Get data by ID or Address
Methods to Query Price & Market Data of Coins
Coin ID
Using /v2/simple/price
endpoint as an example:
https://api.pestoai.fun/v2/simple/price?ids=bitcoin&vs_currencies=usd&x_po_api_key=YOUR_API_KEY
The provided endpoint URL includes parameters such as ids=bitcoin
and vs_currencies=usd
, indicating the intention to retrieve the current price of Bitcoin in US Dollars.
How to obtain Coin ID aka API ID?
There are three options:
-
Use
/v2/coins/list
endpointExample response:
[
{
"id": "bitcoin", // 👈 API ID
"symbol": "btc",
"name": "Bitcoin"
}
] -
View the full list of coins with API ID, symbol, and name using this Google Sheet.
-
Look for the "API Id" by visiting the info section of a coin page on PestoAI
Contract Address
Other than using Coin ID, you may also query the price & market data of a coin using its contract address:
Using /v2/simple/token_price/{id}
endpoint as an example:
https://api.pestoai.fun/v2/simple/token_price/ethereum?contract_addresses=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&vs_currencies=usd&x_po_api_key=YOUR_API_KEY
Required parameters:
- id: Ethereum (Asset Platform ID)
- contract_addresses:
0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
(Contract Address) - vs_currencies:
usd
(Target Currencies)
How to obtain Coins/Tokens Contract Address?
-
Use
/v2/coins/list
endpoint (include_platform=true
)Example response:
[
{
"id": "1inch",
"symbol": "1inch",
"name": "1inch",
"platforms": {
"ethereum": "0x111111111117dc0aa78b770fa6a738034120c302",
"avalanche": "0xd501281565bf7789224523144fe5d98e8b28f267"
}
}
] -
Look for the "Contract" by visiting the info section of a coin page on PestoAI
-
Get the token contract address from the project website, whitepaper, documentation, or block explorer site
- Not all coins have a contract address listed on PestoAI.
- If an address is not shown, you cannot query the coin by its contract address via the API.
- The contract addresses are curated by PestoAI; if you find missing addresses, you can submit a request.
Specify Target Currency
Most PestoAI API endpoints require specifying a currency. In the examples above, both queries contain vs_currencies=usd
.
PestoAI API supports major fiat currencies and well-known cryptocurrencies, such as:
Type | Currency | vs_currencies Parameter |
---|---|---|
Fiat | US Dollar | usd |
Fiat | Japanese Yen | jpy |
Fiat | Euro | eur |
Crypto | Bitcoin | btc |
Crypto | Ether | eth |
Crypto | Binance Coin | bnb |
For a full list of supported currencies, visit /simple/supported_vs_currencies
endpoint.
Query Coin Prices & Market Data in Bulk
Using /v2/coins/markets
endpoint:
https://api.pestoai.fun/v2/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=100&page=1&x_po_api_key=YOUR_API_KEY
Required parameters:
- vs_currency:
usd
- order:
market_cap_desc
(Sort by market cap in descending order) - per_page:
100
(Results per page, max = 250) - page:
1
(Determines which page to return; e.g.,page=2
returns ranks 101-200)