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

How to use websocket request with private key ? #1527

Open
zhangk opened this issue Dec 25, 2024 · 5 comments
Open

How to use websocket request with private key ? #1527

zhangk opened this issue Dec 25, 2024 · 5 comments
Assignees
Labels

Comments

@zhangk
Copy link

zhangk commented Dec 25, 2024

I applied for an Ed25519 API key, but I don't know how to use this API key for websocket requests.

@carlosmiei carlosmiei self-assigned this Dec 28, 2024
@carlosmiei
Copy link
Collaborator

Hello @zhangk, you have several examples in the docs, but basically you just need to do:

api_key = "TwEW0XXXXXXXXXXXXXXXXXXXXXXXXXX"  # your api_key here
privateKey = "-----BEGIN PRIVATE KEY-----\nMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n-----END PRIVATE KEY-----"

client = AsyncClient(api_key, private_key=privateKey)

@PGSch
Copy link

PGSch commented Mar 21, 2025

This does not work for me. Could you please provide a full example? Can't get it running.

@carlosmiei
Copy link
Collaborator

@PGSch What's your python-binance version?

@PGSch
Copy link

PGSch commented Mar 22, 2025

1.0.28

@carlosmiei
Copy link
Collaborator

@PGSch that's the latest, what's the issue exactly?

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