import pmxt
# API key optional — enables faster catalog-backed lookups
exchange = pmxt.Polymarket(
pmxt_api_key="YOUR_PMXT_API_KEY",
)
result = exchange.fetch_trades(
"67890",
start="2026-01-01T00:00:00Z",
end="2026-01-31T00:00:00Z",
limit=10,
)
{
"success": true,
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
},
"data": [
{
"id": "<string>",
"timestamp": 123,
"price": 123,
"amount": 123,
"side": "buy",
"outcomeId": "<string>"
}
]
}Order Book & Trades
Fetch Trades
Fetch raw trade history for a specific outcome.
GET
/
api
/
{exchange}
/
fetchTrades
import pmxt
# API key optional — enables faster catalog-backed lookups
exchange = pmxt.Polymarket(
pmxt_api_key="YOUR_PMXT_API_KEY",
)
result = exchange.fetch_trades(
"67890",
start="2026-01-01T00:00:00Z",
end="2026-01-31T00:00:00Z",
limit=10,
)
{
"success": true,
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
},
"data": [
{
"id": "<string>",
"timestamp": 123,
"price": 123,
"amount": 123,
"side": "buy",
"outcomeId": "<string>"
}
]
}Path Parameters
The prediction market exchange to target.
Available options:
polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, gemini-titan, hyperliquid, suibets, rain, hunch, router Query Parameters
Start of the time range
End of the time range
Maximum number of results to return (max {@link MAX_TRADES_LIMIT})
Response
200 - application/json
Fetch Trades response
Example:
true
Structured error envelope returned inside BaseResponse.error and ErrorResponse.error. Hosted-mode endpoints populate code, retryable, and optionally exchange / detail; legacy local-mode endpoints may still return only message.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

