XChange icon indicating copy to clipboard operation
XChange copied to clipboard

[FTX] No Implementation of AccountService .getFundingHistory

Open mathvdh opened this issue 3 years ago • 3 comments

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 ...

mathvdh avatar Aug 02 '21 14:08 mathvdh

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

cymp avatar Aug 02 '21 18:08 cymp

Submit a PR and we can discuss.

earce avatar Aug 03 '21 20:08 earce

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

mathvdh avatar Aug 04 '21 07:08 mathvdh