> For the complete documentation index, see [llms.txt](https://pacifica.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pacifica.gitbook.io/docs/api-documentation/api/rest-api/markets/get-recent-trades.md).

# Get recent trades

```
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>required</td><td>Trading pair symbol</td><td><code>BTC</code></td></tr></tbody></table>

```
/api/v1/trades?symbol=BTC
```

#### Response

* Status 200: Successfully retrieved recent trades

```json
{
  "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 for.                                                                                                                                                                                                                                                                                   |
| `'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</p> |
| `'created_at'`    | integer        | Timestamp in milliseconds of trade event                                                                                                                                                                                                                                                                                                             |
| `'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
import requests

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

data = response.json()
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://pacifica.gitbook.io/docs/api-documentation/api/rest-api/markets/get-recent-trades.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
