ccxt icon indicating copy to clipboard operation
ccxt copied to clipboard

load_leverage_brackets returns auth error

Open daviidarr opened this issue 1 year ago • 4 comments

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'})

daviidarr avatar May 05 '24 06:05 daviidarr

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.

sc0Vu avatar May 05 '24 08:05 sc0Vu

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: @.***>

daviidarr avatar May 05 '24 08:05 daviidarr

Thanks for clarifying that param does not override actual account status.

daviidarr avatar May 05 '24 09:05 daviidarr

@daviidarr params.portfolioMargin just tells ccxt to use the portfolioMargin endpoint, but your account/API keys need to be properly configured first.

carlosmiei avatar May 05 '24 16:05 carlosmiei