# Trades

## Trades data

This guide explains how to use the WebSocket API to subscribe to Trades data updates via the `/trades` channel.

***

### Overview

The WebSocket API allows clients to receive real-time market data updates. Subscribing to the `/trades` channel provides updates for market ticker data, including prices, bids, asks, and quantities.

***

### Channel

#### `/trades/*`

* Subscribe to get notification about trades for all markets.

#### `/trades/bytradingpair/{market symbol}/*`

* Subscribe to get trades data from specific markets
* Client may be subscribed to many markets at the same time.

#### `/trades/bywallet/{wallet address}/*`

* Subscribe to get trades data from specific wallet ()
* Client may be subscribed to many markets at the same time.

#### `/trades/bywallet/{wallet address}/bytradingpair/{market symbol}`

* Subscribe to get trades data from specific wallet and market
* Client may be subscribed to many markets at the same time.

***

### Subscription

```json
{
    "id": "94c68f6e-44ba-46ec-b9fb-4eb7addfe5ea",
    "type": "subscribe",
    "channel": "orders/bywallet/0xABCDEABCDE/*",
    "authorization": {
        "host": "vfqqino6svadzoqkann4355in4.appsync-api.eu-central-1.amazonaws.com",
        "x-amz-date": "20250117T133706Z",
        "x-api-key": "da2-vjlcb7rsira4bggsctnmzcjvwe"
    }
}
```

```json
{
  "id":"94c68f6e-44ba-46ec-b9fb-4eb7addfe5ea",
  "type":"subscribe_success"
}
```

***

### Market Data Model

Data model definition in progress.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.21x.eu/websocket-api/trades.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
