> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pacifica.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Trades

> Streams all trades on the taker side as they occur in a chosen market.

Refer to [Websocket](https://docs.pacifica.fi/api-documentation/api/websocket) for establishing the websocket connection.

### Params

```json theme={null}
{
    "method": "subscribe",
    "params": {
        "source": "trades",
        "symbol": "SOL"
    }
}
```

### Stream

```json theme={null}
{
  "channel": "trades",
  "data": [
    {
      "h": 80062522,
      "s": "BTC",
      "a": "0.00001",
      "p": "89471",
      "d": "close_short",
      "tc": "normal",
      "t": 1765018379085,
      "li": 1559885104,
      "it": 0
    }
  ]
}
```

<table><thead><tr><th width="181.800048828125">Field</th><th width="237.4000244140625">Type</th><th>Description</th></tr></thead><tbody><tr><td>`'h'`</td><td>integer</td><td>History ID</td></tr><tr><td>`'s'`</td><td>string</td><td>Symbol</td></tr><tr><td>`'a'`</td><td>decimal string</td><td>Amount</td></tr><tr><td>`'p'`</td><td>decimal string</td><td>Price</td></tr><tr><td>`'d'`</td><td>string</td><td>Trade side`open_long``open_short``close_long``close_short`</td></tr><tr><td>`'tc'`</td><td>string</td><td>Trade cause`normal` `market_liquidation` `backstop_liquidation` `settlement` `insolvency_liquidation` `game_settlement` `fulfill_rfq`</td></tr><tr><td>`'t'`</td><td>number</td><td>Timestamp in milliseconds</td></tr><tr><td>`'li'`</td><td>number</td><td>[Last ID](https://docs.pacifica.fi/api-documentation/api/last-id.md) — sequence number for this symbol. Monotonically increasing; use it to order updates and detect gaps.</td></tr><tr><td>`'it'`</td><td>integer</td><td>Instrument type</td></tr></tbody></table>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.