Sending option orders through the Sterling ActiveX API

Discussion in 'Programming' started by jonkump, Jan 11, 2019.

  1. jonkump


    Does anyone out there have an example of an options order that will successfully fire through the sterling API?

    I am building my order like this...
    stiOrder.Symbol = "SPY 190111C259000";
    stiOrder.StrikePrice = 259;
    stiOrder.Account = "DEMODS1649";
    stiOrder.Side = "B";
    stiOrder.Quantity = 1;
    stiOrder.LmtPrice = .3;
    stiOrder.Destination = "C2";
    stiOrder.Tif = "D";
    stiOrder.PriceType = SterlingLib.STIPriceTypes.ptSTILmt;
    stiOrder.ClOrderID = "DEMODS1649_2019111184112436";
    stiOrder.StrikePrice = 259;
    stiOrder.Maturity = "20190111";
    stiOrder.PutCall = "C";
    stiOrder.Underlying = "SPY";
    The odd thing is that this order works if I use a route that exists for equities, but if I use a route that only exits on the options window, I get an error "invalid route".
  2. Robert Morse

    Robert Morse Sponsor

    Don’t you think it would be faster to contact Sterling trading Tech?
    Overnight likes this.
  3. moskvich


    i thought Sterling API got disabled by brokers/became very expensive or that's not the case any longer?
  4. Robert Morse

    Robert Morse Sponsor

    PTS, the owner of Sterling Trader Tech was audited by the NYSE and was forced a few years ago to be compliant with non-display fees. That policy requires them to report any API with open market data. Because of that policy, our default is to disable market data to the API on Lightspeed Trader and Sterling Trader Pro. We then do not have to report it. You can then feed your server from another source and not be subject to those excessive fees from the market data we provide to the terminal. You can then use these APIs for order entry. The NYSE now has an exemption for those that qualify for non-pro status. OPRA has one too for most customer priority customers. NASDAQ has no exemption, but their non-display fees are the lowest and manageable. NYSE feeds can run well over $9000/month, OPRA $2000/month, NASDAQ $375 for L2.
  5. ellevers


    Couple of things I see missing:

    stiOrder.Instrument = "O"; // Option type E for equities
    stiOrder.OpenClose = "O"; // O/C

    As far as the routes go, since you are using a Demo account they might not be enabled. You can use this to get a list of routes:

    STIApp app = new STIApp();
    Array RouteList = Array.CreateInstance((typeof(string)), 0);
    int total = app.GetDestinationList(ref RouteList);