1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! # Gate.io Rust SDK
//!
//! A comprehensive Rust SDK for the Gate.io cryptocurrency exchange API, supporting both synchronous and asynchronous HTTP clients.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use gateio_rs::{
//! api::spot::get_ticker,
//! http::Credentials,
//! ureq::GateHttpClient,
//! };
//!
//! // Create client with credentials
//! let credentials = Credentials::new("your_api_key".to_string(), "your_api_secret".to_string());
//! let client = GateHttpClient::default().credentials(credentials);
//!
//! // Get ticker data
//! let request = get_ticker().currency_pair("BTC_USDT");
//! let response = client.send(request)?;
//! # Ok::<(), Box<dyn std::error::Error>>(()).expect("");
//! ```
//!
//! ## Features
//!
//! This SDK provides dual client implementations controlled by feature flags:
//!
//! * `enable-ureq` (default): Synchronous HTTP client powered by [`ureq`](https://docs.rs/ureq/)
//! * `enable-hyper`: Asynchronous HTTP client powered by [`hyper`](https://docs.rs/hyper/)
//!
//! ## Architecture
//!
//! - **Spot Trading API**: Complete implementation of Gate.io Spot trading endpoints
//! - **Authentication**: Automatic HMAC SHA-512 signing for authenticated requests
//! - **Builder Pattern**: Ergonomic request building with optional parameters
//! - **Type Safety**: Strong typing for all API parameters and responses
//!
/// Spot trading API endpoints
/// HTTP client abstractions and utilities