FastMM documentation
FastMM C++ API 0.14.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
config.hpp File Reference

Typed configuration (8.7). More...

#include "fastmm/core/account_pool.hpp"
#include "fastmm/core/balance_book.hpp"
#include "fastmm/core/enums.hpp"
#include "fastmm/core/fees.hpp"
#include "fastmm/core/fill_cluster.hpp"
#include "fastmm/core/fx.hpp"
#include "fastmm/core/hazard.hpp"
#include "fastmm/core/instrument.hpp"
#include "fastmm/core/perp_book.hpp"
#include "fastmm/core/pool_homes.hpp"
#include "fastmm/core/quote_manager.hpp"
#include "fastmm/core/risk.hpp"
#include "fastmm/core/thread_utils.hpp"
#include "fastmm/core/treasury.hpp"
#include "fastmm/core/underlying.hpp"
#include "fastmm/core/windows.hpp"
#include "fastmm/strategies/params.hpp"
#include <cstdint>
#include <map>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <vector>

Go to the source code of this file.

Classes

class  fastmm::ConfigError
 
struct  fastmm::EngineSection
 
struct  fastmm::FeesSection
 
struct  fastmm::TreasurySection
 [venues. More...
 
struct  fastmm::PoolSection
 [venues. More...
 
struct  fastmm::TransfersSection
 [venues. More...
 
struct  fastmm::VenueSection
 
struct  fastmm::InstrumentSection
 
struct  fastmm::StrategySection
 
struct  fastmm::AbArmSection
 [ab]: an A/B test of strategy parameters (strategies/ab_test.hpp). No arms: no test. More...
 
struct  fastmm::AbSection
 
struct  fastmm::HazardSection
 One [[risk.hazard]] table (core/hazard.hpp). More...
 
struct  fastmm::RiskSection
 
struct  fastmm::GatewaySection
 fastmm-gateway's account guards: one venue's account, shared by every attached strategy. More...
 
struct  fastmm::CapacitySection
 [capacity]: the price of an order slot (core/capacity_price.hpp). More...
 
struct  fastmm::WindowSection
 One [[windows]] table (core/windows.hpp), as written; window_config() resolves it. More...
 
struct  fastmm::LoggingSection
 
struct  fastmm::ShadowSection
 Free-form section used by the sim / backtest libraries: dotted keys -> stringified value. More...
 
struct  fastmm::GenericSection
 
struct  fastmm::ConfigLoadOptions
 
class  fastmm::Config
 

Namespaces

namespace  fastmm
 

Functions

InstrumentTable fastmm::load_instruments (const Config &cfg)
 Builds the dense instrument table (src/core/instrument_loader.cpp). Throws ConfigError.
 
PoolHomesPlan fastmm::pool_homes (const Config &cfg, const InstrumentTable &table)
 [venues.
 
HazardConfig fastmm::hazard_config (const Config &cfg, const InstrumentTable &table, std::span< const std::string > venue_names)
 [[risk.hazard]] with the members resolved in table (venue_names naming its venue ids).
 
WindowsConfig fastmm::window_config (const Config &cfg, const InstrumentTable &table, std::span< const std::string > venue_names)
 [[windows]] with the zones looked up and the scopes resolved in table (venue_names naming its venue ids).
 
FeeTable fastmm::fee_table (const Config &cfg, const InstrumentTable *table=nullptr, const std::vector< std::string > *venue_names=nullptr)
 The fee rates of each instrument: its [[instruments]] maker_bps / taker_bps, else its venue's [venues.
 
BalanceConfig fastmm::balance_config (const Config &cfg, const InstrumentTable *table=nullptr, const std::vector< std::string > *venue_names=nullptr)
 [risk] check_balance and each instrument's [[instruments]] initial_margin, the instruments mapped as fee_table() maps them.
 
PerpConfig fastmm::perp_config (const Config &cfg)
 [accounting] mark, stale_mark_ms and stale_funding_ms.
 

Variables

constexpr std::size_t fastmm::kMaxVenuesConfig = 8
 == kMaxVenues (transport.hpp)
 
constexpr int fastmm::kMaxMdCopies = 8
 The most redundant market-data connections a venue opens ([venues.*] md_copies).
 
constexpr int fastmm::kMinFillAuditIntervalS = 10
 The shortest [venues.<name>] fill_audit_interval_s: an audit reads every subscribed symbol.
 

Detailed Description

Typed configuration (8.7).

TOML parsing lives in src/core/config.cpp (toml++ is a private dependency of fastmm_core); this header exposes only plain structs.

Sections: [engine] [venues.<x>] [venues.<x>.fees] [[instruments]] [strategy] [strategy.params] [risk] [[windows]] [gateway] [accounting] [accounting.fx] [logging] [sim] [backtest] [storage] A [venues.<x>] key the generic parser does not read is kept verbatim in VenueSection::extra: the connector kind names owns it (include/fastmm/venues/registry.hpp). Rules: ${VAR} is substituted only inside [venues.*] strings; a value that looks like an inline secret (> 32 chars, no ${) is rejected unless allow_inline_secrets; redacted() prints the config with secrets masked; validation errors carry line:col.