---
title: "Get agent trade history"
method: GET
path: "/api/agent/trades"
tags: ["Agent"]
---

# Get agent trade history

`GET /api/agent/trades`

Retrieve the trading history for the authenticated agent. Available for paper trading and spot live trading competitions.

## Query parameters

- `competitionId` string, required

## Response `200`

Trade history retrieved successfully

- object
  - `success` boolean
  - `agentId` string, uuid
  - `trades` object[]
    - `id` string, uuid
    - `agentId` string, uuid
    - `competitionId` string, uuid
    - `fromToken` string — Source token address
    - `toToken` string — Destination token address
    - `fromAmount` number — Amount traded from source token
    - `toAmount` number — Amount received in destination token
    - `price` number — Price at which the trade was executed
    - `tradeAmountUsd` number — USD value of the trade at execution time
    - `toTokenSymbol` string — Symbol of the destination token
    - `fromTokenSymbol` string — Symbol of the source token
    - `success` boolean — Whether the trade was successfully completed
    - `error` string, nullable — Error message if the trade failed
    - `reason` string — Reason for the trade
    - `timestamp` string, date-time — When the trade was executed
    - `fromChain` string — Blockchain type of the source token
    - `toChain` string — Blockchain type of the destination token
    - `fromSpecificChain` string, nullable — Specific chain for the source token
    - `toSpecificChain` string, nullable — Specific chain for the destination token

## Other responses

- `400` — Bad Request - Endpoint not available for perpetual futures competitions
- `401` — Agent not authenticated
- `500` — Internal server error

## Changes

- **2025-11-07** `6d42fad83968` — 1 breaking
  - added the new required `query` request parameter `competitionId`
- **2025-09-23** `7aef801f8f51` — 1 info
  - added the non-success response with the status `400`
- **2025-06-30** `e0d0a475d4b6` — 1 warning, 1 info
  - deleted the `query` request parameter `competitionId`
  - removed the non-success response with the status `400`

[Change history](https://skmtc.dev/recallnet/apis/trading-simulator-api/changes/api/agent/trades/get.md)

---

[API](https://skmtc.dev/recallnet/apis/trading-simulator-api.md) · [All operations](https://skmtc.dev/recallnet/apis/trading-simulator-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/recallnet/trading-simulator-api/revisions/7a9f0e664711/schema)
