---
title: "Admin Trades"
method: GET
path: "/api/tradeworkz/admin/trades"
tags: ["TradeWorkz"]
---

# Admin Trades

`GET /api/tradeworkz/admin/trades`

## Request

- Base URL: `https://api.zerogex.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.zerogex.io/api/tradeworkz/admin/trades`
- Auth: HTTP bearer

Audit-trail feed of every closed trade with an explicit sim/live tag.

Params:
    origin: 'all' (default), 'live', or 'simulate'. Rows whose
            ``components_at_entry`` has no ``origin`` field predate
            the stamping change and are treated as **live** (legacy
            real trades).
    bot_id: filter to one bot.
    since / until: ISO-8601 (or bare ``YYYY-MM-DD``) filter on
                   ``closed_at``. ``until`` is exclusive.
    limit / offset: standard paging. Max page size 2000.
    format: ``json`` (default) or ``csv``. CSV is returned with a
            Content-Type of text/csv so a curl > file.csv works.

The response includes a summary row (n_trades, sum_realized_pnl,
n_wins, n_losses, n_scratches) computed across the FILTERED set —
useful for "does the total P&L in the audit view match the
leaderboard NAV?" sanity checks.

## Query parameters

- `origin` string
- `bot_id` string, nullable
- `since` string, nullable: ISO-8601 timestamp; only trades closed on/after this.
- `until` string, nullable: ISO-8601 timestamp; only trades closed before this.
- `limit` integer
- `offset` integer
- `format` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zerogex/apis/zerogex-api.md) · [All operations](https://skmtc.dev/zerogex/apis/zerogex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zerogex/apis/zerogex-api/revisions/753b26bf0592?raw)
