Native Swaps
Last updated
Last updated
Important: Sells require approval (if not already approved). This is shown in additionalTransactions
. Always check for additional transactions and execute them first, then execute transactionData
Buy = $S to Token Sell = Token To $S
Returns transaction data for swapping between native currency and tokens. Uses the quoteData from a previous quote API call to generate executable transaction data.
Encoded quote data from a previous call to the quotes/native API
eyJ0b2tlbk91dCI6IjB4MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MCIsImFtb3VudEluTmF0aXZlIjoiMTAwMDAwMDAwMDAwMDAwMDAwMCIsImFtb3VudE91dEluVG9rZW5zIjoiOTg1MDAwMDAwMDAwMDAwMDAwIiwidG9rZW5PdXREZWNpbWFscyI6MTgsImV4Y2hhbmdlIjowLCJwYXJhbXMiOnsic3RhYmxlIjpmYWxzZSwidGlja1NwYWNpbmciOjAsImZlZSI6MCwiYmluU3RlcCI6IjAiLCJyZXZlcnNlZCI6ZmFsc2V9fQ==
Slippage tolerance percentage (0-100)
0.5
Example: 1
Address to receive tokens (defaults to sender)
0xabcdef1234567890abcdef1234567890abcdef12
Pattern: ^0x[a-fA-F0-9]{40}$
Partner fee in basis points (0-10000)
25
Address to receive the partner fee
0xabcdef1234567890abcdef1234567890abcdef12
Pattern: ^0x[a-fA-F0-9]{40}$