25#include "fastmm/net/endpoint_selector.hpp"
26#include "fastmm/net/source_address.hpp"
41[[nodiscard]]
inline net::SourceAddress
source_address(
const VenueSection& s) {
42 return net::SourceAddress{s.source_ip, s.source_interface};
48 net::EndpointSelectConfig c;
57struct VenueFactoryOptions {
106 std::string_view
key;
120 std::string_view
name;
122 std::span<const std::string_view>
aliases = {};
123 std::span<const VenueKeySpec>
keys = {};
134 return "already present";
155 [[nodiscard]]
const std::vector<VenueEntry>&
entries() const noexcept {
return entries_; }
157 [[nodiscard]] std::string
kinds()
const;
160 std::vector<VenueEntry> entries_;
Definition config.hpp:502
Definition registry.hpp:145
const std::vector< VenueEntry > & entries() const noexcept
Definition registry.hpp:157
std::string kinds() const
Every accepted kind, names and aliases, comma-separated, for an error message.
static VenueRegistry & instance()
The registry fastmm-live resolves kind through.
const VenueEntry * find(std::string_view kind) const noexcept
By kind: the entry's name or one of its aliases.
AddResult add(VenueEntry entry)
Registering the same factory under the same name again changes nothing (AlreadyPresent); anything tha...
Typed configuration (8.7).
constexpr std::string_view to_string(ChannelState s) noexcept
Definition venue.hpp:55
net::SourceAddress source_address(const VenueSection &s)
Runtime knobs every connector honours, passed to the factory.
Definition registry.hpp:43
AddResult
Definition registry.hpp:130
std::unique_ptr< Venue > make_venue(VenueId id, const VenueSection §ion, const VenueFactoryOptions &opts)
Builds the connector section.kind names.
net::EndpointSelectConfig endpoint_select_config(const EngineSection &e)
[engine] endpoint_select and its endpoint_ keys as the process's endpoint selection (net/endpoint_sel...
Definition registry.hpp:49
void validate_venues(const Config &cfg, const VenueRegistry &r=VenueRegistry::instance())
Checks every [venues.
void register_builtin_venues(VenueRegistry &r=VenueRegistry::instance())
Adds the connectors FastMM ships (binance_spot, binance_usdm, bybit, deribit, nasdaq_itch).
KeyType
Definition schema.hpp:22
StrongId< struct VenueTag, std::uint8_t > VenueId
Definition strong_id.hpp:39
Declarative config schema (8.7): every known key with its section, type and whether it is required.
int endpoint_probe_samples
Definition config.hpp:135
int endpoint_spread_us
Definition config.hpp:136
int endpoint_probe_interval_s
Definition config.hpp:134
int endpoint_switch_us
Definition config.hpp:137
bool endpoint_select
Endpoint selection (net/endpoint_selector.hpp): connect to the fastest of a venue host's addresses.
Definition config.hpp:133
Definition config.hpp:227
What a connector declares about itself before one exists.
Definition registry.hpp:75
bool internal_transfer
Can move an asset between the accounts of a pool (Venue::transfer, VenueCaps::internal_transfer) once...
Definition registry.hpp:102
bool polls
Venue::poll() drives its sockets; the reactor never wakes for them.
Definition registry.hpp:86
bool bind_source
Binds every outbound connection (WebSocket, REST, the blocking control requests) to the section's sou...
Definition registry.hpp:98
bool order_entry
can send orders at all
Definition registry.hpp:79
bool replace
can amend a resting order in place
Definition registry.hpp:80
bool market_data_keys
Its market data needs the account's keys too (Alpaca): a dry run keeps api_key and api_secret.
Definition registry.hpp:78
bool positions
reports positions from the venue
Definition registry.hpp:81
bool executions
Can fetch what the account executed since a point in time, so a reconciliation replays the fills the ...
Definition registry.hpp:91
bool credentials
needs api_key / api_secret outside a dry run
Definition registry.hpp:76
bool account_pools
Runs as a member of an account pool ([venues.
Definition registry.hpp:94
bool position_snapshot
Its reconciliation reports the position of every subscribed derivative or stock, flat ones too,...
Definition registry.hpp:85
Definition registry.hpp:114
std::span< const VenueKeySpec > keys
the keys it owns, beyond the generic ones
Definition registry.hpp:125
std::unique_ptr< Venue >(*)(VenueId, const VenueSection &, const VenueFactoryOptions &) Factory
Throws std::invalid_argument (a bad URL, a key the connector rejects); the message names the venue.
Definition registry.hpp:119
std::span< const std::string_view > aliases
other kind values that select this entry
Definition registry.hpp:124
VenueCapabilities caps
Definition registry.hpp:126
Factory make
Definition registry.hpp:127
std::string_view name
Every member has a default, so a registration names only the ones it needs.
Definition registry.hpp:122
std::string_view summary
one line for the connector table
Definition registry.hpp:123
Definition registry.hpp:59
std::string record_raw_dir
non-empty: append raw frames to <dir>/<venue>-<channel>.jsonl
Definition registry.hpp:61
bool pooled
The venue is a pool's primary or member: its account shares the IP's request weight with the pool's o...
Definition registry.hpp:69
bool dry_run
public market data only: no keys, no orders
Definition registry.hpp:60
bool busy_poll
[engine] spin_mode = "busy": Venue::poll() must make progress
Definition registry.hpp:62
VenueId pool_of
A pool member ([venues.
Definition registry.hpp:66
One [venues.
Definition registry.hpp:107
std::string_view doc
Definition registry.hpp:111
bool required
Definition registry.hpp:110
std::string_view key
Definition registry.hpp:108
KeyType type
Definition registry.hpp:109
Venue: the control-path interface every exchange connector implements (6.2).