Skip to main content

Get Order Info

info
  • Need authentication. Up to 10 requests per second.
  • Query your order history. Requires Earn permission on the API key.

HTTP Request

GET/v5/earn/advance/order

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type. SmartLeverage
productIdfalsestringProduct ID
orderIdfalsestringOrder ID
orderLinkIdfalsestringUser customised order ID
startTimefalsestringStart time (order creation time), unix timestamp in milliseconds
endTimefalsestringEnd time, unix timestamp in milliseconds
limitfalseintNumber of items per page. Default: 20, Max: 20
cursorfalsestringPagination cursor. Use nextPageCursor from previous response

Response Parameters

ParameterTypeComments
categorystringProduct category
nextPageCursorstringNext page cursor, empty means no more data
listarrayOrder list
> orderIdstringOrder ID
> orderLinkIdstringUser customised order ID
> productIdstringProduct ID
> categorystringProduct category
> orderTypestringStake: Subscribe. Redeem: Early redemption
> amountstringOrder amount
> createdTimestringCreated time, unix timestamp in ms
> statusstringPending: Order confirming, Success: Order successful (position created), Settled: Position settled, Fail: Order failed
> durationstringProduct term, e.g. 1d, 2d, 3d
> accountTypestringAccount type
> settlementTimestringSettlement time, unix timestamp in ms
> refundStatusstringRefund status. Only valid when status=Fail, Processing, Processed
> investCoinstringInvestment coin, e.g. USDT
> underlyingAssetstringUnderlying asset, e.g. BTC, ETH
> directionstringLong, Short
> leveragestringFixed leverage multiplier
> breakevenPricestringBreakeven price
> initialPricestringUnderlying asset price at order time
> settlementPricestringSettlement price. Only available when status=Settled
> pnlstringProfit and loss. Only available when status=Settled
> toAccountTypestringThe account back to when redeem. Only available when status=Settled or status=Fail

Request Example

GET /v5/earn/advance/order?category=SmartLeverage&orderId=3e7d23fb-acc4-4853-9e32-ab0c0eb43985 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": "SmartLeverage",
"list": [
{
"orderId": "3e7d23fb-acc4-4853-9e32-ab0c0eb43985",
"orderLinkId": "usdt-earn-008",
"productId": "12999",
"category": "SmartLeverage",
"orderType": "Redeem",
"investCoin": "USDT",
"amount": "100",
"underlyingAsset": "BTC",
"direction": "Long",
"leverage": "200",
"breakevenPrice": "68622.69",
"initialPrice": "68403",
"settlementTime": "1775038327000",
"duration": "2d",
"createdTime": "1775038326000",
"status": "Settled",
"settlementPrice": "68566.72",
"pnl": "83.6876",
"refundStatus": "",
"accountType": "",
"toAccountType": "FUND"
}
],
"nextPageCursor": ""
},
"retExtInfo": {},
"time": 1775038381558
}