---
title: "Fetch Trades"
method: GET
path: "/api/{exchange}/fetchTrades"
---

# Fetch Trades

`GET /api/{exchange}/fetchTrades`

Fetch raw trade history for a specific outcome.

## Path parameters

- `exchange` 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'router', required

## Query parameters

- `outcomeId` string, required
- `start` string, date-time
- `end` string, date-time
- `limit` number

## Response `200`

Fetch Trades response

- object
  - `success` boolean
  - `error` ErrorDetail — 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`.
    - `message` string — Human-readable error message.
    - `code` 'HOSTED_TRADING_ERROR' | 'INSUFFICIENT_ESCROW_BALANCE' | 'ORDER_SIZE_TOO_SMALL' | 'INVALID_API_KEY' | 'OUTCOME_NOT_FOUND' | 'CATALOG_UNAVAILABLE' | 'BUILT_ORDER_EXPIRED' | 'INVALID_SIGNATURE' | 'NO_LIQUIDITY' | 'MISSING_WALLET_ADDRESS' | 'BAD_REQUEST' | 'AUTHENTICATION_ERROR' | 'PERMISSION_DENIED' | 'NOT_FOUND' | 'ORDER_NOT_FOUND' | 'MARKET_NOT_FOUND' | 'EVENT_NOT_FOUND' | 'RATE_LIMIT_EXCEEDED' | 'INVALID_ORDER' | 'INSUFFICIENT_FUNDS' | 'VALIDATION_ERROR' | 'NETWORK_ERROR' | 'EXCHANGE_NOT_AVAILABLE' | 'NOT_SUPPORTED' — Stable machine-readable error code. Hosted-mode errors use the `HostedTradingError` family (e.g. `INSUFFICIENT_ESCROW_BALANCE`, `BUILT_ORDER_EXPIRED`); pre-hosted local errors use the legacy family (e.g. `BAD_REQUEST`, `NOT_FOUND`).
    - `retryable` boolean — Hint for clients: when `true`, the same request may succeed on retry (e.g. transient network or rate-limit conditions); when `false`, the caller should not retry without modifying the request.
    - `exchange` string, nullable — Venue the error originated from, when known (e.g. 'polymarket', 'kalshi').
    - `detail` object, nullable — Free-form hosted-mode detail blob. Shape depends on `code` — e.g. for `INSUFFICIENT_ESCROW_BALANCE` it may include `{ requested, available }`; for `ORDER_SIZE_TOO_SMALL` it may include `{ min }`; for `BUILT_ORDER_EXPIRED` it may include `{ expiry }`.
  - `data` Trade[]
    - `id` string, required — The unique identifier for this trade.
    - `timestamp` number, required — Unix timestamp in milliseconds when the trade executed.
    - `price` number, required — Probability between 0.0 and 1.0.
    - `amount` number, required — Size of the trade in contracts/shares.
    - `side` 'buy' | 'sell' | 'unknown', required — Trade side from the taker's perspective.
    - `outcomeId` string — The outcome this trade is for (if known).

---

[API](https://skmtc.net/pmxt-dev/apis/pmxt-hosted-api.md) · [All operations](https://skmtc.net/pmxt-dev/apis/pmxt-hosted-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pmxt-dev/pmxt-hosted-api/versions/da5293255d19/schema)
