Re-exports
Modules
Macros
Structs
Iterates the fixed and oracle_pegged OrderTrees simultaneously, allowing users to
walk the orderbook without caring about where an order came from.
Reference to a node in a book side component
InnerNodes and LeafNodes compose the binary tree of orders.
LeafNodes represent an order in the binary tree
Perp order parameters
Iterate over orders in order (bids=descending, asks=ascending)
A binary tree on AnyNode::key()
Maintains a “stable_price” based on the oracle price.
Enums
Enum for lookup into ix gate
note:
total ix files 56,
ix files included 48,
ix files not included 8,
SideAndOrderTree is a storage optimization, so we don’t need two bytes for the data
Constants
The token index used in AccountBuybackFeesWithMngo to exchange for MNGO
The token index used for the insurance fund.
The token index used for settling perp markets.
This token index is supposed to be the token that oracles quote in.
Traits
Header is created by scanning and parsing the dynamic portion of the account.
This stores useful information e.g. offsets to easily seek into dynamic content.
Trait to allow a AccountLoader to create an accessor for the full account.
Functions
Creates price data for a fixed order’s price
Retrieves the price (in lots) from a fixed order’s price data
Creates a binary tree node key.
Creates price data for an oracle pegged order from the price offset
Retrieves the price offset (in lots) from an oracle pegged order’s price data
Returns the price of one native base token, in native quote tokens
Compares the
fixed
and oracle_pegged
order and returns the one that would match first.Type Definitions
Useful when loading from bytes
Useful when loading from RefCell, like from AccountInfo
Useful when loading from RefCell, like from AccountInfo
Full reference type, useful for borrows
Full reference type, useful for borrows
Fully owned MangoAccount, useful for tests