Complete Example
market-order.ts
With Price Protection
Set a maximum price to prevent excessive slippage:Key Points
Market orders execute immediately
Market orders execute immediately
Market orders fill against the best available liquidity in the DLOB or AMM.
Set price limits for protection
Set price limits for protection
Always set a maximum acceptable price to protect against slippage.
Check order fills
Check order fills
After placing, query your position to verify the fill.
Next Steps
Limit Orders
Place limit orders
Modify Orders
Modify existing orders