> For the complete documentation index, see [llms.txt](https://satangdev.gitbook.io/satang-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://satangdev.gitbook.io/satang-api/apis-v3/websockets/streams/depth.md).

# Depth

## Partial Book Depth

Top level bids and asks. Valid levels are 5, 10 or 20.

{% tabs %}
{% tab title="Stream Info" %}
**Stream Name:** `<pair>@depth<levels>` or `<pair>@depth<levels>@100ms`

**Update Speed:** 1000ms or 100ms
{% endtab %}

{% tab title="Payload" %}

```
{
  "lastUpdateId": 310816162,  // Last update ID
  "bids": [                   // Bids to be updated 
    [
      "306499.98",            // Price level to be updated
      "0.00867287"            // Quantity
    ],
    [
      "304350",
      "0.59428454"
    ],
    [
      "304345.01",
      "0.00978286"
    ],
    [
      "303600",
      "0.235"
    ],
    [
      "303500.01",
      "0.13228"
    ]
  ],
  "asks": [                   // Asks to be updated
    [
      "306699.82",            // Price level to be updated
      "0.19646838"            // Quantity
    ],
    [
      "306887.99",
      "0.1744"
    ],
    [
      "306888",
      "0.22802611"
    ],
    [
      "306932",
      "0.16290253"
    ],
    [
      "306950",
      "0.07202"
    ]
  ]
}
```

{% endtab %}
{% endtabs %}

## Diff Depth

&#x20;Depth updates to locally manage an order book.

{% tabs %}
{% tab title="Stream Info" %}
**Stream Name:** `<pair>@depth` or `<pair>@depth@100ms`

**Update Speed:** 1000ms or 100ms
{% endtab %}

{% tab title="Payload" %}

```
{
  "e": "depthUpdate", // Event type
  "E": 1591838700593, // Event time
  "s": "btc_thb",     // Symbol
  "U": 310816063,     // First update ID in event
  "u": 310816068,     // Final update ID in event
  "b": [              // Bids to be updated
    [
      "304350",       // Price level to be updated
      "0.59428454"    // Quantity 
    ]
  ],
  "a": [              // Asks to be updated
    [
      "306950",       // Price level to be updated
      "0.24642"       // Quantity
    ],
    [
      "307866.09",
      "0.2616"
    ]
  ]
}
```

{% endtab %}
{% endtabs %}


---

# 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://satangdev.gitbook.io/satang-api/apis-v3/websockets/streams/depth.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.
