What are Limit Orders?
A limit order lets you:- Set a specific price (buy amount) for your trade
- Wait for favorable market conditions
- Avoid slippage from market movements
- Have orders valid for extended periods (up to 1 year)
Basic Limit Order
Complete Example with Ethers
Advanced Settings
Custom Validity Period
Set how long the order should remain valid:Partially Fillable Orders
Allow your order to be filled in multiple transactions:App Data Metadata
Add custom metadata to your order:Key Differences from Swaps
| Feature | Market Order (Swap) | Limit Order |
|---|---|---|
| Execution | Immediate | When price condition is met |
| Slippage | May have slippage | No slippage (fixed price) |
| Buy Amount | Estimated | Exact minimum |
| Validity | Minutes | Up to 1 year |
| Order Type | market | limit |
Checking Order Status
After creating a limit order, monitor its status:Cancelling a Limit Order
Off-chain Cancellation (Free)
On-chain Cancellation
For presigned orders, you need an on-chain transaction:Best Practices
- Set Realistic Prices: Ensure your limit price is achievable based on market conditions
- Check Allowances: Verify token approval before posting the order
- Monitor Orders: Track order status to know when they execute
- Use Appropriate Validity: Don’t set overly long validity periods for volatile markets
- Consider Fees: Factor in network costs when setting buy amounts
Example: Buy Order
Create a limit order to buy tokens:Error Handling
Next Steps
- Learn about order management
- Explore React integration
- Read about limit order guide