Prices
Price and ratio queries.
Returns the current price ratio of token B in terms of token A. Note that token A and token B do not always correlate to the first and second tokens in the pool name.
Path parameters
tokenAstring · enumRequiredExample:
The name/symbol of the first token (URL encoded).
CCPossible values: tokenBstring · enumRequiredExample:
The name/symbol of the second token (URL encoded).
USDCxPossible values: Responses
200
Price ratio
application/json
price_of_b_in_anumber · doubleRequiredExample:
The price of token B expressed in token A (tokenB_holdings / tokenA_holdings).
2400
AMM not found
application/json
get/ratio/{tokenA}/{tokenB}
GET /v1/ratio/{tokenA}/{tokenB} HTTP/1.1
Host: api.tradecraft.fi
Accept: */*
{
"price_of_b_in_a": 2
}Last updated
Was this helpful?
