position#
WS wss://api.pro.anboto.xyz/api/v2/ws
Channel for subscribing to account position updates for a specific exchange
Authenticate the connection with a listenKey — see WebSocket.
Subscribe message#
topic string requiredpositionexchange string requiredTrading exchange, case-insensitive
method enum requiredsubscribe / unsubscribeUpdate message fields#
collateral decimalCollateral amount for the position
contracts decimalNumber of contracts
entryPrice decimalAverage entry price
leverage decimalPosition leverage
liquidationPrice decimalLiquidation price
marginMode enumMargin mode for the position —
CROSS, ISOLATEDmarkPrice decimalCurrent mark price
notional decimalNotional value of the position
side enumPosition side —
LONG, SHORT, BOTHsymbol string requiredTrading symbol
timestamp integer requiredUnix timestamp in milliseconds
unrealizedPnl decimalUnrealized profit and loss
instrument InstrumentTrading instrument details
instrument.assetClass enumAsset class of the instrument —
UNDEFINED, SPOT, FUTURE, OPTION, CFDinstrument.assetId stringUnique asset identifier
instrument.baseAsset stringBase asset symbol
instrument.contractSize numberContract size
instrument.enabled boolean requiredWhether the instrument is enabled for trading
instrument.exchangeAssetClass stringExchange-specific asset class
instrument.exchangeSymbol stringSymbol as used on the exchange
instrument.maxCostLimit numberMaximum cost limit
instrument.maxMarketLimit numberMaximum market order limit
instrument.maxPriceLimit numberMaximum price limit
instrument.maxQuantityLimit numberMaximum quantity limit
instrument.minCostLimit numberMinimum cost limit
instrument.minMarketLimit numberMinimum market order limit
instrument.minPriceLimit numberMinimum price limit
instrument.minQuantityLimit numberMinimum quantity limit
instrument.pricePrecision integerPrice decimal precision
instrument.priceSignificantFigure integerPrice significant figures
instrument.quantityPrecision integerQuantity decimal precision
instrument.quantitySignificantFigure integerQuantity significant figures
instrument.quoteAsset stringQuote asset symbol
instrument.symbol stringInstrument symbol
instrument.timestamp date-timeLast update timestamp
Responses#
| code 0 | Acknowledgment of successful subscription |
| code ≠ 0 | Error response for failed subscription — see Errors |
{
"topic": "position",
"exchange": "BINANCE",
"method": "subscribe"
}
{
"topic": "position",
"exchange": "BINANCE",
"method": "unsubscribe"
}
Update position
{
"collateral": "50000.00",
"contracts": "2.5",
"entryPrice": "45000.00",
"leverage": "10.0",
"liquidationPrice": "40500.00",
"marginMode": "CROSS",
"markPrice": "46000.00",
"notional": "115000.00",
"side": "LONG",
"symbol": "BTC-USDT",
"timestamp": 1708840800000,
"unrealizedPnl": "2500.00",
"instrument": {
"assetClass": "FUTURE",
"symbol": "BTC-USDT",
"baseAsset": "BTC",
"quoteAsset": "USDT"
}
}
Ack code 0
{
"code": 0,
"message": "string"
}