Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load_leverage_brackets returns auth error #22397

Closed
daviidarr opened this issue May 5, 2024 · 4 comments
Closed

load_leverage_brackets returns auth error #22397

daviidarr opened this issue May 5, 2024 · 4 comments
Assignees
Labels

Comments

@daviidarr
Copy link

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'})
@sc0Vu sc0Vu self-assigned this May 5, 2024
@sc0Vu
Copy link
Contributor

sc0Vu commented May 5, 2024

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.

@daviidarr
Copy link
Author

daviidarr commented May 5, 2024 via email

@daviidarr
Copy link
Author

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

@carlosmiei carlosmiei added question php Pull requests that update Php code and removed php Pull requests that update Php code labels May 5, 2024
@carlosmiei
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants