Expand description
Idiomatic async Rust client for the documented Fyers broker APIs.
The crate is organized around a single FyersClient with typed accessors
for auth, REST, and WebSocket surfaces. The market-data WebSocket talks the
real Fyers V3 binary protocol (auth handshake, channel-mode set, channel
resume, HSM-token-resolved subscribe, ack flow control) — see
ws::DataSocketConnection and ws::data_protocol.
§Quick start
use fyers_rs::FyersClient;
let client = FyersClient::builder()
.client_id("APPID-100")
.access_token("ACCESS_TOKEN")
.build()?;
let _orders = client.orders();
let _market_data = client.market_data();
let _data_socket = client.data_socket();§REST and WebSocket APIs
REST services live under rest and typed request/response/event models live
under models. WebSocket managers are exposed through ws.
§Verification status
The market-data WebSocket and the profile/funds/holdings REST endpoints have been live-verified end-to-end. REST order placement, modification, and cancellation paths have never been live-fired against a real Fyers account — the URLs and payload shapes match the official Python SDK, but a round-trip live order has not yet been performed through this crate. See the README’s verification matrix and the per-module status notes.
§Warning
This project is entirely AI-generated at this stage. It has not been independently audited or battle-tested. Review, test, and verify all behavior yourself before using it with real Fyers credentials, market data, or orders.
Re-exports§
pub use client::FyersClient;pub use client::FyersClientBuilder;pub use config::FyersConfig;pub use config::SecretString;pub use error::FyersError;pub use error::Result;pub use rest::alerts;pub use rest::edis;pub use rest::funds;pub use rest::gtt;pub use rest::holdings;pub use rest::market_data;pub use rest::orders;pub use rest::positions;pub use rest::profile;pub use rest::reports;pub use rest::smart_orders;pub use rest::trades;
Modules§
- auth
- Auth/session API service.
- client
- Main
FyersCliententry point. - config
- Client configuration and secret handling.
- error
- Error types used by
fyers-rs. - models
- Typed request/response/event models for documented Fyers APIs.
- rest
- REST API service accessors.
- transport
- Shared REST transport primitives.
- ws
- WebSocket service accessors and manager types.