撤銷活動委托單
HTTP 請求
POST /spot/v3/private/cancel-order
請求參數
參數 | 是否必須 | 類型 | 說明 |
---|---|---|---|
orderId | false | string | 訂單ID. 當orderLinkId 為空時, 則必傳 |
orderLinkId | false | string | 用戶自定義ID. 當orderId 為空時, 則必傳 |
orderCategory | false | integer | 訂單類型. 默認為0 :普通訂單; 1 :止盈止損訂單,若是止盈止損則必傳 |
返回參數
參數 | 類型 | 說明 |
---|---|---|
orderId | string | 訂單ID |
orderLinkId | string | 自定義訂單ID,用戶自己生成 |
symbol | string | 幣對名稱 |
status | string | 訂單狀態 |
accountId | string | 賬戶ID |
orderPrice | string | 訂單價格 |
createTime | string | 訂單創建時間 |
orderQty | string | 訂單數量 |
execQty | string | 成交數量 |
timeInForce | string | 執行策略 |
orderType | string | 訂單類型, LIMIT/MARKET/LIMIT_MAKER |
side | string | 買賣方向. BUY :買入, SELL :賣出. |
請求示例
curl --location --request POST 'https://api-testnet.bybit.com/spot/v3/private/cancel-order' \
--header 'X-BAPI-SIGN: XXXXX' \
--header 'X-BAPI-API-KEY: {api key}' \
--header 'X-BAPI-TIMESTAMP: 1659078017415' \
--header 'X-BAPI-RECV-WINDOW: 5000' \
--header 'Content-Type: application/json' \
--data-raw '{
"orderId": "1210810256551063296",
"orderLinkId": null
}'
響應示例
{
"retCode": 0,
"retMsg": "OK",
"result": {
"orderId": "1210810256551063296",
"orderLinkId": "spotA0010",
"symbol": "BTCUSDT",
"status": "NEW",
"accountId": "533287",
"createTime": "1659075830464",
"orderPrice": "23500",
"orderQty": "0.01",
"execQty": "0",
"timeInForce": "GTC",
"orderType": "LIMIT",
"side": "SELL"
},
"retExtMap": {},
"retExtInfo": {},
"time": 1659078151226
}