Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.raydium.io/llms.txt

Use this file to discover all available pages before exploring further.

Raydium Perps uses an order book. Pick the order type based on whether you care more about immediate execution, exact price, or position management.

Order types

Raydium Perps supports these order types:
Order typeWhat it doesWhen to use it
MarketBuys or sells immediately against the best available order-book prices. Any unfilled remainder is canceled if the book cannot fill the full size.You want immediate execution and accept possible slippage.
LimitBuys or sells at your limit price or better. The order fills only if the market reaches that price.You want price control and can wait for a fill.
Stop marketStays inactive until the trigger price is reached, then becomes a market order.You want an execution trigger and prioritize getting out or in once triggered.
Stop limitStays inactive until the trigger price is reached, then becomes a limit order.You want a trigger but still want a limit price.
ScaleSplits one larger order into multiple smaller limit orders across a price range.You want to enter or exit gradually.

Order flags

Order flags change how limit-style orders behave.
FlagBehavior
IOCImmediate-or-cancel. Fills as much as possible immediately at your limit price or better, then cancels the unfilled remainder.
FOKFill-or-kill. Fills the entire order immediately at your limit price or better, or cancels with no partial fill.
Post-onlyAdds liquidity as a maker. If it would match immediately, it cancels instead.
Reduce-onlyPrevents the order from increasing your position. It can only reduce or close an existing position in that market.

User checks

Before submitting an order, confirm:
  • Market and direction are correct.
  • Size and leverage match your intent.
  • Stop trigger and limit price are not inverted.
  • Reduce-only is enabled when you only intend to close or reduce exposure.
  • Post-only is enabled when you want maker behavior.

Where to go next