Skip to main content

Module finam

Module finam 

Source
Expand description

Finam connectors and the Finam gRPC client.

Re-exports§

pub use brokapi_finam_protocol as protocol;

Modules§

cid
Client order id codec
config
Connector configuration: the credentials and endpoint shared by both roles (FinamApiConfig) and the settings of each role (MarketDataConfig, UserDataConfig).
core
Sans-io cores: frames in, normalized events out. No sockets, timers or tasks here.
error
Map protocol errors to public connector errors.
index
Client order id <-> Finam order id.
limits
Rate limits of the Finam connectors, loaded from the bundled limits.toml.
map
Translation between Finam protobuf messages and brokapi-core types.
md
Finam market data connector: MarketDataConnector.
pump
Event pump: frames -> core -> per-subscription buffers -> the client’s Sender.
raw
Direct access to any Finam Trade API method (“back door”): same secret and token manager, same endpoint, same [BrokerLimiter] as the connector it came from.
rpc
Unary call helper: deadline, one re-auth retry for reads.
stream
One supervised gRPC server-stream: open, read, reopen with backoff.
subs
Subscription id generator (unique within one connector).
ud
Finam user data connector: UserDataConnector. One connector = one account.
util
Shared helpers: instrument ids, timestamps, decimals.

Structs§

FinamApiConfig
Connection and credentials, shared in shape by both connector roles.
FinamCidCodec
Codec between the library’s client order id (a UUID) and the fields Finam stores on an order.
FinamRaw
Handle for calling any Finam method with the connector’s token, endpoint and rate limiter.
MarketDataConfig
Market data connector config. Not bound to an account.
MarketDataConnector
Finam market data connector: order books, trades, quotes, candles and the instrument directory.
MdCore
Market data core: turns stream frames into events and keeps the state behind them.
UdCore
User data core: turns stream frames into order, execution and portfolio events.
UserDataConfig
User data connector config: one connector = one account.
UserDataConnector
Finam user data connector for ONE account: orders, stop orders, own trades and the portfolio.

Enums§

SubStatus
State of one subscription as seen by the core.

Functions§

api_config_from_env
Reads the config from environment variables. Meant for examples and live tests.