---
title: "Get trades"
method: GET
path: "/api/v1/trades"
tags: ["Market Data"]
---

# Get trades

`GET /api/v1/trades`

Retrieve recent trades for a specific market ordered by most recent first.
Optionally filter by order ID to get trades for a specific order. Supports pagination.

## Query parameters

- `market` string, required
- `order_id` string
- `limit` integer
- `offset` integer

## Response `200`

Market trade history retrieved successfully

- PaginatedResponseTradeDto
  - `items` object[], required — The items in the current page
    - `account` string, required — User's account address
    - `action` string, required — Trade action type (e.g., "buy", "sell", "liquidation")
    - `client_order_id` string, required — Client-specified order ID
    - `counter_party_account` string, required — Counter party account on the other leg of the fill. For liquidation / ADL / delisting fills this is the backstop liquidator. Empty string for pre-V2 historical trades that did not carry counter party on-chain.
    - `fee_amount` number, double, required — Fee amount in raw units
    - `is_profit` boolean, required — Whether trade was profitable
    - `is_rebate` boolean, required — Whether trade received rebate
    - `market` string, required — Market identifier address
    - `order_id` string, required — Order ID associated with trade
    - `price` number, double, required — Trade price
    - `realized_funding_amount` number, double, required — Realized funding amount in USDC - Negative value: trader PAID funding (e.g., long position with positive funding rate) - Positive value: trader RECEIVED funding (e.g., short position with positive funding rate) - Zero: no funding accrued
    - `realized_pnl_amount` number, double, required — Realized PnL amount
    - `size` number, double, required — Trade size
    - `source` string, required — Trade source (e.g., "OrderFill", "MarginCall", "BackStopLiquidation", "ADL", "MarketDelisted")
    - `trade_id` string, required — Trade ID
    - `transaction_unix_ms` integer, required — Transaction timestamp in milliseconds
    - `transaction_version` integer, required — Transaction version
  - `total_count` integer, nullable — The total number of items across all pages. Optional: history endpoints omit this field to avoid expensive COUNT(*) queries.

## Other responses

- `500` — Database error

---

[API](https://skmtc.net/decibel/apis/decibel-trading-api.md) · [All operations](https://skmtc.net/decibel/apis/decibel-trading-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/decibel/decibel-trading-api/revisions/37a02083ff59/schema)
