Prepares a swap transaction without executing it. Returns serialized transaction data that can be used with the /deposit/uniswap/swap endpoint to execute with Turnkey.
Important: This endpoint only PREPARES the transaction. To actually execute the swap, you must use the /deposit/uniswap/swap endpoint which will sign and broadcast the transaction using Turnkey wallets.
Use this format: ApiKey <your_api_key>
User wallet address
"0xb322E239E5A32724633A595b8f8657F9cbb307B2"
Input token address (use 0x0000000000000000000000000000000000000000 for native token)
"0x0000000000000000000000000000000000000000"
Output token address
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
Amount to swap (in token decimals)
"1000000000000000000"
Minimum amount out (slippage protection)
"1450000000"
Chain ID
1
Deadline timestamp (optional, defaults to 20 minutes from now)
1234567890
Swap transaction prepared successfully
Success status
true
Serialized transaction data
Gas estimation
Expected output amount
"1500000000"
Response message
"Swap transaction prepared successfully"
Approval transaction if needed