How-to get the available trading pairs information
The first step is to get the available pair information from the /symbol_info
endpoint. Calling the symbol_info
endpoint without any parameters will return
a list of all the available pairs in the API database. However, Charli3 Token API tracks
over 17,000 pools not including the aggregate price data for each unique token pair,
leading for a very large payload.
To reduce the payload size, the /symbol_info
endpoint will has a group
parameter,
where group
is the unique name of each protocol (i.e. Minswap
, MinswapV2
,
SundaeSwap
, etc.). When the group
parameter is used, the response will only contain
the pairs for the specified protocol.
- Start by get a list of available groups:
import requests
groups = requests.get("https://api.charli3.io/api/v1/groups").json()
- Next, for each group get the list of available pairs:
symbols = {}
for group in groups:
pairs = requests.get(
"https://api.charli3.io/api/v1/symbol_info",
params={"group": group}
).json()
symbols[group] = pairs