gnome-shell-bitcoin-markets icon indicating copy to clipboard operation
gnome-shell-bitcoin-markets copied to clipboard

Update interval

Open harmancode opened this issue 7 years ago • 4 comments

What is the default update interval?

Is it possible to change that value? If yes, how, please? If not, please consider this as a feature request.

harmancode avatar Nov 21 '17 17:11 harmancode

the default interval are defined in each of the api provider see https://github.com/OttoAllmendinger/gnome-shell-bitcoin-markets/blob/master/src/ProviderBXinTH.js#L17

If you can follow the Javascript then you can find the code here (probably) https://github.com/OttoAllmendinger/gnome-shell-bitcoin-markets/blob/master/src/BaseProvider.js#L108-L113

And you can change the interval directly in the code (in seconds). However, it's tedicious since it requires each of the APIs to be altered manually. This also requires a bit of experience with fiddling of gnome extensions.

samundra avatar Nov 21 '17 18:11 samundra

@dx486 Also please see https://github.com/OttoAllmendinger/gnome-shell-bitcoin-markets/issues/14 regarding the interval

samundra avatar Nov 21 '17 18:11 samundra

The interval is defined for each provider in the "interval" attribute (in seconds): https://github.com/OttoAllmendinger/gnome-shell-bitcoin-markets/blob/master/src/ProviderPoloniex.js#L27

Most APIs have rate limits, the values are chosen so the extension doesn't hit the limit. Feel free to tweak them but be aware that your IP can get banned.

I don't think anybody wants a higher polling interval, and if there is a safe smaller polling interval for an API let me know and I will change it. I don't think this needs to be configurable by the user.

OttoAllmendinger avatar Nov 22 '17 11:11 OttoAllmendinger

It's not only a question about rate limit, according to me i don't need to request each 10s. It's useless. Each minute should be enough. It's not about trading, but to be in touch with the current price. So a "Interval" setting in seconds would be great.

Tazeg avatar Mar 06 '20 08:03 Tazeg