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

> This endpoint allows users to retrieve the current orderbook (bid/ask levels) for a specified trading symbol.

```http theme={null}
/api/v1/book
```

#### 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><tr><td><code>"agg\_level"</code></td><td>integer</td><td>no</td><td>Aggregation level for price grouping. Defaults to <code>1</code></td><td><code>1</code></td></tr></tbody></table>

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

#### Response

* Status 200: Successfully retrieved book data

```json theme={null}
{
  "success": true,
  "data": {
    "s": "BTC",
    "l": [
      [
        {
          "p": "106504",
          "a": "0.26203",
          "n": 1
        },
        {
          "p": "106498",
          "a": "0.29281",
          "n": 1
        }
      ],
      [
        {
          "p": "106559",
          "a": "0.26802",
          "n": 1
        },
        {
          "p": "106564",
          "a": "0.3002",
          "n": 1
        },
      ]
    ],
    "t": 1751370536325
  },
  "error": null,
  "code": null
}
```

| Field | Type           | Description                                                                                              |
| ----- | -------------- | -------------------------------------------------------------------------------------------------------- |
| `'s'` | string         | Symbol                                                                                                   |
| `'l'` | array          | Two-dimensional array containing bids (index 0) and asks (index 1). Each index contains up to 10 levels. |
| `'t'` | integer        | Response timestamp in milliseconds                                                                       |
| `'p'` | decimal string | Price level                                                                                              |
| `'a'` | decimal string | Total amount at price level                                                                              |
| `'n'` | integer        | Number of orders at level                                                                                |

* 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.pacifica.fi/api/v1/book?symbol=BTC",
    headers={"Accept": "*/*"},
)

data = response.json()
```
