GET
/
v0
/
uniswap
/
quote
/
sell_exactly
/
get
from compassapisdk import CompassAPISDK, models


with CompassAPISDK(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api_sdk:

    res = compass_api_sdk.uniswap_v3.quote_sell_exactly(chain=models.UniswapQuoteSellExactlyChain.ARBITRUM_MAINNET, token_in=models.UniswapQuoteSellExactlyTokenInToken.USDC, token_out=models.UniswapQuoteSellExactlyTokenOutToken.USDT, fee=models.UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01, amount_in="<value>")

    # Handle response
    print(res)
{
  "amount_out": "<string>",
  "price_after": "<string>"
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Query Parameters

chain
enum<string>
default:arbitrum:mainnet
required

The chain to use.

Available options:
base:mainnet,
ethereum:mainnet,
arbitrum:mainnet
token_in
enum<string>
default:USDC
required

A class representing the token.

This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.

Available options:
1INCH,
AAVE,
BAL,
cbBTC,
cbETH,
CRV,
crvUSD,
DAI,
ENS,
ETHx,
FRAX,
FXS,
GHO,
KNC,
LDO,
LINK,
LUSD,
MKR,
osETH,
PYUSD,
rETH,
RPL,
rsETH,
sDAI,
SNX,
STG,
sUSDe,
tBTC,
UNI,
USDC,
USDe,
USDS,
USDT,
WBTC,
weETH,
WETH,
wstETH,
ARB,
EURS,
MAI,
USDCe,
AERO,
EUR,
VIRTUAL
token_out
enum<string>
default:USDT
required

A class representing the token.

This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.

Available options:
1INCH,
AAVE,
BAL,
cbBTC,
cbETH,
CRV,
crvUSD,
DAI,
ENS,
ETHx,
FRAX,
FXS,
GHO,
KNC,
LDO,
LINK,
LUSD,
MKR,
osETH,
PYUSD,
rETH,
RPL,
rsETH,
sDAI,
SNX,
STG,
sUSDe,
tBTC,
UNI,
USDC,
USDe,
USDS,
USDT,
WBTC,
weETH,
WETH,
wstETH,
ARB,
EURS,
MAI,
USDCe,
AERO,
EUR,
VIRTUAL
fee
enum<string>
default:0.01
required

The transaction fee of a Uniswap pool in bips.

Uniswap supports 4 different fee levels.

Available options:
0.01,
0.05,
0.3,
1.0
amount_in
default:1
required
Required range: x > 0

Response

200
application/json
Successful Response
amount_out
string
required

The amount of token_out you would receive from the pool.

price_after
string
required

The price of the pool after this trade would happen. (How much token0 you need to buy 1 token1.)