Functionsยง
- calculate_
value_ usdc_ base_ units - Calculate value of token balance in USDC base units. Takes a signed token balance and converts it to USDC value using the oracle price.
- compute_
token_ balance - Calculate token balance from raw Drift position fields.
- get_
token_ balance - Calculate token balance from a Drift spot position and market data. Returns signed balance in base units (positive = deposit, negative = borrow).