Get Perp Market Account
Retrieve a perpetual market account by its market index:Force Fetch from RPC
Force a fetch from RPC before returning the account (useful for testing):Get All Perp Markets
Retrieve all perpetual market accounts:PerpMarketAccount Structure
ThePerpMarketAccount type contains all data for a perpetual market.
number
required
The unique identifier for this perp market
PublicKey
required
The on-chain address of this market account
MarketStatus
required
Current status of the market (e.g., active, paused, settlement, delisted)
ContractType
required
Type of contract: perpetual, future, or prediction
ContractTier
required
Risk tier classification: A, B, C, speculative, highly speculative, or isolated
number[]
required
Market name as byte array (use
decodeName() to convert to string)AMM
required
Automated Market Maker state containing reserves, oracle info, and funding data
number
required
Initial margin ratio required to open positions (in margin precision 10000)
number
required
Maintenance margin ratio to avoid liquidation (in margin precision 10000)
number
required
Initial margin fraction factor for size-based margin increases
number
required
IMF factor applied to unrealized PnL for margin calculations
number
required
Asset weight applied to positive unrealized PnL for initial margin
number
required
Asset weight applied to positive unrealized PnL for maintenance margin
number
required
Count of users with open positions in this market
number
required
Total count of users interacting with this market
PoolBalance
required
PnL pool used to settle positive user PnL
number
required
Fee paid to liquidators (in percentage precision)
number
required
Fee paid to insurance fund during liquidations
BN
required
Expiry timestamp for future contracts (0 for perpetuals)
BN
required
Settlement price for expired futures