Nomics Candles don't close for minutes past the hour

Hi there,

I’m using the endpoint with an interval of 4 hours. I call the endpoint every 4 hours (UTC) when the candles should close. What I’m seeing is that the candles don’t close on the 4 hour mark, rather they continue to be ‘in progress’ for a long time after they should be closed. I have a script that calls the endpoint over and over until the given time period finishes. Sometimes this can go 15 minutes past the hour.

For example, the candles with timestamp 2019-04-24 04:00:00 should close at 2019-04-24 08:00:00 UTC. But when 8 UTC comes along, that candles doesn’t actually close until about 08:13:31.

Can someone explain why this is and if it’s possible to close the candles closer to the 4 hour mark? I understand a minute or two of variance, but 15 minutes is too long.

Hi @gkrizek,

Please see the Candles section in our documentation:

Scroll down a bit to “Why don’t candles show up right away?”.

Nick Gauthier
CTO @ Nomics

Thanks for the reply! Ok, I totally missed that section so apologies. That makes sense.

However, regardless of the new candle showing up, the candle that should have been closed on the hour is still getting updates past the hour. In my script I can see a candle getting updates 12 minutes past it’s cut off time.

To give another example. If I’m watching the 2019-04-24 04:00:00 candle and I call the exchange_candles endpoint, I can see it still changing past the close time of 2019-04-24 08:00:00


2019-04-24T00:10:12Z - {'timestamp': '2019-04-23T20:00:00Z', 'low': '5507.60000000', 'open': '5587.56000000', 'close': '5560.65000000', 'high': '5589.17000000', 'volume': '2210.81421754', 'num_trades': '9758'}
2019-04-24T00:12:58Z - {'timestamp': '2019-04-23T20:00:00Z', 'low': '5507.60000000', 'open': '5587.56000000', 'close': '5545.15000000', 'high': '5589.17000000', 'volume': '2254.69946825', 'num_trades': '10058'}

Yes, that’s correct. It can take a few minutes to get the final trades for the period from an exchange (that’s why the num_trades field is still increasing). This is especially slow on exchanges with poor rate limits and many markets. Are you seeing this on any exchanges or markets in particular?

Ok, that makes sense. I’ve been only trying this on Coinbase Pro (GDAX), so that could be the reason why.