|
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
|
#include <fastmm/config/config.hpp>
Public Attributes | |
| std::string | name = "fastmm" |
| int | cpu = -1 |
| std::vector< int > | net_cpus |
| std::string | spin_mode = "adaptive" |
| bool | restore_position = true |
| Carry the previous session's positions over from the store (venues that replay executions). | |
| std::string | net_backend = "epoll" |
| net::Reactor backend: "epoll" | "io_uring" | |
| std::string | threading = "split" |
| fastmm-live: "split" runs the engine and each venue's network loop on their own threads; "single" runs the one venue's network loop, the engine and order sending on the engine thread. | |
| bool | journal = true |
| std::string | journal_dir = "runs" |
| std::string | journal_sync = "async" |
| "async" | "fdatasync" (core/journal.hpp) | |
| std::size_t | journal_max_bytes = 0 |
| roll over to the next part at this size (0: never) | |
| int | journal_retention_days = 0 |
| delete .fmj files older than this at start (0: keep) | |
| std::string | epoch_file = "runs/session_epoch" |
| std::string | kill_file |
| Latched kill switch and cumulative PnL; empty = "\<journal_dir\>/\<name\>.kill". | |
| bool | instance_lock = false |
| fastmm-live: an exclusive flock(2) on lock_file (empty = "\<journal_dir\>/\<name\>.lock") taken before the session touches the account, so one process of this engine name trades at a time (live/instance_lock.hpp). | |
| std::string | lock_file |
| int | handoff_timeout_ms = 75'000 |
--takeover: how long the new process waits for the running one to release the lock after it accepted handoff, ms. | |
| std::uint64_t | rng_seed = 1 |
| std::size_t | md_ring_bytes = 4U << 20 |
| std::size_t | order_ring_bytes = 1U << 20 |
| std::size_t | journal_ring_bytes = 16U << 20 |
| std::uint32_t | max_events_per_step = 64 |
| std::uint32_t | feed_budget_per_ring = 64 |
| RingFeed: events per ring before the next one's turn. | |
| bool | net_spin_dedicated = false |
| Adaptive: a network thread alone on its pinned core never blocks (net_never_blocks). | |
| int | crossed_grace_ms = 100 |
| int | ack_timeout_ms = 0 |
| force-cancel an order without an ack after this long; 0 = off | |
| int | flatten_interval_ms = 500 |
| Operator flatten (fastmm-ctl flatten): the sweep period, how long the engine keeps working the position off (0 = until it is flat or an operator stops it) and the default slippage. | |
| int | flatten_timeout_ms = 60000 |
| int | flatten_slippage_bps = 25 |
| double | queue_conservatism = 1.0 |
| queue position estimate (ctx.queue_ahead), 0..1 | |
| int | latency_publish_ms = 1000 |
| int | tsc_recalibrate_s = 10 |
| fastmm-live: TSC recalibration period, 0 = never | |
| std::int64_t | timer_slack_ns = 0 |
| fastmm-live: PR_SET_TIMERSLACK of its threads, 0 = kernel's | |
| bool | lock_memory = false |
| fastmm-live: mlockall(MCL_CURRENT | MCL_FUTURE) | |
| int | cpu_dma_latency_us = -1 |
| fastmm-live: PM QoS CPU latency request (/dev/cpu_dma_latency) held for the session, us; -1 = none. | |
| int | rt_priority = 0 |
| fastmm-live: SCHED_FIFO priority of the engine thread and of the network threads, 0 = off. | |
| int | net_rt_priority = 0 |
| bool | log_irq_affinity = false |
| fastmm-live: log the NICs' interrupt CPUs against the pinned ones. | |
| int | min_requote_ticks = 1 |
| int | min_requote_interval_ms = 50 |
| int | min_qty_bps = 8000 |
| bool | post_only = true |
| bool | supports_replace = true |
| int | reject_backoff_ms = 1000 |
| QuoteManager: pause a side after a venue reject (0 = off) | |
| int | reject_backoff_max_ms = 60000 |
| doubling cap | |
| int | quote_token_reserve = 0 |
| [risk] order tokens quotes that add risk leave to others | |
| std::string | on_kill = "exit" |
| fastmm-live after a kill switch it did not ask for (risk limit, internal failure, every venue killed): "exit" shuts down like SIGTERM and exits with code 6; "stay" keeps running with quoting off and logs an ERROR line every 10 s. | |
| std::string fastmm::EngineSection::name = "fastmm" |
| int fastmm::EngineSection::cpu = -1 |
| std::vector<int> fastmm::EngineSection::net_cpus |
| std::string fastmm::EngineSection::spin_mode = "adaptive" |
| bool fastmm::EngineSection::restore_position = true |
Carry the previous session's positions over from the store (venues that replay executions).
| std::string fastmm::EngineSection::net_backend = "epoll" |
net::Reactor backend: "epoll" | "io_uring"
| std::string fastmm::EngineSection::threading = "split" |
fastmm-live: "split" runs the engine and each venue's network loop on their own threads; "single" runs the one venue's network loop, the engine and order sending on the engine thread.
| bool fastmm::EngineSection::journal = true |
| std::string fastmm::EngineSection::journal_dir = "runs" |
| std::string fastmm::EngineSection::journal_sync = "async" |
"async" | "fdatasync" (core/journal.hpp)
| std::size_t fastmm::EngineSection::journal_max_bytes = 0 |
roll over to the next part at this size (0: never)
| int fastmm::EngineSection::journal_retention_days = 0 |
delete .fmj files older than this at start (0: keep)
| std::string fastmm::EngineSection::epoch_file = "runs/session_epoch" |
| std::string fastmm::EngineSection::kill_file |
Latched kill switch and cumulative PnL; empty = "\<journal_dir\>/\<name\>.kill".
| bool fastmm::EngineSection::instance_lock = false |
fastmm-live: an exclusive flock(2) on lock_file (empty = "\<journal_dir\>/\<name\>.lock") taken before the session touches the account, so one process of this engine name trades at a time (live/instance_lock.hpp).
--standby and --takeover take it whatever this says.
| std::string fastmm::EngineSection::lock_file |
| int fastmm::EngineSection::handoff_timeout_ms = 75'000 |
--takeover: how long the new process waits for the running one to release the lock after it accepted handoff, ms.
| std::uint64_t fastmm::EngineSection::rng_seed = 1 |
| std::size_t fastmm::EngineSection::md_ring_bytes = 4U << 20 |
| std::size_t fastmm::EngineSection::order_ring_bytes = 1U << 20 |
| std::size_t fastmm::EngineSection::journal_ring_bytes = 16U << 20 |
| std::uint32_t fastmm::EngineSection::max_events_per_step = 64 |
| std::uint32_t fastmm::EngineSection::feed_budget_per_ring = 64 |
RingFeed: events per ring before the next one's turn.
| bool fastmm::EngineSection::net_spin_dedicated = false |
Adaptive: a network thread alone on its pinned core never blocks (net_never_blocks).
| int fastmm::EngineSection::crossed_grace_ms = 100 |
| int fastmm::EngineSection::ack_timeout_ms = 0 |
force-cancel an order without an ack after this long; 0 = off
| int fastmm::EngineSection::flatten_interval_ms = 500 |
Operator flatten (fastmm-ctl flatten): the sweep period, how long the engine keeps working the position off (0 = until it is flat or an operator stops it) and the default slippage.
| int fastmm::EngineSection::flatten_timeout_ms = 60000 |
| int fastmm::EngineSection::flatten_slippage_bps = 25 |
| double fastmm::EngineSection::queue_conservatism = 1.0 |
queue position estimate (ctx.queue_ahead), 0..1
| int fastmm::EngineSection::latency_publish_ms = 1000 |
| int fastmm::EngineSection::tsc_recalibrate_s = 10 |
fastmm-live: TSC recalibration period, 0 = never
| std::int64_t fastmm::EngineSection::timer_slack_ns = 0 |
fastmm-live: PR_SET_TIMERSLACK of its threads, 0 = kernel's
| bool fastmm::EngineSection::lock_memory = false |
fastmm-live: mlockall(MCL_CURRENT | MCL_FUTURE)
| int fastmm::EngineSection::cpu_dma_latency_us = -1 |
fastmm-live: PM QoS CPU latency request (/dev/cpu_dma_latency) held for the session, us; -1 = none.
| int fastmm::EngineSection::rt_priority = 0 |
fastmm-live: SCHED_FIFO priority of the engine thread and of the network threads, 0 = off.
| int fastmm::EngineSection::net_rt_priority = 0 |
| bool fastmm::EngineSection::log_irq_affinity = false |
fastmm-live: log the NICs' interrupt CPUs against the pinned ones.
| int fastmm::EngineSection::min_requote_ticks = 1 |
| int fastmm::EngineSection::min_requote_interval_ms = 50 |
| int fastmm::EngineSection::min_qty_bps = 8000 |
| bool fastmm::EngineSection::post_only = true |
| bool fastmm::EngineSection::supports_replace = true |
| int fastmm::EngineSection::reject_backoff_ms = 1000 |
QuoteManager: pause a side after a venue reject (0 = off)
| int fastmm::EngineSection::reject_backoff_max_ms = 60000 |
doubling cap
| int fastmm::EngineSection::quote_token_reserve = 0 |
[risk] order tokens quotes that add risk leave to others
| std::string fastmm::EngineSection::on_kill = "exit" |
fastmm-live after a kill switch it did not ask for (risk limit, internal failure, every venue killed): "exit" shuts down like SIGTERM and exits with code 6; "stay" keeps running with quoting off and logs an ERROR line every 10 s.