Skip to main content
GET
/
v1
/
uniswap
/
quote
/
sell_exactly
Python (SDK)
from compass_api_sdk import CompassAPI, models


with CompassAPI(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:

    res = compass_api.uniswap_v3.uniswap_quote_sell_exactly(chain=models.V1UniswapQuoteSellExactlyChain.ARBITRUM, token_in="USDC", token_out="USDC", fee=models.V1UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01, amount_in=4736.09)

    # 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
required
Available options:
arbitrum,
base,
ethereum
token_in
string
default:USDC
required

The symbol or address of the token to swap from.

Examples:

"USDC"

"WETH"

"0xA0b86a33E6441ccF30EE5DdEF1E9b652C91ac1c8"

token_out
string
default:USDT
required

The symbol or address of the token to swap to.

Examples:

"USDC"

"WETH"

"0xA0b86a33E6441ccF30EE5DdEF1E9b652C91ac1c8"

fee
enum<string>
default:0.01
required

The fee to pay for the swap

Available options:
0.01,
0.05,
0.3,
1.0
amount_in
default:1
required

The amount of the token to swap from

Required range: x > 0

Response

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.)