> For the complete documentation index, see [llms.txt](https://docs.hydromancer.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hydromancer.xyz/readme/rest-api/market-data/currentdepth.md).

# currentDepth

{% hint style="info" %}
New endpoint - this endpoint is not a part of original Hyperliquid API and is added by us for builder convenience.
{% endhint %}

{% hint style="warning" %}

### ⚠️ This is an add-on endpoint - access has to be purchased separately.

{% endhint %}

### Overview

The `currentDepth` endpoint returns a real-time snapshot of cumulative orderbook depth at wide BPS levels (10, 25, 50, 100, 200, 500) for all markets. Depth is computed from the full L4 orderbook with no minimum liquidity filter.

**Key details:**

* Refreshed every second (same cadence as foundational data snapshots)
* Returns all markets in a single batch response
* Depth values are cumulative (e.g., 50 bps includes all liquidity within 50 bps)
* Grouped by DEX, filterable with optional `dex` parameter
* Values are in USD
* Includes `timestampMs` for data freshness verification

## Request

**Endpoint:** `POST /info`

<table><thead><tr><th width="164">Field</th><th width="119">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Must be <code>"currentDepth"</code></td></tr><tr><td><code>dex</code></td><td>string</td><td>Filter by DEX (e.g., "hyperliquid", "hyna") (optional)</td></tr></tbody></table>

{% tabs %}
{% tab title="cURL" %}

```bash
# All markets, all DEXes
curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "currentDepth"}'

# Filter by DEX
curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "currentDepth", "dex": "hyperliquid"}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'currentDepth',
        'dex': 'hyperliquid'  # optional
    },
    headers={
        'Authorization': f'Bearer {os.environ.get("HYDROMANCER_API_KEY")}',
        'Content-Type': 'application/json'
    }
)

print(response.json())
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
import axios from 'axios';

try {
    const response = await axios.post('https://api.hydromancer.xyz/info', {
        type: 'currentDepth',
        dex: 'hyperliquid'  // optional
    }, {
        headers: {
            'Authorization': `Bearer ${process.env.HYDROMANCER_API_KEY}`,
            'Content-Type': 'application/json'
        }
    });

    console.log(response.data);
} catch (error) {
    console.error('Error:', error.message);
}
```

{% endtab %}
{% endtabs %}

<details>

<summary>Response</summary>

```json
{
  "timestampMs": 1712930000000,
  "data": [
    {
      "coin": "BTC",
      "dex": "hyperliquid",
      "levels": [
        { "bps": 10, "bidDepthUsd": 4523891.23, "askDepthUsd": 3891234.56 },
        { "bps": 25, "bidDepthUsd": 12345678.90, "askDepthUsd": 11234567.89 },
        { "bps": 50, "bidDepthUsd": 28456789.01, "askDepthUsd": 26789012.34 },
        { "bps": 100, "bidDepthUsd": 45678901.23, "askDepthUsd": 43210987.65 },
        { "bps": 200, "bidDepthUsd": 67890123.45, "askDepthUsd": 65432109.87 },
        { "bps": 500, "bidDepthUsd": 89012345.67, "askDepthUsd": 87654321.09 }
      ]
    },
    {
      "coin": "ETH",
      "dex": "hyperliquid",
      "levels": [
        { "bps": 10, "bidDepthUsd": 1234567.89, "askDepthUsd": 1123456.78 },
        { "bps": 25, "bidDepthUsd": 3456789.01, "askDepthUsd": 3234567.89 },
        { "bps": 50, "bidDepthUsd": 6789012.34, "askDepthUsd": 6543210.98 },
        { "bps": 100, "bidDepthUsd": 12345678.90, "askDepthUsd": 11234567.89 },
        { "bps": 200, "bidDepthUsd": 18901234.56, "askDepthUsd": 17890123.45 },
        { "bps": 500, "bidDepthUsd": 23456789.01, "askDepthUsd": 22345678.90 }
      ]
    }
  ]
}
```

</details>

## Response Fields

| Field                         | Description                                             |
| ----------------------------- | ------------------------------------------------------- |
| `timestampMs`                 | Epoch milliseconds when the depth snapshot was computed |
| `data`                        | Array of per-market depth entries                       |
| `data[].coin`                 | Base coin symbol (e.g., "BTC", "ETH")                   |
| `data[].dex`                  | DEX name (e.g., "hyperliquid", "hyna")                  |
| `data[].levels`               | Array of depth levels, one per BPS threshold            |
| `data[].levels[].bps`         | BPS threshold (10, 25, 50, 100, 200, 500)               |
| `data[].levels[].bidDepthUsd` | Cumulative bid depth within this BPS level, in USD      |
| `data[].levels[].askDepthUsd` | Cumulative ask depth within this BPS level, in USD      |

### Comparison with marketLiquidity

| Feature     | currentDepth              | marketLiquidity               |
| ----------- | ------------------------- | ----------------------------- |
| BPS levels  | 10, 25, 50, 100, 200, 500 | 2, 5, 10, 25, 25-500          |
| Granularity | Real-time snapshot        | Time series (24h retention)   |
| Values      | USD                       | Market asset units            |
| Scope       | All markets in one call   | Single market per call        |
| History     | Current only              | Up to 24h with time filtering |

### Rate limits

* 5 points per request

### Common errors

* **403**: Permission denied - check API key
* **429**: Rate limit exceeded
* **500**: Internal error - depth data may not yet be published
