> For the complete documentation index, see [llms.txt](https://api-docs.flipster.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.flipster.io/api-reference/trade/get-execution-history.md).

# Get Execution History

Retrieves a detailed log of past trade executions (fills) with support for granular filtering and cursor-based pagination.

This endpoint allows users to query their historical execution records, commonly referred to as "fills." Unlike the order history, this provides specific details for each trade event, including execution price, quantity, and associated fees. Users can filter results by product type (Spot or Perpetual), trading symbol, order ID, and execution type (e.g., Trade or Funding). The endpoint utilizes cursor-based pagination (`before` and `after`) to efficiently navigate large datasets. Authentication with a valid API key and read permission scope is required.

## Get Execution History

> Retrieve historical executions (trades) with cursor-based pagination.\
> Supports filtering by product type, symbol, order ID, and time range.

```json
{"openapi":"3.0.0","info":{"title":"Prex Trading API","version":"1.0.0"},"tags":[{"name":"trade","description":"Trading operations"}],"servers":[{"url":"https://trading-api.flipster.io","description":"Production"}],"security":[{"thirdPartyApiKeyAuth":["read"]}],"components":{"securitySchemes":{"thirdPartyApiKeyAuth":{"description":"For third party retail API users","in":"header","name":"api-key","type":"apiKey"}},"schemas":{"Symbol":{"type":"string","pattern":"^[A-Z0-9]+(\\.[A-Z0-9]+)?$","description":"Trading symbol"},"ExecType":{"type":"string","enum":["INVALID","NEW","TRADE","CANCELED","REPLACED","REJECTED","TRIGGERED","FUNDING"],"description":"Execution type"},"Timestamp":{"title":"Timestamp","description":"Precise, high-resolution (nanosecond level) integer timestamp.","type":"string"},"Execution":{"type":"object","properties":{"execId":{"type":"string","format":"uuid"},"orderId":{"type":"string","format":"uuid"},"symbol":{"$ref":"#/components/schemas/Symbol"},"side":{"$ref":"#/components/schemas/OrderSide"},"orderType":{"$ref":"#/components/schemas/OrderType"},"price":{"$ref":"#/components/schemas/Decimal","nullable":true},"quantity":{"$ref":"#/components/schemas/Decimal","nullable":true},"timeInForce":{"$ref":"#/components/schemas/TimeInForce"},"status":{"$ref":"#/components/schemas/OrderStatus"},"execType":{"$ref":"#/components/schemas/ExecType"},"settlementCurrency":{"type":"string"},"orderTime":{"$ref":"#/components/schemas/Timestamp"},"transactTime":{"$ref":"#/components/schemas/Timestamp"},"lastPrice":{"$ref":"#/components/schemas/Decimal"},"lastQty":{"$ref":"#/components/schemas/Decimal"},"execFee":{"$ref":"#/components/schemas/Decimal"},"cumQty":{"$ref":"#/components/schemas/Decimal","nullable":true},"avgPrice":{"$ref":"#/components/schemas/Decimal","nullable":true},"conditionalOrderType":{"$ref":"#/components/schemas/ConditionalOrderType"}},"required":["execId","orderId","symbol","side","orderType","timeInForce","status","execType","settlementCurrency","orderTime","transactTime","lastPrice","lastQty","execFee","conditionalOrderType"]},"OrderSide":{"type":"string","enum":["BUY","SELL"],"description":"Order side"},"OrderType":{"type":"string","enum":["MARKET","LIMIT","STOP_MARKET"],"description":"Order type"},"Decimal":{"title":"Decimal","description":"Precise, high-resolution number type.","type":"string"},"TimeInForce":{"type":"string","enum":["FOK","IOC","GTC"],"description":"Time in force"},"OrderStatus":{"type":"string","enum":["PENDING_NEW","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REJECTED"],"description":"Order status"},"ConditionalOrderType":{"type":"string","enum":["INVALID","POSITION_TP","POSITION_SL","ORDER_TP","ORDER_SL"],"description":"Conditional order type"},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"},"code":{"type":"integer","description":"Error code"}},"required":["type"]}},"required":["error"]}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/v1/trade/execution/history":{"get":{"tags":["trade"],"summary":"Get Execution History","description":"Retrieve historical executions (trades) with cursor-based pagination.\nSupports filtering by product type, symbol, order ID, and time range.","parameters":[{"name":"productType","in":"query","schema":{"type":"string","enum":["SPOT","PERPETUAL"]},"description":"Filter by product type"},{"name":"symbol","in":"query","schema":{"$ref":"#/components/schemas/Symbol"},"description":"Filter by symbol"},{"name":"orderId","in":"query","schema":{"type":"string","format":"uuid"},"description":"Filter by order ID"},{"name":"execType","in":"query","schema":{"$ref":"#/components/schemas/ExecType"},"description":"Filter by execution type"},{"name":"count","in":"query","schema":{"type":"integer","minimum":1,"default":64},"description":"Number of items to return"},{"name":"before","in":"query","schema":{"type":"string","format":"uuid"},"description":"Cursor for forward pagination (older executions)"},{"name":"after","in":"query","schema":{"type":"string","format":"uuid"},"description":"Cursor for backward pagination (newer executions)"},{"name":"startTime","in":"query","schema":{"$ref":"#/components/schemas/Timestamp"},"description":"Start time filter (inclusive)"},{"name":"endTime","in":"query","schema":{"$ref":"#/components/schemas/Timestamp"},"description":"End time filter (inclusive)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"history":{"type":"array","items":{"$ref":"#/components/schemas/Execution"}},"hasPrev":{"type":"boolean"},"hasNext":{"type":"boolean"}},"required":["history","hasPrev","hasNext"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```
