Expand description
Async, typed client for the ICICI Direct Breeze REST and streaming APIs.
The crate preserves Breeze’s exact compact-JSON signing contract, including
request bodies on GET and DELETE. Trading mutations are explicit, market
orders are not representable, and ambiguous mutations are never retried.
§Restoring a session
use breeze_icici::{AppKey, BreezeClient, Credentials, SecretKey, SessionToken};
let credentials = Credentials::new(
AppKey::new(std::env::var("BREEZE_APP_KEY")?)?,
SecretKey::new(std::env::var("BREEZE_SECRET_KEY")?)?,
);
let client = BreezeClient::builder(credentials)
.session_token(SessionToken::new(std::env::var("BREEZE_SESSION_TOKEN")?)?)
.build()?;
let funds = client.account().funds().await?;
println!("unallocated balance: {}", funds.unallocated_balance());Re-exports§
pub use auth::ApiSession;pub use auth::AppKey;pub use auth::Credentials;pub use auth::SecretKey;pub use auth::SessionToken;pub use auth::login_url;pub use client::AccountService;pub use client::Authenticated;pub use client::BreezeClient;pub use client::BreezeClientBuilder;pub use client::EndpointSet;pub use client::MarketDataService;pub use client::OrdersService;pub use client::Pending;pub use client::PortfolioService;pub use client::RetryPolicy;pub use client::RiskService;pub use client::Timeouts;pub use client::TradesService;pub use client::TradingService;pub use error::Error;pub use error::TimeoutPhase;pub use error::ValidationError;
Modules§
Traits§
- Endpoint
Request - A crate-defined Breeze operation with a typed success response.