Skip to main content

Get Position Info

info
  • Requires Earn permission on the API key.
  • Returns active positions only. Settled positions are not returned.

HTTP Request

GET/v5/earn/advance/position

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct category. DoubleWin
productIdfalsestringFilter by product ID
coinfalsestringFilter by underlying asset, e.g. BTC, ETH
limitfalseintNumber of items per page. Default: 20, Max: 20
cursorfalsestringPagination cursor. Use nextPageCursor from previous response

Response Parameters

ParameterTypeComments
categorystringProduct category. DoubleWin
nextPageCursorstringCursor for the next page. Empty string if no more data
listarrayObject
> positionIdstringPosition ID
> productIdstringProduct ID
> categorystringProduct category
> investCoinstringInvestment coin, e.g. USDT
> underlyingAssetstringUnderlying asset, e.g. BTC, ETH
> amountstringPosition amount in investCoin
> leveragestringLeverage multiplier
> initialPricestringUnderlying asset index price at position creation
> lowerPricestringLower bound of the price range
> upperPricestringUpper bound of the price range
> durationstringProduct term, e.g. 1d, 3d
> settlementTimestringSettlement time, Unix timestamp in ms
> createdTimestringPosition creation time, Unix timestamp in ms
> statusstringActive: holding; Redeeming: early redemption in progress
> redeemableboolWhether the position can be redeemed now. false if a pending redeem order exists or less than 30 minutes remain until settlement
> accountTypestringStaking account: FUND or UNIFIED
> orderIdstringStaking order ID

Request Example

GET /v5/earn/advance/position?category=DoubleWin&productId=20001 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672280218882
X-BAPI-RECV-WINDOW: 5000

Response Example

{
"retCode": 0,
"retMsg": "",
"result": {
"category": "DoubleWin",
"list": [
{
"positionId": "2848",
"productId": "14084",
"category": "DoubleWin",
"investCoin": "USDT",
"underlyingAsset": "BTC",
"amount": "150",
"leverage": "9.3309793178843419",
"initialPrice": "66445.69",
"lowerPrice": "66245.69",
"upperPrice": "66645.69",
"duration": "1d",
"settlementTime": "1775203200000",
"createdTime": "1775107014000",
"status": "Active",
"redeemable": true,
"accountType": "FUND",
"orderId": "05184c23-8a98-456c-a2af-0ef1c45116cc"
}
],
"nextPageCursor": ""
},
"retExtInfo": {},
"time": 1775107714828
}