Bitget APIBitget API
UTAClassic
Legacy Doc
  • Overview
  • API Documentation
  • WebSocket
  • Agent Hub
  • SDK
  • Changelog
Copied to clipboard
Websocket
Introduction
Futures
Spot
Margin
    Cross
      Public
        Margin Index Price
      Private
    Isolated
Public

Margin Index Price

Description

Subscribe margin trading pair index price

Code
{ "args":[ { "channel":"index-price", "instType":"MARGIN", "instId":"default" } ], "op":"subscribe" }

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation
subscribe Subscribe
unsubscribe Unsubscribe
argsList<Object>YesList of channels to request subscription
> instTypeStringYesProduct type: MARGIN
> channelStringYesChannel name
> instIdStringYesProduct ID
Only support: default(all symbols)
Code
{ "event":"subscribe", "arg":{ "instType":"MARGIN", "channel":"index-price", "instId":"default" } }

Response Parameters

ParameterTypeDescription
eventStringEvent
argObjectSubscribed channels
> instTypeStringProduct type: MARGIN
> channelStringChannel name
> instIdStringProduct ID
default
codeStringError code, returned only on error
msgStringError message
Code
{ "action":"snapshot", "arg":{ "instType":"MARGIN", "channel":"index-price", "instId":"default" }, "data":[ { "symbol":"BTCUSDT", "baseCoin":"BTC", "quoteCoin":"USDT", "indexPrice":"25702.4", "ts":"1695880514609" } ], "ts":1695880514622 }

Push Parameters

ParameterTypeDescription
argObjectChannels with successful subscription
> instTypeStringProduct type: MARGIN
> channelStringChannel name
> instIdStringProduct ID
actionStringPush data action, snapshot or update
dataList<Object>Subscribed data
> baseCoinStringBase currency
> indexPriceStringIndex price
> quoteCoinStringQuote currency
> symbolStringTrading pair
> tsStringData generation time, Unix millisecond timestamp
tsLongPush timestamp, Unix millisecond timestamp
Cancel Order ChannelCross-Margin Account Channel
JSON
JSON
JSON