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";
199 return "VenueKilled";
201 return "InstrumentDisabled";
203 return "InvalidTick";
207 return "BelowMinNotional";
209 return "StaleMarketData";
211 return "PriceCollar";
215 return "MaxOrderQty";
217 return "MaxOrderNotional";
219 return "MaxPosition";
221 return "MaxOpenOrders";
223 return "SelfTradePrevention";
229 return "MaxGrossNotional";
231 return "MaxNetNotional";
233 return "FxRateUnknown";
237 return "MaxUnderlyingNet";
239 return "UnderlyingMarkUnknown";
241 return "BalanceShort";
243 return "PoolExhausted";
245 return "UnknownOrder";
247 return "InvalidState";
249 return "DuplicateId";
251 return "TransportFull";
253 return "NotReconciled";
257 return "OrderTableFull";
259 return "InvalidAccount";
261 return "GatewayRateLimit";
263 return "GatewayOpenNotional";
265 return "GatewayNotOwner";
267 return "GatewayAccountKilled";
269 return "GatewayGrossNotional";
271 return "GatewayNetNotional";
273 return "GatewayFxRateUnknown";
275 return "GatewayUnderlyingNet";
277 return "GatewayUnderlyingMarkUnknown";
279 return "GatewaySelfTrade";
281 return "GatewayBalanceShort";
283 return "VenueReject";
285 return "PostOnlyWouldCross";
287 return "InsufficientBalance";
289 return "VenueRateLimit";
291 return "VenueUnknownOrder";
339 return "BookSnapshot";
347 return "OrderReject";
349 return "OrderCancelAck";
351 return "OrderCancelReject";
355 return "OrderExpired";
357 return "PositionUpdate";
363 return "ConnectionState";
367 return "LatencySample";
369 return "OutNewOrder";
377 return "OrderExecL3";
379 return "OrderCancelL3";
381 return "OrderReplaceL3";
383 return "OptionTicker";
387 return "ParamUpdate";
395 return "StrategyState";
413 return "Disconnected";
490 return "ResumeQuotes";
500 return "RecalibrateTsc";
502 return "TripVenueKill";
510 return "SetUnderlyingLimit";
550 return "TransportFull";
552 return "JournalOverflow";
554 return "AllVenuesKilled";
558 return "VenueHardStop";
560 return "OrderRingOverflow";
562 return "StrategyError";
566 return "OrderIdsExhausted";
568 return "DeadMansSwitchLost";
570 return "GatewayMaxLoss";
572 return "GatewayOperator";
Definition strategy.hpp:16
OrderType
Definition enums.hpp:23
LogLevel
Definition enums.hpp:604
OrderState
Definition enums.hpp:79
constexpr bool is_pending(OrderState s) noexcept
Definition enums.hpp:93
ConnState
Definition enums.hpp:404
AssetClass
Definition enums.hpp:51
FlattenState
How far an operator flatten (ControlCommand::Flatten) got.
Definition enums.hpp:581
@ 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:523
@ 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
@ 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:300
@ EngineTime
journal only: the engine clock at start / finish / a delta overflow
@ 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: the strategy's state and the positions (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)
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
@ GatewayAccountKilled
[gateway] max_loss tripped the account's kill switch
@ 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.
@ 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:432
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:542
Liquidity
Definition enums.hpp:434
ControlCommand
Definition enums.hpp:447
@ TripVenueKill
A venue connector gave up on one venue (arg: KillReason, hdr.venue: the venue): the engine trips that...
@ SetLimits
New risk limits for RiskEngine::set_limits.
@ Flatten
Operator flatten (arg: the slippage allowance in basis points, 0 takes [engine] flatten_slippage_bps;...
@ 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...
@ Reconcile
Engine -> venue, on the outbound ring (hdr.venue: the venue): the engine and the venue disagree about...