Results 1 to 7 of 7

Thread: Near real time data in api

  1. #1

    Lightbulb Near real time data in api

    Hi dev's

    Can we have a time span as saying like "lastUpdatedOn".
    i have searched everywhere All that i found was near real time data, then exactly how much real data is it. 5 min delayed ? 50 min delayed or 5 hrs delayed?

    this will be helpful to me to make request based on time.
    if i missed something or already that feature available let me know. thanks.


    Regards,
    NoobinCode
    Last edited by Ashwathnm; April 18th, 2017 at 04:47 PM.

  2. #2
    Junior Member
    Join Date
    Oct 2015
    Posts
    52
    That's not something I ever checked to be quite honest.

    Supercell's server (the one that you are querying using the API) is, to me, replying with current values.
    How often data are refreshed on that server is unknown to me and I can't remember seeing this information anywhere.

    Now from my personal experience, I would say very short (and I would risk myself saying way below the 5 minutes)
    That's something easy to experiment if you want to know for sure.

    Query once some data that you can change (donated troop for example), query just after (1sec later) or every second after and see when it changes.
    I think this donation troop variation is used by some websites developed around the API to claim a profile. So it must be very quick.
    ...
    If not real time.

    Cheers

  3. #3
    Quote Originally Posted by OriOn86 View Post
    That's not something I ever checked to be quite honest.

    Supercell's server (the one that you are querying using the API) is, to me, replying with current values.
    How often data are refreshed on that server is unknown to me and I can't remember seeing this information anywhere.

    Now from my personal experience, I would say very short (and I would risk myself saying way below the 5 minutes)
    That's something easy to experiment if you want to know for sure.

    Query once some data that you can change (donated troop for example), query just after (1sec later) or every second after and see when it changes.
    I think this donation troop variation is used by some websites developed around the API to claim a profile. So it must be very quick.
    ...
    If not real time.

    Cheers
    Thanks OriOn86 for suggesting the way but one thing is to remember is that from the experiment we can estimate a time but we don't now sure how coc team updating data in API server may be random or schedule time so if they provide timestamp or how near data. that will be help full for all I think. And do you have any information how many request we can send per token per day I read that sometime req will be denied due to "Request was throttled, because amount of requests was above the threshold defined for the used API token. http status code 429

  4. #4
    Junior Member
    Join Date
    Oct 2015
    Posts
    52
    Indeed, experiment won't give you the exact values but your question was oriented in a way that you were expecting an approximate value or an order of magnitude that you could get through an experimentation.

    For the number of answers from the server I read on the forum that it was around 12 per second from someone's tests...

    The answer of both your questions might depend of the number of requests that the server is dealing with at the moment you are requesting it/them... it may vary over time.

  5. #5
    Centennial Club
    Join Date
    Feb 2016
    Posts
    189
    Quote Originally Posted by Ashwathnm View Post
    Thanks OriOn86 for suggesting the way but one thing is to remember is that from the experiment we can estimate a time but we don't now sure how coc team updating data in API server may be random or schedule time so if they provide timestamp or how near data. that will be help full for all I think. And do you have any information how many request we can send per token per day I read that sometime req will be denied due to "Request was throttled, because amount of requests was above the threshold defined for the used API token. http status code 429
    Hi!
    I've implemented a verification system on my site (https://www.clashofstats.com/), and it is based on player troops donations. From my observation it takes less than a minute to get data from the Game in the API. I'm pretty sure the API request the Game Database in the background, maybe with a cache in between to avoid people DDOSing the Game this way. So it is near real time data .
    Hey Chief!
    Checkout Clash of Stats! Free Live Clan Page, Historical Data, Clans Rankings and Players Rankings.
    Awesome feature you would like to see? Critics? Tell me here!

  6. #6
    Forum Master Saleh47's Avatar
    Join Date
    Sep 2014
    Location
    Lebanon
    Posts
    12,393
    Quote Originally Posted by AdrienBaron View Post
    Hi!
    I've implemented a verification system on my site (https://www.clashofstats.com/), and it is based on player troops donations. From my observation it takes less than a minute to get data from the Game in the API. I'm pretty sure the API request the Game Database in the background, maybe with a cache in between to avoid people DDOSing the Game this way. So it is near real time data .
    In my app I have a Leader/Coleader verification & it takes less than minute in most cases. But for some unknown reason sometimes it takes more than that. The max I know about is like 3 minutes which is still near realtime with not much time critical info except in those 2 cases for 1 time which is manageable

    Thanks for DragonX101 for his great work!

  7. #7
    Quote Originally Posted by AdrienBaron View Post
    Hi!
    I've implemented a verification system on my site (https://www.clashofstats.com/), and it is based on player troops donations. From my observation it takes less than a minute to get data from the Game in the API. I'm pretty sure the API request the Game Database in the background, maybe with a cache in between to avoid people DDOSing the Game this way. So it is near real time data .
    Hi i have checked your site great it takes nearly 2 min to verify. solved my query . thanks
    Last edited by Ashwathnm; April 19th, 2017 at 10:03 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •