Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
],
"summary": "info (alignedQuoteTokenInfo)",
"operationId": "infoAlignedQuoteTokenInfo",
"deprecated": true,
"requestBody": {
"required": true,
"content": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
],
"summary": "info (batchClearinghouseStates)",
"operationId": "infoBatchClearinghouseStates",
"deprecated": true,
"requestBody": {
"required": true,
"content": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@
"enum": [
"perpDexLimits"
]
},
"dex": {
"type": "string",
"minLength": 1,
"description": "Name of the builder-deployed perp DEX. The empty string is not allowed.",
"default": "xyz"
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
"required": [
"type"
"type",
"dex"
]
}
}
Expand All @@ -47,7 +54,34 @@
"content": {
"application/json": {
"schema": {
"type": "object"
"type": "object",
"nullable": true,
"properties": {
"totalOiCap": {
"type": "string",
"description": "Total open interest cap across the DEX."
},
"oiSzCapPerPerp": {
"type": "string",
"description": "Open interest size cap per perpetual."
},
"maxTransferNtl": {
"type": "string",
"description": "Maximum transfer notional amount."
},
"coinToOiCap": {
"type": "array",
"description": "Array of [coin, oiCap] tuples giving the open interest cap per asset.",
"items": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string"
}
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
}
}
}
}
Expand Down
82 changes: 82 additions & 0 deletions reference/hyperliquid-evm-eth-subscribe-syncing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,88 @@ const monitor = new NodeHealthMonitor('wss://hyperliquid-mainnet.core.chainstack
monitor.connect();
```

## Example request

`eth_subscribe("syncing")` runs over a WebSocket connection. After subscribing, the node sends a notification with the current state and then another on every change: `false` when fully synced, or an object with `startingBlock`, `currentBlock`, and `highestBlock` while syncing. The Shell tab uses `wscat` for a quick check; the Python, JavaScript, and TypeScript tabs use the WebSocket transport of each library.

<CodeGroup>

```shell wscat
$ wscat -c wss://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Escape the shell prompt dollar sign in MDX.

Use \$ instead of $ in this MDX code block to satisfy the MDX escaping rule.

As per coding guidelines, “Always escape dollar signs with backslash (\$) in MDX files.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@reference/hyperliquid-evm-eth-subscribe-syncing.mdx` at line 382, The MDX
snippet in the example for the websocket command uses an unescaped shell prompt
dollar sign, which violates the MDX escaping rule. Update the example content in
the relevant MDX section to escape the leading dollar sign as a literal prompt
marker, and ensure any similar shell command examples in this document follow
the same convention.

Source: Coding guidelines

# Wait for the connection to be established

Connected (press CTRL+C to quit)

> {"id":1,"jsonrpc":"2.0","method":"eth_subscribe","params":["syncing"]}
< {"jsonrpc":"2.0","id":1,"result":"0x4f9f6872aa4c474b686cf23e352b725c"}

# A notification is sent immediately with the current state, then on every change.
# When the node is fully synced:
< {"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":"0x4f9f6872aa4c474b686cf23e352b725c","result":false}}

# When the node is syncing:
< {"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":"0x4f9f6872aa4c474b686cf23e352b725c","result":{"startingBlock":"0x0","currentBlock":"0x1234","highestBlock":"0x5678"}}}
```

```python web3.py
import asyncio
from web3 import AsyncWeb3, WebSocketProvider


async def main():
async with AsyncWeb3(WebSocketProvider("YOUR_CHAINSTACK_ENDPOINT")) as w3:
subscription_id = await w3.eth.subscribe("syncing")
print(f"Subscribed with ID: {subscription_id}")

async for message in w3.socket.process_subscriptions():
# result is False when synced, or a progress object while syncing
print(f"Sync status: {message['result']}")


asyncio.run(main())
```

```javascript ethers.js
import { WebSocketProvider } from "ethers";

const provider = new WebSocketProvider("YOUR_CHAINSTACK_ENDPOINT");

// ethers has no high-level "syncing" event, so listen on the underlying
// WebSocket and send the eth_subscribe request directly.
provider.websocket.addEventListener("message", (event) => {
const message = JSON.parse(event.data.toString());
if (message.method === "eth_subscription") {
// result is false when synced, or a progress object while syncing
console.log("Sync status:", message.params.result);
}
});

await provider.send("eth_subscribe", ["syncing"]);
```

```typescript viem
import { createPublicClient, webSocket } from "viem";

const client = createPublicClient({
transport: webSocket("YOUR_CHAINSTACK_ENDPOINT"),
});

// viem has no high-level syncing action, so use the transport's low-level subscribe.
const { unsubscribe } = await client.transport.subscribe({
params: ["syncing"],
onData: (data) => {
// data.result is false when synced, or a progress object while syncing
console.log("Sync status:", data.result);
},
});
```

</CodeGroup>

<Note>
**Use your own endpoint in your code.** The code examples use a placeholder Chainstack endpoint (YOUR_CHAINSTACK_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the [Chainstack console](https://console.chainstack.com/). The curl above uses a shared public endpoint for quick checks only; do not use it in production.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the required link text for console.chainstack.com.

Change [Chainstack console](https://console.chainstack.com/) to [Chainstack account](https://console.chainstack.com/) for consistency with the docs linking standard.

As per coding guidelines, “Use [Chainstack account](link) to link to console.chainstack.com and [Chainstack](link) for chainstack.com; do not mix these.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@reference/hyperliquid-evm-eth-subscribe-syncing.mdx` at line 454, Update the
Hyperliquid EVM subscription syncing doc so the link text for the console URL
follows the docs linking standard. In the referenced markdown content, replace
the current Chainstack console label with the required “[Chainstack
account](https://console.chainstack.com/)” wording wherever that console link
appears, keeping the destination unchanged and ensuring consistency with the
existing linking convention used across the docs.

Source: Coding guidelines

</Note>

## Use cases

The `eth_subscribe("syncing")` method is essential for applications that need to:
Expand Down
10 changes: 5 additions & 5 deletions reference/hyperliquid-info-aligned-quote-token-info.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ openapi: /openapi/hyperliquid_node_api/hypercore_info/info_aligned_quote_token_i
description: "The info endpoint with type: \"alignedQuoteTokenInfo\" retrieves supply, rate, and pending payment information for an aligned quote token."
---

<Info>
This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>
<Warning>
**Removed by Hyperliquid (~June 2026).** The Hyperliquid API no longer recognizes the `alignedQuoteTokenInfo` request type — requests fail to deserialize — and the method has been dropped from the official SDKs. There is no direct replacement. For the aligned quote asset mechanism, see [Aligned quote assets](https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/aligned-quote-assets) in the Hyperliquid docs; for spot token metadata, see [tokenDetails](/reference/hyperliquid-info-token-details). This page is kept for reference.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the internal docs link format required for MDX pages.

The internal link to tokenDetails uses /reference/...; update it to the required internal docs path convention.

As per coding guidelines, “Use relative paths with the /docs/ prefix for internal linking (Platform pages: /docs/page-name, Self-Hosted pages: /docs/self-hosted/page-name)”.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@reference/hyperliquid-info-aligned-quote-token-info.mdx` at line 8, The
internal MDX link in this reference page uses the wrong path convention and
should be updated to the required /docs/ prefix. In the
hyperliquid-info-aligned-quote-token-info.mdx content, change the tokenDetails
link to use the internal docs path format used across docs pages, keeping the
link target consistent with the referenced tokenDetails page.

Source: Coding guidelines

</Warning>

The `info` endpoint with `type: "alignedQuoteTokenInfo"` retrieves supply, rate, and pending payment information for an aligned quote token. Aligned quote tokens are HIP-1 spot tokens that deployers have registered as collateral for HIP-3 perpetual DEXes through the CoreWriter contract on HyperEVM.
The `info` endpoint with `type: "alignedQuoteTokenInfo"` returned supply, rate, and pending payment information for an aligned quote token. Aligned quote tokens are HIP-1 spot tokens that deployers had registered as collateral for HIP-3 perpetual DEXes through the CoreWriter contract on HyperEVM.

Returns `null` if the token has not been registered as an aligned quote asset.
It returned `null` if the token had not been registered as an aligned quote asset.
Comment on lines +7 to +13

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

OpenAPI contract and page status are currently inconsistent.

This page says alignedQuoteTokenInfo is removed, but the OpenAPI spec still exposes infoAlignedQuoteTokenInfo with a normal request/response schema. Please align the spec (e.g., deprecate/remove/annotate) so generated API behavior matches this warning.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@reference/hyperliquid-info-aligned-quote-token-info.mdx` around lines 7 - 13,
The OpenAPI contract for aligned quote token info is still advertising a live
operation while the reference page says it is removed, so make the spec match
the documented status. Update the infoAlignedQuoteTokenInfo operation in the
OpenAPI definition to be deprecated or removed/annotated as unsupported, and
ensure its request/response schema no longer implies a usable API. Keep the
documentation warning and generated client behavior aligned with the status
described on the alignedQuoteTokenInfo reference page.


<Visibility for="humans">
<Check>
Expand Down
8 changes: 4 additions & 4 deletions reference/hyperliquid-info-batch-clearinghouse-states.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ openapi: /openapi/hyperliquid_node_api/hypercore_info/info_batch_clearinghouse_s
description: "The info endpoint with type: \"batchClearinghouseStates\" retrieves perpetuals account summaries for multiple users in one call. On Hyperliquid info."
---

<Info>
You can only use this endpoint on the official Hyperliquid public API. It is not available through Chainstack, as the open-source node implementation does not support it yet. See [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>
<Warning>
**Not available.** This batch method is not served by the public Hyperliquid API — requests return `null` for every address — and it is not available through Chainstack. To fetch perpetuals account state for multiple users, call [clearinghouseState](/reference/hyperliquid-info-clearinghousestate) once per address. Some third-party providers offer their own batch aggregators built on per-user calls. This page is kept for reference.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update internal link path to the MDX docs convention.

The clearinghouseState link uses /reference/...; please switch it to the required internal docs path format.

As per coding guidelines, “Use relative paths with the /docs/ prefix for internal linking (Platform pages: /docs/page-name, Self-Hosted pages: /docs/self-hosted/page-name)”.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@reference/hyperliquid-info-batch-clearinghouse-states.mdx` at line 8, The
internal link in the batch clearinghouse states doc uses the wrong docs
convention, so update the `clearinghouseState` reference to the required
`/docs/`-prefixed internal path format. Locate the markdown link in the MDX
content for `clearinghouseState` and change its href from the current
`/reference/...` style to the corresponding `/docs/...` path, keeping the link
text unchanged.

Source: Coding guidelines

</Warning>

The `info` endpoint with `type: "batchClearinghouseStates"` retrieves perpetuals account summaries for multiple users in one call. Use this to efficiently fetch positions, margin usage, and account values across many addresses.
The `info` endpoint with `type: "batchClearinghouseStates"` was intended to retrieve perpetuals account summaries for multiple users in one call positions, margin usage, and account values across many addresses.

<Visibility for="humans">
<Check>
Expand Down
59 changes: 52 additions & 7 deletions reference/hyperliquid-info-perp-dex-limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "Reference for the perpDexLimits JSON-RPC method on the Hyperliquid
This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

The `info` endpoint with `type: "perpDexLimits"` retrieves the configuration limits for perpetual DEXes on Hyperliquid, including maximum number of assets and other deployment constraints.
The `info` endpoint with `type: "perpDexLimits"` retrieves the market limits for a builder-deployed perpetual DEX on Hyperliquid — the total open interest cap, the per-perpetual open interest size cap, the maximum transfer notional, and the per-asset open interest caps.

<Visibility for="humans">
<Check>
Expand All @@ -25,30 +25,75 @@ You can sign up with your GitHub, X, Google, or Microsoft account.
### Request body

* `type` (string, required) — The request type. Must be `"perpDexLimits"`.
* `dex` (string, required) — The name of the builder-deployed perp DEX, for example `"xyz"`. The empty string is not allowed. Use [perpDexs](/reference/hyperliquid-info-perpdexs) to list deployed perp DEX names.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use /docs/-prefixed internal links for docs pages.

Line 28 links to /reference/hyperliquid-info-perpdexs, which conflicts with the internal-link rule for MDX pages. As per coding guidelines: “Use relative paths with the /docs/ prefix for internal linking” and “Use relative paths for internal links.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@reference/hyperliquid-info-perp-dex-limits.mdx` at line 28, The internal docs
link in the `hyperliquid-info-perp-dex-limits.mdx` content uses the wrong path
style; update the `perpDexs` reference to follow the docs linking convention
with a `/docs/`-prefixed relative internal link. Locate the markdown around the
`dex` field description and change the link target so it points to the
corresponding docs page using the same relative internal-link style used
elsewhere in the MDX docs.

Source: Coding guidelines


## Response

The response contains the perp DEX deployment limits and configuration constraints.
Returns a perp DEX limits object, or `null` if the DEX has no configured limits.

* `totalOiCap` (string) — Total open interest cap across the DEX.
* `oiSzCapPerPerp` (string) — Open interest size cap per perpetual.
* `maxTransferNtl` (string) — Maximum transfer notional amount.
* `coinToOiCap` (array) — Array of `[coin, oiCap]` tuples giving the open interest cap per asset.

## Example request

<CodeGroup>

```shell Shell
curl -X POST \
-H "Content-Type: application/json" \
-d '{"type": "perpDexLimits"}' \
-d '{"type": "perpDexLimits", "dex": "xyz"}' \
https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/info
```

```python Python (hyperliquid-python-sdk)
from hyperliquid.info import Info

# skip_ws=True avoids opening a WebSocket connection for this REST call
info = Info("YOUR_CHAINSTACK_ENDPOINT", skip_ws=True)

# The SDK has no dedicated perpDexLimits helper, so post the request directly.
perp_dex_limits = info.post("/info", {"type": "perpDexLimits", "dex": "xyz"})
print(perp_dex_limits)
```

```typescript TypeScript (@nktkas/hyperliquid)
import { HttpTransport, InfoClient } from "@nktkas/hyperliquid";

// apiUrl points the transport at a custom server (your Chainstack endpoint)
const transport = new HttpTransport({ apiUrl: "YOUR_CHAINSTACK_ENDPOINT" });
const info = new InfoClient({ transport });

const perpDexLimits = await info.perpDexLimits({ dex: "xyz" });
console.log(perpDexLimits);
```

</CodeGroup>

<Note>
**Use your own endpoint in your code.** The code examples use a placeholder Chainstack endpoint (YOUR_CHAINSTACK_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the [Chainstack console](https://console.chainstack.com/). The curl above uses a shared public endpoint for quick checks only; do not use it in production.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the required label for console links.

For https://console.chainstack.com/, use [Chainstack account](...) instead of [Chainstack console](...). As per coding guidelines: “Use [Chainstack account](link) to link to console.chainstack.com.”

Suggested wording fix
-... from the [Chainstack console](https://console.chainstack.com/).
+... from the [Chainstack account](https://console.chainstack.com/).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Use your own endpoint in your code.** The code examples use a placeholder Chainstack endpoint (YOUR_CHAINSTACK_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the [Chainstack console](https://console.chainstack.com/). The curl above uses a shared public endpoint for quick checks only; do not use it in production.
**Use your own endpoint in your code.** The code examples use a placeholder Chainstack endpoint (YOUR_CHAINSTACK_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the [Chainstack account](https://console.chainstack.com/). The curl above uses a shared public endpoint for quick checks only; do not use it in production.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@reference/hyperliquid-info-perp-dex-limits.mdx` at line 75, The link text for
https://console.chainstack.com/ should use the required label format, so update
the reference in the documentation to use [Chainstack account](...) instead of
[Chainstack console](...) while keeping the surrounding guidance in the same
section of hyperliquid-info-perp-dex-limits.mdx.

Source: Coding guidelines

</Note>

## Example response

```json
null
{
"totalOiCap": "7000000000.0",
"oiSzCapPerPerp": "20000000000.0",
"maxTransferNtl": "3000000000.0",
"coinToOiCap": [
["xyz:AAPL", "100000000.0"],
["xyz:ALUMINIUM", "25000000.0"],
["xyz:AMD", "100000000.0"]
]
}
```

## Use case

The `info` endpoint with `type: "perpDexLimits"` is useful for:

* Checking deployment constraints before deploying a new perp DEX
* Understanding the maximum number of assets allowed per DEX
* Building deployment tools that validate against current limits
* Checking the open interest caps of a builder-deployed perp DEX before opening positions
* Monitoring per-asset open interest caps on a perp DEX
* Building risk and deployment tools that validate against current market limits