Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Transactions /
  • REDI API /
avatar image
Question by ichernyavskiy · Feb 06, 2019 at 03:25 PM · rediredi_api

REDILIB Unsubscribe from market data for a given symbol

Do you have an example of how to unsubscribe for a given symbol?
Let's say I am subscribing to SPY and DIA. I want to unsubscribe from SPY. How would I do this without unsubscribing from DIA?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by zoya.farberov · Feb 07, 2019 at 01:43 PM

Hello @ichernyavskiy,

Your app should be able to unsubscribe, via DeleteWatch, from any instrument you have subscribed via AddWatch.

I have added Unsubscribe, via DeleteWatch, to our C# REDI Monitoring L1 Console example and tutorial code on github

I think this addition should be useful, for developers monitoring L1 quotes from C#.

Please let us know if this helps to clarify?

Comment

People who like this

0 Show 3 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
peter.drier · Oct 28, 2020 at 09:53 PM 0
Share

Hi @zoya.farberov,

The C# REDI Monitoring L1 Console example creates a new CacheControl for every quote subscription. I'm pretty sure this is a bad example of how to use CacheControl. Can you possibly fix this example so more people aren't confused?

avatar image
REFINITIV
zoya.farberov ♦♦ peter.drier · Oct 28, 2020 at 11:39 PM 0
Share

Hello @peter.drier,

Creating CacheControl for every quote subscription is the correct usage of the API.

From purely inquisitive perspective, it's very easy to modify C# REDI Monitoring L1 Console example, to reuse CacheControl, and to observe the output, containing duplicates and missing updates.

I hope this info helps.

avatar image
peter.drier zoya.farberov ♦♦ · Oct 29, 2020 at 12:10 AM 0
Share

Hi @zoya.farberov,

Wow, that's actually shocking. CacheControl as an object is inherently a table. I have an entire collection of positions in a single CacheControl, as well as a collection of Orders in another. And from the way the documentation is written (I've read it all, cover to cover, including every post in this forum) there's nothing to imply or even mention that L1 was any different.

Given each quote should fundamentally be a row, can you explain why they each need their own table? You reference duplicates and missing data, what about having 2 rows in a table causes duplicates or missing data that one row wouldn't have a problem with?

Does the Redi app itself make a CacheControl per quote on the watchlist?

For context, Redi is already pretty slow.. creating a hundred COM objects just to marshal quotes around is both more fragile and slow. Anything I can do to prevent COM errors is important, they have a bad habit of being hard to recover from.

Cheers,
Peter

avatar image
REFINITIV
Answer by zoya.farberov · Feb 06, 2019 at 04:00 PM

Hello @ichernyavskiy,

Please see CacheControl -> DeleteWatch in RediSpec

Does this work for you? Do you need a complete code example?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by ichernyavskiy · Feb 07, 2019 at 11:48 AM

Zoya, I've tried several different ways of unsubscribing from one symbol and none work.

In my sample code I added a method unsubscribe in same class as subscribe, getCell and CacheEvent handler. Pass it a symbol. In my case SPY

Public Sub Unsubscribe(ByVal Symbol As String)

quoteCacheTest.DeleteWatch(0, Symbol, "", err)

End Sub

Once I triger it, I can still see SPY getting updates in CacheEvent.

I've attached image showing how subscribing and unsubscribing is getting called. Perhaps you can take a look at tell me if I am doing something silly.

subscribe-now.png


subscribe-now.png (148.3 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by ichernyavskiy · Feb 07, 2019 at 02:20 PM

The example helped tremendously.

I was created way too many objects. What I should have done is query my dictionary for quoteCache that I have for a given symbol and use that to unsubscribe.

Thank you so much!

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
7 People are following this question.

Related Questions

Not able to create order?

Redi C# Samples on github are not working

Update event in REDI API

Getting the Name of Exchange from a RediLib.CacheControl object.

REDI C# Stage VWAP Order Not Honoring StartTime/EndTime Variable

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges