Skip to main content

Module subs

Module subs 

Expand description

The subscription records a connector keeps, and the generators of subscription ids and request ids.

These types are the bookkeeping of the connectors. A bot does not build them: it gets a [SubscriptionId] from a subscribe_* call and passes it back to unsubscribe.

Structs§

MdSubscription
A market data subscription as the connector keeps it.
ReqIdGen
Hands out the req_id that ties an answer of the exchange to its request.
SubIdGen
Hands out subscription ids, counting up from start + 1.
UdSubscription
A user data subscription as the connector keeps it.

Enums§

MdSubKind
What a market data subscription is for.
UdSubKind
What a user data subscription is for.

Functions§

wait_ack
Waits until the exchange has answered a subscription: Ok when it is open, [brokapi_core::Error::Rejected] (subscription_refused) when the exchange refused it, [brokapi_core::Error::Transport] when nothing came in limit.