2

I don't understand their API: https://www.coingecko.com/en/api

It says:

/simple/price Get the current price of any cryptocurrencies in any other supported currencies that you need.

But then you click it and it doesn't spit out any JSON at all. Instead, it shows a number of id fields and other things. I can't make it open the actual URL for displaying the Bitcoin price.

Pieter Wuille
  • 98,249
  • 9
  • 183
  • 287
Mark Adams
  • 21
  • 1
  • 2

1 Answers1

3

Here is an example that will give you the simple price:

https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd

The page lets you try out the API by filling in the form fields. You can get the list of coin ids from:

https://api.coingecko.com/api/v3/coins/list

and the compare currencies from:

https://api.coingecko.com/api/v3/simple/supported_vs_currencies

ohmyfromage
  • 139
  • 6