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
//! # tradestation-api
//!
//! A complete, typed wrapper for the [TradeStation REST API v3](https://api.tradestation.com/docs/).
//!
//! This crate provides async access to all 38 TradeStation v3 endpoints with:
//!
//! - **OAuth2 Authorization Code** flow with automatic token refresh
//! - **Market Data**: Historical bars (OHLCV), quotes, symbol info, crypto pairs, options
//! - **Brokerage**: Accounts, balances, positions, orders, wallets
//! - **Execution**: Place, replace, cancel orders; OCO/bracket groups; activation triggers; routes
//! - **Streaming**: HTTP chunked-transfer for live quotes, bars, market depth, options, orders, positions
//! - **Simulation**: Built-in support for TradeStation's sim API
//!
//! # Quickstart
//!
//! ```no_run
//! use tradestation_api::{Client, Credentials, Scope};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let creds = Credentials::new("CLIENT_ID", "CLIENT_SECRET");
//!
//! // 1. Direct user to authorization URL
//! let url = creds.authorization_url(&Scope::defaults());
//! println!("Visit: {url}");
//!
//! // 2. Exchange the callback code for tokens
//! let mut client = Client::new(creds);
//! client.authenticate("AUTH_CODE").await?;
//!
//! // 3. Fetch data
//! let quotes = client.get_quotes(&["AAPL", "MSFT"]).await?;
//! for q in "es {
//! println!("{}: last={}", q.symbol, q.last);
//! }
//! Ok(())
//! }
//! ```
//!
//! # Standalone crate
//!
//! This is a standalone library with zero Cannopy dependencies. It can be used
//! independently in any Rust project that needs TradeStation API access.
pub use ;
pub use ;
pub use Client;
pub use Error;
pub use ;
pub use ;
pub use ;