For the complete documentation index, see llms.txt. This page is also available as Markdown.

Prices

Price and ratio queries.

Get price ratio

get

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 · 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:
Responses
200

Price ratio

application/json
price_of_b_in_anumber · doubleRequired

The price of token B expressed in token A (tokenB_holdings / tokenA_holdings).

Example: 2
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?