Estimate Future Position APR
Estimates APR for a future Uniswap V3 position using provided amounts, prices, and pool/range inputs.
In: header
Optional liquidity provider. If omitted, defaults to Uniswap v3.
"UNISWAP_V3"The blockchain network where APR will be estimated. Supported EVM chains:
- Arbitrum One: 42161
- Avalanche: 43114
- Base: 8453
- BNB Smart Chain: 56
- Ethereum: 1
- Gnosis: 100
- OP Mainnet: 10
- Polygon: 137
Address of token0 in the target pool.
^0x[a-fA-F0-9]{40}$Address of token1 in the target pool.
^0x[a-fA-F0-9]{40}$Pool fee percent (e.g. 0.3, 1).
0.01 <= value <= 100Minimum active price bound for the future position.
0 <= valueMaximum active price bound for the future position.
0 <= valueResponse Body
curl -X POST "https://api.notuslabs.xyz/api/v1/liquidity/estimate-apr" \ -H "Content-Type: application/json" \ -d '{ "chainId": 42161, "token0": "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f", "token1": "0xaf88d065e77c8cc2239327c5edb3a432268e5831", "token0Amount": "10.5", "token1Amount": "2500", "poolFeePercent": 0.3, "minPrice": 83475.12, "maxPrice": 102300.5 }'{
"estimatedApr": "12.34"
}{
"statusCode": 400,
"id": "NOT_AUTHORIZED_TOKENS",
"message": ""
}{
"statusCode": 403,
"id": "UNAVAILABLE_COMPUTE_UNITS",
"message": "The project doesn't have enough compute units to perform this action. Please upgrade your plan."
}Create Swap Liquidity POST
This endpoint creates liquidity for a swap liquidity pool
Get Liquidity Amounts GET
Get the amounts of tokens needed to provide liquidity to a pool based on the maximum you want to spend in one token. You can pass the max amount for both tokens and receive quotes for the two possible scenarios, this way you can check in a single call what option works based on the amounts your user has. E.g. your user wants to provide liquidity to the ETH-USDC pool, and they have 100 USDC and 100 ETH in their wallet. By passing both as the max amounts in `tokenXMaxAmount` you'll get two quotes. One telling how much ETH you need to provided if you send 100 USDC and another telling how much USDC you need to provide given 100 ETH. Then you can choose which one actually fits the liquidity your user has. **Note**: If only one of them is returned it means the price range is outside the current price, so only one token can be provided to create liquidity, the other will always be zero.