Search code examples
pythonbinance-api-client

Binance Python - enable InternalTransfer and send fund to financement Wallet


I'm trying to send some token from a spot account to a sub-account of the same wallet. As far as I understand, there is few sub-account wallet on 'regular' binance account (<25bnb):

  • Spot Wallet
  • Futures Wallet
  • Isolated Maring Wallet
  • Crossed Margin Wallet
  • Financement Wallet

I'm using python 3.8 and the python binance api.

Here is the command I've used:

transfer_spot_to_isolated_margin(asset="MATIC", amount=float(amount), type="1") 

And here is the result :

binance.exceptions.BinanceAPIException: APIError(code=-1002): You are not authorized to execute this request. 

It seems the API configuration isn't setup to allow this transfert. Here is API configuration

from

get_account_api_permissions()

got

{'ipRestrict': True, 'createTime': 1641830788000, 'enableReading': True, 'enableSpotAndMarginTrading': True, 'enableWithdrawals': True, 'enableInternalTransfer': False, 'enableMargin': False, 'enableFutures': False, 'permitsUniversalTransfer': True, 'enableVanillaOptions': False}

I think the problem is comming from enableInternalTransfer that is set to 'False'. But I don't know how to change this configuration. I've cross everything in the API configuration in the binance API panel.

Do you know how to enable it?

I live in France, so margin and futures are disable. But it should be ok to transfert token to these Wallet (it's possible from binance Android application)

Do you know how to transfert fund to 'Financement Wallet'? I can't find anything about it in the binance API python documentation.

Thanks a lot in advance for any help :) Sorry for asking that many question in a single post !


Solution

  • The margin account was totally initialized : it is mandatory to send some fund in this account 'manually' to enable the margin wallet. Once this was done I didn't receive the error anymore.

    Please check out 'Binance' answer for more link to documentations.