Quote
Generate a price quote for swapping tokens on Nabla.
Quote endpoint: /chains/{chainId}/quote
Query
Description of query parameters
All parameters with asterisks *
are REQUIRED.
chainId
*
integer
Network chain ID of the target blockchain.
Example: 42161
(Arbitrum).
tokenIn
*
string
Contract address of the ERC20 token to swap from.
Example: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831
(USDC on Arbitrum).
tokenOut
*
string
Contract address of the ERC20 token to swap to.
Example: 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1
(WETH on Arbitrum).
amountIn
*
integer
Amount of tokenIn
to sell, specified in minimal divisible units.
Examples:
1.00 USDC
→ 1000000
0.5 WETH
→ 500000000000000000
Example request
HTTP GET
GET /chains/42161/quote?tokenIn=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&tokenOut=0x82aF49447D8a07e3bd95BD0d56f35241523fBab1&amountIn=500000000
curl
curl -X GET "https://swap-api.nabla.fi/chains/42161/quote?tokenIn=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&tokenOut=0x82aF49447D8a07e3bd95BD0d56f35241523fBab1&amountIn=500000000" \
-H "accept: application/json"
Response
Response fields
amountIn
integer
Amount of input tokens to sell (in minimal divisible units).
amountOut
integer
Estimated amount of output tokens to receive (in minimal divisible units).
routerPath
array of strings
Ordered list of router contract addresses used in the swap route.
tokenPath
array of strings
Ordered list of token contract addresses representing the swap path.
estimatedSlippage
float
Estimated slippage for this swap, expressed in percent (e.g. 0.5
= 0.5%).
Example response
{
"amountIn": 500000000,
"amountOut": 126738061188613643,
"routerPath": [
"0x7bcFc8b8ff61456ad7C5E2be8517D01df006d18d"
],
"tokenPath": [
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
],
"estimatedSlippage": 0.0302
}
Notes
This endpoint does not execute swaps — it only provides pricing and routing information.
To perform the actual swap, use the
/swap
endpoint with the parameters returned here.Prices and slippage estimates may change rapidly depending on on-chain liquidity conditions.
Last updated