Dinosaur Technology and Trading » Dinosaur Technology and Trading

incoming OpenOrder message format problem

(5 posts)
  • Started 8 months ago by JonesWooHoo
  • Latest reply from garachen

  1. JonesWooHoo
    Member

    Hi,

    First of all, thanks for doing this c# interface. It makes it all a bit more bearable considering the underlying api is so insane.

    Anyway, in version 9406 of the dinosaur c#, IBClient.cs, line approx 3237
    (case IncomingMessage.OpenOrder: of the switch statement)

    First of all I had a problem with:

    order.Rule80A =
    (AgentDescription) EnumDescConverter.GetEnumValue(typeof (AgentDescription), ReadStr());

    because ReadStr() was returning null. I put in some code to default to "I" to get past this.

    But now the next line is failing

    order.PercentOffset = ReadDouble();

    Because the ReadStr() call in ReadDouble() is returning the string "DEMO".
    So something is out of sequence as far as the message format contents.

    This occurs after I call client.ReqAllOpenOrders();

    Anyone else experience this?

    Posted 8 months ago #
  2. Hey Jones,

    I have not seen this - is this against a demo account? Does it occur if you use your papertrading account?

    -Karl

    Posted 7 months ago #
  3. garachen
    Member

    I just upgraded and am getting the same problem.

    Posted 7 months ago #
  4. garachen
    Member

    Here's where the problem is.
    You can see that OutsideRth is set twice. Once in the else{}, and then immediately after (which I have commented out).

    You get the same problem if you have 'download open orders on connection' set in TWS.


    Posted 7 months ago #
  5. garachen
    Member

    Here's the code

    if (version >= 4)
    {
    order.PermId = ReadInt();
    if(version < 18)
    {
    // will never happen
    /* order.m_ignoreRth = */
    ReadBoolFromInt();
    }
    else
    {
    order.OutsideRth = ReadBoolFromInt();
    }
    // order.OutsideRth = ReadInt() == 1;
    order.Hidden = ReadInt() == 1;
    order.DiscretionaryAmt = ReadDouble();
    }

    Posted 7 months ago #

RSS feed for this topic

Reply

You must log in to post.