[5] Crypto APIs
1. Crypto Prices
The first step is to get the id numbers of all the cryptos. you can use this code:
Sample response:
Some examples of id numbers:- BCH = 1831
- BNB = 1839
- BTC = 1
- BUSD = 4687
- DOGE = 74
- ETH = 1027
- FIL = 2280
- LINK = 1975
- LTC = 2
- USDC = 3408
- USDT = 825
For getting details of one or multiple cryptos (BTC and ETH in this example), you can use this code:
Sample reponse:
For picking specific data, you can use something like this:$price_ETH = $response_array["data"]["1027"]["quote"]["USD"]["price"];
2. Latest Global Metrics
For the latest global cryptocurrency market metrics, you can use this code.
Sample response
If you want to pick specific data, use somthing like this:$total_market_cap = $response_array["data"]["quote"]["USD"]["total_market_cap"];
3. Static Metadata
For all static metadata available for one or more cryptos (logo, description, official website URL, social links, and links to a cryptocurrency's technical documentation, etc.), you can use this code:
Sample response: