Skip to content
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

TickId bigger than Int32.MaxValue #2

Closed
Nucs opened this issue Jun 30, 2018 · 2 comments
Closed

TickId bigger than Int32.MaxValue #2

Nucs opened this issue Jun 30, 2018 · 2 comments

Comments

@Nucs
Copy link
Contributor

Nucs commented Jun 30, 2018

Hey,
During accessing history data of msft-nasdaq, in parsing of TickMessage inside the constructor (see code below),
the following line was received:
"2018-04-17 17:51:22.000000,96.0700,1061909,0,0.0000,0.0000,4145784264,O,19,143A"

The parsing code inside constructor:

var values = msg.Split(',');
return new TickMessage(
    DateTime.Parse(values[0]),
    float.Parse(values[1]),
    int.Parse(values[2]),
    int.Parse(values[3]),
    float.Parse(values[4]),
    float.Parse(values[5]),
    int.Parse(values[6]), //this line is tickId that attempts to parse 4145784264.
    char.Parse(values[7]),
    int.Parse(values[8]),
    values[9]);

Fix:

Change TickId to ulong (or long if there is a possibility to receive -1).

@mathpaquette
Copy link
Owner

Sure let me fix it tonight

@mathpaquette
Copy link
Owner

@Nucs fixed in the 1.3.1 branch.

mathpaquette added a commit that referenced this issue Jul 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants