Thabo
Thabo

Reputation: 1475

How to get historic Bitcoin Price Index using coinbase or any other open source API

I would like to get a history of the bitcoin price. For example I would like to be able to provide a start_date and end_date for a search/filter. Are there any open source and trusted api with almost accurate prices for this?

I have noticed that coinbase only returns the spot/current price and I cannot pass more params to filter

curl https://api.coinbase.com/v2/prices/spot?currency=USD

I have also used coindesk but the prices are not accurate.

https://api.coindesk.com/v1/bpi/historical/close.json?start=2019-08-10&end=2020-08-11&currency=zar

Upvotes: 2

Views: 1799

Answers (2)

Let's try
Let's try

Reputation: 1058

I would recommend you to use the CoinMarketCap API if what you want are historical prices.

There are also libraries like ccxt where you can probably find this information as well.

However you have keep in mind that due to the number of exchanges these prices are approximations, and there is not sucha thing as a "unique" price for bitcoin.

Upvotes: 1

Yuri Ginsburg
Yuri Ginsburg

Reputation: 2611

bitcom.com does not provide historical prices, it is wallet and kinda banking services.

API for pro.bitcom.com, (crypto exchange) provides to historical prices.

https://docs.pro.coinbase.com/#get-historic-rates

Upvotes: 3

Related Questions