Closed dabezian closed 2 years ago
This is a known issue including the one on public_orderbook
. The package is undergoing some changes and I will take public functions next. Thanks for your patience.
If I locally load the RGDAX 1.0 functions "public_candles" and "parse_response", I get public candles just fine with RGDAX 1.1 installed. Is it as easy as swapping the 1.1 versions of these functions with the old 1.0 versions?
In theory yes. I have just put a fix together and is now pushed to dev branch. Test and let me know how it goes. I am closing this for now.
The
public_candles()
function is not parsing additional query parameters correctly.When trying to specify start, end, or granularity, it returns
Error in UseMethod("as.request") : no applicable method for 'as.request' applied to an object of class "character"
Looking at the code, it looks like the issue is in the internal function parse_response().
Comparing to
public_orderbook()
which is passing the level parameter as expected, you haveresponse <- parse_response(path = req.url, query = list(level = level))
as opposed to
response <- parse_response(path = req.url, query = c(start = start, end = end, granularity = granularity))
I suspect the issue is the function
parse_response()
is being passed a character vector due to thec()
funtion rather than thelist()
function, which is causing the request to fail. However it also appearspublic_orderbook()
is not parsing the levels parameter properly either, as it only returns one line from the orderbook regardless of the level requested.