Can't get subaccount transfers through API

I’m trying to get the transfers to and from a subaccount, using the subaccount API keys.

However when calling the endpoint /sapi/v1/sub-account/transfer/subUserHistory I aways get an empty response.

When checking with the web interface on the subaccount, I can see that there is a transfer (see picture linked)

Am I using the wrong endpoint or is there a bug with this endpoint ?

Hi,

When calling the subUserHistory endpoint, make sure that you’re using your main account’s API/Secret Key, not the Subaccount’s keys. Please let me know if you’re still having issues seeing the transfer history into/out of your Subaccount(s) once you’ve ensured you’re using the main account to make the request.

Hi,

Thanks for your answer.

What I’m looking for is to get the subaccount transfer history but using the subaccount API keys, not the main account API keys.

Is there an endpoint to do so ?

Ok I see. Then you would just treat the subaccount as if it was a regular account and use the standard transfer history endpoint (GET /sapi/v1/asset/transfer): Binance API Documentation

I tried many endpoint but I still can’t find the transfer using the subaccount API keys.

Using the main account API keys, I can find the original deposit using /sapi/v1/capital/deposit/hisrec

However with the subaccount API keys I tried all those endpoints:

/sapi/v1/capital/deposit/hisrec
/sapi/v1/fiat/orders
/sapi/v1/fiat/payments
/sapi/v1/pay/transactions
/sapi/v1/asset/transfer

All those endpoints returned empty responses.