[英]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):
据我了解,“常规”币安账户(<250 亿)的子账户钱包很少:
I'm using python 3.8 and the python binance api.我正在使用 python 3.8 和 python 币安 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.似乎 API 配置未设置为允许此转移。 Here is API configuration
这是API配置
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'
.我认为问题来自设置为
'False'
enableInternalTransfer 。 But I don't know how to change this configuration.但我不知道如何更改此配置。 I've cross everything in the API configuration in the binance API panel.
我已经在 binance API 面板中的 API 配置中交叉了所有内容。
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)
但是应该可以将令牌转移到这些钱包(可以从币安Android应用程序)
Do you know how to transfert fund to 'Financement Wallet'?你知道如何将资金转移到“金融钱包”吗? I can't find anything about it in the binance API python documentation.
我在 binance API python 文档中找不到任何关于它的信息。
Thanks a lot in advance for any help:) Sorry for asking that many question in a single post !非常感谢您的帮助:) 很抱歉在一个帖子中问了这么多问题!
The sub-account feature is used by corporate account users and VIP1 (or higher) personal account users which has a master account for the management.子账户功能供企业账户用户和拥有主账户管理的VIP1(或更高)个人账户用户使用。 If you're not under those categories, then sub-accounts feature is not enabled and its associated permission “enableInternalTransfer" doesn't matter for your case.
如果您不在这些类别下,则未启用子帐户功能,并且其相关权限“enableInternalTransfer”对您的情况无关紧要。
Any Binance account comes with many different products, for example: Spot, Futures and Margin (each with their own account wallet).任何币安账户都有许多不同的产品,例如:现货、期货和保证金(每个都有自己的账户钱包)。
If you want to transfer from Spot to Isolated Margin wallet,there's 2 ways:如果您想从现货转入逐仓保证金钱包,有两种方式:
Use of POST /sapi/v1/asset/transfer First request with parameter type=MAIN_MARGIN
and 2nd request with parameter type=MARGIN_ISOLATEDMARGIN
.使用POST /sapi/v1/asset/transfer参数类型=MAIN_MARGIN 的第一个请求和参数
type=MARGIN_ISOLATEDMARGIN
type=MAIN_MARGIN
的第二个请求。 You already have 'permitsUniversalTransfer': True, so no need to change on the API Management page.您已经拥有 'permitsUniversalTransfer': True,因此无需在 API 管理页面上进行更改。
(Or) Use of POST /sapi/v1/margin/isolated/transfer (或)使用POST /sapi/v1/margin/isolated/transfer
For both options, you should have the check the following on API Management page:对于这两个选项,您应该在 API 管理页面上检查以下内容:
In case you still get error code -1002
, please go to https://dev.binance.vision/t/error-you-are-not-authorized-to-execute-this-request/8102 to test on more possibilities.如果您仍然收到
error code -1002
,请 go 到https://dev.binance.vision/t/error-you-are-not-authorized-to-execute-this-request/8102测试更多可能性。
Useful links:有用的链接:
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.请查看“Binance”答案以获取更多文档链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.