RDP STREAMING

Hello,

For the given below python scrip how can we add multiple RIC codes and multiple fids like IBM.N, AAPL.O, MSFT.O with CF_NAME, CF_DATE, CF_LAST, CF_CLOSE fields.

python c:\pythonstuff\woo_streamingmarket_price_wealth_edpgw_authentication.py --user Muzammil.Sharief1.prod@refinitiv.com --password xxxxxxxxxxxx --clientid f2b7f9a5f4ce4bfeb79bd5d37b59b9509e8199e6 --hostname eu-west-1-aws-2-lrg.optimized-pricing-api.refinitiv.net --service ELEKTRON_DD

Apprecciate your response

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @muzammil.sharief1

    You can use the WebSocket Batch and View features:

    Please see the example from the RTDS - market_price_batch_view.py example below:

    def send_market_price_request(ws):
        """ Create and send simple Market Price batch request with view """
        mp_req_json = {
            'ID': 2,
            'Key': {
                'Name': [
                    'TRI.N',
                    'IBM.N',
                    'T.N'
                ],
            },
            'View': [
                'BID',
                'ASK',
                'BIDSIZE'
            ]
        }
        ws.send(json.dumps(mp_req_json))
        print("SENT:")
        print(json.dumps(mp_req_json, sort_keys=True, indent=2, separators=(',', ':')))

    You can change your code to send the Batch View request message like the example above.