Expand description
Represents a price in a market with a specified precision.
Structs§
- Price
- Represents a price in a market with a specified precision.
Constants§
- ERROR_
PRICE - The sentinel
Pricerepresenting errors (this will be removed when Cython is gone). - PRICE_
ERROR - The sentinel value for an error or invalid price.
- PRICE_
MAX - The maximum valid price value that can be represented.
- PRICE_
MIN - The minimum valid price value that can be represented.
- PRICE_
UNDEF - The sentinel value for an unset or null price.
Statics§
- PRICE_
RAW_ MAX - The maximum raw price integer value.
- PRICE_
RAW_ MIN - The minimum raw price integer value.
Functions§
- check_
positive_ price - Checks the price
valueis positive. - decode_
raw_ price_ i64 - The raw i64 price has already been scaled by 10^9. Further scale it by the difference to
FIXED_PRECISIONto make it high/defi-precision raw price.