Sterling API Developer Thread

Discussion in 'Trading Software' started by mnx, Apr 25, 2008.

  1. mnx


    I see that Anvil has a thread where traders and programmers a like can discuss the ins and outs of their API. I figure there must be as many people or more using Sterling Trader Pro and it's API so I figured I'd kick things off.

    I'll start with a question.

    What is the difference between StructOrderUpdate and OrderUpdateMsg (and all the other events that have both a struct and Msg version) and why does Sterling recommend that you use the Structs in your code?


    - mnx
  2. Only reason I know of is because Terry says so. :p
  3. ers811


    I've been using the API for over a year and I've never really seen much discussion. Maybe we can get some good replies here about the intricaies of the API architecture... i.e. more than just "refer to the documentation".... hehe. j/k... Terry is actualy really nice and helpful. But since he basically serves as a shield to the programmers there it might be nice to get some technical discussion from other people actually USE it!

  4. I don't use the API, but used to be in an office with others around me who did, and I would assist them in their developing when markets were slow around lunch. But I believe the "Structure" has to do with UDT, and has to do with how you are feeding the data into your API. But I am in know way proficient enough to really speak intelligently about this, so I may have no idea what I am talking about, but just throwing it out there.
  5. mnx


    Ok, so I googled UDT since I didn't know what it was... If you're reading this and are as uninformed as I am it's short for a User Defined Type.

    The question still remains though... How are the UDT Structs different from the STI...Msg Objects? (and what might be their advanatges?)
  6. I am assuming one is to be used when you use Sterlings data feed, and the other is to be used when using a third party data feed that you plugin to the Sterling API or system, because you don't like Sterlings data feed or you want your data from a different provider than Sterling uses. I forget which Data provider sterling uses, but someone with the capital might want a raw data feed from Comstock for $5,000 a month. Their are different levels of latency and quality of data feeds.
  7. Toggling the structs format affects order events only.
  8. ers811


    Exactly. Same data comes through either way. It's like puting a puting a box in the middle of a room with a note that says "Do not open this box"....

    Yeah, but why? LOL Are Stucts just passed more efficiently than a Msg class via the API or what?
  9. bespoke


    I just noticed something today into the close.

    If you run a program in which you RegisterForAllMDX, and then run another program which will RegisterQuote, the MDX messages get resent in the first program for all the symbols you register in the second program (even if you don't RegisterForMDX in 2nd program). Just thought I'd let you know so you can be careful if you do any type of executions based on MDX messages. Weird.
  10. From the second paragraph on this site

    "As can be seen from this example, it would be quite a bit more convenient passing around a single piece of information that contains all of the things that are important with respect to the locale than to have to pass each of these pieces of information around separately and to address them and store them separately as well."

    I think if you do it in a UDT Structure you can send less mesages? If that is the case I would assume that things would run faster?
    #10     Apr 25, 2008