And node response values

In order to program a robust trading system, I need more information on potential response values for these nodes. The signal api only shows examples when no error exists such as <ack> node returns “Signal Received” and <status> returns “OK”. By trial and error I have found <status> node can also return “error” then it creates an additional error node with more information.

What else can I expect from these nodes? Mainly I’m interested in response when using All-in-one,xreplace and positionstatus functions for starters.


fwiw, subject line above was supposed to read <ack> and <status>

Also I would like to know what HTTP status codes to expect from the C2 servers and which ones should I retry the request on. I would expect perhaps 503 Service Unavailable, anything else?


Is admin ever going to answer this? Lack of info on website, lack of response from admin…not looking too good for my business !!!

Hi, Rob:

I apologize for the slow reply. The disheartening truth is that we don’t have full documentation of the API – specifically, we don’t have a list of all possible <status> nodes and error conditions.

I agree that is very needed, and I have added to the “must do soon” list. But I haven’t had a chance to do it. And I don’t yet have an ETA for it. Is there any chance you can try to muddle through without a definitive list of error codes? I guess the main point to know is that, if there is an error, it will appear in the error node, and status will not be “ok.”

Matthew, sure no problem I can work through most of it. I’m only doing OCA, XREPLACE and POSITIONSTATUS so let’s just deal with specific questions then. I can post here or direct email whatever works for you.

So for starters only a few questions. What I have done for now is send request and then if status is ok parse the info, if not ok, I simply retry the request 3 or 4 times. What I have found so far with XREPLACE is that if the orderID is gone (i.e. filled or cancelled) the first 2 retries I get xreplace error but then I think on the 3rd retry I get a not long or not short error. The order system is in the early stages of development so I believe this is what I’m seeing but would like to know if this in fact what I should expect. I realize I should probably handle the first xreplace error but nonetheless would like to understand what happens if I hit it several times.

The only other real mystery for me right now is http status codes. For sure I get 200 when things are fine but today the server was down or busy for a few minutes and I was expecting a 503 or some 5xx status. Does your server ever send 5xx, or 4xx for that matter or even 3xx which I doubt. And in the 2xx series will I only receive a 200 or any others? These answers will help a lot to get the basic retry framework worked out.

Thanks for getting back to me,


Matthew, I’m probably wrong on the xreplace so don’t worry about it, I’ll sort through it.

If you could just give some idea what to expect from http status codes from your server that would help the most.


Unfortunately the status codes are not terribly useful. In the case of the API server being down – either for scheduled maintenance or “unscheduled maintenance” (i.e. one member of our huge development team breaks the production code base) – you’ll get a status code 502.

In the case of a request that utterly makes no sense to our server, you’ll get a 404.

In the case in which our data center goes dark, then you’ll get a “no response” – i.e. request will time out.

Does this help at all?

Yes, that helps a lot!

Since I was expecting 503 I’ll check for 502 instead. This means I need to retry the request. And you do respond with client side errors (i.e. 4xx series) so I can check for 404 too and stop sending you garbage!