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

AttributeError: 'Spot' object has no attribute 'get_flexible_product_position' #317

Open
aattieh opened this issue May 8, 2024 · 3 comments

Comments

@aattieh
Copy link

aattieh commented May 8, 2024

Before submitting a new issue, please check if a similar issue has already been filed.

trying to get the current positions am having within flexible earn am getting the error message
AttributeError: 'Spot' object has no attribute 'get_flexible_product_position'

Using the example script is not working

import logging
from binance.spot import Spot as Client
from binance.lib.utils import config_logging
from binance.error import ClientError

API_key = "XXXXXXXXX"
Secrect_Key = "XXXXXXXX"

config_logging(logging, logging.DEBUG)
logger = logging.getLogger(name)

client = Client(API_key,Secret_Key )

try:
response = client.get_flexible_product_position(
current=1, size=100, recvWindow=5000
)
logger.info(response)
except ClientError as error:
logger.error(
"Found error. status: {}, error code: {}, error message: {}".format(
error.status_code, error.error_code, error.error_message
)
)

@alplabin
Copy link
Contributor

Hey,
It appears there might be an issue with the naming of your credentials. The variable Secrect_Key does not match the one you added to the Client.
If the issue persists, please double-check that you have downloaded the correct library. Here's an example of how to install it: pip install binance-connector.

@abdala9512
Copy link

abdala9512 commented Oct 28, 2024

I'm having the same issue with the query_commission_rates
image
And the method is called here.. https://github.com/binance/binance-connector-python/blob/master/binance/spot/__init__.py
the binance-connector version is the 3.9.0 btw

@alplabin
Copy link
Contributor

Did you install the package binance-futures-connector-python as well? If so, have a look at the response to the following issue: #324

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

No branches or pull requests

3 participants