Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 551 Bytes

File metadata and controls

15 lines (12 loc) · 551 Bytes

Key Pair Based Authentication

use binance_sdk::mining;
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 = mining::MiningRestApi::production(configuration);
let response = client.acquiring_algorithm().await?;