0

Markets endpoint:

https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=bitcoin

current_price 22105

Market chart endpoint:

https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=7&interval=daily

The last value in the prices array:

22047.831234213034

Both called less than a second apart. Both different prices.

Is it not possible to get the most recent current price from the market_chart endpoint? I'm getting rate limited really fast when I make both calls on 1 screen with the free api.

WHOATEMYNOODLES
  • 845
  • 9
  • 25

1 Answers1

0

The endpoints have different caching/update frequency.

As stated here in the CoinGecko API guidebook, this seems to be the best & fastest endpoint to get the latest price: https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd

sachiew
  • 1
  • 4