Skip to main content

Order Channel

Description

Subscribe the order channel

Data will be pushed when the following events occured:

  1. Open/Close orders are created
  2. Open/Close orders are filled
  3. Orders canceled
Request Example
{
"op": "subscribe",
"args": [
{
"instType": "USDT-FUTURES",
"channel": "orders",
"instId": "default"
}
]
}

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation, subscribe unsubscribe
argsList<Object>YesList of channels to request subscription
> channelStringYesChannel name: orders
> instTypeStringYesProduct type
USDT-FUTURES USDT professional futures
COIN-FUTURES Mixed futures
USDC-FUTURES USDC professional futures
SUSDT-FUTURES USDT professional futures demo
SCOIN-FUTURES Mixed futures demo
SUSDC-FUTURES USDC professional futures demo
> instIdStringNoTrading pair, e.g. BTCUSDT
default: All trading pairs
For settled Futures, it only supports default
Response Example
{
"event": "subscribe",
"arg": {
"instType": "USDT-FUTURES",
"channel": "orders",
"instId": "default"
}
}

Response Parameters

ParameterTypeDescription
eventStringEvent
argObjectSubscribed channels
> channelStringChannel name: orders
> instTypeStringProduct type
USDT-FUTURES USDT professional futures
COIN-FUTURES Mixed futures
USDC-FUTURES USDC professional futures
SUSDT-FUTURES USDT professional futures demo
SCOIN-FUTURES Mixed futures demo
SUSDC-FUTURES USDC professional futures demo
> instIdStringProduct ID
codeStringError code
msgStringError message
Push Data
{
"action": "snapshot",
"arg": {
"instType": "USDT-FUTURES",
"channel": "orders",
"instId": "default"
},
"data": [
{
"accBaseVolume": "0.01",
"cTime": "1695718781129",
"clientOId": "1",
"feeDetail": [
{
"feeCoin": "USDT",
"fee": "-0.162003"
}
],
"fillFee": "-0.162003",
"fillFeeCoin": "USDT",
"fillNotionalUsd": "270.005",
"fillPrice": "27000.5",
"baseVolume": "0.01",
"fillTime": "1695718781146",
"force": "gtc",
"instId": "BTCUSDT",
"leverage": "20",
"marginCoin": "USDT",
"marginMode": "crossed",
"notionalUsd": "270",
"orderId": "1",
"orderType": "market",
"pnl": "0",
"posMode": "hedge_mode",
"posSide": "long",
"price": "0",
"priceAvg": "27000.5",
"reduceOnly": "no",
"stpMode": "cancel_taker",
"side": "buy",
"size": "0.01",
"enterPointSource": "WEB",
"status": "filled",
"tradeScope": "T",
"tradeId": "1111111111",
"tradeSide": "open",
"uTime": "1695718781146"
}
],
"ts": 1695718781206
}

Push Parameters

ParameterTypeDescription
argObjectChannels with successful subscription
> channelStringChannel name: orders
> instTypeStringProduct type
USDT-FUTURES USDT professional futures
COIN-FUTURES Mixed futures
USDC-FUTURES USDC professional futures
SUSDT-FUTURES USDT professional futures demo
SCOIN-FUTURES Mixed futures demo
SUSDC-FUTURES USDC professional futures demo
> instIdStringProduct ID
delivery contract reference:https://www.bitget.com/api-doc/common/release-note
dataList<Object>Subscription data
> orderIdStringOrder ID
> clientOIdStringCustomized order ID
> priceStringOrder price
> sizeStringOriginal order amount in coin
> posModeStringPosition Mode
one_way_mode:one-way mode
hedge-mode: hedge mode
> enterPointSourceStringOrder source
WEB: Orders created on the website
API: Orders created on API
SYS: System managed orders, usually generated by forced liquidation logic
ANDROID: Orders created on the Android app
IOS: Orders created on the iOS app
> tradeSideStringTrade Side trading direction
> notionalUsdStringEstimated USD value of orders
> orderTypeStringOrder type
limit: limit order
market: market order
> forceStringOrder validity period
> sideStringOrder direction
> posSideStringPosition direction
long: hedge-mode, long position
short: hedge-mode, short position
net: one-way-mode position
> marginModeStringMargin mode
crossed: crossed mode
isolated: isolated mode
> marginCoinStringMargin coin
> fillPriceStringLatest filled price
> tradeIdStringLatest transaction ID
> baseVolumeStringNumber of latest filled orders
> fillTimeStringLatest transaction time. Unix millisecond timestamp, e.g. 1690196141868
> fillFeeStringTransaction fee of the latest transaction, negative value
> fillFeeCoinStringCurrency of transaction fee of the latest transaction
> tradeScopeStringThe liquidity direction of the latest transaction T: taker M maker
> accBaseVolumeStringTotal filled quantity
> fillNotionalUsdStringUSD value of filled orders
> priceAvgStringAverage filled price
If the filled size is 0, the field is 0; if the order is not filled, the field is also 0; This field will not be pushed if the order is cancelled
> statusStringOrder status
live: New order, waiting for a match in orderbook
partially_filled: Partially filled
filled: All filled
canceled: the order is cancelled
> leverageStringLeverage
> feeDetailList<Object>Transaction fee of the order
>> feeCoinStringThe currency of the transaction fee. The margin is charged.
>> feeStringOrder transaction fee, the transaction fee charged by the platform from the user.
> pnlStringProfit
> uTimeStringOrder update time, Milliseconds format of updated data timestamp Unix, e.g. 1597026383085
> cTimeStringOrder creation time, milliseconds format of Unix timestamp, e.g.1597026383085
> reduceOnlyStringReduce-only
yes: Yes
no: No
> presetStopSurplusPriceStringSet TP price
> presetStopLossPriceStringSet SL price
> stpModeStringSTP Mode
none not setting STP
cancel_taker cancel taker order
cancel_maker cancel maker order
cancel_both cancel both of taker and maker orders

How was your Reading Experience with us?