Skip to main content
Asset IDs are hexadecimal strings used to specify the asset or market in actions such as orders, TWAP orders, and withdrawals. Read Asset IDs from perpMeta, spotMeta, or predictionMeta. Polygon and HyperEVM Asset IDs are listed by protocolTransferRoutes.

Asset ID Format

Asset IDs use the characters 0–9 and a–f, a number format called hexadecimal. Notional returns Asset IDs in lowercase; send them in lowercase. In the formulas below, + joins pieces of text into one ID. hex(value, width) writes a number in hexadecimal, then adds zeroes at the start to make width characters. Orders, TWAP orders, withdrawals, and market metadata use the ID without 0x at the start. Protocol transfers, version 2 Polymarket split/merge actions, and responses such as pendingWithdrawals and the protocol transfer endpoints use 0x at the start. updateLeverage and updateIsolatedMargin also accept Hyperliquid’s numeric perpetual index.

Examples

BTC spot token

BTC spot uses Hyperliquid’s UBTC token. To construct its Asset ID:
  1. Find UBTC in Hyperliquid’s spotMeta.tokens. Its index is 197.
  2. Add the spot token offset: 10000 + 197 = 10197.
  3. Write that value in hexadecimal: hex(10197, 4) = "27d5".
  4. Add the spot token prefix: "0001" + "27d5" = "000127d5".
The Notional Asset ID for BTC spot (UBTC) is 000127d5.

Other assets and markets

  • e.g. BTC perpetual is 00020000.
  • e.g. BTC/USDC spot (UBTC/USDC) is 0003008e.
  • e.g. Yes on “Anthropic IPO by November 30, 2026?” on Hyperliquid (outcomeId 5112, side 0) is 0004000005f6a8b0.
  • e.g. Tesla perpetual (xyz:TSLA, venueIndex 110001) is 000500000001adb1.
  • e.g. Yes on Polymarket’s “Will the US confirm that aliens exist before 2027?” example (tokenId 651150819117105875331414918119047680898421632356043490229292782433651916800) is 1001017089ce3ba22aaa0a4cba8250b8c8e1eb000000000000000000000000000000.
  • e.g. pUSD on Polygon is 800101c011a7e12a19f7b1f670d46f03b03f3342e82dfb (0x800101c011a7e12a19f7b1f670d46f03b03f3342e82dfb in protocol transfers).