Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
Loading...
Searching...
No Matches
instance_expansion.hpp File Reference
#include <nlohmann/json.hpp>
#include <slick/logger.hpp>
#include <format>
#include <stdexcept>
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>
Include dependency graph for instance_expansion.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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.

Functions

template<typename DefaultName>
std::vector< nlohmann::json > slick::sim::exch::expand_instances (const nlohmann::json &config, std::string_view list_key, std::string_view venue, DefaultName &&default_name)
 Expands a venue's config entry into one config per instance listed under list_key.
template<typename T>
void slick::sim::exch::claim (std::unordered_map< T, std::string > &claimed, const T &value, const std::string &owner, std::string_view what, std::string_view venue)
 Records that instance owner uses value.
std::string slick::sim::exch::group_key (const nlohmann::json &group)
 "address:port" of a { "address", "port" } multicast group config, as claimed.