Get user trade history
Retrieve trade history for a specific user with optional filtering by market, order ID, side, and timestamp range. Returns executed trades with price, size, PnL, and fee details. Supports sorting by timestamp (default: descending) and pagination. Page size is capped at 200.
Query parameters
User account address (user query alias is also accepted)
Filter by specific order ID (requires market to also be provided)
Filter by market address
Order side filter: buy (long) or sell (short). For orders, maps to is_buy column. For trades/funding, maps to action IN ('OpenLong','CloseShort') (buy) or action IN ('CloseLong','OpenShort') (sell).
Filter by side
Page size
Page offset
Sort key for history endpoints
Response
Trade history retrieved successfully
Example response
{
"items": [
{
"account": "0x1234567890abcdef1234567890abcdef12345678",
"action": "buy",
"client_order_id": "client_order_abc",
"counter_party_account": "0xfedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"market": "0xmarket123456789abcdef",
"order_id": "12345",
"price": 50000.25,
"realized_funding_amount": -15.5,
"size": 100.5,
"source": "OrderFill",
"trade_id": "3647276",
"transaction_unix_ms": 1634567890000,
"transaction_version": 3647276285
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.