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

# Fetch My Trades

`GET /api/{exchange}/fetchMyTrades`

Fetch authenticated user trade history.

## 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
- `marketId` string
- `since` string, date-time
- `until` string, date-time
- `limit` number
- `cursor` string

## Response `200`

Fetch My 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` UserTrade[]
    - `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).
    - `orderId` string — The order that produced this trade, if known.
    - `marketId` string — The market this trade belongs to, when the venue exposes it (e.g. derivable from the fill's coin/asset).
    - `fee` number — Trading fee paid by the user for this fill, when the venue exposes it.
    - `txHash` string, nullable — Populated in hosted mode after on-chain settlement; null for local-mode and for non-on-chain venues.
    - `chain` string, nullable — Populated in hosted mode after on-chain settlement; null for local-mode and for non-on-chain venues.
    - `blockNumber` number, nullable — Populated in hosted mode after on-chain settlement; null for local-mode and for non-on-chain venues.

---

[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)
