akapur / pyiqfeed

Python LIbrary for reading DTN's IQFeed
GNU General Public License v2.0
168 stars 108 forks source link

Generic Question: Canceling a specific realtime market data stream #52

Closed karunkrishna closed 2 years ago

karunkrishna commented 3 years ago

I have three strategies that all make requests for ES Futures but with varying bar_period

akapur commented 3 years ago

Unfortunately, there is no identifier for each request. So you are probably going to have to unwatch and rewatch everything. Generally, when I want bars at multiple intervals, I subscribe to bars at the smallest interval size (or even all trades) and maintain bars at the larger interval sizes myself.

I would try to figure out why IQFeed is dropping one of your requests. I don't make requests for multiple bar sizes like you do but I haven't seen IQFeed drop a real-time data request before. Unfortunately that is likely an IQFeed issue not a pyiqfeed issue. pyiqfeed is only an interface on top of IQFeed.

On Fri, Apr 23, 2021 at 2:40 PM karunkrishna @.***> wrote:

I have three strategies that all make requests for ES Futures but with varying bar_period

  • ES Futures at 60 seconds interval
  • ES Futures at 200 tick interval
  • ES Futures at 2 hour interval

There are times when my strategy disconnects( Say for example ES Futures at 60 seconds) As a result I request the @es https://github.com/es#60sec again. This results in two active streams now for @es https://github.com/es

60sec

Is there a way to cancel the previous listener (giving some kind of unique stream identifier string); and then making the required request again I see a api for unwatching a symbol, but not sure if that would cancel all 3 of my marketdata as they are all @es https://github.com/es#

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/akapur/pyiqfeed/issues/52, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJAVHUCCP5WE5CN7PBIETTKG5LTANCNFSM43PEJKSA .

karunkrishna commented 3 years ago

Looking for some pointers on what has worked for you I think I need to architecture how I am request market data per algo

akapur commented 2 years ago

Not an issue with pyiqfeed.