Anyone out there with Genesis API expertise that can help?

Discussion in 'Automated Trading' started by malona, Mar 10, 2006.

  1. malona

    malona

    Hi, my programmer and i have been having trouble sending market order to Genesis api. So far the only thing that works is if we bid on isld with a couple of cents higher than ask it works. And we do the reverse when selling. I'll post how he coded it, so can someone please comment on what he's doing wrong. We tried using Brut for Nasdaq and OESD for NYSE stocks when trying to send a market order. Here's the code for sending order to OESD and Brut.

    ********************************************

    48682295 (5:55:59 PM): the code for filling initial ordering system is:

    If Len(sStockSymb) > 3 Then
    StockECN(f) = GTAPINet.GTSession.MMID_BRUT
    Else
    StockECN(f) = GTAPINet.GTSession.MMID_OESD
    End If

    ********************************************

    Here's the code for sending market orders to brut/oesd

    ===================
    MyOrder(f) = New GTAPINet.GTSession.GTOrder32
    StockTrading(f).InitOrder(MyOrder(f))

    StockTrading(f).Ask(MyOrder(f), Abs(StockNumberOfShares(f)), 0, StockECN(f))
    MyOrder(f).chPriceIndicator = "1"
    MyOrder(f).m_bBrutAutoRoute = 1

    StockTrading(f).PlaceOrder(MyOrder(f))
     
  2. malona

    malona

    By the way, im posting here because Genesis does not support their api. All they do is give you sample codes that does not work and some documentations. If you have questions with the api they will give you an answer "uhhhhh check the video and go back to the manual, sorry we dont support the api due to liability". (How stupid) If i only knew how bad their support is before starting i wouldnt have paid a developer to program in their api. Now we are too deep in the application to change now. I'm sure my developer is probably just doing something wrong but we cant get Genesis support to comment. So someone please help.
     
  3. tomhaden

    tomhaden

    Its hard to comment without seeing the error messages being returned by the API.

    I don't know how good your programmer is, but from the looks of the code, little to no error checking is being done.

    For example: StockTrading(f).PlaceOrder(MyOrder(f))

    What is the return value from this function? No error checking?

    I would start by adding and comparing the error codes returned by the Genesis API during a working order (ISLD) vs a non-working order (Brut, etc.).

    In financial apps, error checking and fault checking are too important to ignore. If something goes wrong, the code must be able to adapt or you will lose some serious cash.

    As I like to say, you either pay for good programming, or pay later when the bad programming breaks in the middle of a trade.

    When using a poorly documented/supported API, you will most likely run into further problems in the future. Sometimes you need to take the short term pain and switch to a better API.

    It may slow you down short-term, but who knows what problems you will run into down the road.

    But before switching, make sure its the API thats the problem and not your programmer.
     
  4. For what it is worth , unless u are a hedge fund with big $ no one in the tech help will give u support u want. I've used Hold, IB, Assent, SLK API and they ALL leaves a lot to be desired.Just the nature of the beast. Get over it. I know I did. Just keep plugging away and use those error codes.
     
  5. That code looks much like Visual Basic.....doesn't Genesis support C++ with the API ?
     
  6. malona

    malona

    oh thanks maybe quantant can help me out. anyway, my developer put in new codes there for testing if it still doesnt work i'll give you guys a call.