diegomanuel / binance-to-google-sheets

Google Spreadsheets add-on to get data directly from Binance API without any intermediaries! :rocket:
GNU General Public License v3.0
431 stars 77 forks source link

[FEATURE] option to set the tables/poll trigger to state off #43

Open ziggetty opened 3 years ago

ziggetty commented 3 years ago

i do not know how other projects(moosyresearch and others) handle the errors (or found a solution around it), but yesterday it was almost not workable (lots of 403 and 418 errors) (on other days it annoys, but 4 now can live with it)

afbeelding

as i do not have a lot of orders(all triggers off and handling things manually) , i would prefer to have an option in the menu to turn the tables/poll also off (select between 10 min and off) (dont call the api when it is not needed)

i tend to go another route (not via google sheets but via excel) to prevent all those errors which come from the shared ip's of google sheets.

i do minimal =binance requests. for example i request all prices in 1 go and further do a lookup when needed. annoying is: if this price request fails and for hours i only get the last prices from cache. (old prices are useless (for my use) ) and you need to be very attentive that the prices which are served are old.

diegomanuel commented 3 years ago

Hey @ziggetty thanks for the suggestion, I'll probably add it in the next release.

i do minimal =binance requests. for example i request all prices in 1 go and further do a lookup when needed. annoying is: if this price request fails and for hours i only get the last prices from cache. (old prices are useless (for my use) ) and you need to be very attentive that the prices which are served are old.

That's how the add-on tries to work right now by using the cache for < 60s and using a locking mechanism to ensure to have only one request to Binance API to retrieve, for instance the current prices, and the rest of awaiting operations will read the value from the cache once it's updated. In that way you can have several operations like =BINANCE("prices", "whatever") that will all be enqueued almost at the same time to be updated in the configured interval, but just one of them will produce an API request.

Will close the issue once I push the code changes :beers: