Quotes
Trade quote calculations.
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.
The name/symbol of the first token (URL encoded).
CCPossible values: The name/symbol of the second token (URL encoded).
USDCxPossible values: The amount of token A the user is giving
100Trade quote
The amount of output token the user will receive.
49.5Invalid parameters or AMM not found
GET /v1/quoteForFixedInput/{tokenA}/{tokenB}?givingAmount=100 HTTP/1.1
Host: api.tradecraft.fi
Accept: */*
{
"user_gets": 49.5
}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.
The name/symbol of the first token (URL encoded).
CCPossible values: The name/symbol of the second token (URL encoded).
USDCxPossible values: The amount of token B the user wants to receive
50Trade quote
The amount of input token the user must provide.
101Invalid parameters or AMM not found
GET /v1/quoteForFixedOutput/{tokenA}/{tokenB}?gettingAmount=50 HTTP/1.1
Host: api.tradecraft.fi
Accept: */*
{
"user_gives": 101
}Last updated
Was this helpful?
