The discrepancy between the close price on the /coins/{id}/market_chart endpoint and the OHLC prices arises due to the differences in time where the worker runs.
/coins/{id}/market_chart (interval=daily): Data is sourced from our daily table where information is stored based on a per-day snapshot. The closing price depends on when we take a snapshot of the data, with updates made daily.
/ohlc: Data is sourced from our hourly table where we capture snapshots every hour.
Example:
https://api.coingecko.com/api/v3/coins/tether/market_chart?vs_currency=usd&days=14&interval=daily
https://api.coingecko.com/api/v3/coins/tether/ohlc?vs_currency=usd&days=14
Comments
0 comments
Article is closed for comments.