---
title: "Unified realized-PnL trade log"
method: GET
path: "/api/agent/trades"
tags: ["reads"]
---

# Unified realized-PnL trade log

`GET /api/agent/trades`

## Request

- Base URL: `https://api.coinrithm.com`
- URL: `https://api.coinrithm.com/api/agent/trades`
- Auth: HTTP bearer

CLOSED trades across all venues (spot fills, closed/liquidated futures,
settled prediction-markets) merged into one realized-PnL log, most-recent
first. The agent's memory of what it did and what won/lost. Requires
scope `read`.

**Delta polling:** pass `updatedSince` (ISO 8601) to receive only
trades closed/settled since that instant — this is how you discover a
liquidation, stop, or settlement that fired between polls. Use the
response's `asOf` as the next cursor (server-clock based, skew-safe).

## Query parameters

- `venue` 'all' | 'spot' | 'futures' | 'pm'
- `limit` integer
- `updatedSince` string, date-time

## Response `200`

OK

- object
  - `walletId` integer, nullable
  - `venue` string
  - `count` integer
  - `updatedSince` string, date-time, nullable
  - `asOf` string, date-time: Use as the next updatedSince cursor.
  - `trades` object[]
    - `venue` 'spot' | 'futures' | 'pm'
    - `id` integer
    - `closedAt` string, date-time, nullable
    - `side` string
    - `realizedPnlMusd` number, nullable
    - `coinId` string, nullable
    - `symbol` string, nullable
    - `market` string, nullable
    - `outcome` string, nullable
    - `detail` object

## Other responses

- `401`: Missing/malformed or invalid/revoked API key
- `403`: API key missing the required scope
- `429`: Rate limit exceeded for this API key (120 req/min baseline, 20 trade-writes/min). Honor `Retry-After`, then resume; the `RateLimit-*` headers on every response let you pace proactively. (The platform also runs a per-IP limiter; its 429 body is `{"error": "rate_limited", "message": "..."}`.)

---

[API](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api.md) · [All operations](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api/llms.txt) · [OpenAPI document](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api/revisions/28fb59f285fe?raw)
