XChange
XChange copied to clipboard
[FTX] No Implementation of AccountService .getFundingHistory
Hi All,
There is no implementation of getFundingHistory
for the AccountService of FTX.
The idea is to implementent it using :
-
FtxAccountServiceRaw.transferBetweenFtxSubAccount
(implemented) -
/wallet/deposits
(not implemented) see : https://docs.ftx.com/#get-deposit-history -
/wallet/withdrawals
(not implemented) see : https://docs.ftx.com/#get-withdrawal-history
And then to differentiate between the two types using
FundingRecord.Type.INTERNAL_DEPOSIT
or FundingRecord.Type.DEPOSIT
(and the same for WITHDRAWALS)
What do you think ? I'm working on it and I will submit a PR when done ...
Good practices in this project is to use only one API call per operations. If not possible, please take care of rate limits by using resilience.
Originally posted by @cymp in https://github.com/knowm/XChange/issues/4195#issuecomment-891256829
Submit a PR and we can discuss.
Well anyway, I'm gonna split this into so this will be solved ...
The call to getFundingHistory
on the main account should use /wallet/deposits
and /wallet/withdrawals
And the call to getFundingHistory
for a subaccount should use the transferts between subaccounts ..
It's the correct way I think