Getting Started
Public Data
Trading
- POSTPlace order
- DELCancel order
- DELCancel multiple orders
- GETGet order
- GETGet orders
- PUTEdit order
- POSTPlace algo order
- DELCancel algo order
- DELCancel multiple algo orders
- DELCancel all orders by symbol
- GETGet algo order
- GETGet algo orders
- PUTEdit algo order
- GETGet transaction by trade id (last 3 months)
- GETGet transaction history (in the past 2 years)
- GETGet trading fee
- POSTCancel all after
Account
Assets
Futures
Spot Margin
Websocket Streams
- Introduction
- Public Market Data
- Private User Data
- Commands
Private User Data
Position
Copy
{
"topic": "position",
"ts": 1677814655101,
"data":
{
"positions":
[
{
"s": "PERP_BTC_USDT" // symbol
"h": "1", // holding
"plq": "0.0002", // pending long quantity
"psq": "0.0", // pending short quantity
"aop": "0.0", // average open price
"pnl": "-1.55902", // 24h pnl
"roi": "-0.0054" // 24h pnl % change
"fee": "0.218", // 24h fee
"sp": "49000", // last settle price
"mp": "50000", // mark price
"ot": 1677814653001, // opening time
"aq": 1, // adl quantile
"lv": 10, // leverage
"m": "ISOLATED", // margin mode
"ps": "BOTH", // position side
"it": "USDT", // isolated margin token
"ia": "1000", // isolated margin amount
"il": "10", // isolated margin frozen long
"is": "10", // isolated margin frozen short
"ver": 93454, // version
"ts": 1677814653001 // timestamp of actual position update
},
...
]
}
}
Topic: position
Push interval: push on update
Subscribe to position updates. Updates will be sent only when specific events occur, such as order executions, placements, or cancellations. Updates will not be triggered by changes in the mark price.
Copy
{
"topic": "position",
"ts": 1677814655101,
"data":
{
"positions":
[
{
"s": "PERP_BTC_USDT" // symbol
"h": "1", // holding
"plq": "0.0002", // pending long quantity
"psq": "0.0", // pending short quantity
"aop": "0.0", // average open price
"pnl": "-1.55902", // 24h pnl
"roi": "-0.0054" // 24h pnl % change
"fee": "0.218", // 24h fee
"sp": "49000", // last settle price
"mp": "50000", // mark price
"ot": 1677814653001, // opening time
"aq": 1, // adl quantile
"lv": 10, // leverage
"m": "ISOLATED", // margin mode
"ps": "BOTH", // position side
"it": "USDT", // isolated margin token
"ia": "1000", // isolated margin amount
"il": "10", // isolated margin frozen long
"is": "10", // isolated margin frozen short
"ver": 93454, // version
"ts": 1677814653001 // timestamp of actual position update
},
...
]
}
}
Copy
{
"topic": "position",
"ts": 1677814655101,
"data":
{
"positions":
[
{
"s": "PERP_BTC_USDT" // symbol
"h": "1", // holding
"plq": "0.0002", // pending long quantity
"psq": "0.0", // pending short quantity
"aop": "0.0", // average open price
"pnl": "-1.55902", // 24h pnl
"roi": "-0.0054" // 24h pnl % change
"fee": "0.218", // 24h fee
"sp": "49000", // last settle price
"mp": "50000", // mark price
"ot": 1677814653001, // opening time
"aq": 1, // adl quantile
"lv": 10, // leverage
"m": "ISOLATED", // margin mode
"ps": "BOTH", // position side
"it": "USDT", // isolated margin token
"ia": "1000", // isolated margin amount
"il": "10", // isolated margin frozen long
"is": "10", // isolated margin frozen short
"ver": 93454, // version
"ts": 1677814653001 // timestamp of actual position update
},
...
]
}
}
Assistant
Responses are generated using AI and may contain mistakes.