andreskull / rFTX

R API for FTX
Other
5 stars 12 forks source link

ftx_coin_balances() not working with subaccounts #26

Closed brenktt closed 2 years ago

brenktt commented 2 years ago

Hi,

First of all I have to say big thanks for this package, very helpful for me.

I have one issue though, when I created first subaccount, function ftx_coin_balances stopped working for me.

So when no subaccounts are created this works: ftx_coin_balances(key, secret)

After I create subaccount, non of these options work anymore: ftx_coin_balances(key, secret) ftx_coin_balances(key, secret, accounts = "subaccount_name")

I receive following error: Error in filter(): ! Problem while computing ..1 = total != 0. Caused by error in mask$eval_all_filter(): ! object 'total' not found

I noticed some other functions contain parameter subaccount instead of accounts used in this function and these seem to work correctly. Am I doing something wrong or is there a bug in function?

Thanks for your help!

andreskull commented 2 years ago

Hi, This is a weird error. I haven't seen it before. It seems that FTX API responds with results where the total column is missing. I cannot reproduce the error. First, make sure the key and secret are correct (character types in R), use the main account key (this should give all accounts balances). If you would like to restrict only a particular subaccount then provide this subaccount key and secret.

If the error still persists then could you send me (andres.a.kull@gmail.com) the ftx key and secret (read-only) of your account for troubleshooting together with the actual code line you used.

andreskull commented 2 years ago

Dou you have account with ftx.com or ftx.us? Which endpoint are you using ftx.com or ftx.us?

brenktt commented 2 years ago

Hi, it's strange, but the function started working later that day, not sure what the issue was, I only noticed it because my robot stoped working when I messed around with subaccounts. But all seems to work fine now. Will let you know if some issue persist.

Thanks.