Skip to main content
Market orders execute immediately at the best available price.

Complete Example

market-order.ts

With Price Protection

Set a maximum price to prevent excessive slippage:

Key Points

Market orders fill against the best available liquidity in the DLOB or AMM.
Always set a maximum acceptable price to protect against slippage.
After placing, query your position to verify the fill.

Next Steps

Limit Orders

Place limit orders

Modify Orders

Modify existing orders