I started developing for the C2ATI today. I’ve got a program which polls for signals and acknowledges them when they come in. Each response from C2 is logged.
I am getting opening signals from my test system but not closing signals. Here’s a log of what I captured in the interaction and some comments from me regarding what I think is happening:
# My code issues a GET on http://52.70.183.178:7878?cmd=latestsigs&session=30159301474515534667&h=myhost.example.com
# The result is a <signalpacket> with a signal id of 100592054; looks like I have successfully
# received the BTO issued by the system
<collective2>
<status>OK</status>
<error>
<code>0</code>
</error>
<data>
<recentc2fills>
</recentc2fills>
<cancelsiglist>
</cancelsiglist>
<signalsep>100592054</signalsep>
<signalpacket>
<systemname>Bride of Xaden</systemname>
<systemidnum>100340696</systemidnum>
<signalid>100592054</signalid>
<postedwhen>1455228933</postedwhen>
<postedhumantime>2016-02-11 17:15:33</postedhumantime>
<wasparkeduntilwhen>0</wasparkeduntilwhen>
<wasparkeduntilhumantime></wasparkeduntilhumantime>
<action>BTO</action>
<scaledquant>100000</scaledquant>
<originalquant>10</originalquant>
<symbol>EURUSD</symbol>
<assettype>forex</assettype>
<mutualfund>0</mutualfund>
<ordertype>MARKET</ordertype>
<stop>0.000000</stop>
<limit>0.000000</limit>
<tif>DAY</tif>
<underlying></underlying>
<right></right>
<strike>0</strike>
<expir></expir>
<exchange></exchange>
<marketcode></marketcode>
<ocagroup></ocagroup>
<conditionalupon></conditionalupon>
<conditionaluponpermid></conditionaluponpermid>
<commentary></commentary>
</signalpacket>
<fillinforeceived>
</fillinforeceived>
<completetrades>
</completetrades>
<pollinterval>7000</pollinterval>
<servertime>1455228938</servertime>
<humantime>2016-02-11 17:15:38</humantime>
</data>
</collective2>
# Having received the signal id of 100592054, my code proceeds to ack it by
# doing a HTTP GET on http://52.70.183.178:7878?cmd=confirmsig&sigid=100592054&session=30159301474515534667&h=myhost.example.com&quant=1
# and the C2ATI responds with a confirmation of my confirmation
<collective2>
<status>OK</status>
<error>
<code>0</code>
</error>
<data>
Signal confirm received 100592054
</data>
</collective2>
# Next, I go back to the top of the loop in my code and poll for the latest signals again with a GET on
http://52.70.183.178:7878?cmd=latestsigs&session=30159301474515534667&h=myhost.example.com
# I see a <completetrades> on that previously mentioned signal id
<collective2>
<status>OK</status>
<error>
<code>0</code>
</error>
<data>
<recentc2fills>
</recentc2fills>
<cancelsiglist>
</cancelsiglist>
<fillinforeceived>
</fillinforeceived>
<completetrades>
<sigid>100592054</sigid>
</completetrades>
<pollinterval>7000</pollinterval>
<servertime>1455228981</servertime>
<humantime>2016-02-11 17:16:21</humantime>
</data>
</collective2>
From this point on, I don’t get any more updates about that position. So, my question is “Where’s my closing signal?” I would have expected a response to latestsigs with a and a of STC. The position is getting closed, but the C2ATI is never notifying my code with STC. Am I wrong to expect that?