> 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/metadata/perpdexlimits.md).

# perpDexLimits

Returns the open-interest and transfer limits for a builder-deployed (HIP-3) perp DEX, including the per-asset open-interest caps.

<table><thead><tr><th width="115">Field</th><th width="177">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Must be <code>"perpDexLimits"</code></td></tr><tr><td><code>dex</code></td><td>string</td><td>Perp DEX name (e.g. <code>"xyz"</code>). Required. An empty string selects the native Hyperliquid perp DEX.</td></tr></tbody></table>

## Request

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

```bash
curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "perpDexLimits",
    "dex": "xyz"
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os
import json

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'perpDexLimits',
        'dex': 'xyz'
    },
    headers={
        'Authorization': f'Bearer {os.environ["HYDROMANCER_API_KEY"]}',
        'Content-Type': 'application/json'
    }
)
print(json.dumps(response.json(), indent=2))
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
import axios from 'axios';

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

console.log(JSON.stringify(response.data, null, 2));
```

{% endtab %}
{% endtabs %}

***

## Response Fields

Returns `null` for a DEX that has no configured limits.

| Field            | Type   | Description                                                           |
| ---------------- | ------ | --------------------------------------------------------------------- |
| `totalOiCap`     | string | Total open-interest cap across the DEX                                |
| `oiSzCapPerPerp` | string | Open-interest size cap per perp                                       |
| `maxTransferNtl` | string | Maximum transfer notional                                             |
| `coinToOiCap`    | array  | Array of `[coin, oiCap]` pairs giving the per-asset open-interest cap |

<details>

<summary>Response (trimmed)</summary>

```json
{
  "totalOiCap": "6000000000.0",
  "oiSzCapPerPerp": "20000000000.0",
  "maxTransferNtl": "2000000000.0",
  "coinToOiCap": [
    ["xyz:AAPL", "100000000.0"],
    ["xyz:ALUMINIUM", "25000000.0"]
  ]
}
```

</details>
