> ## 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.

# Get Recent Trades

> This endpoint allows users to get recent trades for a specific market.

```http theme={null}
GET /api/v1/trades
```

#### Query Parameters

<table><thead><tr><th width="176">Field</th><th width="98">Type</th><th width="95">Need</th><th width="189">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>"symbol"</code></td><td>string</td><td>optional</td><td>Trading pair symbol. If omitted, returns recent trades across all markets.</td><td><code>BTC</code></td></tr></tbody></table>

```http theme={null}
/api/v1/trades?symbol=BTC
```

#### Response

* Status 200: Successfully retrieved recent trades

```json theme={null}
{
  "success": true,
  "data": [
    {
      "event_type": "fulfill_taker",
      "price": "104721",
      "amount": "0.0001",
      "side": "close_long",
      "cause": "normal",
      "created_at": 1765006315306
    }
  ],
  "error": null,
  "code": null,
  "last_order_id": 1557404170
}
```

| Field          | Type           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| -------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `'event_type'` | string         | <p><code>"fulfill\_taker"</code> if maker<br /><code>"fulfill\_maker"</code> if taker</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `'price'`      | decimal string | Price in USD at which trade event has occurred                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `'amount'`     | decimal string | Amount in token denomination for which the trade has occurred.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `'side'`       | string         | <p><code>"open\_long"</code><br /><code>"open\_short"</code><br /><code>"close\_long"</code><br /><code>"close\_short"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `'cause'`      | string         | <p><code>"normal"</code><br />regular user-initiated trading<br /><code>"market\_liquidation"</code> position was liquidated due to insufficient margin<br /><code>"backstop\_liquidation"</code> position was liquidated by backstop mechanism<br /><code>"settlement"</code><br />position was closed due to Auto-Deleveraging (ADL) or other settlement<br /><code>"insolvency\_liquidation"</code> position was closed due to account insolvency<br /><code>"game\_settlement"</code> position was settled by the prediction game<br /><code>"fulfill\_rfq"</code> trade resulted from an RFQ fill</p> |
| `'created_at'` | integer        | Timestamp in milliseconds of trade event                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

The response also includes a top-level `last_order_id` field (a sibling of `data`, `error`, and `code` — not a member of each trade object):

| Field             | Type    | Description                                                                                                         |
| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
| `'last_order_id'` | integer | Exchange-wide nonce. Used to reliably determine exchange event ordering. Sequential and not subject to clock drift. |

* Status 400: Invalid request parameters
* Status 401: Unauthorized access
* Status 500: Internal server error

#### Code Example (Python)

```python theme={null}
import requests

response = requests.get(
    "/api/v1/trades?symbol=BTC",
    headers={"Accept": "*/*"},
)

data = response.json()
```
