18 3 2 3

RDP Python API performance

I am doing POC of python Library with our first client .

Client requirement is pretty straight forward . They are subscribing around 9000 RIC & interested in snapshot data only with 2 fields (i.e. Dynamic View request for Image )

I tried 4 different models (for Delivery & Contents Layer functions in Sync/Async mode ) with 1000 Rics for POC . All are getting taking around 2 mins to process that much responses .

One of a Async non-streaming sample code is as such :-

def create_cache(name,msg ):


print( " Response Recevied for ",msg['Key']['Name'] )




ricList = getItemList() ## here geting 1000 rics for POC


mySession = sh.get_session('deployed')

display_stats( " Record processing started ") ## Start time for calculation

for ric in ricList:

order_book = rdp.ItemStream(

name = ric,

service = 'CANNED_DATA',

session = mySession,

domain = "MarketPrice",

streaming =False,

fields = ['BID', 'ASK'],

on_refresh = lambda name , msg : create_cache(name,msg), ## At the moment just printing

on_update = lambda s,msg : print (" Update Msg ", s,json.dumps(msg, indent=2))



loop = asyncio.get_event_loop()


display_stats(" process "+ str( len(outPut))+ " Records") ## End time for processing calc

I am wondering if there is something i can do to improve performance , expecting to process ~9000 Rics in 10 seconds

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.


Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.



Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.



1 Answer

· Write an Answer
78.8k 250 52 74


Typically, the WebSocket API supports the batch request. With the batch request, you can use one request message to request multiple items. This could improve the performance of the application.

However, from my checking, the RDP Python library may not support the batch request.

I think to get more performance you can directly use WebSocket API to consume the data. The example is available on GitHub.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks Jirapongse , Actually we were using websocket API earlier for this client . We have written an Async wrapper on top of that . Anyhow Async wrapper is not feature rich . So thought of moving to RDP for two things

  1. Get more feature
  2. Better support

Anyhow we stuck with performance issue here . I have raised this to Olivier & waiting for some input from Refinitiv .

On Other note , i can see we can send Batch request in content layer i.e. StreamingPrices fucntion . It takes a list of instruments as universe parameters . Anyhow that's not giving decent performance .

I have checked the code. If I am correct, the API internally separates a batch request into individual requests. Therefore, it will get the same performance as individual requests.

Hi Jirapongse,

Thanks for your reply. Actually our client was already using a in-house developed async wrapper written on top of websocket API . That wrapper has a decent performance but not feature rich (i.e connection recovery , item recovery ). Also that library was not easy to be used . That' why we thought of giving try to RDP python Library. I checked with Refinitiv support & look like you do have plan to add new features in RDP (i.e. connection recovery , item recovery etc.).

Anyhow we stuck with the performance issue with RDP here .

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.