Adding prices to our dataset
Price information is typically stored off-chain, and various sources provide access to this data. Some of the most popular APIs include the following:
- CoinGecko
- CoinMarketCap
- Binance
- Chainlink
- OHLC data: Kraken
Each API comes with its own limitations, which we need to consider when deciding whether to integrate them into our projects. Specific details can be found in their respective documentation.
Regarding price data, it is important to understand how it is calculated, as in these examples:
- CoinMarketCap calculates an asset’s price by considering the volume-weighted average of all markets where the asset is traded. This approach is based on the notion that more liquid markets are less susceptible to price fluctuations or manipulation and, therefore, more reliable.
- Binance reports prices based on transactions conducted on their platform. Depending on the pair, it provides the price of the last trade...