Expand description
Signed request builder for Binance API.
This module provides a builder pattern for creating authenticated Binance API requests, encapsulating the common signing workflow used across all authenticated endpoints.
§Overview
The SignedRequestBuilder eliminates code duplication by centralizing:
- Credential validation
- Timestamp generation
- Parameter signing with HMAC-SHA256
- Authentication header injection
- HTTP request execution
§Example
let binance = Binance::new(ExchangeConfig::default())?;
// Simple GET request
let data = binance.signed_request("/api/v3/account")
.execute()
.await?;
// POST request with parameters
let data = binance.signed_request("/api/v3/order")
.method(HttpMethod::Post)
.param("symbol", "BTCUSDT")
.param("side", "BUY")
.param("type", "MARKET")
.param("quantity", "0.001")
.execute()
.await?;Structs§
- Signed
Request Builder - Builder for creating authenticated Binance API requests.
Enums§
- Http
Method - HTTP request methods supported by the signed request builder.