-
Notifications
You must be signed in to change notification settings - Fork 42
fix to support protocol 6.2 changes in L2 streaming example #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
level2Client.Timestamp += Level2ClientOnTimestamp; | ||
|
||
// Step 6 - Make your streaming Level 2 requests | ||
level2Client.ReqWatch("@ES#"); | ||
// ReqWatch is only supported in protocols 6.1 and below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah didnt know that.
@@ -9,7 +9,7 @@ namespace IQFeed.CSharpApiClient.Examples.Examples.StreamingLevel2 | |||
{ | |||
public class StreamingLevel2Example : IExampleAsync | |||
{ | |||
public bool Enable => false; // *** SET TO TRUE TO RUN THIS EXAMPLE *** | |||
public bool Enable => true; // *** SET TO TRUE TO RUN THIS EXAMPLE *** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please put it back to false
@@ -32,34 +32,65 @@ public async Task RunAsync() | |||
level2Client.System += Level2ClientOnSystem; | |||
level2Client.Error += Level2ClientOnError; | |||
|
|||
level2Client.Summary += Level2ClientOnSummary; | |||
level2Client.Update += Level2ClientOnSummary; | |||
//level2Client.Summary += Level2ClientOnSummary; // protocol 6.1 and prior |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it documented somewhere?
Console.WriteLine(msg); | ||
} | ||
|
||
//private void Level2ClientOnSummary(UpdateSummaryMessage msg) // protocol 6.1 and prior |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can just remove all this code if not usable in 6,2 anymore...
Hi Mathieu. I submitted a couple of pull requests last summer that I guess went nowhere, one of which was the one you replied about below. I think that I re-submitted that inadvertently las t week while trying to sync my local repo. If you’d like to continue with amending the new demo PR I can do that. I think the other PR was an amendment to one of the current examples to account for MBO data
I also have another question for you that in order to address would require changes to the client API. Some background: I’ve been using a WPF app of my own to download and store historical data from IQFeed for a long time. I do that on the weekend for a group of about 50 symbols that retrieves tick data for each for the whole prior week. The issue I occasionally have is that when downloading data for ES I’ll get a stack overflow due to the fact that it so heavily traded on busy weeks that include something like an FOMC rate decision or other important market catalysts.
That’s because the lookup client adds the response strings to an IEnumerable whose size then causes the SO. I deal with that by downloading data for the week in separate batches for a fewer number of days. I have a process that separates the data for the week into separate files for each business day but I have to go back and programmatically clean up the daily files for weekly files that were broken apart. That’s not a complete nightmare but I was thinking about a solution that would use something like System.IO.Pipelines to deliver the data and store it in batches as it’s being retrieved rather than all at once in an IEnumerable. I also would like to implement something like that for storing L2 data throughout the trading day in the not-to-distant future and would like to pursue performance enhancements in general along with MS’s improvements to the .NET runtimes .
Let me know your thoughts and whether you like to see a PR for something like that.
john
From: Mathieu ***@***.***>
Sent: Sunday, February 26, 2023 12:00 PM
To: ***@***.***>
Cc: John ***@***.***>; ***@***.***>
Subject: Re: [mathpaquette/IQFeed.CSharpApiClient] fix to support protocol 6.2 changes in L2 streaming example (PR #144)
@mathpaquette requested changes on this pull request.
In src/IQFeed.CSharpApiClient.Examples/Examples/StreamingLevel2/StreamingLevel2Example.cs<#144 (comment)>:
level2Client.Timestamp += Level2ClientOnTimestamp;
// Step 6 - Make your streaming Level 2 requests
- ***@***.***#");
+ // ReqWatch is only supported in protocols 6.1 and below.
ah didnt know that.
In src/IQFeed.CSharpApiClient.Examples/Examples/StreamingLevel2/StreamingLevel2Example.cs<#144 (comment)>:
@@ -9,7 +9,7 @@ namespace IQFeed.CSharpApiClient.Examples.Examples.StreamingLevel2
{
public class StreamingLevel2Example : IExampleAsync
{
- public bool Enable => false; // *** SET TO TRUE TO RUN THIS EXAMPLE ***
+ public bool Enable => true; // *** SET TO TRUE TO RUN THIS EXAMPLE ***
could you please put it back to false
In src/IQFeed.CSharpApiClient.Examples/Examples/StreamingLevel2/StreamingLevel2Example.cs<#144 (comment)>:
@@ -32,34 +32,65 @@ public async Task RunAsync()
level2Client.System += Level2ClientOnSystem;
level2Client.Error += Level2ClientOnError;
- level2Client.Summary += Level2ClientOnSummary;
- level2Client.Update += Level2ClientOnSummary;
+ //level2Client.Summary += Level2ClientOnSummary; // protocol 6.1 and prior
is it documented somewhere?
In src/IQFeed.CSharpApiClient.Examples/Examples/StreamingLevel2/StreamingLevel2Example.cs<#144 (comment)>:
{
Console.WriteLine(msg);
}
+ private void Level2ClientOnTimestamp(TimestampMessage msg)
+ {
+ Console.WriteLine(msg);
+ }
+
+ //private void Level2ClientOnSummary(UpdateSummaryMessage msg) // protocol 6.1 and prior
maybe we can just remove all this code if not usable in 6,2 anymore...
—
Reply to this email directly, view it on GitHub<#144 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABSCMHSSW42ESIULVRQDA5TWZODZXANCNFSM53NEBJHA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@jphiggs did you review my comments at some point ? |
I had issues with projects targeting .NET Framework 4.6.1 and could not find the SDK so I targeted 4.6.2 in my local repo but did not include any of those changes. A second PR for a new demo project will be coming soon.