Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GDAX returns strings => cast to float #405

Closed
stefandeml opened this issue Oct 26, 2017 · 3 comments
Closed

GDAX returns strings => cast to float #405

stefandeml opened this issue Oct 26, 2017 · 3 comments
Assignees

Comments

@stefandeml
Copy link

stefandeml commented Oct 26, 2017

Using with GDAX results in the following error: "must be real number, not str
Need to cast string to float to make math operations work

       precision = {
-                'amount': -math.log10(amountLimits['min']),
-                'price': -math.log10(priceLimits['min']),
+                'amount': -math.log10(float(amountLimits['min'])),
+                'price': -math.log10(float(priceLimits['min'])),
}

@stefandeml stefandeml changed the title GDAX returns strings GDAX returns strings => cast to float Oct 26, 2017
@kroitor
Copy link
Member

kroitor commented Oct 26, 2017

Oh, ok... I'll fix it right away!

fix

@kroitor kroitor self-assigned this Oct 26, 2017
@stefandeml
Copy link
Author

stefandeml commented Oct 26, 2017

thanks a ton.
any chance for the future to create a fix myself? (enable branches on the repo?)

@kroitor
Copy link
Member

kroitor commented Oct 26, 2017

@stefandeml you're welcome! If you feel like you want to contribute then go ahead, plz, you're free to submit PRs like other people do ;) No time for branches :)) Just make sure to read the CONTRIBUTING doc before actually making the changes. Also, as you can see from the edits introduced by the above commit, it's a pretty straightforward fix, and it maps one-to-one to your initial post, that gets inherited (transpiled) in Py from JS (more on that in the contributing doc).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants