# Stream API has a major delay?

**URL:** <https://discuss.dev.twitch.com/t/stream-api-has-a-major-delay/14336>\
**Category:** API\
**Created:** [February 17, 2018, 10:30pm UTC](https://discuss.dev.twitch.com/t/stream-api-has-a-major-delay/14336 "2018-02-17T22:30:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@Josh](https://discuss.dev.twitch.com/u/Josh)\
**Post date:** [February 17, 2018, 10:30pm UTC](https://discuss.dev.twitch.com/t/stream-api-has-a-major-delay/14336/1 "2018-02-17T22:30:08Z")

</div>

Hello developers,  
I have been trying to detect when a user starts and stops streaming, but I’m having some issues. I am using the Twitch API v5 because I looked around the new Twitch API docs and couldn’t find anything.  
When I begin streaming, it seems to (most of the time) update immediately. However, when I stop streaming shortly after, there is a huge delay before it updates. There’s nothing wrong with my code, because even when I go on the API in my browser it doesn’t update.

Here’s the API that I’m using: [https://api.twitch.tv/kraken/streams/NewVoids?client\_id=my\_client\_id](https://api.twitch.tv/kraken/streams/NewVoids?client_id=my_client_id)

Does anyone know why this happens?  
Thank you,  
Josh

---

<div class="post-metadata">

**Author:** ![Josh](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@Josh](https://discuss.dev.twitch.com/u/Josh)\
**Post date:** [February 17, 2018, 11:52pm UTC](https://discuss.dev.twitch.com/t/stream-api-has-a-major-delay/14336/2 "2018-02-17T23:52:19Z")

</div>

Never mind - it has a huge delay when the stream starts as well.  
I also found out how to do it with the new Twitch API, but there are still long delays.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [February 18, 2018, 11:17am UTC](https://discuss.dev.twitch.com/t/stream-api-has-a-major-delay/14336/3 "2018-02-18T11:17:08Z")

</div>

There “delay” has always been between 3-5 minutes.

First it’s to confirm the stream is actually up and stable  
Second [http://shouldiblamecaching.com/](http://shouldiblamecaching.com/)

---

<div class="post-metadata">

**Author:** ![Josh](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@Josh](https://discuss.dev.twitch.com/u/Josh)\
**Post date:** [February 19, 2018, 1:39am UTC](https://discuss.dev.twitch.com/t/stream-api-has-a-major-delay/14336/4 "2018-02-19T01:39:24Z")

</div>

lol, why is it so long

---

<div class="post-metadata">

**Author:** ![IllusionaryOne](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/illusionaryone/32/2011_2.png) [@IllusionaryOne](https://discuss.dev.twitch.com/u/IllusionaryOne)\
**Post date:** [February 19, 2018, 2:17am UTC](https://discuss.dev.twitch.com/t/stream-api-has-a-major-delay/14336/5 "2018-02-19T02:17:13Z")

</div>

The data is cached. It has always been that way.

---

<div class="post-metadata">

**Author:** ![AlbericoD](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/albericod/32/4325_2.png) [@AlbericoD](https://discuss.dev.twitch.com/u/AlbericoD)\
**Post date:** [March 1, 2018, 8:13pm UTC](https://discuss.dev.twitch.com/t/stream-api-has-a-major-delay/14336/6 "2018-03-01T20:13:29Z")

</div>

Hello, I have some questions to try to help you in some way, are you opening a web socket ([socket.io](http://socket.io)) ?, Another question, uses promises for the callback?

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [March 31, 2018, 8:13pm UTC](https://discuss.dev.twitch.com/t/stream-api-has-a-major-delay/14336/7 "2018-03-31T20:13:30Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
