Expand description
Asset ids: the integer an order names its market by. Ids run perps on the main dex below 10000, spot pairs from 10000, HIP-3 perps from 100000 and HIP-4 outcomes from 100000000, so an id alone says what it names, and so which builder cap holds it.
Structs§
- Asset
- An asset id. Made from the index it is counted from, so a pair index is never sent where an asset id belongs; an index past its range is refused rather than spilling into the next kind’s ids.
Enums§
- Asset
Kind - What an asset id names.
- Outcome
Side - A HIP-4 outcome’s side, the last digit of its encoding.
Constants§
- HIP3_
ASSET_ BASE - Where HIP-3 perps begin:
100000 + dex * 10000 + index,dexthe dex’s place inperpDexs, where the main dex is 0. - HIP3_
DEX_ SPAN - How many ids each HIP-3 dex spans.
- OUTCOME_
ASSET_ BASE - Where HIP-4 outcomes begin:
100000000 + 10 * outcome + side. - SPOT_
ASSET_ BASE - Where spot pairs begin:
10000 + pair index.