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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! # Coinbase Advanced Trade API Client
//!
//! A Rust client library for the Coinbase Advanced Trade API.
//!
//! ## Features
//!
//! - REST API client with JWT authentication
//! - Strongly typed request/response models
//! - Async/await support with tokio
//! - Support for both production and sandbox environments
//!
//! ## Quick Start
//!
//! ```no_run
//! use coinbase_advanced::{Credentials, RestClient};
//!
//! #[tokio::main]
//! async fn main() -> coinbase_advanced::Result<()> {
//! // Create credentials from environment variables
//! let credentials = Credentials::from_env()?;
//!
//! // Build the client
//! let client = RestClient::builder()
//! .credentials(credentials)
//! .build()?;
//!
//! // Make API calls...
//! Ok(())
//! }
//! ```
//!
//! ## Authentication
//!
//! The Coinbase Advanced Trade API uses JWT (JSON Web Tokens) for authentication.
//! You'll need:
//!
//! - An API key (in the format `organizations/{org_id}/apiKeys/{key_id}`)
//! - An EC private key in PEM format
//!
//! These can be obtained from the Coinbase Developer Platform.
//!
//! ## Sandbox Mode
//!
//! For testing, you can use the sandbox environment:
//!
//! ```no_run
//! # use coinbase_advanced::{Credentials, RestClient};
//! let client = RestClient::builder()
//! .credentials(Credentials::from_env().unwrap())
//! .sandbox(true)
//! .build()
//! .unwrap();
//! ```
// Re-export main types.
pub use ;
pub use Credentials;
pub use ;
// Re-export API types for convenience.
pub use ;
// Re-export constants for advanced usage.