Expand description
Connector configuration: the credentials and endpoint shared by both roles (FinamApiConfig) and
the settings of each role (MarketDataConfig, UserDataConfig).
§Examples
use brokapi_finam::{FinamApiConfig, MarketDataConfig, UserDataConfig};
// Secret from your own storage. The default endpoint is the real broker.
let api = FinamApiConfig::new("my-api-secret");
let md = MarketDataConfig::new(api.clone(), "finam-md");
let ud = UserDataConfig::new(api, "A12345", "finam-ud-A12345");
assert_eq!(ud.account_id, "A12345");
assert_eq!(&*md.source, "finam-md");
// `{:?}` never prints the secret.
assert!(!format!("{ud:?}").contains("my-api-secret"));Structs§
- Finam
ApiConfig - Connection and credentials, shared in shape by both connector roles.
- Market
Data Config - Market data connector config. Not bound to an account.
- User
Data Config - User data connector config: one connector = one account.
Functions§
- api_
config_ from_ env - Reads the config from environment variables. Meant for examples and live tests.