Skip to content

Get History TP/SL Order

Rate Limit: 10 req/sec/uid

Description

Get History TP/SL Order

HTTP Request

  • GET /api/v1/futures/tpsl/get_history_orders

Request Parameters

ParameterTypeRequiredDescription
symbolstringfalseTrading pair
sideint32falseorder side
positionModeint32falseorder position mode
startTimeint64falseStart timestamp
Unix timestamp in milliseconds format, e.g. 1597026383085
endTimeint64falseStart timestamp
Unix timestamp in milliseconds format, e.g. 1597026683085
skipint64falseskip order count default: 0
limitint64falseNumber of queries: Maximum: 100, default: 10

Request Example

bash
curl -X 'GET'  --location 'https://fapi.bitunix.com/api/v1/futures/tpsl/get_history_orders?symbol=BTCUSDT' \
   -H "api-key:*******" \
   -H "sign:*" \
   -H "time:1659076670000" \
   -H "language:en-US" \
   -H "Content-Type: application/json"

Response Parameters

ParameterTypeDescription
orderListlistTP/SL order List
>idstringorder id
>positionIdstringposition id
>symbolstringcoin pair
>basestringbase
>quotestringquote
>tpPricestringTake-profit trigger price
>tpStopTypestringTake-profit trigger type
LAST_PRICE
MARK_PRICE
>slPricestringStop-loss trigger price
>slStopTypestringStop-loss trigger type
LAST_PRICE
MARK_PRICE
>tpOrderTypestringTake-profit order type
LIMIT
MARKET
Default is market.
>tpOrderPricestringTake-profit order price
>slOrderTypestringStop-loss order type
LIMIT
MARKET
Default is market.
>slOrderPricestringStop-loss order price
>tpQtystringTake-profit order quantity(base coin)
At least one of tpQty or slQty is required.
>slQtystringStop-loss order quantity(base coin)
At least one of tpQty or slQty is required.
>statusstringTP/SL order status
>ctimeint64create timestamp
>triggerTimeint64trigger time timestamp
totalint64total

Response Example

json
{"code":0,"data":[{"positionId":"12345678","symbol":"BTCUSDT","qty":"0.5","entryValue":"30000","side":"LONG","positionMode":"HEDGE","marginMode":"ISOLATION","leverage":100,"fee":"0.1","funding":"-0.2","realizedPNL":"102.9","margin":"300","unrealizedPNL":"1.5","liqPrice":"22209","marginRate":"0.01","ctime":1691382137448,"mtime":1691382137448}],"msg":"Success"}