126 lines
3.7 KiB
Python
Executable File
126 lines
3.7 KiB
Python
Executable File
#!/usr/bin/python
|
|
|
|
|
|
logins = {
|
|
"mc1":61921,
|
|
"mc5":61922,
|
|
"mc7":61923,
|
|
"mc8":61924,
|
|
}
|
|
|
|
cgw_logins = {
|
|
"v06":("69.50.112.143","69.50.112.140",28296)
|
|
}
|
|
|
|
gws = {
|
|
"50":"69.50.112.202",
|
|
"52":"69.50.112.181",
|
|
"54":"69.50.112.191",
|
|
"56":"69.50.112.174",
|
|
"58":"69.50.112.172",
|
|
"60":"69.50.112.195",
|
|
"64":"69.50.112.177",
|
|
"68":"69.50.112.168",
|
|
"70":"69.50.112.183",
|
|
"72":"69.50.112.189",
|
|
"74":"69.50.112.197",
|
|
"76":"69.50.112.204",
|
|
"78":"69.50.112.167",
|
|
"80":"69.50.112.187",
|
|
"82":"69.50.112.179",
|
|
"84":"69.50.112.198",
|
|
"88":"69.50.112.169",
|
|
"99":"69.50.112.199",
|
|
}
|
|
print """
|
|
JetFIXSimConnection {
|
|
value {
|
|
sim {
|
|
name: "sim"
|
|
platform: SIM
|
|
socket_connect_host_ip: "127.0.0.1"
|
|
socket_connect_port: @Ports.exchange_sim_fix_port
|
|
sender_compid: "SPARK" # this is the FIX session name
|
|
sender_subid: "BTS"
|
|
target_compid: "BTS"
|
|
target_subid: "BTS"
|
|
cme_market_segment_id: 0
|
|
end_time: "07:48:00"
|
|
start_time: "07:52:00"
|
|
raw_data: "1JE9X"
|
|
use_cme_secure_logon: false
|
|
seconds_to_pause : 1
|
|
}
|
|
}
|
|
}
|
|
"""
|
|
|
|
for login,port in logins.iteritems():
|
|
print "JetFIX {"
|
|
print " rule: \"CannedCertSession.name='%s'\"" % (login)
|
|
print " value {"
|
|
print " connection: @JetFIXSimConnection.sim"
|
|
for segment_id,ip in gws.iteritems():
|
|
print " connection {"
|
|
print " name: \"cme_%s_%s\"" % (login,segment_id)
|
|
print " platform: GLBX"
|
|
print " socket_connect_host_ip: \"%s\"" % ip
|
|
print " socket_connect_port: %s" % port
|
|
print " sender_compid: \"%s004N\"" % login.upper()
|
|
print " target_compid: \"CME\""
|
|
print " target_subid: \"%s\"" % segment_id
|
|
print " cme_market_segment_id: %s" % segment_id
|
|
print " start_time: \"00:30:00\""
|
|
print " end_time: \"23:30:00\""
|
|
print " start_day: \"sunday\""
|
|
print " end_day: \"friday\""
|
|
print " sender_subid: \"BTS\""
|
|
print " raw_data: \"S4PMA\""
|
|
print " auto_fix_seq_num: true"
|
|
print " }"
|
|
|
|
print " }"
|
|
print "}"
|
|
|
|
print ""
|
|
|
|
print """
|
|
|
|
#You probably will need to copy this entry out into your own
|
|
#JetFIX if you are mixing MSGW with CGW in 1 config
|
|
"""
|
|
|
|
# CGW iLinks
|
|
for login,endpoint_info in cgw_logins.iteritems():
|
|
print "JetFIX {"
|
|
print " rule: \"CannedCertSession.name='%s'\"" % (login)
|
|
print " value {"
|
|
print " connection: @JetFIXSimConnection.sim"
|
|
print " connection {"
|
|
print " name: \"cme_%s_g\"" % login
|
|
print " platform: GLBX"
|
|
print " socket_connect_host_ip: \"%s\"" % endpoint_info[0]
|
|
print "# Backup IP"
|
|
print "# socket_connect_host_ip: \"%s\"" % endpoint_info[1]
|
|
print " socket_connect_port: %s" % endpoint_info[2]
|
|
print " sender_compid: \"%s004N\"" % login.upper()
|
|
print " target_compid: \"CME\""
|
|
print " target_subid: \"G\""
|
|
print " start_time: \"00:30:00\""
|
|
print " end_time: \"23:30:00\""
|
|
print " start_day: \"sunday\""
|
|
print " end_day: \"friday\""
|
|
print " sender_subid: \"BTS\""
|
|
print " auto_fix_seq_num: true"
|
|
print " }"
|
|
print " }"
|
|
print "}"
|
|
|
|
print """
|
|
|
|
#If no canned cert specified we fallback to just sim
|
|
CannedCertSession { value { name: "" }}
|
|
JetFIX {value {connection: @JetFIXSimConnection.sim}}
|
|
|
|
"""
|