fix: Don't apply cme cpp overrides to non-cme securities

Bugs (fixed):
  * The cash per point for many securities is wrong. For example, it is
    5 for all BTC securities (which is wrong).

    Cause: cpp override config that should be specific to cme is applied
    to ALL securities.
This commit is contained in:
John Colvin committed 2025-03-24 20:20:53 +00:00
1 parent 8512f414d6
commit 8e9ab8f2eb
1 file changed
+4
+4
View File
@@ -5,6 +5,7 @@
#include "lib/config/config.h"
#include "lib/config/protos/cme_reference_data.pb.h"
#include "lib/config/protos/market_data.pb.h"
#include "lib/domain_model/Security.pb.h"
#include "lib/utils/parse_enum.h"
#ifndef _WIN32
@@ -61,6 +62,9 @@ struct CppOverride : public ISecurityMapper {
}
void apply(FixedSecurity &f) const override {
if (f.exchange != api::VENUE_GLBX) {
return;
}
auto iter = _map.find(f.symbol());
if (iter != _map.end()) {
f.cash_per_point = iter->second;