25#include "fastmm/net/source_address.hpp"
40[[nodiscard]]
inline net::SourceAddress
source_address(
const VenueSection& s) {
41 return net::SourceAddress{s.source_ip, s.source_interface};
44struct VenueFactoryOptions {
100 std::string_view
name;
102 std::span<const std::string_view>
aliases = {};
103 std::span<const VenueKeySpec>
keys = {};
114 return "already present";
135 [[nodiscard]]
const std::vector<VenueEntry>&
entries() const noexcept {
return entries_; }
137 [[nodiscard]] std::string
kinds()
const;
140 std::vector<VenueEntry> entries_;
Definition config.hpp:302
Definition registry.hpp:125
const std::vector< VenueEntry > & entries() const noexcept
Definition registry.hpp:137
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:51
net::SourceAddress source_address(const VenueSection &s)
Runtime knobs every connector honours, passed to the factory.
Definition registry.hpp:42
AddResult
Definition registry.hpp:110
std::unique_ptr< Venue > make_venue(VenueId id, const VenueSection §ion, const VenueFactoryOptions &opts)
Builds the connector section.kind names.
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.
Definition config.hpp:155
What a connector declares about itself before one exists.
Definition registry.hpp:62
bool internal_transfer
Can move an asset between the accounts of a pool (Venue::transfer, VenueCaps::internal_transfer) once...
Definition registry.hpp:82
bool polls
Venue::poll() drives its sockets; the reactor never wakes for them.
Definition registry.hpp:67
bool bind_source
Binds every outbound connection (WebSocket, REST, the blocking control requests) to the section's sou...
Definition registry.hpp:78
bool order_entry
can send orders at all
Definition registry.hpp:64
bool replace
can amend a resting order in place
Definition registry.hpp:65
bool positions
reports positions from the venue
Definition registry.hpp:66
bool executions
Can fetch what the account executed since a point in time, so a reconciliation replays the fills the ...
Definition registry.hpp:72
bool credentials
needs api_key / api_secret outside a dry run
Definition registry.hpp:63
bool account_pools
Runs as a member of an account pool ([venues.
Definition registry.hpp:75
Definition registry.hpp:94
std::span< const VenueKeySpec > keys
the keys it owns, beyond the generic ones
Definition registry.hpp:105
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:99
std::span< const std::string_view > aliases
other kind values that select this entry
Definition registry.hpp:104
VenueCapabilities caps
Definition registry.hpp:106
Factory make
Definition registry.hpp:107
std::string_view name
Every member has a default, so a registration names only the ones it needs.
Definition registry.hpp:102
std::string_view summary
one line for the connector table
Definition registry.hpp:103
Definition registry.hpp:46
std::string record_raw_dir
non-empty: append raw frames to <dir>/<venue>-<channel>.jsonl
Definition registry.hpp:48
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:56
bool dry_run
public market data only: no keys, no orders
Definition registry.hpp:47
bool busy_poll
[engine] spin_mode = "busy": Venue::poll() must make progress
Definition registry.hpp:49
VenueId pool_of
A pool member ([venues.
Definition registry.hpp:53
One [venues.
Definition registry.hpp:87
std::string_view doc
Definition registry.hpp:91
bool required
Definition registry.hpp:90
std::string_view key
Definition registry.hpp:88
KeyType type
Definition registry.hpp:89
Venue: the control-path interface every exchange connector implements (6.2).