Instruction Builders
All order builders produce Phoenix instructions. They do not submit transactions by themselves.| Action | TypeScript builder | Rust builder | Phoenix instruction |
|---|---|---|---|
| Place limit order | client.ixs.buildPlaceLimitOrder(...) | PhoenixTxBuilder::place_limit_order(...) | PlaceLimitOrder |
| Cancel by order id | client.ixs.buildCancelOrdersById(...) | PhoenixTxBuilder::build_cancel_orders(...) | CancelOrdersById |
| Cancel all in a market | client.ixs.buildCancelAll(...) | PhoenixTxBuilder::build_cancel_all_orders(...) | CancelAll |
| Place market order | client.ixs.buildPlaceMarketOrder(...) | PhoenixTxBuilder::place_market_order(...) | PlaceMarketOrder |
| Place position stop loss | client.ixs.buildPlaceStopLoss(...) | PhoenixTxBuilder::build_stop_loss_orders(...) | PlaceStopLoss |
| Place conditional order | client.ixs.buildPlacePositionConditionalOrder(...) | PhoenixTxBuilder::place_position_bracket_order(...) or raw ix builders | PlacePositionConditionalOrder |
Limit Order
Cancel Limit Order
Cancel All
Market Order
Stop Losses
Position stop losses use a per-trader, per-asset stop-loss account. If the account does not already exist, creating it can add an account-init instruction and incur rent.Conditional Orders
Conditional orders use a trader conditional-orders account. If the account does not already exist, your flow may need to create it first and pay rent. The newer bracket helpers can check and create the account when configured with an RPC client; raw builders require you to includeCreateConditionalOrdersAccount yourself when needed.