Quotes

Trade quote calculations.

Get trade quote for fixed input

get

Calculate how much of token B the user will receive when providing a fixed amount of token A. Uses the constant product formula with double-sided fees. Note that token A and token B do not always correlate to the first and second tokens in the pool name.

Path parameters
tokenAstring · enumRequired

The name/symbol of the first token (URL encoded).

Example: CCPossible values:
tokenBstring · enumRequired

The name/symbol of the second token (URL encoded).

Example: USDCxPossible values:
Query parameters
givingAmountnumber · doubleRequired

The amount of token A the user is giving

Example: 100
Responses
chevron-right
200

Trade quote

application/json
get
/quoteForFixedInput/{tokenA}/{tokenB}

Get trade quote for fixed output

get

Calculate how much of token A the user must provide to receive a fixed amount of token B. Uses the constant product formula with double-sided fees. Note that token A and token B do not always correlate to the first and second tokens in the pool name.

Path parameters
tokenAstring · enumRequired

The name/symbol of the first token (URL encoded).

Example: CCPossible values:
tokenBstring · enumRequired

The name/symbol of the second token (URL encoded).

Example: USDCxPossible values:
Query parameters
gettingAmountnumber · doubleRequired

The amount of token B the user wants to receive

Example: 50
Responses
chevron-right
200

Trade quote

application/json
get
/quoteForFixedOutput/{tokenA}/{tokenB}

Last updated

Was this helpful?