daroczig / binancer

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

Support API of USDM futures #21

Open siegfried opened 2 years ago

siegfried commented 2 years ago

Does this project accepts features of USDM? Shall I add them to binance.R or a new file?

daroczig commented 2 years ago

I am not familiar with the USDM features, but based on a quick search, I think it would be a great extension, so looking forward to any help :bow:

binance.R grew super large already (it was named that way as originally this package supported multiple crypto exchanges), so feel free to start a new file.

Thanks!

siegfried commented 2 years ago

I think binance_query() is reusable. For most of the API on USDM we just need to point the host to https://fapi.binance.com. I can make the base here as an argument. However, for functions like binance_new_order() need new counterparts since the orders on USDM are different. What do you propose the function names would be? Shall I rename the current spot specific functions and move them to a different file?

https://github.com/daroczig/binancer/blob/8cfdfe369980357c49deaf235419ae426af11717/R/binance.R#L112

siegfried commented 2 years ago

May I use tibble of dplyr instead of data.table in this project? @daroczig

daroczig commented 2 years ago

Sorry, I'd rather not mix dplyr and data.table in the same project.

On the other hand, if you are asking about the user-facing result, I've done this on a configurable way in another project of mine https://github.com/daroczig/dbr/blob/master/R/db.R#L131-L137

siegfried commented 2 years ago

It's fine. I don't want to mix them either.