Skip to main content

Module enums

Module enums 

Source
Expand description

Enumerations of the BCS API.

The broker writes most of its enums as strings of digits ("1" for buy) or as upper-case names. These types serialize to exactly that, so you can use them in requests and read them from replies. Enums that read replies have an Unknown variant (through #[serde(other)]), so a value the broker adds later does not break parsing of a whole frame.

Enums§

Exchange
Exchange code, as the broker writes it in the exchange fields.
ExecutionType
Type of an execution report (executionType): why the broker sent this message.
InstrumentType
Instrument type, as the broker names it in its upper-case form.
OrderSide
Side of an order: buy or sell. The wire form is the digit as a string.
OrderStatus
State of an order in an event or a state reply (orderStatus). The wire form is a digit string.
OrderType
Type of an order as it appears in order events of the WebSocket (orderType of an order message).
PortfolioPositionType
Kind of a portfolio record (type of a portfolio position), in camelCase.
SubscribeType
Kind of a market data subscription command: subscribe or unsubscribe.
TimeFrame
Candle time frame, in the names of the broker.
TradeSide
Side of a trade on the anonymous trades tape (WebSocket side as text).
TradingSessionStatus
Status of a trading session: OPEN or CLOSE.
UpperType
Top-level kind of a portfolio position (the upperType field).