v1

latestOpenAPI 3.0.32026-07-1482226.1 KB
Account Data

/account/trades

Retrieves the user's trade history.

get/api/v1/account/trades

Query parameters

symbolstring

Market address to filter trades by. If not specified, returns trades for all markets.

startTimeAtMillisinteger

Start time in milliseconds. Defaults to 7 days ago if not specified.

endTimeAtMillisinteger

End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart.

limitinteger

Default 500; max 1000.

tradeType'ORDER' | 'LIQUIDATION' | 'DELEVERAGE' | 'UNSPECIFIED'

Type of trade.

Type of trade. By default returns all. UNSPECIFIED returns all.

pageinteger

The page number to retrieve in a paginated response.

Response

Successful response with trade details.

idstring required

Trade ID

clientOrderIdstring

Client order ID.

symbolstring

Market address.

orderHashstring

Order hash.

orderType'LIMIT' | 'MARKET' | 'STOP_LIMIT' | 'STOP_MARKET' | 'LIQUIDATION' | 'STOP_LOSS_MARKET' | 'TAKE_PROFIT_MARKET' | 'STOP_LOSS_LIMIT' | 'TAKE_PROFIT_LIMIT' | 'BANKRUPTCY_LIQUIDATION' | 'UNSPECIFIED'

The type of order. (BANKRUPTCY_LIQUIDATION is deprecated)

tradeType'ORDER' | 'LIQUIDATION' | 'DELEVERAGE' | 'UNSPECIFIED'

Type of trade.

side'LONG' | 'SHORT' | 'UNSPECIFIED' required

Trade side based on the user order in this trade.

isMakerboolean

Indicates if the user was a maker to the trade.

priceE9string required

Trade price (e9 format).

quantityE9string required

Trade quantity (e9 format).

quoteQuantityE9string required

Quote quantity (e9 format).

realizedPnlE9string

Realized profit and loss (e9 format).

positionSide'LONG' | 'SHORT' | 'UNSPECIFIED'

The side of the position, either long or short

tradingFeeE9string

Trading fee (e9 format).

tradingFeeAssetstring

Asset used for trading fee.

gasFeeE9string

Gas fee.

gasFeeAssetstring

Asset used for gas fee.

executedAtMillisinteger required

Trade timestamp in milliseconds since Unix epoch.

Example response

[
  {
    "clientOrderId": "25851813",
    "priceE9": "7819010000000",
    "quantityE9": "20000000000",
    "quoteQuantityE9": "150000000000000",
    "realizedPnlE9": "-9000000000",
    "tradingFeeE9": "-780000000",
    "tradingFeeAsset": "USDC, BLUE",
    "gasFeeE9": "1234",
    "gasFeeAsset": "USDC",
    "executedAtMillis": 1569514978020
  }
]