Skip to Content

Query Trade History

Request URL

GET /ftapi/v1/tradeHis

Request Parameters

NameTypeRequiredDescription
symbolIdSTRINGNOTrading pair
orderIdLONGNOOrder ID
startTimeLONGNOStart time (milliseconds)
endTimeLONGNOEnd time (milliseconds)
limitINTNONumber of results, max 1000

Response Parameters

NameTypeDescription
codeSTRINGResponse Code
msgSTRINGResponse Message
successBOOLEANSuccess Flag
data[].dealTypeINTEGER
data[].deductFeeAmountSTRING
data[].deductLossAmountSTRING
data[].feeAmountSTRING
data[].feeAssetIdSTRING
data[].leverageINTEGER
data[].liquidityTypeINTEGER
data[].marginModeSTRING
data[].markPriceSTRING
data[].orderIdSTRING
data[].positionIdSTRING
data[].positionModeSTRING
data[].profitSTRING
data[].sideSTRING
data[].sourceSTRING
data[].symbolIdSTRING
data[].tradeAmountSTRING
data[].tradeIdSTRING
data[].tradePriceSTRING
data[].tradeQuantitySTRING
data[].tradeTimeINTEGER
data[].tradeTypeINTEGER
data[].typeSTRING
data[].uidSTRING

Request Example

https://openapi.bittap.com/ftapi/v1/tradeHis?symbol=BTC-USDT-M

Response Example

{ "code": "0", "data": [ { "dealType": 1, // Trade reason: 1 - normal trade, 2 - liquidation trade, 3 - liquidation reduce "deductFeeAmount": "0", // Deducted fee amount "deductLossAmount": "0", // Deducted loss amount "feeAmount": "1.016587456", // Fee amount "feeAssetId": "USDT", // Fee currency (e.g., USDT) "leverage": 20, // Leverage "liquidityType": 1, // Role type: 1 - taker, 2 - maker "marginMode": "CROSSED", // Margin mode: CROSSED (cross margin) / ISOLATED (isolated margin) "markPrice": "106410.5", // Mark price (market mark) "orderId": "111429461924122624", // Order ID "positionId": "6017661495600394692", // Position ID "positionMode": "HEDGE", // Position mode: HEDGE (hedge) / ONE_WAY (one-way) "profit": "0", // PnL amount "side": "BUY", // Direction: BUY (buy open long) / SELL (sell open short) "source": null, // Order source: 0/1 - user, 2 - liquidation, 10 - reverse "symbolId": "BTC-USDT-M", // Contract symbol (e.g., BTC-USDT perpetual contract) "tradeAmount": "10165.87456", // Trade amount "tradeId": "226920709357568", // Trade ID "tradePrice": "106337.6", // Trade price "tradeQuantity": "0.0956", // Trade quantity "tradeTime": 1762233378235, // Trade time (timestamp) "tradeType": 3, // Trade type: 1 - open position, 2 - close position, 3 - add position, 4 - reduce position "type": "LIMIT", // Order type: LIMIT (limit order) / MARKET (market order) "uid": "76957286" // User ID } ], "msg": "Request successful", "success": true }

Error Codes

Error CodeDescription
500Server Error

Code Example

Last updated on: