Exemple #1
0
# Imports
import uuid
from google.protobuf.text_format import MessageToString
from tt.messaging.order import enums_pb2 as enums
from tt.pyrate.debesys.clients.order_sender import OCOrderSender
from tt.pyrate.debesys.messaging import dict_to_protobuf
from tt.pyrate.debesys.messaging import Header
from tt.pyrate.debesys.messaging import load_lbm_config
from tt.pyrate.debesys.messaging import PYRATE_APPLICATION_ID
from tt.pyrate.debesys.messaging import TradeCaptureReport
from tt.pyrate.debesys.messaging import NewTradeCapture

# Initialization
# NOTE: make sure you add the Pyrate application to your lbm.conf
load_lbm_config("/etc/debesys/lbm.conf", "T_Trader")

# Put your info here
account_id = 597
account = "lou-cert"
account_id_1 = 7563
account_1 = "lou-cert1"
connection_id = 18150
user_id = 525

# HSI

# Construct the message
report_id = uuid.uuid4()
attrs = {
    'instrument_id':
# Imports
import uuid
from google.protobuf.text_format import MessageToString
from tt.messaging.order import enums_pb2 as enums
from tt.pyrate.debesys.clients.order_sender import OCOrderSender
from tt.pyrate.debesys.messaging import dict_to_protobuf
from tt.pyrate.debesys.messaging import Header
from tt.pyrate.debesys.messaging import load_lbm_config
from tt.pyrate.debesys.messaging import PYRATE_APPLICATION_ID
from tt.pyrate.debesys.messaging import NewQuote

# Initialization
# NOTE: make sure you add the Pyrate application to your lbm.conf
load_lbm_config("/etc/debesys/lbm.conf")

# Put your info here
connection_id = 19078
user_id = 5964
account_id = 32017
account = "cm-int-dev"

price = 22
qty = 1

# Construct the message
quote_id = uuid.uuid4()
quote_side_1 = [{
    'qty': 1,
    'side': 1,
    'price': 200.30
}, {