Skip to main content

Module ud

Module ud 

Source
Expand description

User-data core: order lifecycle, own trades, portfolio of ONE account.

The runtime owns the streams (OrderStateStream, TradesStream, PortfolioStream, PositionsStream) and the unary calls; this core keeps the order state machine, links ids (our cid <-> exchange order id <-> instrument) and turns everything into events.

One account: every message with another account_id is dropped even if the broker sends it on our stream.

Structs§

UdCore
Sans-io core of the user data of ONE account: order state machine, own trades, portfolio.

Enums§

StreamKind
The user-data streams the runtime keeps open.
UdFrame
One inbound item for UdCore: a message from one of the user data streams.
UdSubKind
User-data subscriptions. brokapi-sansio’s SubscriptionKind has no executions variant yet, so this core takes them through UdCore::add_sub.