small changes for ice cert
This commit is contained in:
1 parent
aea02e212a
commit
6e09d9e949
4 files changed
+26
-10
No files matched your search
@@ -57,12 +57,15 @@ ICEOptions {
|
||||
name: "oil" #these names are arbitrary and are for debugging
|
||||
market_type: 5 #ICE Futures Brent, IPE Brent Futures
|
||||
market_type: 9 #ICE Futures WTI, ICE WTI Crude Futures
|
||||
#market_type: 11 #ICE WTI-Brent spreads
|
||||
#market_type: 14 #ICE HO-WTI Crack
|
||||
#market_type: 16 #ICE RB-WTI Crack
|
||||
#udp_buffer_size: 33554432 #32mb
|
||||
}
|
||||
channel {
|
||||
name: "juice"
|
||||
market_type: 23 #ICE Futures US Agricultures, FCOJ A
|
||||
}
|
||||
# channel {
|
||||
# name: "juice"
|
||||
# market_type: 23 #ICE Futures US Agricultures, FCOJ A
|
||||
# }
|
||||
ice_config_file: "ConnectivityConfiguration.APITest.xml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ SymbolLists
|
||||
symbol: "BRN"
|
||||
symbol: "WBS"
|
||||
symbol: "OJ"
|
||||
symbol: "*"
|
||||
}
|
||||
list
|
||||
{
|
||||
|
||||
@@ -42,8 +42,11 @@ ICEListener::~ICEListener() {}
|
||||
|
||||
std::string ICEListener::parse_contract_symbol(const std::string& sym)
|
||||
{
|
||||
const auto&& res = sym.substr(0, sym.find(' '));
|
||||
return res;
|
||||
auto end = sym.find(' ');
|
||||
if(end == std::string::npos)
|
||||
return sym;
|
||||
else
|
||||
return sym.substr(0, end);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -124,8 +124,8 @@ private:
|
||||
{
|
||||
if (_index.has_security(exchange_id))
|
||||
return SKIP;
|
||||
// if(_symbol_filter.count("*") > 0)
|
||||
// return ADD;
|
||||
if(_symbol_filter.count("*") > 0)
|
||||
return ADD;
|
||||
return _symbol_filter.count( parse_contract_symbol(def.contractSymbol) ) > 0 ? ADD : SKIP;
|
||||
}
|
||||
void flush_books();
|
||||
@@ -143,8 +143,17 @@ void ICEListener::set_security_common(const Definition& def, FixedSecurity& fsec
|
||||
{
|
||||
fsec.numeric_id = def.marketId;
|
||||
std::string sym = parse_contract_symbol(def.contractSymbol);
|
||||
fsec.symbol( sym );
|
||||
fsec.security_desc(def.contractSymbol);
|
||||
if(!sym.empty())
|
||||
{
|
||||
fsec.symbol( sym );
|
||||
fsec.security_desc(def.contractSymbol);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto id = std::to_string(def.marketId);
|
||||
fsec.symbol(id);
|
||||
fsec.security_desc(id);
|
||||
}
|
||||
fsec.exchange = api::Venue::VENUE_ICE;
|
||||
fsec.display_factor = 0.0;
|
||||
fsec.ice_price_denominator = (int8_t)(def.orderPriceDenominator - '0');
|
||||
|
||||
Reference in new issue
Block a user