Native Swaps

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

Get transaction data for native currency swaps

post

Returns transaction data for swapping between native currency and tokens. Uses the quoteData from a previous quote API call to generate executable transaction data.

Body
quoteDatastringRequired

Encoded quote data from a previous call to the quotes/native API

Example: eyJ0b2tlbk91dCI6IjB4MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MCIsImFtb3VudEluTmF0aXZlIjoiMTAwMDAwMDAwMDAwMDAwMDAwMCIsImFtb3VudE91dEluVG9rZW5zIjoiOTg1MDAwMDAwMDAwMDAwMDAwIiwidG9rZW5PdXREZWNpbWFscyI6MTgsImV4Y2hhbmdlIjowLCJwYXJhbXMiOnsic3RhYmxlIjpmYWxzZSwidGlja1NwYWNpbmciOjAsImZlZSI6MCwiYmluU3RlcCI6IjAiLCJyZXZlcnNlZCI6ZmFsc2V9fQ==
slippagenumber · max: 100Optional

Slippage tolerance percentage (0-100)

Default: 0.5Example: 1
toAddressstringOptional

Address to receive tokens (defaults to sender)

Example: 0xabcdef1234567890abcdef1234567890abcdef12Pattern: ^0x[a-fA-F0-9]{40}$
feeBpsinteger · max: 10000Optional

Partner fee in basis points (0-10000)

Example: 25
feeRecipientstringOptional

Address to receive the partner fee

Example: 0xabcdef1234567890abcdef1234567890abcdef12Pattern: ^0x[a-fA-F0-9]{40}$
Responses
post
/api/v1/swap/native

Last updated