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

Fill Channel

Data will be pushed when order filled.

Description

Trade details channel

Data will be pushed when order filled.

Code
{ "op": "subscribe", "args": [ { "instType": "USDT-FUTURES", "channel": "fill", "instId": "default" } ] }

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation, subscribe unsubscribe
argsList<Object>YesList of channels to request subscription
> channelStringYesChannel name: fill
> instTypeStringYesProduct type
USDT-FUTURES USDT-M Futures
COIN-FUTURES Coin-M Futures
USDC-FUTURES USDC-M Futures
> instIdStringNoProduct ID or default,
delivery contract reference:https://www.bitget.com/api-doc/common/release-note#optimization-of-delivery-futures
Code
{ "event": "subscribe", "arg": { "instType": "USDT-FUTURES", "channel": "fill", "instId": "default" } }

Response Parameters

ParameterTypeDescription
eventStringEvent
argObjectSubscribed channels
> channelStringChannel name: fill
> instTypeStringProduct type
USDT-FUTURES USDT-M Futures
COIN-FUTURES Coin-M Futures
USDC-FUTURES USDC-M Futures
> instIdStringProduct ID or default
delivery contract reference:https://www.bitget.com/api-doc/common/release-note#optimization-of-delivery-futures
codeStringError code
msgStringError message
Code
{ "action":"snapshot", "arg":{ "instType":"USDT-FUTURES", "channel":"fill", "instId":"default" }, "data":[ { "orderId":"111", "clientOid":"111", "tradeId":"222", "symbol":"BTCUSDT", "side":"buy", "orderType":"market", "posMode":"one_way_mode", "price":"51000.5", "baseVolume":"0.01", "quoteVolume":"510.005", "profit":"0", "tradeSide":"open", "tradeScope":"taker", "feeDetail":[ { "feeCoin":"USDT", "deduction":"no", "totalDeductionFee":"0", "totalFee":"-0.183717" } ], "cTime":"1703577336606", "uTime":"1703577336606" } ], "ts":1703577336700 }

Push Parameters

ParameterTypeDescription
actionStringsnapshot
argObjectChannels with successful subscription
> channelStringChannel name: fill
> instTypeStringProduct type
USDT-FUTURES USDT-M Futures
COIN-FUTURES Coin-M Futures
USDC-FUTURES USDC-M Futures
> instIdStringProduct ID or default
delivery contract reference:https://www.bitget.com/api-doc/common/release-note#optimization-of-delivery-futures
dataList<Object>Subscription data
> orderIdStringOrder ID
> clientOidStringCustomize order ID
> tradeIdStringTrade ID
> symbolStringSymbol Name
> sideStringTrade direction
buy: Buy
sell: Sell
Please note, for this channel, in hedge position mode, Open Long and Close Short, the "side" will be buy; Close Long and Open Short, the "side" will be sell
> orderTypeStringOrder type
limit limit order
market market order
> posModeStringHold Mode
one_way_mode
hedge_mode
> priceStringOrder price
> baseVolumeStringAmount of base coin
> quoteVolumeStringAmount of denomination coin
> profitStringRealized PnL
> tradeSideStringTrade type
close: Close (open and close mode)
open: Open (open and close mode)
reduce_close_long: Liquidate partial long positions for hedge position mode
reduce_close_short:Liquidate partial short positions for hedge position mode
burst_close_long:Liquidate long positions for hedge position mode
burst_close_short:Liquidate short positions for hedge position mode
offset_close_long:Liquidate partial long positions for netting for hedge position mode
offset_close_short:Liquidate partial short positions for netting for hedge position mode
delivery_close_long:Delivery long positions for hedge position mode
delivery_close_short:Delivery short positions for hedge position mode
dte_sys_adl_close_long:ADL close long position for hedge position mode
dte_sys_adl_close_short:ADL close short position for hedge position mode
buy_single:Buy, one way postion mode
sell_single:Sell, one way postion mode
reduce_buy_single:Liquidate partial positions, buy, one way position mode
reduce_sell_single:Liquidate partial positions, sell, one way position mode
burst_buy_single:Liquidate short positions, buy, one way postion mode
burst_sell_single:Liquidate partial positions, sell, one way position mode
delivery_sell_single:Delivery sell, one way position mode
delivery_buy_single:Delivery buy, one way position mode
dte_sys_adl_buy_in_single_side_mode:ADL close position, buy, one way position mode
dte_sys_adl_sell_in_single_side_mode:ADL close position, sell, one way position mode
> tradeScopeStringThe liquidity direction
taker
maker
> feeDetailList<Object>Transaction fee of the order
  >> deductionStringdeduction
yes
no
  >> totalDeductionFeeStringFee of deduction
  >> totalFeeStringFee of all
  >> feeCoinStringCurrency of transaction fee
> cTimeStringCreate Time,milliseconds format of Unix timestamp, e.g.1597026383085
> uTimeStringUpdate Time,milliseconds format of Unix timestamp, e.g.1597026383085
Equity ChannelPosition Channel
JSON
JSON
JSON