Expand description
§KiteConnect API Client Module
This module provides the main KiteConnect
struct and associated methods for
interacting with the Zerodha KiteConnect REST API.
§Overview
The KiteConnect API allows you to build trading applications and manage portfolios programmatically. This module provides async methods for all supported endpoints.
§Authentication Flow
- Get Login URL: Use
KiteConnect::login_url
to generate a login URL - User Login: Direct user to the URL to complete login
- Generate Session: Use
KiteConnect::generate_session
with the request token - API Access: Use any API method with the authenticated client
§Example Usage
use kiteconnect_async_wasm::connect::KiteConnect;
let mut client = KiteConnect::new("your_api_key", "");
// Authentication
let login_url = client.login_url();
// ... user completes login and returns request_token ...
let session = client.generate_session("request_token", "api_secret").await?;
// Portfolio operations
let holdings = client.holdings().await?;
let positions = client.positions().await?;
let margins = client.margins(None).await?;
// Order operations
let orders = client.orders().await?;
let trades = client.trades().await?;
// Market data
let instruments = client.instruments(None).await?;
Re-exports§
pub use endpoints::Endpoint;
pub use endpoints::HttpMethod;
pub use endpoints::KiteEndpoint;
pub use endpoints::RateLimitCategory;
pub use rate_limiter::CategoryStats;
pub use rate_limiter::RateLimiter;
pub use rate_limiter::RateLimiterStats;
pub use utils::RequestHandler;
pub use utils::URL;
Modules§
- auth
- Authentication Module
- endpoints
- Endpoint Management Module
- gtt
- GTT (Good Till Triggered) Module
- market_
data - Market Data Module
- mutual_
funds - Mutual Funds Module
- orders
- Orders Module
- portfolio
- Portfolio Module
- rate_
limiter - Rate Limiter Module
- utils
- Utility Functions
Structs§
- Cache
Config - Configuration for response caching
- Kite
Connect - Main client for interacting with the KiteConnect API
- Kite
Connect Config - Configuration for KiteConnect client
- Retry
Config - Configuration for retry behavior