Partial fills are only supported for self-execution (
gasless=false). Gasless quotes cannot be partially filled.How It Works
The quote response includes apartialFillOffset field that tells you where in the transaction calldata to modify the fill amount. By default, quotes are filled fully - to partially fill, you replace the taker amount at that offset with your desired amount.
Partial fill amounts must be less than the original taker_amount in the quote, specified in base units (same as the original quote), and encoded as a 64-character hex string (32 bytes, zero-padded).
Understanding the Calldata Structure
ThepartialFillOffset is a word index (0-indexed) counting 32-byte segments in the encoded calldata. Each word is 32 bytes = 64 hex characters.
10 accounts for the 0x prefix (2 chars) and the 4-byte function selector (8 chars).
Step by Step
1. Request a Quote
2. Calculate Your Partial Fill Amount
Decide how much of the original order you want to fill. The amount must be in base units and less than the originaltaker_amount:
3. Modify the Calldata
Replace the fill amount in the transaction calldata at the position indicated bypartialFillOffset: