Execution¶
- class BestPriceFillModel¶
Bases:
objectFill model that executes all orders at the best available price with unlimited liquidity.
- class CappedOptionFeeModel¶
Bases:
FeeModel- get_commission(order, fill_quantity, fill_px, instrument)¶
- get_commission_with_context(order, fill_quantity, fill_px, instrument, underlying_px=None)¶
- class CompetitionAwareFillModel¶
Bases:
objectFill model that reduces available liquidity by a factor to simulate market competition.
- class DefaultFillModel¶
Bases:
object
- class ExecutionEngineConfig¶
Bases:
objectConfiguration for ExecutionEngine instances.
- allow_overfills¶
- carry_replay_events_on_reopen¶
- debug¶
- external_clients¶
- load_cache¶
- manage_own_order_books¶
- purge_account_events_interval_mins¶
- purge_account_events_lookback_mins¶
- purge_closed_orders_buffer_mins¶
- purge_closed_orders_interval_mins¶
- purge_closed_positions_buffer_mins¶
- purge_closed_positions_interval_mins¶
- purge_from_database¶
- snapshot_orders¶
- snapshot_positions¶
- snapshot_positions_interval_secs¶
- class FeeModel¶
Bases:
object- get_commission(_order, _fill_quantity, _fill_px, _instrument)¶
- get_commission_with_context(order, fill_quantity, fill_px, instrument, _underlying_px=None)¶
- class FillModel¶
Bases:
object- fill_limit_inside_spread()¶
- get_orderbook_for_fill_simulation(_instrument, _order, _best_bid, _best_ask)¶
- is_limit_filled()¶
- is_slipped()¶
- class LimitOrderPartialFillModel¶
Bases:
objectFill model that simulates partial fills: max 5 contracts at best, unlimited one tick worse.
- class MakerTakerFeeModel¶
Bases:
FeeModel- get_commission(order, fill_quantity, fill_px, instrument)¶
- class MarketHoursFillModel¶
Bases:
objectFill model that simulates varying conditions based on market hours. During low liquidity: wider spreads (one tick worse). Normal hours: standard liquidity.
- class OneTickSlippageFillModel¶
Bases:
objectFill model that forces exactly one tick of slippage for all orders.
- class PerContractFeeModel¶
Bases:
FeeModel- get_commission(order, fill_quantity, fill_px, instrument)¶
- class ProbabilisticFillModel¶
Bases:
objectFill model with 50/50 chance of best price fill or one tick slippage.
- class ProbabilityPriceFeeModel¶
Bases:
FeeModelFee model for probability-priced outcome shares.
Applies qty * fee_rate * p * (1 - p) using the instrument’s maker or taker fee rate. This matches venues that represent outcome shares as [InstrumentAny::BinaryOption] instruments quoted on a [0, 1] probability scale.
This model covers quote-currency match-time exchange fees only. Venue-specific rebate programs or non-quote fee assets remain outside the core execution layer.
- get_commission(order, fill_quantity, fill_px, instrument)¶
- class SizeAwareFillModel¶
Bases:
objectFill model that applies different execution based on order size. Small orders (<=10) get 50 contracts at best. Large orders get 10 at best, remainder at +1 tick.
- class StaticLatencyModel¶
Bases:
objectStatic latency model with fixed latency values.
Models the latency for different order operations including base network latency and specific operation latencies for insert, update, and delete operations.
The base latency is automatically added to each operation latency, matching Python’s behavior. For example, if base_latency_nanos = 100ms and insert_latency_nanos = 200ms, the effective insert latency will be 300ms.
- class ThreeTierFillModel¶
Bases:
objectFill model with three tiers: 50 at best, 30 at +1 tick, 20 at +2 ticks.
- class TieredNotionalOptionFeeModel¶
Bases:
FeeModel- get_commission(order, fill_quantity, fill_px, instrument)¶
- class TwoTierFillModel¶
Bases:
objectFill model with two tiers: first 10 contracts at best price, remainder one tick worse.
- class VolumeSensitiveFillModel¶
Bases:
objectFill model that adjusts liquidity based on recent trading volume. Uses 25% of recent volume at best price, unlimited one tick worse.