Skip to main content

Get Position Info

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

HTTP Request​

GET/v5/earn/advance/position

Request Parameters​

ParameterRequiredTypeComments
categorytruestringProduct category. DiscountBuy
productIdfalsestringFilter by product ID
coinfalsestringFilter by underlying coin, e.g. USDT
limitfalseintNumber of items per page
cursorfalsestringPagination cursor. Use nextPageCursor from previous response

Response Parameters​

ParameterTypeComments
nextPageCursorstringCursor for the next page. Empty string if no more data
listarrayObject
> positionIdstringPosition ID
> productIdstringProduct ID
> categorystringProduct category. DiscountBuy
> coinstringInvestment coin, e.g. USDT
> underlyingAssetstringUnderlying asset, e.g. BTC, ETH
> amountstringInvestment amount
> purchasePricestringAnchor buy price locked at order time
> knockoutPricestringKnockout price
> knockoutCouponE8stringAnnualized interest rate in e8 precision. Actual rate = knockoutCouponE8 / 1e8
> statusstringPosition status: Active (holding); Settling (settlement in progress)
> orderIdstringAssociated order ID
> durationstringProduct duration, e.g. 7d
> settlementTimestringSettlement time, Unix timestamp in ms
> accountTypestringDeduction account: FUND or UNIFIED
> toAccountTypestringSettlement credit account. Always FUND
> settleTypestringSettlement preference when exercised: Base = receive underlying asset; Quote = receive USDT. Has no effect upon knockout
> expectReceiveAtstringExpected settlement credit time, Unix timestamp in ms. Equal to settlementTime + 15 minutes

Request Example​

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

Response Example​

{
"retCode": 0,
"retMsg": "",
"result": {
"category": "",
"list": [
{
"positionId": "11959",
"productId": "7037",
"category": "DiscountBuy",
"coin": "USDT",
"underlyingAsset": "BTC",
"amount": "200",
"purchasePrice": "74019",
"knockoutPrice": "76050",
"knockoutCouponE8": "1000000",
"status": "Active",
"orderId": "38f6f5ce-57e2-4d69-b4d3-c39464389ccb",
"duration": "1d",
"settlementTime": "1776240000000",
"accountType": "FUND",
"toAccountType": "FUND",
"settleType": "Base",
"expectReceiveAt": "1776240900000"
}
],
"nextPageCursor": ""
},
"retExtInfo": {},
"time": 1776154219022
}