Skip to main content

Query Parameters

FieldTypeNeedDescriptionExample
”account”stringoptionalUser’s wallet address42trU9A5…
“symbol”stringoptionalMarket symbol to filter byBTC
”builder_code”stringoptionalOnly return trades with this builder codeBUILDER1
”start_time”integeroptionalStart time in milliseconds1625097600000
”end_time”integeroptionalEnd time in milliseconds1759215599188
”limit”integeroptionalMaximum number of records to return, defaults to 100100
”cursor”stringoptionalCursor pagination to access records. Default to none1115hVka

Response

  • Status 200: Successfully retrieved portfolio position history
FieldTypeDescription
”history_id”integerHistory id of trade
”order_id”integerOrder id of order that resulted in the trade
”client_order_id”UUIDCLOID of order that resulted in the trade
”symbol”stringTrading pair symbol
”amount”decimal stringAmount (in token denomination) of the trade event
”price”decimal stringCurrent price of the specified symbol
”entry_price”decimal stringPrice at which the trade event was executed
”fee”decimal stringFee paid by the trade event
”spot_fee”decimal string or nullNative spot fee paid for this trade; only set for spot-buy fills
”pnl”decimal stringPnL generated by the trade event
”event_type”string”fulfill_taker” if taker
”fulfill_maker” if maker
”side”string”open_long"
"open_short"
"close_long"
"close_short"
"created_at”integerTimestamp in milliseconds when the trade event occurred
”cause”string”normal”
regular user-initiated trading
”market_liquidation” position was liquidated due to insufficient margin
”backstop_liquidation” position was liquidated by backstop mechanism
”settlement”
position was closed due to Auto-Deleveraging (ADL) or other settlement
’next_cursor’stringNext cursor for pagination
’has_more’booleanTrue if there exists a ‘next_cursor’
  • Status 400: Invalid request parameters
  • Status 401: Unauthorized access
  • Status 500: Internal server error

Code Example (Python)