Bitget position
The positions of the unified trading account. Bitget says data is pushed on first subscribing, and then incrementally when futures positions are opened or closed and when orders that close a position are placed, changed or cancelled.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
This is a subscription of the Bitget WebSocket API, not an HTTP endpoint. It has no method and no path: it is sent as JSON over an open WebSocket connection.
The message
- Name
- position
- Direction
- Subscription, opened by the client and then fed by the server
- Subscribed to as
- position
- Carried by
- WebSocket. This channel is in the private section of Bitget's WebSocket documentation, so the connection has to send login first. The addresses are the ones on Bitget's quick start page (bitget.com/docs/uta/quick-start), opened the same day, which also lists VIP and low latency hosts.
- Private channel
- wss://ws.bitget.com/v3/ws/private
- Private channel, demo trading
- wss://wspap.bitget.com/v3/ws/private
Fields
The vendor's page does not say which of these fields are required or always present.
| Name | Type | Description |
|---|---|---|
| op | String | subscribe to start the channel, unsubscribe to stop it. |
| args | List<Object> | The channels to act on. Each entry names one. |
| args[].instType | String | Always UTA, for the unified trading account. |
| args[].topic | String | Always position. |
What arrives
position: A message with the event subscribe and the same arg confirms the subscription, with a connId for the connection. On an error the event is error, with a code and a msg. Data then arrives as below. The page's table holds a few more fields: marginRate, openFeeTotal, closeFeeTotal, breakEvenPrice, profitRate, totalFundingFee and cashDividend.
The vendor's page does not say which of these fields are required or always present.
| Name | Type | Description |
|---|---|---|
| arg | Object | The channel the data belongs to: the instType, the topic and, on a public channel, the symbol that were subscribed to. |
| action | String | snapshot for full data, update for incremental data. |
| data | List<Object> | The positions. |
| data[].symbol | String | The symbol. |
| data[].marginCoin | String | The margin coin. |
| data[].marginSize | String | The size of the margin. |
| data[].marginMode | String | crossed for cross margin, isolated for isolated margin. |
| data[].posSide | String | The side of the position: long or short. |
| data[].holdMode | String | one_way_mode or hedge_mode. |
| data[].positionStatus | String | opening while the position is ongoing, ended once it is complete. |
| data[].size | String | The size of the position: available plus frozen. |
| data[].available | String | The size available. |
| data[].frozen | String | The size frozen. |
| data[].avgPrice | String | The average opening price. |
| data[].leverage | String | The leverage. |
| data[].curRealisedPnl | String | The realised profit and loss. |
| data[].unrealisedPnl | String | The unrealised profit and loss. |
| data[].liqPrice | String | The estimated liquidation price. |
| data[].mmr | String | The maintenance margin rate. |
| data[].markPrice | String | The mark price. |
| data[].createdTime | String | When the position was created, as Unix time in milliseconds. |
| data[].updatedTime | String | When the position was last updated, as Unix time in milliseconds. |
Sample
Written by this site from the fields recorded on this page. It has not been run against a terminal, a server or an account, and the values in it are placeholders. No credential is typed into it: where a field holds one, the placeholder says where it comes from. Nothing is entered on this site.
{
"op": "subscribe",
"args": [
{
"instType": "UTA",
"topic": "position"
}
]
}Limits that apply at Bitget
| Limit | Value | Scope | Source |
|---|---|---|---|
| Public market data, legacy v1 API | 20 per 2 s per IP, public market data | Per IP address, public market data endpoints of the legacy v1 API | bitgetlimited.github.iochecked |
| Overall requests a minute | 6,000 | Per IP address, all requests to the common domain name, with REST and WebSocket sharing one allowance | bitget.comchecked |
| Concurrent WebSocket connections | 100 | Per IP address | bitget.comchecked |
| WebSocket messages a second | 10 | Per WebSocket connection, counting ping, login, subscribe and unsubscribe messages | bitget.comchecked |
| WebSocket subscription requests an hour | 240 | Per WebSocket connection | bitget.comchecked |
| Concurrent WebSocket channel subscriptions | 1,000 | Per WebSocket connection | bitget.comchecked |