mathpaquette / IQFeed.CSharpApiClient

IQFeed.CSharpApiClient is fastest and the most well-designed C# DTN IQFeed socket API connector available
MIT License
120 stars 43 forks source link

fix to support protocol 6.2 changes in L2 streaming example #144

Open jphiggs opened 2 years ago

jphiggs commented 2 years ago

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.

jphiggs commented 1 year 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

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

 {

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;

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);

     }

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: @.***>

mathpaquette commented 1 year ago

@jphiggs did you review my comments at some point ?