Expand description
Tick / lot price conversions.
Enums§
Constants§
- MAX_
UI_ ORDER_ SIZE_ UNITS - Release-safety ceiling for user-entered base-asset size. This is far above normal UI presets but prevents pathological input from ever reaching an on-chain lot conversion.
Functions§
- base_
lots_ to_ units - Converts on-chain base lots into the absolute token unit size float.
- pct_
change_ 24h - 24h percentage change from mark vs. prior-day mark;
0.0whenprev_dayis zero. - phoenix_
decimal_ to_ num_ base_ lots - Convert Phoenix HTTP
Decimal(value, decimals)intonum_base_lotsfor a market’sbase_lot_decimals(equivalent tosize * 10^base_lot_decimalswith exact rationals). When scaling down (base_lot_decimals < value_decimals), truncates toward zero like an exact integer quotient. - ticks_
to_ price - Converts on-chain price ticks into an absolute USD float representation.
- ui_
size_ to_ num_ base_ lots - Converts a user-entered base-asset size into on-chain base lots with explicit
validation. Values are floored to whole lots, matching the previous
truncate-toward-zero behavior, but invalid and overflowing inputs now return
an error instead of silently saturating through
as u64.