> For the complete documentation index, see [llms.txt](https://docs.native.org/native-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.native.org/native-dev/legacy-v2/orderbook.md).

# Orderbook

The Orderbook provides real-time pricing and detailed data from private market makers, aggregated through the Native Swap Engine.

Swappers can access the latest information by querying the orderbook endpoint and analyzing the returned data, which includes price levels and token quantities.

**Example Response**:

```json
[
    {
        "base_symbol": "WETH",
        "quote_symbol": "USDT",
        "base_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "quote_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
        "minimum_in_base": 0,
        "side": "bid",
        "levels": [
            [
                0.0001,
                3213.12345
            ],
            [
                12.75786733219471,
                3210.15
            ],
            [
                42,
                3210.12
            ]
        ]
    }
}
```

For further details about the orderbook endpoint, refer to the following link: [Swap API](/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis.md), [PMM API](/native-dev/build-with-native/market-makers/native-market-makers-api.md)

**Note**: The price levels provided are non-cumulative. For example, to execute a trade of 30 ETH for USDT, the price would be calculated as:\
`(0.0001 * 3213.12345 + 12.75786733219471 * 3210.15 + (30 - 0.0001 - 12.75786733219471) * 3210.12) / 30 = 3,210.13276787883`


---

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

```
GET https://docs.native.org/native-dev/legacy-v2/orderbook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
