For the complete documentation index, see llms.txt. This page is also available as Markdown.

allActiveAssetCtx

Stream all asset contexts in a single batch message. Requires add-on permission.

Every live data message includes both routing identifiers with the same value:

{"type": "allActiveAssetCtx", "channel": "allActiveAssetCtx"}

Other payload fields are omitted above. Existing clients may continue routing on either field.

New endpoint - this endpoint is not a part of original Hyperliquid API and is added by us for builder convenience.

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

Instead of subscribing to activeAssetCtx per-coin (N separate subscriptions), allActiveAssetCtx sends all asset contexts in a single message per snapshot tick (~1s).

Subscribe

{
    "type": "subscribe",
    "subscription": {
        "type": "allActiveAssetCtx",
        "dex": "dex_name" // optional, filters by DEX prefix
    }
}

dex also accepts a list, so several DEXes can be requested in one subscribe:

{
    "type": "subscribe",
    "subscription": {
        "type": "allActiveAssetCtx",
        "dex": ["main", "hyna"]
    }
}

Unsubscribe

Parameters

Parameter
Required
Description

dex

No

Filter by DEX — a single name or a list of names (up to 32 distinct filters per connection). "main" returns native coins (BTC, ETH, etc); "hyperliquid" is accepted as an alias for it. Other values (e.g. "hyna") return only coins with that prefix (max 6 characters per name). Omit for all coins across all DEXes.

Multiple DEXes

DEX filters are additive: a connection holds one allActiveAssetCtx subscription whose filter set grows with each subscribe and shrinks with each dex-scoped unsubscribe (the same model as per-coin trades/allFills subscriptions).

  • Subscribing to "main" and then "hyna" results in one message per tick containing both DEXes' coins — the second subscribe merges rather than replaces, and the confirmation echoes the merged set ("dex": ["hyna", "main"]).

  • Subscribing without dex switches the subscription to unfiltered (all DEXes), absorbing any active filters. The confirmation carries a dex_filters_absorbed warning listing them.

  • Subscribing to a DEX that is already covered — either already in the filter set, or while the unfiltered form is active — is accepted as a no-op with a redundant_dex warning.

  • Unsubscribing with dex removes just those DEXes; the subscription ends when the last filter is removed. Unsubscribing without dex always clears the whole subscription. A dex-scoped unsubscribe is rejected with an error message while the unfiltered form is active (there is no "all DEXes minus one" mode — unsubscribe fully, then resubscribe with an explicit list).

  • The merged filter set is capped at 32 distinct DEXes per connection; a subscribe that would exceed the cap is rejected with an error.

  • Subscribing to an unrecognized DEX — a name that is not "main" and not on the deployed perp-DEX roster — succeeds, but the confirmation carries an unknown_dex warning listing it (the filter starts matching if such a DEX deploys later). When market metadata is temporarily unavailable the code is market_activity_unavailable instead, same as the l2Book coin warnings.

Warnings arrive on the subscriptionUpdate confirmation:

Message format

One message per snapshot tick containing all matching asset contexts:

The data field is a map from coin name to asset context. impactPxs contains the average execution price to trade impact notional (20k$ for BTC/ETH, 6k$ for others) on bid and ask.

When using the dex filter, only matching coins are included. For example, "dex": "main" would return only BTC and ETH from the above, while "dex": "hyna" would return only hyna:BTC.

Examples

Error messages:

Common errors

Last updated