Open jphiggs opened 2 years ago
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.cshttps://github.com/mathpaquette/IQFeed.CSharpApiClient/pull/144#discussion_r919967736:
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.cshttps://github.com/mathpaquette/IQFeed.CSharpApiClient/pull/144#discussion_r920284748:
@@ -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.cshttps://github.com/mathpaquette/IQFeed.CSharpApiClient/pull/144#discussion_r920285282:
@@ -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.cshttps://github.com/mathpaquette/IQFeed.CSharpApiClient/pull/144#discussion_r920286034:
{
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 GitHubhttps://github.com/mathpaquette/IQFeed.CSharpApiClient/pull/144#pullrequestreview-1037204699, or unsubscribehttps://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.