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.

The five order types

Market. Buys or sells immediately at the best available prices in the order book. Matches against resting orders until your size is filled. If the book cannot fill the full amount, the unfilled remainder is canceled (not rested). Use for immediate execution at the cost of slippage. Limit. Buys or sells at a specific price you choose (the limit price) or better. A limit order rests on the book until matched or canceled. Use when price, not speed, is the priority. Stop Market. Inactive until the market prints your trigger (stop) price. When triggered, it is submitted as a market order and fills at the next available prices if sufficient liquidity is available. Use when immediate execution is more important than price control. Stop Limit. Inactive until the market prints your trigger price. When triggered, it is submitted as a limit order at your specified limit price and will only fill if the book reaches that price. Use when you want a stop that never executes worse than a floor/ceiling, accepting that it may not fill at all in a gap move. Scale. Splits a single larger order into multiple smaller limit orders distributed across a price range. Use for gradual entry or exit rather than punching the whole size through at one price.

The four order flags

These can be attached to Limit or Stop-Limit orders to change execution semantics: IOC — Immediate-or-Cancel. Fills as much as possible instantly at the limit price (or better). Any unfilled portion is canceled rather than resting on the book. Use when you want immediate execution with a price ceiling. FOK — Fill-or-Kill. Either fills the entire order instantly at the limit price (or better), or cancels with no partial fill. Use when partial fills are worse than no fill — e.g., the position only makes sense at full size. Post-Only. Ensures the order adds liquidity (maker side). If it would match against a resting order on placement (i.e. it would be a taker), it is canceled instead of crossing. Use when you want maker execution rather than taker execution. Reduce-Only. Prevents the order from increasing your position. It can only close or reduce an existing position in that market. If you have no position, or the order would increase it, the order does not execute. Use for automated take-profit / stop-loss logic where you never want to accidentally flip into the opposite direction.

Combining type + flags

Not every combination is allowed. The common ones:
OrderFlagTypical use
LimitResting maker quote
LimitPost-OnlyStrict maker quote (no accidental take)
LimitIOCAggressive take with price cap
LimitFOKAll-or-nothing take
LimitReduce-OnlyExit at a price
MarketReduce-OnlyEmergency close at any price
Stop MarketReduce-OnlyStop-loss that prioritizes exit without flipping
Stop LimitReduce-OnlyStop-loss with price floor, no flip
ScalePost-OnlyPassive ladder entry
Post-Only and Reduce-Only can be combined on the same order.

Fee implications

Order type and flags interact with fee tier:
  • Market orders always pay taker. No way to get maker rebates on a market order.
  • Limit orders pay maker if they rest on the book and get matched later; pay taker if they match immediately on placement.
  • Post-Only targets maker fees by rejecting any placement that would cross.
  • Stop orders pay the fee class of whatever they convert into when triggered (stop-market → taker; stop-limit → maker unless it crosses).
Volume-based taker tiers and the flat 0 bps maker fee are documented in fees.

Where to go next

Sources:
  • Orderly Network order-type documentation.
  • Raydium Perps trading interface at perps.raydium.io.