Hi,
I can't find any documentation on how to request market prices towards multiple Service's, would you be able to provide with such or a working example on how to write it?
I am using Websocket API with Python and your market_price.py example like below towards one Service only:
def send_market_price_request(ws): """ Create and send simple Market Price request """ mp_req_json = { 'ID': 2, 'Key': { 'Name': ["EUR=,"DKK="], 'Service': 'IDN_SELECTFEED' }, "View": [6, 22, 25, 30, 31, 1010, 1025], 'Streaming': not snapshot, } ws.send(json.dumps(mp_req_json)) print("SENT:") print(json.dumps(mp_req_json, sort_keys=True, indent=2, separators=(',', ':')))
And I am looking for something like below if possible:
def send_market_price_request(ws): """ Create and send simple Market Price request """ mp_req_json = { 'ID': 2, 'Key': [{ 'Name': ["EUR=","DKK="], 'Service': 'IDN_SELECTFEED' }, { 'Name': ["EUR=MAFX","DKK=MAFX"], 'Service': 'INTERNAL_PRICE' } ], "View": [6, 22, 25, 30, 31, 1010, 1025], 'Streaming': not snapshot, } ws.send(json.dumps(mp_req_json)) print("SENT:") print(json.dumps(mp_req_json, sort_keys=True, indent=2, separators=(',', ':')))
Kind regards,
Johan