Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 552 Bytes

File metadata and controls

15 lines (12 loc) · 552 Bytes

Key Pair Based Authentication

use binance_sdk::alpha;
use binance_sdk::config;

let configuration = config::ConfigurationRestApi::builder()
    .api_key("your-api-key")
    .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path
    .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted
    .build()?;

let client = alpha::AlphaRestApi::production(configuration);
let response = client.get_exchange_info(params).await?;