> For the complete documentation index, see [llms.txt](https://docs.kaiko.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kaiko.com/rest-api/cefi-spot-markets/market-data/order-book-aggregations/order-book-pressure.md).

# Order book pressure

{% hint style="info" %}

### This data is included in the following Kaiko packages:

* **Level 1 & Level 2 Data** \[Level 2 Aggregations Tier]
* **Level 1 & Level 2 Data** \[Level 2 Tick-Level Tier]

*Subscriptions with "CeFi Spot" as the market type.*
{% endhint %}

### What is this endpoint for? <a href="#what-is-this-endpoint-for" id="what-is-this-endpoint-for"></a>

This endpoint returns the imbalance between the bids and asks resting in the order book, one row per order book snapshot. For six depths around the mid price (0.05%, 0.25%, 0.5%, 1%, 2% and 5%), it gives the net size (bids minus asks), the total size (bids plus asks) and the net size as a percentage of the total. A positive value means there are more bids than asks within that depth.

### Endpoint

{% code overflow="wrap" %}

```http
https://<eu|us>.market-api.kaiko.io/v2/data/order_book_snapshots.v1/exchanges/{exchange}/{instrument_class}/{instrument}/snapshots/pressure
```

{% endcode %}

### Path parameters

<table><thead><tr><th width="203">Parameter</th><th>Required?</th><th>Description</th></tr></thead><tbody><tr><td><code>region</code></td><td>Yes</td><td>Choose between <code>eu</code> and <code>us</code>.</td></tr><tr><td><code>exchange</code></td><td>Yes</td><td>Exchange <code>code</code>.<br><br>See <a data-mention href="https://docs.kaiko.com/rest-api/cefi-spot-markets/reference-data/exchange-codes.md">Exchange codes</a></td></tr><tr><td><code>instrument_class</code></td><td>Yes</td><td>Instrument <code>class</code>: <code>spot</code>.</td></tr><tr><td><code>instrument</code></td><td>Yes</td><td>Instrument <code>code</code>.<br><br>See <a data-mention href="https://docs.kaiko.com/rest-api/cefi-spot-markets/reference-data/exchange-trading-pair-codes-instruments.md">Exchange trading pair codes (instruments)</a></td></tr></tbody></table>

### Query parameters

<table><thead><tr><th width="187">Parameter</th><th width="114">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>start_time</code></td><td>No</td><td>Starting time in ISO 8601 (inclusive).<br><br><em>Automatically included in continuation tokens.</em></td></tr><tr><td><code>end_time</code></td><td>No</td><td>Ending time in ISO 8601 (exclusive).<br><br><em>Automatically included in continuation tokens.</em></td></tr><tr><td><code>page_size</code></td><td>No</td><td>Number of rows per page. Default 10.<br><br>See <a data-mention href="https://docs.kaiko.com/rest-api/general/getting-started/pagination.md">Pagination</a><br><br><em>Automatically included in continuation tokens.</em></td></tr><tr><td><code>sort</code></td><td>No</td><td>Return the data in ascending (<code>asc</code>) or descending (<code>desc</code>) order.<br><br>Default <code>desc</code>.<br><br><em>Automatically included in continuation tokens.</em></td></tr><tr><td><code>continuation_token</code></td><td>No</td><td>See <a data-mention href="https://docs.kaiko.com/rest-api/general/getting-started/pagination.md">Pagination</a></td></tr></tbody></table>

### Fields

`{L}` is the depth: `0_05` (0.05%), `0_25` (0.25%), `0_5` (0.5%), `1` (1%), `2` (2%) and `5` (5%).

<table><thead><tr><th width="230">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>poll_timestamp</code></td><td>Time we took the order book snapshot, in Unix milliseconds.</td></tr><tr><td><code>poll_date</code></td><td>Time we took the order book snapshot, in ISO 8601.</td></tr><tr><td><code>timestamp</code></td><td>Timestamp of the snapshot provided by the exchange, in Unix milliseconds. <code>null</code> when the exchange doesn't provide one.</td></tr><tr><td><code>mid_price</code></td><td>Mid price between the best bid and the best ask.</td></tr><tr><td><code>pressure{L}</code></td><td>Bids minus asks within L% of the mid price, in the base asset. <code>null</code> when the order book doesn't reach that depth.</td></tr><tr><td><code>total_volume{L}</code></td><td>Bids plus asks within L% of the mid price, in the base asset.</td></tr><tr><td><code>pressure_percent{L}</code></td><td><code>pressure{L}</code> as a percentage of <code>total_volume{L}</code>.</td></tr></tbody></table>

### Request examples

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```url
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
  'https://us.market-api.kaiko.io/v2/data/order_book_snapshots.v1/exchanges/cbse/spot/btc-usd/snapshots/pressure'
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}

```python
import requests
import pandas as pd

api_key = "YOUR_API_KEY"
exchange = "cbse"
instrument_class = "spot"
instrument = "btc-usd"

url = f"https://us.market-api.kaiko.io/v2/data/order_book_snapshots.v1/exchanges/{exchange}/{instrument_class}/{instrument}/snapshots/pressure"
headers = {"Accept": "application/json", "X-Api-Key": api_key}
params = {
    "start_time": "2026-11-01T00:00:00Z",
    "end_time": "2026-11-02T00:00:00Z",
    "sort": "desc",
    "page_size": 100,
}

rows = []
res = requests.get(url, headers=headers, params=params)
res.raise_for_status()
data = res.json()
rows.extend(data.get("data", []))

# Follow next_url until every page is retrieved
while data.get("next_url"):
    res = requests.get(data["next_url"], headers=headers)
    res.raise_for_status()
    data = res.json()
    rows.extend(data.get("data", []))

df = pd.DataFrame(rows)
```

{% endtab %}
{% endtabs %}

### Response example

Shortened to the 0.05% and 0.25% levels.

```json
{
  "query": {
    "metric": "pressure",
    "start_time": "2026-11-01T00:00:00Z",
    "start_timestamp": 1793491200000,
    "end_time": "2026-11-02T00:00:00Z",
    "end_timestamp": 1793577600000,
    "exchange": "cbse",
    "instrument_class": "spot",
    "instrument": "btc-usd",
    "slippage": 0,
    "limit_orders": 10,
    "slippage_ref": "mid_price",
    "sort": "desc",
    "page_size": 1,
    "request_time": "2026-11-09T17:46:31.224616865Z",
    "data_version": "v1",
    "commodity": "order_book_snapshots"
  },
  "time": "2026-11-09T17:46:31.294196674Z",
  "timestamp": 1794246391294,
  "data": [
    {
      "poll_timestamp": 1793577574539,
      "poll_date": "2026-11-01T23:59:34.539Z",
      "timestamp": 1793577571323,
      "mid_price": "78234.685",
      "pressure0_05": "-1.6550416199999987",
      "pressure_percent0_05": "-8.52861003338271",
      "total_volume0_05": "19.405760299999997",
      "pressure0_25": "-40.95183361000002",
      "pressure_percent0_25": "-24.75567522909778",
      "total_volume0_25": "165.42402189"
    }
  ],
  "result": "success",
  "continuation_token": "2abA7TsKtKRiyzQbgitE...",
  "next_url": "https://us.market-api.kaiko.io/v2/data/order_book_snapshots.v1/exchanges/cbse/spot/btc-usd/snapshots/pressure?continuation_token=..."
}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kaiko.com/rest-api/cefi-spot-markets/market-data/order-book-aggregations/order-book-pressure.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
