Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2677144bfa | ||
|
|
6b30c42c0d |
No files matched your search
@@ -185,6 +185,339 @@ JetFIX {
|
||||
}
|
||||
}
|
||||
|
||||
JetFIX {
|
||||
rule: "CannedCertSession.name='gt_cert'"
|
||||
value {
|
||||
connection {
|
||||
name: "ice_cert"
|
||||
platform: ICE
|
||||
use_cme_secure_logon: false
|
||||
log_fix_stream: true
|
||||
socket_connect_host_ip: "63.247.113.154"
|
||||
socket_connect_port: 80
|
||||
sender_compid: "51251"
|
||||
target_compid: "ICE"
|
||||
start_time: "22:55:00"
|
||||
end_time: "22:05:00"
|
||||
sender_subid: "BTS"
|
||||
user_name: "bluetrd-os" #this is the order_server_id
|
||||
raw_data: "Starts123"
|
||||
max_order_msgs_per_window: 300
|
||||
auto_fix_seq_num: true
|
||||
|
||||
seconds_to_replay: 6000
|
||||
}
|
||||
connection: @JetFIXSimConnection.sim
|
||||
connection {
|
||||
name: "cme_mc7_99"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.199"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "99"
|
||||
cme_market_segment_id: 99
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_58"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.172"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "58"
|
||||
cme_market_segment_id: 58
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_54"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.191"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "54"
|
||||
cme_market_segment_id: 54
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_82"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.179"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "82"
|
||||
cme_market_segment_id: 82
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_56"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.174"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "56"
|
||||
cme_market_segment_id: 56
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_50"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.202"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "50"
|
||||
cme_market_segment_id: 50
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_52"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.181"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "52"
|
||||
cme_market_segment_id: 52
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_60"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.195"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "60"
|
||||
cme_market_segment_id: 60
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_76"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.204"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "76"
|
||||
cme_market_segment_id: 76
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_88"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.169"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "88"
|
||||
cme_market_segment_id: 88
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_74"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.197"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "74"
|
||||
cme_market_segment_id: 74
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_64"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.177"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "64"
|
||||
cme_market_segment_id: 64
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_72"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.189"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "72"
|
||||
cme_market_segment_id: 72
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_70"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.183"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "70"
|
||||
cme_market_segment_id: 70
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_68"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.168"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "68"
|
||||
cme_market_segment_id: 68
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_80"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.187"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "80"
|
||||
cme_market_segment_id: 80
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_84"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.198"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "84"
|
||||
cme_market_segment_id: 84
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
connection {
|
||||
name: "cme_mc7_78"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.167"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "78"
|
||||
cme_market_segment_id: 78
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "S4PMA"
|
||||
auto_fix_seq_num: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
JetFIX {
|
||||
rule: "CannedCertSession.name='mc7'"
|
||||
value {
|
||||
|
||||
@@ -626,6 +626,11 @@ OrderOpResult ICENativeOrder::on_update(api::orderman::Update const &update)
|
||||
if (me->state.last_msg().size())
|
||||
me->state.set_last_msg("");
|
||||
|
||||
LOG(OrderMan, Warn,
|
||||
"ICE may not honor this update if we recently issued an unacknowledged cancelreplace {}. Update: {}@{}. Buffering",
|
||||
key().value(), q.value(), p.value());
|
||||
me->buffered_update.emplace(p, q);
|
||||
|
||||
// early return so we skip report_state (for speed)
|
||||
return OrderOpResult{};
|
||||
}
|
||||
@@ -730,6 +735,11 @@ OrderOpResult ICENativeOrder::on_cancel()
|
||||
me->cancel_clordid_bm = encoding.overwrite( me->cancel_clordid_bm, cancel_clorid, count_digits(cancel_clorid) );
|
||||
|
||||
me->services->queue_fix(*me->session_services, jetfix::MessageTypes::Cancel,me->cancel_encoding);
|
||||
me->buffered_cancel = true;
|
||||
LOG(OrderMan, Warn,
|
||||
"ICE May not honor this cancel if we'd previously issued an unacknowledged cancelreplace "
|
||||
"Buffering cancel to be safe",
|
||||
key().value());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -865,6 +875,8 @@ void ICENativeOrder::on_exe_report(const NewExecutionReportEvent &er)
|
||||
// terminal states, nothing can change them
|
||||
case ORDER_STATUS_COMPLETED:
|
||||
case ORDER_STATUS_CANCELED:
|
||||
me->buffered_cancel = false;
|
||||
me->buffered_update.reset();
|
||||
break;
|
||||
|
||||
// receiving an execution report does does not mean
|
||||
@@ -881,30 +893,20 @@ void ICENativeOrder::on_exe_report(const NewExecutionReportEvent &er)
|
||||
transition(external_status);
|
||||
if (external_status == ORDER_STATUS_WORKING)
|
||||
{
|
||||
if (me->buffered_cancel)
|
||||
{
|
||||
LOG(OrderMan, Warn,
|
||||
"Applying buffered cancel to order {}, on first ack",
|
||||
key().value());
|
||||
on_cancel();
|
||||
}
|
||||
else if (me->buffered_update.has_value())
|
||||
{
|
||||
auto [p, q] = me->buffered_update.value();
|
||||
me->buffered_update.reset();
|
||||
LOG(OrderMan, Warn,
|
||||
"Applying buffered update ({}@{}) to order {}, on "
|
||||
"first ack",
|
||||
q.value(),p.value(),
|
||||
key().value());
|
||||
on_update(p, q);
|
||||
}
|
||||
handle_buffered_state("first ack");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ORDER_STATUS_WORKING:
|
||||
{
|
||||
transition(external_status);
|
||||
auto [p, q] = me->buffered_update.value();
|
||||
if(er.data->price.value() == p.value() && er.data->quantity.value() == q.value())
|
||||
me->buffered_update.reset();
|
||||
|
||||
handle_buffered_state("working");
|
||||
}
|
||||
break;
|
||||
|
||||
case ORDER_STATUS_INACTIVE:
|
||||
@@ -927,6 +929,28 @@ void ICENativeOrder::on_exe_report(const NewExecutionReportEvent &er)
|
||||
}
|
||||
}
|
||||
|
||||
void ICENativeOrder::handle_buffered_state(const std::string& condition)
|
||||
{
|
||||
if (me->buffered_cancel)
|
||||
{
|
||||
LOG(OrderMan, Warn,
|
||||
"Applying buffered cancel to order {}, on ",
|
||||
condition,
|
||||
key().value());
|
||||
on_cancel();
|
||||
}
|
||||
else if (me->buffered_update.has_value())
|
||||
{
|
||||
auto [p, q] = me->buffered_update.value();
|
||||
//me->buffered_update.reset();
|
||||
LOG(OrderMan, Warn,
|
||||
"Applying buffered update ({}@{}) to order {}, on ",
|
||||
condition,
|
||||
q.value(),p.value(), key().value());
|
||||
on_update(p, q);
|
||||
}
|
||||
}
|
||||
|
||||
void ICENativeOrder::on_cancel_reject(const orderman::CancelRejectEvent &cr)
|
||||
{
|
||||
auto &state = me->state;
|
||||
@@ -963,6 +987,7 @@ void ICENativeOrder::on_gateway_status(const GatewayStatusChangeEvent &ev)
|
||||
case ORDER_STATUS_CANCELED:
|
||||
case ORDER_STATUS_ERROR:
|
||||
case ORDER_STATUS_PENDING_WORKING:
|
||||
break;
|
||||
case ORDER_STATUS_WORKING:
|
||||
break;
|
||||
case ORDER_STATUS_DISCONNECTED:
|
||||
@@ -971,23 +996,7 @@ void ICENativeOrder::on_gateway_status(const GatewayStatusChangeEvent &ev)
|
||||
transition(map_external_status(native_state.native_status()));
|
||||
if (me->state.status() == ORDER_STATUS_WORKING)
|
||||
{
|
||||
if (me->buffered_cancel)
|
||||
{
|
||||
LOG(OrderMan, Warn,
|
||||
"Applying buffered cancel to order {}, on re-connection",
|
||||
key().value());
|
||||
on_cancel();
|
||||
}
|
||||
else if (me->buffered_update.has_value())
|
||||
{
|
||||
auto [p, q] = me->buffered_update.value();
|
||||
me->buffered_update.reset();
|
||||
LOG(OrderMan, Warn,
|
||||
"Applying buffered update ({}@{}) to order {}, on "
|
||||
"re-connection",
|
||||
q.value(),p.value(), key().value());
|
||||
on_update(p, q);
|
||||
}
|
||||
handle_buffered_state("re-connection");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ class ICENativeOrder : public NativeOrderBase {
|
||||
void warm_up_activate(OrderServicesData &, OrderServices &) override;
|
||||
void init_recovered_common(const api::orderman::OrderRecord &,
|
||||
const PreActivationOrderServices &);
|
||||
void handle_buffered_state(const std::string& condition);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user