General Error at sub-account/futures/internalTransfer

My POST to /sub-account/futures/internalTransfer is failing with {‘code’: 200000000, ‘msg’: ‘General error.’}

I am using the example code provided on github, except for the final lines and the api base url I am using is “”:

params = {
    "fromEmail": ""
    "toEmail": "",
    "futuresType": 1, 
    "asset": "BUSD",
    "amount": 20,
response = send_signed_request("POST", "/sapi/v1/sub-account/futures/internalTransfer", params)

Can someone help please?

  1. If you replace the payload in this quick script:
    Does the same error code happens?

  2. What happens if you use the API Key’s Binance account to make the transfer on the UI?

  3. You can also test with Postman

Since this error message is too general, we’ll have to debug a bit to gather more details.

Hi @aisling2 , I have some more clues for you, I hope these will help:

I ran the following shell script, and all the requests are succeeding except for two, both at sapi/v1/sub-account/futures/. They return these errors:

POST /sapi/v1/sub-account/futures/internalTransfer returns {"code":200000000,"msg":"General error."}.

POST /sapi/v1/sub-account/futures/enable returns {"code":-1000,"msg":"System abnormality"}.

But POST /sapi/v1/sub-account/margin/enable works, even when I called it again after enabling margin. I thought maybe “system abnormality” meant “already enabled,” because I received that when trying to enable futures (and futures for the sub-account was enabled already in the UI), but I did not get “system abnormality” when enabling margin several times in a row.

Could it be an issue with /sapi/v1/sub-account/futures/…`? Maybe I should just erase the subaccount and make a new one.

timestamp=`date +%s%N | cut -b1-13`
echo $timestamp
echo $query_string
signature=`echo -n $query_string | openssl dgst -sha256 -hmac $SECRET`
echo $signature
sig_no_prefix=${signature#* } # Removes up to the space after "(SHA2-256(stdin)= "
echo $sig_no_prefix

#echo `curl -H "X-MBX-APIKEY: ${KEY}" \
#       -X POST '' \
#       -d "${query_string}&signature=${sig_no_prefix}"`

#echo `curl -H "X-MBX-APIKEY: ${KEY}" \
#       -X POST '' \
#       -d "${query_string}&signature=${sig_no_prefix}"`

#echo `curl -H "X-MBX-APIKEY: ${KEY}" \
#       -X POST '' \
#       -d "${query_string}&signature=${sig_no_prefix}"`

#echo `curl -H "X-MBX-APIKEY: ${KEY}" "${query_string}&signature=${sig_no_prefix}"`
#echo `curl -H "X-MBX-APIKEY: ${KEY}" "${query_string}&signature=${sig_no_prefix}"`
#echo `curl -H "X-MBX-APIKEY: ${KEY}" "${query_string}&signature=${sig_no_prefix}"`
#echo `curl -H "X-MBX-APIKEY: ${KEY}" -X POST "" -d "${query_string}&signature=${sig_no_prefix}"`

Hi @aisling2 , thank you for helping me out.

Using the script you linked instead of the one I was using earlier:

  1. Doing sapi/v1/futures/transfer with transfer type either 1 or 2, I receive a transaction id for a successful request. This works while making the request using either the sub-account’s credentials or the master account’s.
  2. I have made successful transfers to the subaccount from the UI.

Also running sapi/v1/futures/transfer works with the script I had before works, but for both scripts, I receive the “General Error” when trying sapi/v1/sub-account-futures/internalTransfer. Maybe there is something I need to enable in the UI first, does master-subaccount internal transfer require this? I noticed that Universal Transfer does.

Again thanks for your help, I’ll do everything you suggest to get this resolved soon.

This is resolved, sub-account/futures/internalTransfer is from main futures to subaccount futures – and I had no balance in the main futures account. We’ll need to use sub-account/universalTransfer to transfer from main spot to subaccount futures. Thanks anyway @aisling2

1 Like