Closed Simon99975 closed 6 years ago
@Simon99975 Thanks for pointing out the bug. I did not realize that enhancing add_order()
to include stop orders broke everything else. I will be pushing a fix soon to a branch and you should be able to install it directly from there. Unfortunately, I am out of turns to push an update to CRAN so a package update will have to wait. I will post the details on how to get the fix from github once the fix is ready.
@Simon99975 The fix is now available on both github and bitbucket.
library(devtools)
install_github("DheerajAgarwal/rgdax", ref="dev")
or
library(devtools)
install_bitbucket("DheerajdrjAgarwal/rgdax", ref="dev")
Let me know if you still see any issues.
It seems to be working now. There is an issue with having a floating point number in the parameters with too many decimal places (for example in the size parameter). I get "Error: Bad Request" when this happens.
I cannot get “add_order” to work now. When I manually type in a float like 100.23 in “size,” it works. But when I try to pass a variable with that value like x <- 100.23, it will not work
beavertrapper07 - it will work if you do round(x, digits=2). But this is not ideal.
I do not believe that is a defect per se. If you run df <- public_info()
and look at the base_min_size
, you will realize that the api expects a minimum precision for orders that varies with currency. If you are trading in USD, then only BTC goes to 3 decimals. LTC is just 1.
I also suggest looking at min_market_funds
Makes sense. It would probably be good to make note of this in the documentation or return a more informative error.
Thanks for this great library!
That is a great suggestion @jcole75. I will try and add this to documentation at least. My initial thought is that if try to provide a better user message, it will require me to override the api response and that may not be a good way to manage future exceptions. None the less, point noted and I will try and figure out a way.
Also, thanks to you and @beavertrapper07 I know that the function is working, so closing this original issue.
This package is great, thank you for sharing it! Please can you help? I keep getting "Error: Bad Request" when trying to do a market trade with the 'add_order' function. I think the authentication is working ok, because cancel_order works. Please could you give me an example that works for you to check I am using it right? Cheers Simon