Trades API
Query historical trade data for prediction markets
Trades API
The Trades API provides access to historical trade data for prediction markets. Relays requests directly to Kalshi API.
Access
Methods
getTrades
Get historical trades with optional filters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
ticker | string | No | Filter by market ticker |
minTs | number | No | Filter trades after this Unix timestamp |
maxTs | number | No | Filter trades before this Unix timestamp |
limit | number | No | Maximum trades to return (1-1000, default 100) |
cursor | string | No | Pagination cursor (trade ID) to start from |
getTradesByMint
Get trades by outcome token mint address.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
mintAddress | string | Yes | Mint address (ledger or outcome mint) |
params.minTs | number | No | Filter trades after this Unix timestamp |
params.maxTs | number | No | Filter trades before this Unix timestamp |
params.limit | number | No | Maximum trades to return (1-1000, default 100) |
params.cursor | string | No | Pagination cursor (trade ID) to start from |
Trade Object
Examples
Get Recent Trades
Filter by Timestamp Range
Paginate Through All Trades
Real-time Trades
For real-time trade updates, use the WebSocket API:
See the WebSocket API for more details.