Calculates the best swap path and quote for given token pair and amount
JWT token obtained from /api/generate-token endpoint
Whether to use automatic slippage calculation
true, false true
Ethereum address of the user
"0x1234567890abcdef1234567890abcdef12345678"
Address of the input token
"0xA0b86a33E6441051686442d3a1BA4Fab4F85d2b2"
Address of the output token
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
Amount to swap (in wei for tokens with 18 decimals)
"1000000000000000000"
Slippage tolerance in basis points (e.g., 50 = 0.5%)
1 <= x <= 1000050
Optional referrer address for fee sharing
"0x5678567856785678567856785678567856785678"
Optional referrer fee in basis points
0 <= x <= 1000025
Successfully calculated best path
Response type identifier
"swap_calculation"
Status of the calculation
success, error "success"
Expected output amount
"950000000000000000"
Status or error message
Swap route information (tx_builder.SwapRoute)
Transaction build response (tx_builder.BuildResponse)
Gas price information (swapcalc.GasPriceInfo)