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 · 1 comment
Open

How to use websocket request with private key ? #1527

zhangk opened this issue Dec 25, 2024 · 1 comment
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)

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

2 participants