daroczig / binancer

An R client to the Public Rest API for Binance.
https://daroczig.github.io/binancer
54 stars 57 forks source link

Error using binance_all_orders() #33

Open jvaccaro2 opened 1 year ago

jvaccaro2 commented 1 year ago

Hi,

I've encountered a problem using binance_all_orders() function, where when using a specific symbol I get the following error:

"Error in rbindlist(ord) : Item 20 has 22 columns, inconsistent with item 1 which has 20 columns. To fill missing columns use fill=TRUE."

Upon debuging the function the problem appears to be that within the function when queriyng all orders using _"binancequery(endpoint = "api/v3/allOrders", params = params, sign = TRUE)" which returns a nested list with all orders. The orders of type _"TAKE_PROFITLIMIT" has 22 items as oposed to the 20 items of the rest of the orders.

Using fill = TRUE in the rbindlist() within the function appears to fix the problem just fine if the desired behaviour is to add the 2 aditional columns to the data.frame (will be NULL in all orders except on the _"TAKE_PROFITLIMIT")

Cheers!