ccxt
ccxt copied to clipboard
load_leverage_brackets returns auth error
Operating System
ubunutu
Programming Languages
Python
CCXT Version
4.3.16
Description
response = await self.papiGetUmLeverageBracket(query) throws ccxt.base.errors.AuthenticationError: binance {"code":-2015,"msg":"Invalid API-key, IP, or permissions for action, request ip: ..."}
Code
await ccxt.pro.binance([all api keys]).fetch_leverage_tiers(reload=True,
params={'portfolioMargin': True,
'type': 'swap',
'subtype': 'linear'})
Hi @daviidarr
Before use portfolio margin api in binance, please make sure that:
- you're vip1+ and you manually activated the portfolio margin in the binance-futures page
- your API key was created after the activation was completed.
Ok, so param.portfoliomargin does not override the actual status of my account. Thanks for clarification.
On Sun, 5 May 2024, 10:58 Peter Lai, @.***> wrote:
Hi @daviidarr https://github.com/daviidarr
Before use portfolio margin api in binance, please make sure that:
- you're vip1+ and you manually activated the portfolio margin in the binance-futures page
- your API key was created after the activation was completed.
— Reply to this email directly, view it on GitHub https://github.com/ccxt/ccxt/issues/22397#issuecomment-2094693890, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALVJWRVEXNLF5STHZJM64E3ZAXYBXAVCNFSM6AAAAABHHPFRXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGY4TGOBZGA . You are receiving this because you were mentioned.Message ID: @.***>
Thanks for clarifying that param does not override actual account status.
@daviidarr params.portfolioMargin just tells ccxt to use the portfolioMargin endpoint, but your account/API keys need to be properly configured first.