fix: Actually store currency in shared mem
This field has always been in the Security proto, though it until now it had been omitted from the shared memory representation (FixedSecurity).
This commit is contained in:
1 parent
3c9755f0dd
commit
be4895faa6
3 files changed
+6
No files matched your search
@@ -445,6 +445,7 @@ void GeneralMarketDataListener::_copy_security_common(
|
||||
to.symbol(symbol);
|
||||
to.security_desc(from.security_common.desc);
|
||||
to.exchange = domain::DomainSecurityUtils::convert(from.venue());
|
||||
to.currency(from.security_common.currency);
|
||||
to.display_factor = 0.0;
|
||||
to.price_break = 0.0;
|
||||
to.low_tick = to.high_tick = from.security_common.min_price_increment;
|
||||
|
||||
@@ -31,6 +31,7 @@ FixedSecurity::FixedSecurity()
|
||||
memset(_cfi_code, 0, BTS_ARRAYSIZE(_cfi_code));
|
||||
memset(_security_desc, 0, BTS_ARRAYSIZE(_security_desc));
|
||||
memset(_platform_id, 0, BTS_ARRAYSIZE(_platform_id));
|
||||
memset(_currency, 0, BTS_ARRAYSIZE(_currency));
|
||||
|
||||
memset(_ice_market_description, 0, BTS_ARRAYSIZE(_ice_market_description));
|
||||
memset(_ice_cleared_alias, 0, BTS_ARRAYSIZE(_ice_cleared_alias));
|
||||
@@ -162,6 +163,7 @@ void convert_security(const FixedSecurity &source, Security *presult) {
|
||||
dest.set_id(source.key);
|
||||
dest.set_exchange(source.exchange);
|
||||
dest.set_symbol(source.symbol());
|
||||
dest.set_currency(source.currency());
|
||||
|
||||
switch (source.exchange) {
|
||||
case Venue::VENUE_GLBX:
|
||||
@@ -357,6 +359,7 @@ void convert_security(
|
||||
dest.key = set_security_key ? src.id() : invalid_security_key;
|
||||
dest.type = securitytype_of_contractcase(src.Contract_case());
|
||||
dest.symbol(src.symbol());
|
||||
dest.currency(src.currency());
|
||||
dest.exchange = src.exchange();
|
||||
dest.display_factor = to_exponent(src.contract_spec().price_multiplier());
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ class BTS_EXPORT FixedSecurity {
|
||||
STRING_PROPERTY(cfi_code);
|
||||
STRING_PROPERTY(security_desc);
|
||||
STRING_PROPERTY(platform_id);
|
||||
STRING_PROPERTY(currency);
|
||||
|
||||
size_t size;
|
||||
security_key key;
|
||||
@@ -91,6 +92,7 @@ class BTS_EXPORT FixedSecurity {
|
||||
// 35
|
||||
char _alt_symbol[16]; // "cme symbol" or alternate symbol
|
||||
char _platform_id[64];
|
||||
char _currency[5];
|
||||
|
||||
char _ice_market_description[120];
|
||||
char _ice_cleared_alias[15];
|
||||
|
||||
Reference in new issue
Block a user