---
search:
  tags:
    - Markets
    - GET
seo:
  description: >-
    Returns trades across every market in execution-time order, newest first by
    default. Reference for the GET /trades endpoint in the REST API.
sidebar:
  label: List Trades
  badge: GET
title: List Trades
type: openapi-operation
---
Returns trades across every market in execution-time order, newest first by default.

### Endpoint

- Method and path: `GET /trades`
- Operation ID: `listTrades`
- API reference: [GET /trades](/api-reference/rest/markets/list-trades)
- Complete specification: [OpenAPI (YAML)](/openapi.yml)
- Spec location (JSON Pointer): `#/paths/~1trades/get`

#### Authorization

- Credential: optional. An authenticated request is metered against the member's read bucket and returns RateLimit headers; an unauthenticated request shares the public per-client limit.
- Accepted credentials: `UDX-Access-Key` header and `UDX-Access-Timestamp` header and `UDX-Access-Signature` header; or Bearer token in `Authorization`
- Details: [Authentication](/reference/authentication)

#### Parameters

```yaml
- $ref: "#/components/parameters/VersionHeader"
- name: executed_at_or_after
  in: query
  required: false
  description: Include trades at or after this instant, compared at millisecond precision.
  schema:
    type: string
    format: date-time
    maxLength: 40
- name: executed_at_or_before
  in: query
  required: false
  description: Include trades at or before this instant, compared at millisecond precision.
  schema:
    type: string
    format: date-time
    maxLength: 40
- name: trade_id
  in: query
  required: false
  description: Return the trade with this exchange-assigned identifier.
  schema:
    $ref: "#/components/schemas/EntityId"
- $ref: "#/components/parameters/PaginationLimit"
- $ref: "#/components/parameters/PaginationPage"
- $ref: "#/components/parameters/PaginationOrder"
```


#### Responses

##### `200`

A page of trades across all markets.

Headers:

```yaml
UDX-Version:
  $ref: "#/components/headers/VersionHeader"
Cache-Control:
  $ref: "#/components/headers/NoStore"
```

Content type: `application/json`

Schema:

```yaml
$ref: "#/components/schemas/TradesListResponse"
```

Example: Example

```json
{
  "trades": [
    {
      "trade_id": "BP1ZQ131E04J",
      "ticker": "UDX-EXAMPLE-MARKET",
      "price": "0.55",
      "quantity": "40",
      "taker_side": "buy",
      "executed_at": "2026-01-01T00:00:00.000000Z"
    },
    {
      "trade_id": "BP1ZQ131E04K",
      "ticker": "UDXCOMBO-EXAMPLE",
      "price": "0.06",
      "quantity": "30",
      "taker_side": "sell",
      "executed_at": "2025-12-31T23:59:58.000000Z"
    }
  ],
  "next_page_url": null
}
```

##### `400`

The request doesn't conform to this spec.

Headers:

```yaml
UDX-Version:
  $ref: "#/components/headers/VersionHeader"
```

Content type: `application/problem+json`

Schema:

```yaml
$ref: "#/components/schemas/ProblemDetails"
```

Example: Invalid request parameters

```json
{
  "type": "urn:udx:problem:invalid-request-parameters",
  "title": "Bad Request",
  "status": 400,
  "detail": "invalid request parameters",
  "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}
```

Example: Unknown UDX-Version

```json
{
  "type": "urn:udx:problem:unknown-version",
  "title": "Bad Request",
  "status": 400,
  "detail": "unknown UDX-Version \"1999-01-01\"; supported versions: 2026-07-15",
  "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}
```

##### `429`

The request rate was exceeded. An unauthenticated request shares the public per-client limit; an authenticated request is metered against the member's read bucket.

Headers:

```yaml
UDX-Version:
  $ref: "#/components/headers/VersionHeader"
Retry-After:
  $ref: "#/components/headers/RetryAfter"
Cache-Control:
  $ref: "#/components/headers/NoStore"
```

Content type: `application/problem+json`

Schema:

```yaml
$ref: "#/components/schemas/ProblemDetails"
```

Example: Public limit exceeded

```json
{
  "type": "urn:udx:problem:unauthenticated-rate-limit-exceeded",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "this client has temporarily exceeded the public request rate",
  "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}
```

Example: Member limit exceeded

```json
{
  "type": "urn:udx:problem:member-rate-limit-exceeded",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "this member has temporarily exceeded its request rate",
  "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}
```

##### `500`

Something went wrong on UDX's side.

Headers:

```yaml
UDX-Version:
  $ref: "#/components/headers/VersionHeader"
```

Content type: `application/problem+json`

Schema:

```yaml
$ref: "#/components/schemas/ProblemDetails"
```

Example: Internal server error

```json
{
  "type": "urn:udx:problem:internal-error",
  "title": "Internal Server Error",
  "status": 500,
  "detail": "internal error",
  "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}
```

##### `503`

Request admission is unavailable.

Headers:

```yaml
UDX-Version:
  $ref: "#/components/headers/VersionHeader"
Cache-Control:
  $ref: "#/components/headers/NoStore"
```

Content type: `application/problem+json`

Schema:

```yaml
$ref: "#/components/schemas/ProblemDetails"
```

Example: Admission temporarily unavailable

