SDK
1
Install + initialize
2
Quote
3
Approve
4
Execute
5
Track
API equivalent
POST /v1/buildTx and submit the returned data to the chain.
Common gotchas
- Native token sentinel, use
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeEfor ETH/native, not the zero address. - Decimals matter,
amountis wei. USDC is 6 decimals (1000000= 1 USDC), WETH is 18. - Slippage units,
1= 1%, not 100bps. Default is 1. - Approvals once, for
AutoPermitflows the on-chain approval to Permit2 is one-time.