|
Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
|
#include <common/types.hpp>#include <memory>#include <string>#include <string_view>#include <vector>#include <nlohmann/json_fwd.hpp>Go to the source code of this file.
Classes | |
| class | slick::sim::exch::ExchangeRegistry |
| Maps a key under the config's exchanges object (e.g. More... | |
Namespaces | |
| namespace | slick |
| namespace | slick::sim |
| namespace | slick::sim::exch |
| Helpers for a venue whose one config entry describes several independent exchange instances, such as CME's market segments or ICE's silos. | |
Concepts | |
| concept | slick::sim::exch::MultiInstanceVenue |
| A venue whose one config entry can describe several exchanges. | |
Macros | |
| #define | SLICK_SIM_REGISTER_VENUE(key, venue_enum, ExchangeType) |
| Defines a venue's factory and registers it. | |
Functions | |
| template<typename T, typename Base = Exchange> | |
| std::vector< std::unique_ptr< Base > > | slick::sim::exch::make_exchanges (const nlohmann::json &config) |
| The factory body SLICK_SIM_REGISTER_VENUE registers. | |
| #define SLICK_SIM_REGISTER_VENUE | ( | key, | |
| venue_enum, | |||
| ExchangeType ) |
Defines a venue's factory and registers it.
Place at namespace scope in exactly one translation unit of the venue library:
SLICK_SIM_REGISTER_VENUE("coinbase", Venue::COINBASE, CoinbaseExchange);
The factory builds one ExchangeType from the venue's config entry, unless ExchangeType declares
static std::vector<std::unique_ptr<Exchange>> create_instances(const nlohmann::json &);
in which case that decides how many instances the entry describes.
That TU must live in an OBJECT library - see cmake/slick_sim_venue.cmake for why a static library would let the linker drop this registration entirely.
Definition at line 100 of file exchange_registry.hpp.