encoding derived from the outcome ID and binary side:
encoding = 10 * outcome + side
Only side = 0 and side = 1 are valid.
The same encoding is used in three representations:
| Representation | Format | Example for outcome 1, side 0 |
|---|---|---|
| Outcome spot coin | #<encoding> | #10 |
| Outcome token name | +<encoding> | +10 |
| Outcome asset ID | 100000000 + encoding | 100000010 |
1 and side 0:
encoding = 10 * 1 + 0 = 10
coin = #10
token = +10
asset ID = 100000010
The outcome ID and side are found in the outcomeMeta info response. Hyperliquidโs documentation notes that outcomes share most implementation details with spot trading, but their API representation is different from both spot and perps.
Reference: Hyperliquid Asset IDs documentation.
Like what you're reading? Try it yourself โ this link supports ChartedTrader at no cost to you.
Create a Hyperliquid account โExample helper
This is a reference example based on the documented formula, not a tested integration:
def outcome_asset_id(outcome: int, side: int) -> int:
if side not in (0, 1):
raise ValueError("Only side 0 and side 1 are valid.")
encoding = 10 * outcome + side
return 100_000_000 + encoding
For outcome = 1 and side = 0, the helper returns 100000010.
Related mapping
For spot and builder-deployed perp asset IDs, see Hyperliquid API Asset IDs: Spot, Builder Perps, and Token ID Mapping.
This article includes a Hyperliquid referral link. If you create an account through Create a Hyperliquid account, I may earn a referral reward. The link may provide a 4% fee discount on the first $25M of volume; Vaults and sub-accounts are excluded.
Continue with Hyperliquid
Browse the Hyperliquid guide hub for the complete user journey.