Skip to main content

Get Order Info

info
  • Requires Earn permission on the API key.

HTTP Request

GET/v5/earn/advance/order

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct category. DiscountBuy
orderIdfalsestringFilter by order ID
orderLinkIdfalsestringFilter by user customised order ID
productIdfalsestringFilter by product ID
startTimefalseintStart time (order creation time), Unix timestamp in ms
endTimefalseintEnd time, Unix timestamp in ms
limitfalseintNumber of items per page
cursorfalsestringPagination cursor. Use nextPageCursor from previous response

Response Parameters

ParameterTypeComments
nextPageCursorstringNext page cursor. Empty string if no more data
listarrayObject
> orderIdstringOrder ID
> orderLinkIdstringUser customised order ID
> productIdstringProduct ID
> categorystringProduct category. DiscountBuy
> orderTypestringFixed value: Stake
> amountstringInvestment amount
> coinstringInvestment coin, e.g. USDT
> underlyingAssetstringUnderlying asset, e.g. BTC, ETH
> statusstringOrder status: Pending (processing); Success (order accepted, position created); Settled (product settled — knocked out or exercised); Fail (order failed)
> createdTimestringOrder creation time, Unix timestamp in ms
> purchasePricestringAnchor buy price
> knockoutPricestringKnockout price
> knockoutCouponE8stringAnnualized interest rate in e8 precision. Actual rate = knockoutCouponE8 / 1e8
> durationstringProduct duration, e.g. 7d
> settlementTimestringSettlement time, Unix timestamp in ms
> accountTypestringDeduction account: FUND or UNIFIED
> toAccountTypestringSettlement credit account. FUND when status=Settled; deduction account when status=Fail
> settleTypestringSettlement preference when exercised: Base = receive underlying asset; Quote = receive USDT. Has no effect upon knockout
> settlementPricestringSettlement price (30-min TWAP before settlementTime). Only available when status=Settled
> settlementCoinstringSettlement coin. Only available when status=Settled
> settlementAmountstringSettlement amount. Only available when status=Settled. See calculation rules below
> isVipboolWhether this is a VIP product order
> refundStatusstringRefund status. Only valid when status=Fail: REFUNDING (refund in progress), REFUND_DONE (refund completed). Empty string for other statuses

Request Example

GET /v5/earn/advance/order?category=DiscountBuy&orderLinkId=my-order-001 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": [
{
"orderId": "38f6f5ce-57e2-4d69-b4d3-c39464389ccb",
"orderLinkId": "my-order-001",
"productId": "7037",
"category": "DiscountBuy",
"orderType": "Stake",
"amount": "200",
"coin": "USDT",
"underlyingAsset": "BTC",
"status": "Success",
"createdTime": "1776154116000",
"purchasePrice": "74019",
"knockoutPrice": "76050",
"knockoutCouponE8": "1000000",
"duration": "1d",
"settlementTime": "1776240000000",
"accountType": "FUND",
"toAccountType": "",
"settlementPrice": "",
"settlementCoin": "",
"settlementAmount": "",
"settleType": "Base",
"isVip": false,
"refundStatus": ""
}
],
"nextPageCursor": ""
},
"retExtInfo": {},
"time": 1776154473104
}