Bitget APIBitget API
UTAClassic
Legacy Doc
  • Overview
  • API Documentation
  • WebSocket
  • Agent Hub
  • SDK
  • Changelog
Copied to clipboard
Websocket
Introduction
Futures
Spot
    Public
    Private
      Account ChannelFill ChannelOrder ChannelTrigger Order ChannelPlace Order ChannelCancel Order Channel
Margin
Private

Order Channel

Description

Get order information. Initial subscriptions will not trigger any push notifications.

Data will be pushed when the following events occurred:

  1. Place orders
  2. Orders are filled
  3. Cancel orders
  4. Modify orders
Code
{ "op": "subscribe", "args": [ { "instType": "SPOT", "channel": "orders", "instId": "BTCUSDT" } ] }

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation, subscribe unsubscribe
argsList<Object>YesList of channels to request subscription
> instTypeStringYesProduct line type
> channelStringYesChannel name
> instIdStringYesProduct ID, e.g. ETHUSDT
default all symbols
Code
{ "event": "subscribe", "arg": { "instType": "SPOT", "channel": "orders", "instId": "BTCUSDT" } }

Response Parameters

ParameterTypeDescription
eventStringYes
Event
argObjectSubscribed channels
> instTypeStringProduct type
> channelStringChannel name
> instIdStringProduct ID, e.g. ETHUSDT
codeStringError code, returned only on error
msgStringError message
Code
{ "action": "snapshot", "arg": { "instType": "SPOT", "channel": "orders", "instId": "BTCUSDT" }, "data": [ { "instId": "BTCUSDT", "orderId": "1", "clientOid": "1", "size": "8.0000", "newSize": "500.0000", "notional": "8.000000", "orderType": "market", "force": "gtc", "side": "buy", "fillPrice": "26256.0", "tradeId": "1", "baseVolume": "0.0003", "fillTime": "1695797773286", "fillFee": "-0.00000018", "fillFeeCoin": "BTC", "tradeScope": "T", "accBaseVolume": "0.0003", "priceAvg": "26256.0", "status": "partially_filled", "cTime": "1695797773257", "uTime": "1695797773326", "stpMode": "cancel_taker", "feeDetail": [ { "feeCoin": "BTC", "fee": "-0.00000018" } ], "enterPointSource": "WEB" } ], "ts": 1695797773370 }

Push Parameters

ParameterTypeDescription
argObjectChannels with successful subscription
> instTypeStringProduct type
> channelStringChannel name
> instIdStringYes
actionStringPush data action, snapshot or update
dataList<Object>Subscription data
> instIdStringProduct ID, e.g. ETHUSDT
> orderIdStringOrder ID
> clientOidStringCustomized order ID
> priceStringOrder price
> sizeStringOrder amount
when side=buy, it represents the amount of quote coin;
when side=sell, it represents the amount of base coin.
> newSizeStringnewSize represents the order quantity, following the specified rules:
when orderType=limit, newSize represents the quantity of base coin,
when orderType=marketandside=buy, newSize represents the quantity of quote coin,
when orderType=marketandside=sell, newSize represents the quantity of base coin.
> notionalStringBuy amount, returned when buying at market price
> ordTypeStringOrder type, market: market order. Limit: limit order
> forceStringOrder validity, GTC: normal limit order, good till canceled. post_only Post only. FOK: Fill or kill. IOC: Immediate or cancel.
> sideStringOrder direction
> fillPriceStringLatest filled price
> tradeIdStringLatest transaction ID
> baseVolumeStringNumber of latest filled orders
> fillTimeStringLatest transaction time
> fillFeeStringTransaction fee of the latest transaction, negative value
> fillFeeCoinStringCurrency of transaction fee of the latest transaction
> tradeScopeStringDirection of liquidity of the latest transaction
T;
M;
> accBaseVolumeStringTotal filled quantity
> priceAvgStringTotal average filled price. If the filled orders are 0, the field is 0.
> statusStringOrder status
live order;
partially_filled filled;
filled filled;
cancelled: cancelled;
> enterPointSourceStringOrder source
> feeDetailList<Object>transaction fee list
>> feeCoinStringTransaction fee currency
>> feeStringOrder transaction fee, the transaction fee charged by the platform from the user.
> cTimeStringOrder creation time, milliseconds format of Unix timestamp, e.g.1630410492847
> uTimeStringOrder Update time, milliseconds format of Unix timestamp, e.g.1630410492847
> 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
Fill ChannelTrigger Order Channel
JSON
JSON
JSON