'How can I get current day OHLCV hourly dta from the Coin Market Cap API?
I recently started using the Coin Market Cap API. It has 2 main endpoints that I have been using OHLCV historical and OHLCV Latest. The historical API allows for hourly data but not including data for the current day. The other endpoint gives you the data of the day but not hourly. Is it possible to get hourly data from the current day?
Solution 1:[1]
The OHLCV latest is reserved for Paid plans. The endpoint is not available for basic(free) or hobbyist(29/month), You will need a plan startup(79/month) or above.
Now, if you have the correct plan, you can use the
endpoint: /v2/cryptocurrency/ohlcv/latest
more details here OHLCV v2.
https://pro-api.coinmarketcap.com/v2/cryptocurrency/ohlcv/latest
The information in this endpoint is updated every 10 minutes
The string query parameters are:
id
=> string: One or more comma-separated cryptocurrency CoinMarketCap IDs. Example: 1,2symbol
=> string: (Alternatively) pass one or more comma-separated cryptocurrency symbols. Example: "BTC,ETH".
at least one of the above is needed for a successful call
convert
=> string: (optional) calculate price in fiat currencies supported by CMCconvert_id
=> string: similar above but using CMC IDs
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Victor Andres Aguirre Fernande |