question

Upvotes
Accepted
87 7 13 27

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-sdkema-apirrtelektron-message-apiquote
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.

@luxiangyuan, thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text beneath the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question. Thanks, AHS

1 Answer

· Write an Answer
Upvotes
Accepted
25.3k 87 12 25

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 512.0 KiB each and 1.0 MiB total.

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.