OrderType
Defines the type of order.LIMIT- Standard limit order that executes at specified price or betterTRIGGER_MARKET- Market order triggered when price condition is metTRIGGER_LIMIT- Limit order triggered when price condition is metMARKET- Immediate execution at best available priceORACLE- Order priced relative to oracle price with offset
MarketType
Specifies whether an order/position is for perpetual or spot markets.SPOT- Spot market (immediate settlement)PERP- Perpetual futures market
PositionDirection
Defines the direction of a position or order.LONG- Long position (buy/bullish)SHORT- Short position (sell/bearish)
OrderStatus
Indicates the current status of an order.INIT- Order initialized but not yet activeOPEN- Order is active and can be filledFILLED- Order has been completely filledCANCELED- Order has been canceled
OrderTriggerCondition
Defines when a trigger order should activate.ABOVE- Trigger when price goes above trigger priceBELOW- Trigger when price goes below trigger priceTRIGGERED_ABOVE- Above condition has been triggeredTRIGGERED_BELOW- Below condition has been triggered
PostOnlyParams
Defines post-only behavior for orders.NONE- No post-only requirementMUST_POST_ONLY- Transaction fails if order can’t be maker-onlyTRY_POST_ONLY- Order not placed if can’t be maker-only, but transaction succeedsSLIDE- Price modified to ensure maker-only if needed
SizeDistribution
How to distribute order sizes across scale orders.FLAT- Equal size for all ordersASCENDING- Smallest at start price, largest at end priceDESCENDING- Largest at start price, smallest at end price
MarketStatus
Indicates the operational status of a market.INITIALIZED- Market created but not yet activeACTIVE- Market is fully operationalFUNDING_PAUSED- Funding rate updates pausedAMM_PAUSED- AMM operations pausedFILL_PAUSED- Order fills pausedWITHDRAW_PAUSED- Withdrawals pausedREDUCE_ONLY- Only position-reducing orders allowedSETTLEMENT- Market in settlement modeDELISTED- Market has been delisted
SpotBalanceType
Indicates whether a spot position is a deposit or borrow.DEPOSIT- User has deposited/lent tokensBORROW- User has borrowed tokens
OracleSource
Specifies the oracle provider for price feeds.PYTH- Standard Pyth oraclePYTH_PULL- Pyth pull-based oracleSWITCHBOARD- Switchboard oracleSWITCHBOARD_ON_DEMAND- Switchboard on-demand oracleQUOTE_ASSET- Uses quote asset as oracle (for stablecoins)
ContractType
Type of perpetual contract.PERPETUAL- Perpetual futures (no expiry)FUTURE- Dated futures (with expiry)PREDICTION- Prediction market
ContractTier
Risk tier classification for perpetual markets.A- Tier A (lowest risk, best margin terms)B- Tier B (moderate risk)C- Tier C (higher risk)SPECULATIVE- Speculative assetsHIGHLY_SPECULATIVE- Highly speculative assetsISOLATED- Isolated margin only
AssetTier
Risk tier classification for spot assets.COLLATERAL- Can be used as collateralPROTECTED- Protected asset statusCROSS- Cross-margin enabledISOLATED- Isolated margin onlyUNLISTED- Not listed for trading
MarginMode
Margin mode for user accounts.DEFAULT- Standard margin requirementsHIGH_LEVERAGE- High leverage mode enabledHIGH_LEVERAGE_MAINTENANCE- High leverage in maintenance mode
OrderAction
Type of order action event.PLACE- Order was placedCANCEL- Order was canceledEXPIRE- Order expiredFILL- Order was filledTRIGGER- Trigger order was activated
LiquidationType
Type of liquidation.LIQUIDATE_PERP- Liquidate perpetual positionLIQUIDATE_SPOT- Liquidate spot positionLIQUIDATE_BORROW_FOR_PERP_PNL- Liquidate borrow to cover perp PnLLIQUIDATE_PERP_PNL_FOR_DEPOSIT- Use perp PnL to cover depositPERP_BANKRUPTCY- Perpetual position bankruptcySPOT_BANKRUPTCY- Spot position bankruptcy
UserStatus
Status flags for user accounts.BEING_LIQUIDATED(1) - Account is being liquidatedBANKRUPT(2) - Account is bankruptREDUCE_ONLY(4) - Account in reduce-only modeADVANCED_LP(8) - Advanced liquidity providerPROTECTED_MAKER(16) - Protected maker status
ExchangeStatus
Global exchange status flags.ACTIVE(0) - Exchange fully operationalDEPOSIT_PAUSED(1) - Deposits pausedWITHDRAW_PAUSED(2) - Withdrawals pausedAMM_PAUSED(4) - AMM operations pausedFILL_PAUSED(8) - Order fills pausedLIQ_PAUSED(16) - Liquidations pausedFUNDING_PAUSED(32) - Funding updates pausedSETTLE_PNL_PAUSED(64) - PnL settlement pausedPAUSED(255) - All operations paused