Get Spot Market Account
Retrieve a spot market account by its market index:Force Fetch from RPC
Force a fetch from RPC before returning the account (useful for testing):Get All Spot Markets
Retrieve all spot market accounts:Get Quote Spot Market
The quote spot market (USDC, index 0) is commonly used:SpotMarketAccount Structure
TheSpotMarketAccount type contains all data for a spot market.
The unique identifier for this spot market
The on-chain address of this market account
Current status of the market (e.g., active, paused, delisted)
Asset tier classification: collateral, protected, cross, isolated, or unlisted
Market name as byte array (use
decodeName() to convert to string)SPL token mint address for this market
Vault account holding the market’s token balance
Oracle account providing price data
Oracle source type (Pyth, Switchboard, etc.)
Token decimals for this market
Asset weight for initial margin calculations (in margin precision 10000)
Asset weight for maintenance margin calculations (in margin precision 10000)
Liability weight for initial margin calculations (in margin precision 10000)
Liability weight for maintenance margin calculations (in margin precision 10000)
Initial margin fraction factor for size-based margin increases
Fee paid to liquidators (in percentage precision)
Fee paid to insurance fund during liquidations
Total scaled deposit balance across all users
Total scaled borrow balance across all users
Cumulative deposit interest multiplier
Cumulative borrow interest multiplier
Target utilization rate for optimal interest rates
Interest rate at optimal utilization
Maximum borrow interest rate
Minimum borrow interest rate
Maximum token deposits allowed (0 = unlimited)
Maximum borrow fraction relative to deposits
Deposit size where asset weight scaling begins
Insurance fund information for this market
Historical oracle price data and TWAP values
Historical index price bid/ask data
Minimum order size increment
Minimum price increment
Minimum order size
Maximum position size allowed