Sterling API Developer Thread

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

  1. Hello!
    Can anyone help me understand couple things regarding level2 quotes?

    1. Sometimes I get L2 update messages with price and size set to -1.
    Code:
    <?xml version="1.0"?>
    <structSTIL2Update>
        <nQty>-1</nQty>
        <fPrice>-1</fPrice>
        <bstrSymbol>MRKT</bstrSymbol>
        <bstrSide>S</bstrSide>
        <bstrTime>102416</bstrTime>
        <bstrMaker>NSDQ</bstrMaker>
        <bstrAction>C</bstrAction>
        <bstrID>NSDQ</bstrID>
    </structSTIL2Update>
    What does this kind of updates mean and how they should be handled?

    2. How do I get notified of specific L2 quote disappearing? Do I get new quote with that price and 0 size?

    Thanks beforehand!
     
    #291     Sep 17, 2014
  2. Hello,

    i've stopped writing here as I found more info and source codes here: https://github.com/victor-velchev?tab=repositories

     
    #292     Dec 21, 2014
  3. JohnTack

    JohnTack

    Hello,
    Guys have you ever had problems with 'Out of memory' message popping up in Sterling Trader Pro when you use ActiveX API?
    I have simple C# WPF application to send orders to Sterling, and get order status and positions. After 1-2 hours of work I'm getting 'Out of memory' message in Sterling, and getting 300-500 Mb dump files in Sterling directory.
    Would appreciate any hints how can I solve this .
     
    #293     Apr 20, 2015
  4. piyayo

    piyayo

    I´m looking for a developer familiar with Sterlign API. A need to connect Sterling to any platform with a vertical DOM, like Ninja Trader, Multicharts, CQG, Obsidian, etc...

    I want to mouse trade on the DOM and send the orders to Sterling. You also need to load the prices data from Sterling to the DOM

    If there is anyone cappable of developing such a bridge please contact me to talk about price.

    Many thanks
     
    #294     Oct 15, 2015
  5. Hi everyone. Its great this thread exists. I recently switched brokers and as a consequence have been forced to use Sterling.
    So I have been building an app in C# to connect my automation code to the sterling Api. So far it actually has been very straight forward. However I am stuck on something:

    in the structSTIPositionUpdate - I cannot seem to find a member that relates to The Position Average Price.
    Does anyone know how to request the position average price?
     
    #295     Dec 22, 2016
  6. reply Never Mind. I just did position cost / netshares
     
    #296     Dec 22, 2016
  7. spamula

    spamula

    Hi guys can someone help with this, my developer is having the following problems:

    "The problem is the API gets disconnected intermittently"

    Example -
    1) Detect if network / broker disconnected. Then reconnect again.

    2) Sometimes freezing / no quotes.

    Any advice or guidance would be appreciated apparently sterling API support is very slow!
     
    #297     May 16, 2018
  8. richardm

    richardm

    Holding a class on APIs near the end of the month

    www.datanowllc.com

    The setup class and the intro class are free, the others are per training event.
     
    #298     May 16, 2018
  9. spamula

    spamula

    HELP! From my developer:

    The core issue is reliability - we do not get events (when market is closed)
    or if there is a genuine error. So, it is difficult to figure out the cause.


    I have a few questions regarding the Sterling ActiveX API -

    1) An "Automation Error" or "ActiveX error" is observed if SterlingPro is not running -
    can I use this error handling to detect whether SterlingPro is running ?

    2) No events (except Shutdown when closing SterlingPro) are received when SterlingPro is ON,
    but the Market is Inactive (trading closed)

    3) No return codes, or error message / events when sending orders or deleting orders -
    There is no way to find the cause why it failed. When market is inactive the same behaviour is noticed)

    4) Is there a way to find if a exchange or market is active ? Trading is allowed ?

    5) When I register quote during inactive hours, no callback events are received.
    So techically there is no way to figure out why it failed.

    This is the setup I use :

    Windows 10 / 64-bit, Sterling Pro (installed with administrator privileges)
    Visual Basic 6.0 (Visual Studio 6.0 Enterprise Edition with admin privileges)
    The VB6 examples and my application are run with admin priviledges.
     
    #299     May 30, 2018
  10. spamula

    spamula

    Continued, from chat conversation:


    yes, reliability issues it skips events e.g I continuously track open p/l and daily p/l etc if I do not get updates / freezes then it can be risky - I am trying another idea, but would like to hear from themIf I know a reliable way to find if the market is open or closed, half my problems are solved.
     
    #300     May 30, 2018