Every order references an integer asset ID. The ID namespace determines the market type.
Asset ID ranges
| Range | Market type | Example |
|---|---|---|
0–999 | Perpetuals | 0 = BTC-PERP |
10000+ | Spot | 10000 = first spot pair |
20000+ | Outcome markets | 20000 = first outcome |
For perps, the ID is the index in the universe array returned by meta. For spot, the ID is 10000 + index in spotMeta.universe.
Spot example
If HYPE/USDC is at index 107 in spotMeta.universe, the asset ID is 10107.
asset = 10000 + spot_indexDo not assume the index is stable across networks. Always read spotMeta and match by name.
Tick and lot size
| Market | Tick | Lot |
|---|---|---|
| BTC-PERP | 0.5 USDC | 0.0001 BTC |
| ETH-PERP | 0.05 USDC | 0.001 ETH |
| SOL-PERP | 0.01 USDC | 0.01 SOL |
| Long-tail perps | 0.0001 USDC | 1 unit |
Metadata returns tickSize and lotSize. Prices and sizes must be exact multiples; the exchange rejects anything else with Invalid price or Invalid size.
Price formatting
Use decimal strings, not floating point. JavaScript numbers lose precision above 2^53 and introduce rounding artifacts in the last decimal.
const price = new Decimal(mid).toFixed(tickDecimals);
const size = new Decimal(notional).div(price).toFixed(lotDecimals);Market metadata
{
"universe": [
{
"name": "BTC-PERP",
"szDecimals": 4,
"maxLeverage": 40,
"onlyIsolated": false,
"tickSize": "0.5",
"lotSize": "0.0001"
}
]
}