I wrote a system using the basic Genesis API and recently got a demo account to test it. Unfortunatly things went a bit wrong from the off, with the program logging in successfully and receiving quotes but when my test strategy sent an order the gtbPlaceOrder() failed and returned -1. I tried passing all sorts of different arguments but it always fails no matter what I use. After trying various things I remembered the demo program that came with the API so I thought Iâd see if that works. I built it and ran it and it ran into the exact same problem with gtbPlaceOrder() always failing, so if their program doesnât work then itâs unlikely to be a problem with the code but possibly with the account. Thereâs no .pdb with the debug .dll so I canât debug into it to see exactly why itâs failing so Iâm rather at a loss to what to do. Has anyone tried their demo program at the below link and if so did it send orders correctly? http://www.gndt.com/download/GTAPIB-1.0.0.28.ZIP If anyone has a spare minute Iâd be grateful if you could download it, build it and run it with a demo account and tell me if it also fails for them. If you donât have a demo account PM me and Iâll let you know the login for the one I have been given. The second issue I have is with the documentation - the names of the servers donât seem to be defined so I get a lot of unknown servers when I log in as you can see here: http://i12.tinypic.com/2ns73gz.gif Below is a screenshot of all the servers defined in the API header file: http://i12.tinypic.com/2i05cuf.gif As you can see in the below screenshot my function returns a name for all servers defined in the header file: http://i12.tinypic.com/334rnmq.gif Despite handling all defined servers Iâm still getting unknown servers. The documentation for the API doesnât even cover all the servers in the header file so thatâs no use: http://i12.tinypic.com/2ahtxsn.jpg Theyâre also not documented in the .chm that comes with the API and only the 28 that are defined in the header file are covered. Does anybody know where the identity of these unknown servers is documented or if itâs documented at all? One final question, as you can see when I log in I get no status report for the major ECNs like ARCA, INET, BRUT etc. http://i12.tinypic.com/2ns73gz.gif As you can see from the earlier screenshots there are defines for the major ECN servers so either these have changed and the ECNs are actually the unknown servers or Iâm simply not getting a report. Without this status report my program has no way of knowing if an ECN has gone offline which could result in me routing orders to an ECN that is having problems. Iâd be very grateful for any advice you can offer me with any of these three issues. Thanks in advance.
Hi Zlatan, I use Genesis API and I can place orders successfuly, maybe there is something wrong with the way you place the order "post here how you place it" or your login has something wrong that prevent it from sending orders "send me your test login if you would like me to test it on my system" Regarding the unknown servers, believe it or not you just have to live with it and believe it or not I asked someone at Genesis about it and he said he doesn't know, anyhow they wont cause you many problems so just pass them for now.
Thanks a lot for the reply. I would be very grateful if you could test my training account login. Iâll PM you with the login details now. As for how I place the order, Iâve tried a massive variety of parameters to the function but it always fails. The TestAPIB project that is distributed with the API has four calls to the gtbPlaceOrder() function and all of them fail as well so Iâm not sure that itâs a problem with my code. This is the code from the TestAPIB project that comes with the API and the only thing I have changed it to add the MessageBox lines so I could show it failing: http://i9.tinypic.com/33epmdx.gif Hereâs what happens when I run the TestAPIB project and click and order button: http://i9.tinypic.com/2ds1s2t.jpg As you can see it logged in and got a few Level 1 quotes but the order fails. With their code failing in the same way Iâm rather at a loss so having someone else test the training account login will be extremely useful in narrowing down the cause. Thanks again for your help. Iâll send that PM now.
Hi zaltan, I just tried your login, it doesn't work !! I tried it using Laser and it worked just fine but when I tried it using the API it just doesn't send the orders. Very strange. I didn't go through your code since now we have a problem with the login. I think you should contact the guy who gave you this login and tell him about the problem
Thanks a lot for all your help. It was impossible to narrow down with the problem without someone else trying the login so Iâm really grateful for that. Iâll get in touch with them and get the account sorted out. On a different note, I was trying to sort out the other two issues I mentioned in the first post. With regards to the ECN status it appears that the status is only reported if the ECN is down so the way to handle it is to assume all ECNs are working unless it is reported otherwise. This is not actually documented but is what I have surmised based on watching the status log at the end of the day, since you start to receive reports about ECNs going offline a few hours after the close. I still havenât found the documentation for identity of the additional unknown servers yet. It seems Genesis arenât too big on documentation.
you are welcomed anytime. Don't depend too much on the documentation, unfortunately they lack lots of information. you will have to dig your way by try and error. Good Luck