Classic Account — Spot — Trade
Place Order
Rate limit: 10 requests/second/UID Rate limit: 1 request/second/UID for copy trading traders
Place Order
- API Broker rebate identifier: The following code block needs to be added to the HTTP Header of the request.
"X-CHANNEL-API-CODE":"your-channel-api-code"
Place Order › Request Parameters
symbolTrading pair name, e.g. BTCUSDT
sideOrder Direction
buy: Buy
sell: Sell
orderTypeOrder type
limit: Limit order
market: Market order
forceExecution strategy(It is invalid when orderType is market)
gtc: Normal limit order, good till cancelled
post_only: Post only
fok: Fill or kill
ioc: Immediate or cancel
sizeAmount. For Limit and Market-Sell orders, it represents the number of base coins. For Market-Buy orders, it represents the number of quote coins.
priceLimit price
clientOidCustomed order ID. It's invalid when tpslType is tpsl
triggerPriceSPOT TP/SL trigger price, only required in SPOT TP/SL order
tpslTypeOrder type
normal: SPOT order(default)
tpsl: SPOT TP/SL order
requestTimeRequest Time, Unix millisecond timestamp
receiveWindowValid time window, Unix millisecond timestamp
stpModeSTP Mode(Self Trade Prevention)
none: not setting STP(default)
cancel_taker: cancel taker order
cancel_maker: cancel maker order
cancel_both: cancel both of taker and maker orders
presetTakeProfitPriceTake profit price. It's invalid when tpslType is tpsl
executeTakeProfitPriceTake profit execute price. It's invalid when tpslType is tpsl
presetStopLossPriceStop loss price. It's invalid when tpslType is tpsl
executeStopLossPriceStop loss execute price. It's invalid when tpslType is tpsl
Place Order › Response Parameters
Successful response
codemsgrequestTimeorderIdOrder ID
clientOidCustom order ID
Batch Place Orders
Frequency limit: 5 times/1s (UID) Trader frequency limit: 1 times/1s (UID)
Place Orders in Batch
- API Broker rebate identifier: The following code block needs to be added to the HTTP Header of the request.
"X-CHANNEL-API-CODE":"your-channel-api-code"
Batch Place Orders › Request Parameters
Collection of placing orders,maximum length: 50
batchModeBatch order mode
single single currency mode, default single currency mode
multiple cross-currency mode.
If single mode, the symbol in orderList will be ignored.
If multiple mode, the symbol in orderList is not allowed to be null, and the symbol in orderList is required. The symbol outside orderList will be ignored.
symbolTrading pair name, e.g. BTCUSDT. Used when batchMode is single.
Batch Place Orders › Response Parameters
Successful response
codemsgrequestTimeSuccessful order number
Failed order number
Cancel Order
Frequency limit:10 times/1s (UID)
Cancel Order
Cancel Order › Request Parameters
symbolTrading pair name, e.g. BTCUSDT. It is not required when tpslType is tpsl
tpslTypeorder type, deafult:normal
normal spot order
tpsl spot tpsl order
orderIdOrder ID. Either orderId or clientOid is required. It's required when tpslType is tpsl
clientOidClient Order ID. Either orderId or clientOid is required
Cancel Order › Response Parameters
Successful response
codemsgrequestTimeorderIdOrder ID
clientOidClient Order ID
Batch Cancel Orders
Frequency limit:10 times/1s (UID)
Cancel Orders in Batch
- For batch cancellation (simultaneously revoking multiple orders for the same symbol), it is not permitted to mix the use of orderId and clientOid. The identifiers used must be consistent across all orders in the batch. Otherwise, orders that only submit a clientOid will fail to be cancelled.
Batch Cancel Orders › Request Parameters
Order ID List, maximum length: 50
symbolTrading pair name, e.g. BTCUSDT
batchModeBatch order mode
single single currency mode, default single currency mode
multiple cross-currency mode.
If single mode, the symbol in orderList will be ignored.
If multiple mode, the symbol in orderList is not allowed to be null, and the symbol in orderList is required. The symbol outside orderList will be ignored.
Batch Cancel Orders › Response Parameters
Successful response
codemsgrequestTimeSuccessful order number
Failed order number
Cancel Order by Symbol
Frequency limit: 5 times/1s (UID)
Cancel order by symbol
Cancel Order by Symbol › Response Parameters
Successful response
codemsgrequestTimesymbolCancelled symbol (This request is executed asynchronously. If you need to know the result, please query the Get History Orders endpoint.)
Cancel an Existing Order and Send a New Order
Rate limit: 5 requests/second/UID
Cancel an Existing Order and Send a New Order
- API Broker rebate identifier: The following code block needs to be added to the HTTP Header of the request.
"X-CHANNEL-API-CODE":"your-channel-api-code"
Cancel an Existing Order and Send a New Order › Request Parameters
symbolTrading pair name, e.g. BTCUSDT
priceLimit price
sizeAmount,it represents the number of base coins.
clientOidClient Order ID. Either orderId or clientOid is required
orderIdOrder ID. Either orderId or clientOid is required
newClientOidNew customed order ID. If newClientOid results in idempotency duplication, it may cause the old order to be successfully canceled but the new order placement to fail.
presetTakeProfitPriceTake profit price
executeTakeProfitPriceTake profit execute price
presetStopLossPriceStop loss price
executeStopLossPriceStop loss execute price
Cancel an Existing Order and Send a New Order › Response Parameters
Successful response
codemsgrequestTimeorderIdOrder ID
clientOidClient Order ID
successoperate success
success: success
failure: failure
msgFailure reason
Batch Cancel Existing Order and Send New Orders
Rate limit: 5 requests/second/UID
Cancel an Existing Order and Send a New Order
- API Broker rebate identifier: The following code block needs to be added to the HTTP Header of the request.
"X-CHANNEL-API-CODE":"your-channel-api-code"
Batch Cancel Existing Order and Send New Orders › Request Parameters
Collection of placing orders,maximum length: 50
Batch Cancel Existing Order and Send New Orders › Response Parameters
Successful response
codemsgrequestTimeorderIdOrder ID
clientOidClient Order ID
successoperate success
success: success
failure: failure
msgFailure reason
Get Order Info
Frequency limit: 20 times/1s (UID)
Get Order Info
Request Parameters
orderIdEither Order ID or clientOids is required.
clientOidEither Client customized ID or orderId is required.
requestTimerequest Time Unix millisecond timestamp
receiveWindowvalid window period Unix millisecond timestamp
Get Order Info › Response Parameters
Successful response
codemsgrequestTimeuserIdAccount id
symbolTrading pair name
orderIdOrder ID
clientOidCustomized ID
priceOrder price
sizeAmount. Limit represents the number of base coins. market-buy represents the number of quote coins. market-sell represents the number of base coins.
orderTypeOrder type limit Limit price market Market price
sideDirection
statusOrder status
live: pending match
partially_filled: Partially filled
filled: All filled
cancelled: The order is cancelled
priceAvgFilled price
baseVolumeFilled quantity (base coin)
quoteVolumeTotal trading amount (quote coin)
enterPointSourceClient WEB WEB Client API API Client SYS SYS Client ANDROID ANDROID Client IOS IOS Client
cTimeCreation time, Unix millisecond timestamp, e.g. 1690196141868
uTimeUpdate time, Unix millisecond timestamp, e.g. 1690196141868
orderSourceOrder source normal Normal order market Market order spot_trader_buy Elite spot trade to buy (elite traders) spot_follower_buy Copy trade to buy (followers) spot_trader_sell Elite spot trade to sell (elite traders) spot_follower_sell Copy trade to sell (followers)
feeDetailTransaction fee breakdown
newFees: Fee details for "newFees".
c: Amount deducted by coupons, unit: currency obtained from the transaction. d: Amount deducted in BGB (Bitget Coin), unit: BGB r: If the BGB balance is insufficient to cover the fees, the remaining amount is deducted from the currency obtained from the transaction. t: The total fee amount to be paid, unit: currency obtained from the transaction. deduction: Ignore. totalDeductionFee: Ignore. BGB: (Ignore) If there is no "newFees" field, this data represents earlier historical data. This key represents the currency used for fee deduction (it is not fixed; if BGB deduction is enabled, it's BGB, otherwise, it's the currency obtained from the transaction). deduction: Whether there is a fee deduction. feeCoinCode: Transaction fee coin code totalDeductionFee: Deduction amount unit: BGB totalFee: The total fee amount to be paid, unit: currency obtained from the transaction.
tpslTypenormal: spot order
tpsl: spot tpsl order
triggerPriceSpot tpsl trigger price (Only valid when tpslType is tpsl)
quoteCoinQuote coin
baseCoinBase coin
cancelReasonCancel reason
normal_cancel: Normal cancel
stp_cancel: Cancelled by STP
executionTypeExecution type
exchange: exchange
Get Current Orders
Frequency limit: 20 times/1s (UID)
Get Unfilled Orders
Request Parameters
symbolTrading pair
startTimeThe record start time for the query. Unix millisecond timestamp, e.g. 1690196141868 (Only queries for data from the past 90 days are allowed.)
endTimeThe end time of the record for the query. Unix millisecond timestamp, e.g. 1690196141868 (The startTime and endTime should be within 90 days.)
idLessThanRequests the content on the page before this ID (older data), the value input should be the orderId of the corresponding interface.
limitLimit number default 100 max 100
orderIdOrderId
tpslTypeorder type deafult normal
normal spot order
tpsl spot tpsl order
requestTimerequest Time Unix millisecond timestamp
receiveWindowvalid window period Unix millisecond timestamp
Get Current Orders › Response Parameters
Successful response
codemsgrequestTimeuserIdUser id
symbolTrading pair name
orderIdOrder ID
clientOidClient order ID
priceAvgOrder price
sizeAmount. (orderType = limit means base coin; orderType = market means quote coin)
orderTypeOrder type limit Limit price market Market price
sideDirection
statusOrder status
live:unfilled;
partially_filled:partially filled;
filled:filled;
cancelled:cancelled;
basePriceFilled price
baseVolumeFilled volume in base coin
quoteVolumeFilled volume in quote coin
enterPointSourceClient type WEB WEB Client APP APP Client API API Client SYS SYS Client ANDROID ANDROID Client IOS IOS Client
orderSourceOrder source normal: Normal order market: Market order spot_trader_buy: Elite spot trade to buy (elite traders) spot_follower_buy: Copy trade to buy (followers) spot_trader_sell: Elite spot trade to sell (elite traders) spot_follower_sell: Copy trade to sell (followers) strategy_oco_limit: OCO orders
triggerPricespot tpsl trigger price(Only valid when tpslType is tpsl)
tpslTypenormal spot order
tpsl spot tpsl order
presetTakeProfitPriceTake profit trigger price
executeTakeProfitPriceTake profit execute price(If the value is empty, it means take profit in market price)
presetStopLossPriceStop loss trigger price
executeStopLossPriceStop loss execute price(If the value is empty, it means stop loss in market price)
cTimeCreation time, Unix millisecond timestamp, e.g. 1690196141868
uTimeUpdate time, Unix millisecond timestamp, e.g. 1690196141868
forceExecution strategy
gtc: Normal limit order, good till cancelled
post_only: Post only
fok: Fill or kill
ioc: Immediate or cancel
executionTypeExecution type
exchange: exchange
Get History Orders
Frequency limit: 20 times/1s (UID)
Get History Orders(It only supports to get the data within 90days. The older data can be downloaded from web)
Request Parameters
symbolTrading pair
startTimeThe record start time for the query. Unix millisecond timestamp, e.g. 1690196141868. (For Managed Sub-Account, the StartTime cannot be earlier than the binding time)
endTimeThe end time of the record for the query. Unix millisecond timestamp, e.g. 1690196141868
idLessThanRequests the content on the page before this ID (older data), the value input should be the orderId of the corresponding interface.
limitLimit number default 100 max 100
orderIdOrderId
tpslTypeorder type deafult normal
normal spot order
tpsl spot tpsl order
requestTimerequest Time Unix millisecond timestamp
receiveWindowvalid window period Unix millisecond timestamp
Get History Orders › Response Parameters
Successful response
codemsgrequestTimeuserIdUser id
symbolTrading pair name
orderIdOrder ID
clientOidClient Order ID
priceOrder price
sizeAmount (orderType = limit means base coin; orderType = market means quote coin)
orderTypeOrder type limit Limit price market Market price
sideDirection
statusOrder status
live:unfilled;
partially_filled:partially filled;
filled:filled;
cancelled:cancelled;
priceAvgAverage fill price
baseVolumeFilled volume (base coin)
quoteVolumeFilled volume (quote coin)
enterPointSourceClient WEB WEB Client APP APP Client API API Client SYS SYS Client ANDROID ANDROID Client IOS IOS Client
orderSourceOrder source normal Normal order market Market order spot_trader_buy Elite spot trade to buy (elite traders) spot_follower_buy Copy trade to buy (followers) spot_trader_sell Elite spot trade to sell (elite traders) spot_follower_sell Copy trade to sell (followers)
cTimeCreation time, Unix millisecond timestamp, e.g. 1690196141868
uTimeUpdate time, Unix millisecond timestamp, e.g. 1690196141868
feeDetailFee details. If there is a "newFees" field, then "newFees" represents the fee details. If not, the remaining information is the fee details.
newFees: Fee details for "newFees".
c: Amount deducted by coupons, unit: currency obtained from the transaction. d: Amount deducted in BGB (Bitget Coin), unit: BGB r: If the BGB balance is insufficient to cover the fees, the remaining amount is deducted from the currency obtained from the transaction. t: The total fee amount to be paid, unit: currency obtained from the transaction. deduction: Ignore. totalDeductionFee: Ignore. BGB: If there is no "newFees" field, this data represents earlier historical data. This key represents the currency used for fee deduction (it is not fixed; if BGB deduction is enabled, it's BGB, otherwise, it's the currency obtained from the transaction). deduction: Whether there is a fee deduction. feeCoinCode: Transaction fee coin code totalDeductionFee: Deduction amount unit: BGB totalFee: The total fee amount to be paid, unit: currency obtained from the transaction.
triggerPricespot tpsl trigger price
tpslTypenormal spot order
tpsl spot tpsl order
cancelReasonCancel reason
normal_cancel: Normal cancel
stp_cancel: Cancelled by STP
quoteCoinQuote coin
baseCoinBase coin
executionTypeExecution type
exchange: exchange
Get Fills
Frequency limit:10 times/1s (UID) Trader frequency limit: 1 times/1s (UID)
Get Fills(It only supports to get the data within 90days.The older data can be downloaded from web)
Request Parameters
symbolTrading pair name
orderIdOrder ID
startTimeThe start time of the orders, i.e. to get orders after that timestamp. Unix millisecond timestamp, e.g. 1690196141868. (For Managed Sub-Account, the StartTime cannot be earlier than the binding time)
endTimeThe end time of a fulfilled order, i.e., get orders prior to that timestamp. Unix millisecond timestamp, e.g. 1690196141868. The interval between startTime and endTime must not exceed 90 days.
limitNumber of results returned: Default: 100, max 100
idLessThanRequests the content on the page before this ID (older data), the value input should be the tradeId of the corresponding interface.
Get Fills › Response Parameters
Successful response
codemsgrequestTimeuserIdAccount ID
symbolTrading pair name
orderIdOrder ID
tradeIdTransaction id
orderTypeOrder type
sideOrder direction
priceAvgFilled price
sizeFilled quantity
amountTotal trading amount
cTimeCreation time, Unix second timestamp, e.g. 1622697148
uTimeUpdate time, Unix second timestamp, e.g. 1622697148
tradeScopeTrader tag taker Taker maker Maker
Transaction fee breakdown
