Match Limits
Overview
Match Limits
function buyLimit(
uint256 baseAmount,
uint256 price,
bool postOnly,
ExecutionType executionType,
MatchLimitBehavior behavior,
uint256 maxMatches // Maximum number of maker orders to match against
) externalWhy Match Limits?
Match Limit Behaviors
Cancel
PlaceAtLast
Match Counting
Execution Types
Standard Execution
Immediate-Or-Cancel (IOC)
Fill-Or-Kill (FOK)
Usage Examples
Example 1: Large Buy Order with Gas Limit
Example 2: IOC Order with Match Limit
Example 3: FOK Order for Exact Fill
Self-Trade Prevention Integration
Gas Optimization
Events
Best Practices
Technical Implementation
Last updated