question

Upvotes
Accepted
87 4 4 11

what is the side-effect if request a qoute code repeatly

hello:

1、I want to know the the side-effect if request a qoute code repeatly.

2、as we know, the chain could be update in the trading session(9:00 - 16:30 HKSE), I want to store all quotes in the vector, under the circumstances, what should I do?

A、unRegister all quotes (has been registered) first, then register all quotes (contain the new quotes received )again?

B、just register all quotes again, even if some quotes has been registered.

C、only register the quote new received.


thanks


elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apiquote
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
20.3k 73 10 20

Hi @luxiangyuan

As you can imagine, re-requesting the same instrument is inefficient. Not only in making requests for instruments that you are already consuming, but each time to re-request the same RIC you will receive a onRefreshMsg event for that instrument - even if there has been no change in the instrument values since the last update. So, you will be unnecessarily processing Field etc that don't need to - as nothing may have changed.

It may not matter too much from a performance perspective if you are only consuming a short chain with low activity - but will make a difference if you are consuming longer chains / more active chains - or need to do so in the future with the same code.

The best advise would be to only register new RIC codes that arrive in any Chain updates and unregister any that are removed from the Chain. So, you could use something other than Vector, for example a Map keyed on the RIC code to help you in the above process.

icon clock
10 |1500

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

Click below to post an Idea Post Idea