```json
{
  "type": "urn:udx:problem:request-admission-unavailable",
  "title": "Service Unavailable",
  "status": 503,
  "detail": "request admission is temporarily unavailable",
  "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}
```


#### Referenced definitions

The references in the excerpts above resolve to these definitions in the complete specification.

##### `#/components/headers/VersionHeader`

```yaml
description: API version used for this response.
schema:
  type: string
  maxLength: 10
  description: A dated API version (YYYY-MM-DD).
  example: 2026-07-15
```

##### `#/components/headers/NoStore`

```yaml
description: Prevents caching this response.
schema:
  type: string
  enum:
    - no-store
  description: Always the cache directive no-store.
  example: no-store
```

##### `#/components/schemas/TradesListResponse`

```yaml
type: object
description: A page of public trades, newest first.
required:
  - trades
  - next_page_url
properties:
  trades:
    type: array
    maxItems: 100
    description: One page of trades.
    items:
      $ref: "#/components/schemas/Trade"
  next_page_url:
    $ref: "#/components/schemas/NextPageURL"
```

##### `#/components/schemas/Trade`

```yaml
type: object
additionalProperties: false
description: A public trade (match) on a market.
required:
  - trade_id
  - ticker
  - price
  - quantity
  - taker_side
  - executed_at
properties:
  trade_id:
    type: string
    maxLength: 64
    description: Exchange-assigned trade identifier.
    example: BP1ZQ131E04J
  ticker:
    $ref: "#/components/schemas/Ticker"
  price:
    type: string
    pattern: ^[0-9]+(\.[0-9]{1,6})?$
    maxLength: 24
    description: Trade price, in YES dollars.
    example: "0.55"
  quantity:
    type: string
    pattern: ^[0-9]+(\.[0-9]{1,2})?$
    maxLength: 24
    description: Contracts traded.
    example: "100"
  taker_side:
    type: string
    enum:
      - buy
      - sell
    description: The aggressor (taker) side of the trade.
  executed_at:
    type: string
    format: date-time
    maxLength: 40
    description: When the trade executed.
    example: 2026-01-01T00:00:00.000000Z
```

##### `#/components/schemas/Ticker`

```yaml
type: string
minLength: 1
maxLength: 128
description: A human-meaningful natural key naming a single-leg or multi-leg market.
example: UDX-EXAMPLE-MARKET
```

##### `#/components/schemas/NextPageURL`

```yaml
type:
  - string
  - "null"
format: uri-reference
maxLength: 4096
pattern: ^/[^/\s#][^\s#]*$
description: Root-relative URL for the next page. Null when there are no more items.
example: /api_keys?limit=10&order=desc&page=eyJ2IjoxLCJzIjoiMjAyNi0wNi0wMVQxMjowMDowMC4wMDAwMDBaIiwiaWQiOiIzNTE3NDU2MjI5NjM0MTg1NjQ2In0&sort=created_at
```

##### `#/components/schemas/ProblemDetails`

```yaml
type: object
description: An RFC 9457 machine-readable error, returned on every non-2xx response. The response's Content-Language header identifies the language used by title and detail, and Vary includes Accept-Language.
required:
  - type
  - title
  - status
properties:
  type:
    type: string
    format: uri-reference
    maxLength: 2048
    description: A stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.
  title:
    type: string
    maxLength: 40
    example: Bad Request
    description: A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
  status:
    type: integer
    example: 400
    description: The HTTP status code, repeated from the response itself.
  detail:
    type: string
    maxLength: 500
    example: malformed request body
    description: A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
  instance:
    type: string
    format: uri-reference
    maxLength: 100
    example: urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef
    description: An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
```

##### `#/components/headers/RetryAfter`

```yaml
description: Whole seconds to wait before retrying.
schema:
  type: integer
  minimum: 1
  description: A positive delay in whole seconds.
  example: 2
```

##### `#/components/parameters/VersionHeader`

```yaml
name: UDX-Version
in: header
required: false
description: Dated API version (YYYY-MM-DD).
schema:
  type: string
  minLength: 10
  maxLength: 10
  description: A dated API version (YYYY-MM-DD).
  example: 2026-07-15
```

##### `#/components/schemas/EntityId`

```yaml
type: string
minLength: 1
description: An exchange-assigned identifier. Treat it as an opaque, stable key with no internal structure.
example: "6820943174116859281"
```

##### `#/components/parameters/PaginationLimit`

```yaml
name: limit
in: query
required: false
description: Maximum number of items to return in one page.
schema:
  type: integer
  minimum: 1
  maximum: 100
  default: 10
  description: Page size.
  example: 10
```

##### `#/components/parameters/PaginationPage`

```yaml
name: page
in: query
required: false
description: Opaque token identifying the requested page.
schema:
  type: string
  maxLength: 512
  description: An opaque pagination cursor.
  example: eyJ2IjoxLCJzIjoiMjAyNi0wNi0wMVQxMjowMDowMC4wMDAwMDBaIiwiaWQiOiIzNTE3NDU2MjI5NjM0MTg1NjQ2In0
```

##### `#/components/parameters/PaginationOrder`

```yaml
name: order
in: query
required: false
description: Sort direction. Applies to the default sort field when sort is omitted. Nulls sort last in both directions.
schema:
  type: string
  enum:
    - asc
    - desc
  default: desc
  description: Sort direction.
  example: desc
```

