Skip to main content

Crate finnhub_client_rs

Crate finnhub_client_rs 

Source
Expand description

Async Rust client for the Finnhub.io financial data API.

Create a FinnhubClient with your API key, then call endpoints through the accessor methods that mirror Finnhub’s own documentation grouping:

use finnhub_client_rs::FinnhubClient;

let client = FinnhubClient::new("your-api-key");
let quote = client.stock().quote("AAPL").await?;
println!("{:?}", quote.current_price);

All HTTP goes through a single internal request path that injects authentication (ADR-0002) and enforces a client-side rate limit (ADR-0004). The crate never retries on its own; use Error::is_retryable and Error::retry_after to build your own backoff policy (ADR-0003).

Modules§

endpoints
Thin endpoint handles (ADR-0005).
models
Typed response models (ADR-0005).

Structs§

ClientConfig
Client configuration (everything except the API key, which is supplied at construction and stored separately).
FinnhubClient
The single entry point: owns the config, HTTP connection pool, API key, and rate limiter. Cheap to clone (everything is behind an Arc).

Enums§

AuthMethod
How the API key is attached to outgoing requests.
Error
All failure modes of the client.

Type Aliases§

Result
Result type alias for this crate.