Skip to main content

Module credential

Module credential 

Source
Expand description

Binance API credential handling and request signing.

This module provides two types of credentials:

  • Credential: HMAC SHA256 signing for REST API and standard WebSocket
  • Ed25519Credential: Ed25519 signing for WebSocket API and SBE streams

Ed25519 keys are required. Credentials are resolved from standard environment variables (BINANCE_API_KEY/BINANCE_API_SECRET), falling back to deprecated *_ED25519_* variables with a warning.

Structs§

Credential
Binance API credentials for signing requests (HMAC SHA256).
Ed25519Credential
Binance Ed25519 credentials for WebSocket API authentication.

Enums§

Ed25519CredentialError
Error type for Ed25519 credential creation.

Functions§

resolve_credentials
Resolves API credentials from config or environment variables.