Order Channel
Description
Subscribe the order channel
Data will be pushed when the following events occured:
- Open/Close orders are created
- Open/Close orders are filled
- Orders canceled
Request Example
{
"op": "subscribe",
"args": [
{
"instType": "USDT-FUTURES",
"channel": "orders",
"instId": "default"
}
]
}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| op | String | Yes | Operation, subscribe unsubscribe |
| args | List<Object> | Yes | List of channels to request subscription |
| > channel | String | Yes | Channel name: orders |
| > instType | String | Yes | Product typeUSDT-FUTURES USDT professional futuresCOIN-FUTURES Mixed futuresUSDC-FUTURES USDC professional futuresSUSDT-FUTURES USDT professional futures demoSCOIN-FUTURES Mixed futures demoSUSDC-FUTURES USDC professional futures demo |
| > instId | String | No | Trading pair For settled Futures, it only supports default |
Response Example
{
"event": "subscribe",
"arg": {
"instType": "USDT-FUTURES",
"channel": "orders",
"instId": "default"
}
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| event | String | Event |
| arg | Object | Subscribed channels |
| > channel | String | Channel name: orders |
| > instType | String | Product typeUSDT-FUTURES USDT professional futuresCOIN-FUTURES Mixed futuresUSDC-FUTURES USDC professional futuresSUSDT-FUTURES USDT professional futures demoSCOIN-FUTURES Mixed futures demoSUSDC-FUTURES USDC professional futures demo |
| > instId | String | Product ID |
| code | String | Error code |
| msg | String | Error 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
| Parameter | Type | Description |
|---|---|---|
| arg | Object | Channels with successful subscription |
| > channel | String | Channel name: orders |
| > instType | String | Product typeUSDT-FUTURES USDT professional futuresCOIN-FUTURES Mixed futuresUSDC-FUTURES USDC professional futuresSUSDT-FUTURES USDT professional futures demoSCOIN-FUTURES Mixed futures demoSUSDC-FUTURES USDC professional futures demo |
| > instId | String | Product ID delivery contract reference:https://www.cointr.com/api-doc/common/release-note |
| data | List<Object> | Subscription data |
| > orderId | String | Order ID |
| > clientOId | String | Customized order ID |
| > price | String | Order price |
| > size | String | Original order amount in coin |
| > posMode | String | Hold Mode |
| > enterPointSource | String | Order 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 |
| > tradeSide | String | Trade Side trading direction |
| > notionalUsd | String | Estimated USD value of orders |
| > orderType | String | Order type limit: limit order market |
| > force | String | Order validity period |
| > side | String | Order direction |
| > posSide | String | Position direction |
| > marginMode | String | Trading model margin model |
| > marginCoin | String | Margin coin |
| > fillPrice | String | Latest filled price |
| > tradeId | String | Latest transaction ID |
| > baseVolume | String | Number of latest filled orders |
| > fillTime | String | Latest transaction time. Unix millisecond timestamp, e.g. 1690196141868 |
| > fillFee | String | Transaction fee of the latest transaction, negative value |
| > fillFeeCoin | String | Currency of transaction fee of the latest transaction |
| > tradeScope | String | The liquidity direction of the latest transaction T: taker M maker |
| > accBaseVolume | String | Total filled quantity |
| > fillNotionalUsd | String | USD value of filled orders |
| > priceAvg | String | Average filled price. If the filled orders are 0, the field is 0; if the order is not filled, the field is also 0. |
| > status | String | Order status live: New order, waiting for a match in orderbook partially_filled: Partially filled filled: All filled canceled: the order is cancelled |
| > leverage | String | Leverage |
| > feeDetail | List<Object> | Transaction fee of the order |
| >> feeCoin | String | The currency of the transaction fee. The margin is charged. |
| >> fee | String | Order transaction fee, the transaction fee charged by the platform from the user. |
| > pnl | String | Profit |
| > uTime | String | Order update time, Milliseconds format of updated data timestamp Unix, e.g. 1597026383085 |
| > cTime | String | Order creation time, milliseconds format of Unix timestamp, e.g.1597026383085 |
| > reduceOnly | String | Is reduceOnly reduce-only or not |
| > presetStopSurplusPrice | String | Set TP price |
| > presetStopLossPrice | String | Set SL price |
| > stpMode | String | STP Mode none not setting STP cancel_taker cancel taker order cancel_maker cancel maker order cancel_both cancel both of taker and maker orders |