Compare commits

...
4 Commits
Author SHA1 Message Date
Kevin Darby 22cc946f52 Merged in ice_clang (pull request #206)
changes to compile ice market data with clang
2019-04-02 20:04:09 +00:00
Kevin Darby 6d0eb62712 changes to compile ice work with clang 2019-04-02 15:55:29 -04:00
Eric Harding 369b89b3a7 Update default symbol list for compat with deployed config 2019-04-02 15:15:12 -04:00
Jake Norbut 16acc4f5b0 Mass cancel messaging nits 2019-04-02 09:42:20 -05:00
6 changed files with 84 additions and 63 deletions

No files matched your search

@@ -90,7 +90,7 @@ namespace mbts.spark {
wbids => wbids.Any(),
() => {
var resp = BTSMessageBox.Show(
"Are you sure you want to cancel all working buy orders?",
"Are you sure you want to cancel all BUY orders?",
"Cancel Buy Orders",
BTSMessageBoxButtons.Yes | BTSMessageBoxButtons.No,
MessageBoxImage.Question);
@@ -103,7 +103,7 @@ namespace mbts.spark {
wasks => wasks.Any(),
() => {
var resp = BTSMessageBox.Show(
"Are you sure you want to cancel all working sell orders?",
"Are you sure you want to cancel all SELL orders?",
"Cancel Sell Orders",
BTSMessageBoxButtons.Yes | BTSMessageBoxButtons.No,
MessageBoxImage.Question);
@@ -116,7 +116,7 @@ namespace mbts.spark {
worders => worders.Any(),
() => {
var resp = BTSMessageBox.Show(
"Are you sure you want to cancel all working orders?",
"Are you sure you want to cancel ALL orders?",
"Cancel All Orders",
BTSMessageBoxButtons.Yes | BTSMessageBoxButtons.No,
MessageBoxImage.Question);
+67 -30
View File
@@ -1,11 +1,71 @@
SymbolLists
{
value
SymbolList {
value {
# This key is here for backwards compatability ONLY.
# If you need to update symbols you should update SymbolLists (plural)
symbol: "6B"
symbol: "6E"
symbol: "6J"
symbol: "6P"
symbol: "ARE"
symbol: "BK"
symbol: "BOB"
symbol: "BUB"
symbol: "BZ"
symbol: "CL"
symbol: "EH"
symbol: "ES"
symbol: "FYT"
symbol: "FOB"
symbol: "GC"
symbol: "GE"
symbol: "GLI"
symbol: "HE"
symbol: "HG"
symbol: "HO"
symbol: "KE"
symbol: "LE"
symbol: "NB"
symbol: "NBY"
symbol: "NOB"
symbol: "NON"
symbol: "NG"
symbol: "NQ"
symbol: "NUB"
symbol: "RB"
symbol: "SI"
symbol: "SOM"
symbol: "SR1"
symbol: "SR3"
symbol: "TN"
symbol: "TUF"
symbol: "TUT"
symbol: "UB"
symbol: "XC"
symbol: "XK"
symbol: "YM"
symbol: "ZB"
symbol: "ZC"
symbol: "ZCW"
symbol: "ZF"
symbol: "ZL"
symbol: "ZM"
symbol: "ZN"
symbol: "ZO"
symbol: "ZQ"
symbol: "ZR"
symbol: "ZS"
symbol: "ZT"
symbol: "ZW"
}
}
SymbolLists
{
value
{
list
{
key: "ICE"
# symbol: "BRN"
# symbol: "WBS"
# symbol: "OJ"
@@ -13,31 +73,8 @@ SymbolLists
list
{
key: "GLBX"
symbol: "HE"
symbol: "LE"
symbol: "CL"
symbol: "RB"
symbol: "HO"
symbol: "BZ"
symbol: "NG"
symbol: "GC"
symbol: "SI"
symbol: "HG"
symbol: "ZW"
symbol: "ZC"
symbol: "ZS"
symbol: "ZM"
symbol: "ZL"
symbol: "ZO"
symbol: "ZR"
symbol: "ZB"
symbol: "ZN"
symbol: "ZF"
symbol: "ZT"
symbol: "UB"
symbol: "GE"
}
symbol: @SymbolList.symbol
}
}
}
@@ -74,6 +111,6 @@ Symbols {
ice {
future: @SymbolLists.list[ICE].symbol
spread: @SymbolLists.list[ICE].symbol
}
}
}
}
+2 -2
View File
@@ -26,7 +26,7 @@ std::string ICEChannel::to_string() const
{
std::string mt = name;
for(const auto& x : market_types)
mt += " " + x;
mt += " " + std::to_string(x);
return mt;
}
@@ -123,4 +123,4 @@ const std::vector<ICEChannel> get_configured_ice_channels() {
}}} //namespace
#endif
#endif
+2 -1
View File
@@ -7,6 +7,7 @@ class IMDPlatform
{
public:
virtual void send_heartbeats();
virtual ~IMDPlatform() {}
};
}}
}}
@@ -56,17 +56,14 @@ void ICEListener::onMarketStateChange(const onixs_ice::MarketStateChange& , cons
void ICEListener::onError(const onixs_ice::Error& error)
{
std::string error_desc(error.description());
tracepoint (bts_trace,trace_order,(char*) "onError", 0, (uint16_t) 0, 0);
LOG(md,Warn, "OnixS ICE Error: {} - {}", error.toString(), error_desc );
}
void ICEListener::onFeedError(onixs_ice::FeedId feedid, onixs_ice::ErrorCode code, const std::string& desc)
{
tracepoint (bts_trace,trace_order,(char*) "onFeedError", 0, (uint16_t) 0, 0);
LOG(md,Warn, "OnixS ICE FeedError: {} - {}", feedid, desc, code);
}
void ICEListener::onWarning(const onixs_ice::Warning& warning)
{
tracepoint (bts_trace,trace_order,(char*) "onWarning", 0, (uint16_t) 0, 0);
LOG(md,Warn, "OnixS ICE Warn: {} - {}", warning.toString(), std::string(warning.description()) );
}
@@ -74,31 +71,27 @@ void ICEListener::onWarning(const onixs_ice::Warning& warning)
// Security discovery
void ICEListener::onFuturesProductDefinition(const onixs_ice::FuturesProductDefinition& msg, bool& is_interested)
{
tracepoint (bts_trace,trace_order,(char*) "onFuturesProductDefinition", 0, (uint16_t) 0, 0);
if(msg.isSpread)
on_future_strip(msg, is_interested);
else
on_future(msg, is_interested);
}
void ICEListener::onNewExpiry(const onixs_ice::NewExpiry& msg, bool& is_interested, const onixs_ice::MessageInfo& msg_info)
void ICEListener::onNewExpiry(const onixs_ice::NewExpiry& msg, bool& is_interested, const onixs_ice::MessageInfo& )
{
tracepoint (bts_trace,trace_order,(char*) "onNewExpiry", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
on_future(msg, is_interested);
}
void ICEListener::onFuturesStrategyDefinition(const onixs_ice::FuturesStrategyDefinition& def, bool& is_interested)
{
tracepoint (bts_trace,trace_order,(char*) "onFuturesStrategyDefinition", 0, (uint16_t) 0, 0);
//TODO need to find out how to produce data for testing
//on_uds_future_spread(def, is_interested);
UNUSED(def);
UNUSED(is_interested);
}
//This is only for UDS
void ICEListener::onNewFuturesStrategyDefinition(const onixs_ice::NewFuturesStrategyDefinition& msg, bool& is_interested, const onixs_ice::MessageInfo& msg_info)
void ICEListener::onNewFuturesStrategyDefinition(const onixs_ice::NewFuturesStrategyDefinition& msg, bool& is_interested, const onixs_ice::MessageInfo& )
{
tracepoint (bts_trace,trace_order,(char*) "onFuturesStrategyDefinition", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
//TODO need to find out how to produce data for testing
//on_uds_future_spread(msg, is_interested);
UNUSED(msg);
@@ -152,7 +145,7 @@ void ICEListener::onMarketSnapshotPriceLevel(const onixs_ice::MarketSnapshotPric
// Book
void ICEListener::onOrderBookUpdated(const onixs_ice::OrderBook& onixs_book, const onixs_ice::MessageInfo& msg_info)
{
tracepoint (bts_trace,trace_order,(char*) "onBookUpdate", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
//tracepoint (bts_trace,trace_order,(char*) "onBookUpdate", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
auto data = _index.get_security(onixs_book.marketId());
if (data == nullptr)
@@ -214,9 +207,8 @@ void on_trade(ICESecurityData* data, const onixs_ice::Price& price, int size, on
data->handle.add_trade(ts, ps, date, map_aggressor(agside), size);
}
void ICEListener::onTrade(const onixs_ice::Trade& msg, const onixs_ice::MessageInfo& msg_info)
void ICEListener::onTrade(const onixs_ice::Trade& msg, const onixs_ice::MessageInfo& )
{
tracepoint (bts_trace,trace_order,(char*) "onTrade", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
auto* data = _index.get_security(msg.marketId);
if (data != NULL)
{
@@ -230,9 +222,8 @@ void ICEListener::onTrade(const onixs_ice::Trade& msg, const onixs_ice::MessageI
//
// RFQ
void ICEListener::onRfq(const onixs_ice::Rfq& msg, const onixs_ice::MessageInfo& msg_info)
void ICEListener::onRfq(const onixs_ice::Rfq& msg, const onixs_ice::MessageInfo& )
{
tracepoint (bts_trace,trace_order,(char*) "onRfq", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
auto* data = _index.get_security(msg.marketId);
if (data != nullptr)
{
@@ -267,9 +258,8 @@ void ICEListener::onRfq(const onixs_ice::Rfq& msg, const onixs_ice::MessageInfo&
//
// Misc
void ICEListener::onSettlementPrice(const onixs_ice::SettlementPrice& msg, const onixs_ice::MessageInfo& msg_info)
void ICEListener::onSettlementPrice(const onixs_ice::SettlementPrice& msg, const onixs_ice::MessageInfo& )
{
tracepoint (bts_trace,trace_order,(char*) "onSettlementPrice", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
auto* data = _index.get_security(msg.marketId);
if (data != nullptr)
{
@@ -287,9 +277,8 @@ void ICEListener::onOpenInterest(const onixs_ice::OpenInterest &msg, const onixs
UNUSED(msg_info);
}
void ICEListener::onOpenPrice(const onixs_ice::OpenPrice& msg, const onixs_ice::MessageInfo& msg_info)
void ICEListener::onOpenPrice(const onixs_ice::OpenPrice& msg, const onixs_ice::MessageInfo& )
{
tracepoint (bts_trace,trace_order,(char*) "onOpenPrice", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
auto* data = _index.get_security(msg.marketId);
if (data != nullptr)
{
@@ -301,9 +290,8 @@ void ICEListener::onOpenPrice(const onixs_ice::OpenPrice& msg, const onixs_ice::
}
}
void ICEListener::onClosePrice(const onixs_ice::ClosePrice& msg, const onixs_ice::MessageInfo& msg_info)
void ICEListener::onClosePrice(const onixs_ice::ClosePrice& msg, const onixs_ice::MessageInfo& )
{
tracepoint (bts_trace,trace_order,(char*) "onClosePrice", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
auto* data = _index.get_security(msg.marketId);
if (data != nullptr)
{
@@ -315,9 +303,8 @@ void ICEListener::onClosePrice(const onixs_ice::ClosePrice& msg, const onixs_ice
}
}
void ICEListener::onEndOfDayMarketSummary(const onixs_ice::EndOfDayMarketSummary& msg, const onixs_ice::MessageInfo& msg_info)
void ICEListener::onEndOfDayMarketSummary(const onixs_ice::EndOfDayMarketSummary& msg, const onixs_ice::MessageInfo& )
{
tracepoint (bts_trace,trace_order,(char*) "onEndOfDayMarketSummary", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
auto* data = _index.get_security(msg.marketId);
if (data != nullptr)
{
@@ -333,18 +320,15 @@ void ICEListener::onEndOfDayMarketSummary(const onixs_ice::EndOfDayMarketSummary
//
// Feed
void ICEListener::onMulticastMessageBlockBegin(onixs_ice::FeedId feedId, const onixs_ice::MessageInfo& msg_info)
void ICEListener::onMulticastMessageBlockBegin(onixs_ice::FeedId feedId, const onixs_ice::MessageInfo& )
{
UNUSED(feedId);
tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockBegin", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0);
}
void ICEListener::onMulticastMessageBlockEnd(onixs_ice::FeedId feedId, const onixs_ice::MarketIds& marketIds)
{
UNUSED(feedId);
UNUSED(marketIds);
tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockEnd.begin", 0, (uint16_t) 0, 0);
tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockEnd.end", 0, (uint16_t) 0, 0);
}
void ICEListener::onFeedStarted(onixs_ice::FeedId, const onixs_ice::MarketIds&)
@@ -217,7 +217,6 @@ unique_ptr<ICEListener> ICEMain::prepare_listener(onixs_ice::Handler& handler, c
producer_channels.push_back(_producer.get_channel(symbol.symbol().c_str(), symbol.type(), symbol.exchange()));
}
const auto& options = channel_settings_for(channel);
unique_ptr<ICEListener> listener(new ICEListener(_index, _producer, /*_settlement_recorder,*/ producer_channels));
for (auto& symbol : channel.symbols)
listener->add_filter_symbol(symbol.symbol());