> 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/getting-started/kaiko-examples/compare-market-depth-between-exchanges.md).

# Compare market depth between exchanges

Market depth is a measure of how well a market can handle large orders without impacting asset prices. A "deep" market has enough volume on both sides - bids (buy orders) and asks (sell orders) - to handle large orders while keeping prices stable. Market depth varies between exchanges and over time, so traders often monitor it across different platforms to determine the best market on which to trade.&#x20;

<figure><img src="/files/y4ExdOeknE7YImSYOGzh" alt=""><figcaption><p>This chart shows the 1% market depth for all trading pairs with BTC as the base asset. It shows the USD value of all bids <code>(bid_volume_1)</code> and asks (<code>ask_volume_1</code>) within 1% of the mid-price.</p></figcaption></figure>

### <mark style="color:blue;">How to build the request</mark>

Use [Market Metrics](/rest-api/monitoring-solutions/kaiko-market-explorer/assets.md) (assets) with the following parameters to replicate this chart.

| Paramater   | Value                    |
| ----------- | ------------------------ |
| asset       | btc                      |
| start\_time | 2022-11-05T00:00:00.000Z |
| end\_time   | 2022-11-28T00:00:00.000Z |
| interval    | 1d                       |
| sources     | true                     |

Here's an example of a cURL string request using the values above:

{% code overflow="wrap" %}

```url
curl -X GET "https://us.market-api.kaiko.io/v2/data/analytics.v2/asset_metrics?asset=btc&start_time=2022-11-05T00:00:00.000Z&end_time=2022-11-28T00:00:00.000Z&interval=1d&sources=true" -H "accept: application/json" -H "X-Api-Key: YOUR_API_KEY"
```

{% endcode %}

When you receive your response, search for the following fields to find the data you need:

* `timestamp`&#x20;
* `buy_market_depths`:
  * exchange
  * volume\_usds: {bid\_volume\_0\_1}
* `sell_market_depth`s:&#x20;
  * exchange&#x20;
  * volume\_usds: {ask\_volume\_0\_1}


---

# 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://docs.kaiko.com/getting-started/kaiko-examples/compare-market-depth-between-exchanges.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.
