-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[SSL: UNEXPECTED_EOF_WHILE_READING] #1549
Comments
Hello @GauravDucker, Are the other methods working? |
i have reset my keys a couple of times , ensured that i have the correct permissions , my ip seems to be fine as i saw a previously raised complaint about it causing such issues . this only happens with when i try and use any of the account end points none of the other endpoints seem to be having this issue |
@GauravDucker I have tested and it works on my end:
|
yeah i tried the exact same code, i upgraded my open ssl version which caused problems i think its an issue on my end illfigure somethingh out cause not the error codes are differen ssl c -2015 and ssl c 1018 |
Description:
I'm encountering an SSL error when trying to fetch API permissions using the Binance Python SDK. Specifically, the program fails with an SSLError mentioning [SSL: UNEXPECTED_EOF_WHILE_READING]. This happens every time I try to call the /sapi/v1/account/apiRestrictions endpoint, even though my API keys and setup seem correct.
Steps to Reproduce:
Here’s how you can recreate the issue:
Install the Binance Python SDK (python-binance) and set up a .env file with your API keys.
Run the following code:
import os
from binance.client import Client
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv('BINANCE_API_KEY')
api_secret = os.getenv('BINANCE_API_SECRET')
client = Client(api_key, api_secret)
try:
permissions = client.get_account_api_permissions()
print("Permissions:", permissions)
except Exception as e:
print(f"Error fetching API permissions: {e}")
Actual Behavior:
Instead, the program throws this error:
Error fetching API permissions: HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /sapi/v1/account/apiRestrictions?recvWindow=10000×tamp=1737981224669&signature=b93f746ef5d9529257ced13064a94d529816f45ce3a57eaf483179ba067c1685 (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))
please excust the formating of the code im new to coding
The text was updated successfully, but these errors were encountered: