Sending option orders through the Sterling ActiveX API

Discussion in 'App Development' started by jonkump, Jan 11, 2019.

  1. jonkump

    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...
    Code:
    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

    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

    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);
     
  6. Hey Jonkump

    Do you mind sharing your code? I wanted to build a GUI that would fire orders though Sterling API but for stocks
     
  7. Jonkump, do you have the capability to send orders through Sterling API with Excel? I started down this road a while back and would like to learn how to do it on my own. I need help with this as I've developed some trading strategies using real time price and volume date in Excel and would like to automate the orders into Sterling. I'm willing to share strategies once I get them up and running.