10enum class Side : std::uint8_t {
Buy = 0,
Sell = 1 };
14[[nodiscard]]
constexpr int sign(
Side s)
noexcept {
17[[nodiscard]]
constexpr std::string_view
to_string(
Side s)
noexcept {
102 return "PartiallyFilled";
104 return "PendingCancel";
106 return "PendingReplace";
209 return "VenueKilled";
211 return "InstrumentDisabled";
213 return "InvalidTick";
217 return "BelowMinNotional";
219 return "StaleMarketData";
221 return "PriceCollar";
225 return "MaxOrderQty";
227 return "MaxOrderNotional";
229 return "MaxPosition";
231 return "MaxOpenOrders";
233 return "SelfTradePrevention";
239 return "MaxGrossNotional";
241 return "MaxNetNotional";
243 return "FxRateUnknown";
247 return "MaxUnderlyingNet";
249 return "UnderlyingMarkUnknown";
251 return "BalanceShort";
257 return "PoolExhausted";
259 return "UnknownOrder";
261 return "InvalidState";
263 return "DuplicateId";
265 return "TransportFull";
267 return "NotReconciled";
271 return "OrderTableFull";
273 return "InvalidAccount";
275 return "HomeUnavailable";
277 return "GatewayRateLimit";
279 return "GatewayOpenNotional";
281 return "GatewayNotOwner";
283 return "GatewayAccountKilled";
285 return "GatewayGrossNotional";
287 return "GatewayNetNotional";
289 return "GatewayFxRateUnknown";
291 return "GatewayUnderlyingNet";
293 return "GatewayUnderlyingMarkUnknown";
295 return "GatewaySelfTrade";
297 return "GatewayBalanceShort";
299 return "VenueReject";
301 return "PostOnlyWouldCross";
303 return "InsufficientBalance";
305 return "VenueRateLimit";
307 return "VenueUnknownOrder";
363 return "BookSnapshot";
371 return "OrderReject";
373 return "OrderCancelAck";
375 return "OrderCancelReject";
379 return "OrderExpired";
381 return "PositionUpdate";
387 return "ConnectionState";
391 return "LatencySample";
393 return "OutNewOrder";
401 return "OrderExecL3";
403 return "OrderCancelL3";
405 return "OrderReplaceL3";
407 return "OptionTicker";
411 return "ParamUpdate";
419 return "StrategyState";
421 return "AccountFlow";
425 return "InstrumentRules";
462 return "Disconnected";
560 return "ResumeQuotes";
570 return "RecalibrateTsc";
572 return "TripVenueKill";
580 return "SetUnderlyingLimit";
586 return "ResetLossBudget";
632 return "TransportFull";
634 return "JournalOverflow";
636 return "AllVenuesKilled";
640 return "VenueHardStop";
642 return "OrderRingOverflow";
644 return "StrategyError";
648 return "OrderIdsExhausted";
650 return "DeadMansSwitchLost";
652 return "GatewayMaxLoss";
654 return "GatewayOperator";
656 return "StoreFailure";
Definition strategy.hpp:23
OrderType
Definition enums.hpp:23
LogLevel
Definition enums.hpp:688
OrderState
Definition enums.hpp:79
constexpr bool is_pending(OrderState s) noexcept
Definition enums.hpp:93
TradingStatus
Whether a venue takes orders on an instrument (Instrument::status, InstrumentRulesMsg).
Definition enums.hpp:436
@ Closed
the venue lists it no longer, or has closed it for the day
@ Halted
a break, a halt, an auction, before or after the session
ConnState
Definition enums.hpp:453
AssetClass
Definition enums.hpp:51
FlattenState
How far an operator flatten (ControlCommand::Flatten) got.
Definition enums.hpp:665
@ Flat
it finished: no position left in its scope
@ Working
quoting is off in its scope and reduce-only slices are going out
@ TimedOut
[engine] flatten_timeout_ms elapsed with a position left; it gave up
@ Stopped
the operator resumed quoting before it finished
@ Off
none was asked for in this session
KillReason
Why a kill switch (global or one venue's) was tripped.
Definition enums.hpp:603
@ OrderIdsExhausted
the session's 32-bit client order id sequence is used up
@ TransportFull
the outbound ring to a venue was full
@ VenueHardStop
venue error map: REST stopped (IP ban)
@ VenueFatal
venue error map: bad key, signature, permission, failed auth
@ StoreFailure
fastmm-live: the store failed or dropped records ([storage] kill_on_failure)
@ AllVenuesKilled
every venue with instruments has its own kill bit set
@ OrderRingOverflow
fastmm-live: a venue's order-event ring overflowed
@ JournalOverflow
the journal ring was full
@ GatewayMaxLoss
fastmm-gateway: the account's [gateway] max_loss, over every strategy
@ DeadMansSwitchLost
the venue-side countdown could not be refreshed within its window
@ StrategyError
a strategy hook reported an error (Python hot hooks)
@ GatewayOperator
fastmm-gateway: an operator's kill on the gateway's control socket
@ FeedLost
a multicast feed cannot rebuild its books (nasdaq_itch)
@ Requested
ControlCommand::TripKill: shutdown, operator.
EventType
Message discriminator carried in EventHeader::type.
Definition enums.hpp:316
@ EngineTime
journal only: the engine clock at start / finish / a delta overflow
@ OwnLevels
Our resting quantity at the prices of one instrument's book as a simulated venue's feed shows it ([ba...
@ AccountFlow
money in or out of an account other than by trades (AccountFlowMsg)
@ Funding
a perpetual funding payment booked by the venue (FundingMsg)
@ Balance
the account's holding of one asset on one venue (BalanceMsg)
@ Padding
ring wrap filler, never dispatched
@ StrategyState
journal only: a checkpoint or a restored state (StrategyStateMsg)
@ OptionTicker
mark / implied vols / greeks of one option (OptionTickerMsg)
@ ParamUpdate
new strategy parameter values (ParamUpdateMsg)
@ PerpState
mark, index and funding of one derivative (PerpStateMsg)
@ InstrumentRules
A venue's trading rules or trading status of one instrument changed while the session ran (Instrument...
RejectReason
Ordered exactly like RiskEngine::check_new evaluates them (5.7), followed by OMS / transport / venue ...
Definition enums.hpp:123
@ GatewayUnderlyingMarkUnknown
an inverse contract of the underlying has no current mark
@ ReduceOnly
Reduce-only mode (fastmm-ctl reduce-only, [risk] reduce_only) holds the order's instrument,...
@ GatewayAccountKilled
[gateway] max_loss tripped the account's kill switch
@ PricedOut
[capacity]: the order is worth less than the price of the order slot it takes now (its account's wind...
@ GatewayNetNotional
the account's signed position at the marks
@ UnderlyingMarkUnknown
The underlying cannot be measured: an inverse contract in it has a position or open orders (or is the...
@ GatewayNotOwner
the instrument belongs to another attachment (or none)
@ GatewayUnderlyingNet
[gateway.underlying.<BASE>] max_net, over every strategy and venue
@ GatewayOpenNotional
the notional working at the venue, over every attached strategy
@ GatewayRateLimit
fastmm-gateway's account guards ([gateway]), refused before the order reached the connector
@ VenueReject
Venue-originated.
@ HomeUnavailable
[venues.
@ MaxUnderlyingNet
[risk.underlying.
@ GatewayBalanceShort
the account's balance, less every attached strategy's orders
@ GatewaySelfTrade
it would cross another attached strategy's resting order
@ FxRateUnknown
[accounting]: the rate of the order's settlement currency is unknown or stale, and the order would ad...
@ BalanceShort
The account's balance on the venue, as the venue last reported it less what the engine's own orders a...
@ FeedLag
[risk] max_feed_lag_ms: the venue's market data is late (core/venue_health.hpp) and the order could r...
@ MaxGrossNotional
portfolio |position| at the last marks, over every instrument
@ InvalidAccount
NewOrderRequest::account names a venue that is neither the instrument's nor a member of its pool (cor...
@ OrderTableFull
The connector's table of the orders it has sent is full: it could not record this one (whose fills,...
@ PoolExhausted
OMS / transport.
@ GatewayFxRateUnknown
[accounting]: the order's currency has no current rate
@ GatewayGrossNotional
the account's |position| at the marks, over every instrument
@ InvalidTag
a direct order used a user_tag in the QuoteManager's range
constexpr Side opposite(Side s) noexcept
Definition enums.hpp:13
Side
Definition enums.hpp:12
FeeAsset
The asset a fill's commission is charged in.
Definition enums.hpp:481
constexpr int sign(Side s) noexcept
Definition enums.hpp:16
constexpr bool is_terminal(OrderState s) noexcept
Definition enums.hpp:90
TimeInForce
Definition enums.hpp:36
constexpr std::string_view to_string(ParamType t) noexcept
Definition params.hpp:63
OptionType
Definition enums.hpp:77
constexpr std::size_t kKillVenueSlots
Kill reasons are kept per venue id for ids 0..kKillVenueSlots-1; higher ids share the last slot,...
Definition enums.hpp:624
Liquidity
Definition enums.hpp:483
ControlCommand
Definition enums.hpp:496
@ TripVenueKill
A venue connector gave up on one venue (arg: KillReason, hdr.venue: the venue): the engine trips that...
@ ReduceOnly
Reduce-only mode (arg: 1 on, 0 off; hdr.instrument: one instrument, else hdr.venue: one venue's instr...
@ SetLimits
New risk limits for RiskEngine::set_limits.
@ Flatten
Operator flatten (arg: the slippage allowance in basis points, 0 takes [engine] flatten_slippage_bps;...
@ PoolSweep
A pool's sweep (core/transfer_lane.hpp): hdr.venue the pool's primary, arg kSweepOff,...
@ Transfer
A pool treasury's transfer (core/treasury.hpp): planned, sent, done, failed or timed out.
@ SetUnderlyingLimit
A new [risk.underlying.
@ TakeOver
A warm standby took the instance lock (fastmm-live --standby): arg is the PnL carried from earlier se...
@ PoolHome
An instrument's home in its account pool (core/pool_homes.hpp): hdr.instrument, arg pool_home_arg(to,...
@ ResetLossBudget
A new [risk] max_loss period began (max_loss_period = "utc_day"): the engine measures net PnL from ze...
@ BaseFlow
A change of a spot instrument's base asset on its accounts that no fill and no transfer of the engine...
@ Reconcile
Engine -> venue, on the outbound ring (hdr.venue: the venue): the engine and the venue disagree about...