๐Ÿ”Œ API & Developers

Hyperliquid API Asset IDs: Spot, Builder Perps, and Token ID Mapping

โš ๏ธ Disclosure: Some links on this page are affiliate links. If you sign up through them, I may earn a commission โ€” at no extra cost to you. I only review tools I actually use.
Hyperliquid API asset IDs are the integer values used when submitting orders and cancels through actions. The correct integer depends on whether you are trading a standard perp, a builder-deployed perp, or a spot pair. The official Asset IDs documentation defines the mappings below.

Quick reference

Market typeWhat to look upAsset ID formulaExample
Standard perpCoin index in the meta info responseindexBTC on mainnet is 0
Builder-deployed perpperp_dex_index and index_in_meta100000 + perp_dex_index * 10000 + index_in_metatest:ABC on testnet: 100000 + 1 * 10000 + 0 = 110000
Spot pairspotInfo["index"] for the base/quote pair in spotMeta10000 + spotInfo["index"]PURR/USDC with spot index 0 is 10000
Token IDToken identifier, separate from spot asset IDNot the same as spot asset IDHYPE mainnet token ID 150; mainnet spot ID 107

Standard perp asset IDs

For perpetual endpoints, asset should be the integer index of the coin in the meta info response. For example, the documentation lists BTC = 0 on mainnet.

This is the simplest case: no offset is added. If your bot resolves a perp by name, use the index returned in the perp metadata, not a token ID or a spot pair index.

Builder-deployed perp asset IDs

Builder-deployed perps use a different offset so they do not collide with standard perp indices. The documented formula is:

asset = 100000 + perp_dex_index * 10000 + index_in_meta

Builder-deployed perp names are in the format {dex}:{coin}. The documentation example is test:ABC on testnet, where perp_dex_index = 1 and index_in_meta = 0, producing:

100000 + 1 * 10000 + 0 = 110000

When implementing this, resolve both the builder perp's perp_dex_index and its index_in_meta before constructing the order payload. Do not send the raw {dex}:{coin} string as the asset field; the API expects the calculated integer.

๐Ÿ’ก Hyperliquid

Like what you're reading? Try it yourself โ€” this link supports ChartedTrader at no cost to you.

Create a Hyperliquid account โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime

Spot asset IDs

Spot endpoints expect:

asset = 10000 + spotInfo["index"]

spotInfo is the object in spotMeta that matches the desired quote and base tokens. For example, if PURR/USDC has spot index 0, the spot asset ID is 10000.

Spot asset IDs are not token IDs. The documentation gives HYPE as an example of the distinction:

NetworkHYPE token IDHYPE spot ID
Mainnet150107
Testnet11051035
Mainnet and testnet also use different asset IDs. A bot that hard-codes one network's IDs should not assume the same integers are valid on the other network.

Common mapping mistakes

If an order fails with an asset-related error, first verify which market type you are targeting, then re-fetch the relevant metadata and recompute the asset ID. For broader API error handling, see Hyperliquid API error responses: troubleshooting guide. For a related spot-metadata issue in Python SDK usage, see Hyperliquid spot meta array mismatch fix.

Worked example

Suppose a bot needs to place three orders:

  1. Standard perp BTC on mainnet, where the meta index is 0:
asset = 0
  1. Builder perp test:ABC on testnet, where perp_dex_index = 1 and index_in_meta = 0:
asset = 110000
  1. Spot pair PURR/USDC, where the spotMeta index is 0:
asset = 10000

These examples use the values from the official documentation and are intended to show the formula structure, not live order results.

Source

Create a Hyperliquid account. This is a referral link; a commission may be earned if you sign up.

Continue with Hyperliquid

Browse the Hyperliquid guide hub for the complete user journey.

๐Ÿงฎ Free Hyperliquid calculators

Fee Calculator โ†’
Hyperliquid vs centralized exchange fee comparison
PnL & Liquidation โ†’
Perp PnL + liquidation price
Position Size โ†’
Risk-aware position sizing for HL perps
Hyperliquid

Ready to get started? Use the link below โ€” it helps support ChartedTrader at no cost to you.

Create a Hyperliquid account โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime
๐Ÿ“ˆ

About the author

I'm a systematic trader running live strategies on IB (USDJPY momentum) and Hyperliquid (crypto perps). Every tool reviewed here is something I've used with real capital. Questions? Reach out.

๐Ÿ“š Related Articles

๐Ÿ”Œ
API & Developers

Hyperliquid Outcome Asset IDs: Encoding, Coin Names, and Token Names

Hyperliquid outcome assets use encoding = 10 * outcome + side, then #coin, +token, and asset ID 100000000 + encoding. Includes worked example.

November 10, 2026 โฑ 2 min read
๐Ÿ”ง
Troubleshooting & Fixes

Hyperliquid Python SDK: Builder Perp Slippage Price Misclassified as Spot (2026)

Explains reported GitHub issue #341: Exchange._slippage_price treats HIP-3 builder perps (IDs >= 110000) as spot, so market_open/market_close can emit prices above the perp decimal cap.

November 13, 2026 โฑ 4 min read
๐Ÿ”Œ
API & Developers

Hyperliquid HIP-3: user_fills dex Parameter Missing Fix (2026)

Fix HIP-3 fill tracking on Hyperliquid by parsing the dex prefix from coin, paging userFillsByTime, and using documented WebSocket userFills subscriptions.

July 11, 2026 โฑ 7 min read