Who is VERY VERY familiar with the sterling API I want to pay you $ to help me

Discussion in 'Automated Trading' started by WhiteOut56, Jan 6, 2011.

  1. I have a bug w/ the sterling API that I just cannot seem to crack.

    The error is with regard to sending / tracking / canceling orders.

    What's happening is that I'm sending in orders, and cancels, and most of the time I get it to work, but what happens is I send in a cancel or an order and it doesn't go through. Very very frusterating and looking for someone to help me

  2. Do you get any error messages or have you phoned sterling tech support to see if they have any record of your attempted orders?
  3. Everysingle cancel has a unique ID I'm using this

    Private Function GetClOrdID() As String
    Dim theTime As SYSTEMTIME
    g_nCounter = g_nCounter + 1
    GetClOrdID = theTime.wYear & theTime.wMonth & theTime.wDay & theTime.wHour & theTime.wMinute & theTime.wSecond & theTime.wMilliseconds & g_nCounter
    End Function

    So everyone is different
  4. sidenote : you're probably better off using tradelink because not only would you have help for solving these problems.... you would not spend any time doing basic stuff like this since it already works for everybody in tradelink. as another user mentioned, you could also call sterling technical support and have watch your cancel as it's received and generally they can see the reason. but this is the slow route.

    in any event, cancel ids from my memory have to be unique over several days. so cancelid = cancelid +1 may be your cause

    see line 562 in our code above, we're using an IDtracker to generate a guaranteed unique cancel.

    there are a couple of other really picky things they do, feel free to use tradelink source code as a working example if you need one.