peshay / btcde

A Python Module for Bitcoin.de Trading API
MIT License
38 stars 24 forks source link

Update btcde.py (self.nonce) #33

Closed js931 closed 6 years ago

js931 commented 6 years ago

Avoid "invalid nonce" error for frequent API calls by raising the number by 1000.

Edit: This doesn't help with parallel API calls on the same connection unfortunately... Only when creating new connections. Any idea on how to generate the nonce so that parallel calls don't pose a problem?

codecov[bot] commented 6 years ago

Codecov Report

Merging #33 into 2.3 will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##            2.3    #33   +/-   ##
===================================
  Coverage   100%   100%           
===================================
  Files         1      1           
  Lines       186    186           
===================================
  Hits        186    186
Impacted Files Coverage Δ
btcde.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7f2d6d9...ca04a5d. Read the comment docs.

peshay commented 6 years ago
js931 commented 6 years ago

Sorry, i'm new to Github... I added another change in the header nonce. Now it works fine for me, even with frequent parallel calls.

peshay commented 6 years ago

Finally build and test succeed. @js931 can you please test the latest changes here on your side, then I will make a new release for this change.

js931 commented 6 years ago

Works fine for me, thanks! Only very rarely i am getting "invalid nonce" errors, but this isn't the fault of the btcde module, rather than my program. I guess one would have to implement a queue for parallel calls to get rid of those errors 100%.