With the first api, I seem to be getting an extra transfer as if it was showing a transaction between spot wallet and futures wallet. However, I can tell for sure.
Hi.
Though the HTTP request methods are not mentioned, I assume you want to ask the following two endpoints?
GET /sapi/v1/futures/transfer -> retrieves the transfer history between spot account and futures account.
GET /sapi/v1/sub-account/transfer/subUserHistory -> retrieves the transfer history between this account and its master account or another sub account.
Note that neither spot account nor futures account is equivalent to sub account. Sub account is a special type of account that managed by a master account, aka corporate account.
So, the GET /sapi/v1/futures/transfer endpoint will show all transfers between spot and futures account regardless of the direction. E.g, spot to futures and futures to spot?
So, one other question. I seem to also get a Transfer when making a call to the endpoint: /fapi/v1/income.
It’s a transfer that seems to be a sub-account (futures wallet) to the master account. I don’t understand why it does NOT come back in the call to endpoint: /sapi/v1/sub-account/transfer/subUserHistory but only in this income history endpoint above.
GET /sapi/v1/sub-account/transfer/subUserHistory shows the sub-account transfer history. That is, it shows the record of calling the following two APIs:
POST /sapi/v1/sub-account/transfer/subToSub
POST /sapi/v1/sub-account/transfer/subToMaster
However, as you can see from the 2nd endpoints acceptable parameters, it’s not able to specify if it’s from futures wallet or not. Probably that’s why its not listed in the query result.