New: signalstatus command

Based on developer requests, I have added a new command to the Trade Entry API. It’s called signalstatus. It allows you to request the up-to-date status of a C2 order. In other words, if you know a signalid, you can find out whether a signal has been filled on C2’s Hypothetical Fill Engine, and at what price. You may also learn that the signal has been canceled or has expired.



The requestor needs either to be the owner of the system in question, or a subscriber to the system. You identify yourself by passing the usual pw=c2password parameter, but also – and this part is new – you must pass the email address you use to login to C2. This last parameter is necessary because this particular command does not require you to specify which systemid you are requesting information for. All that is necessary is the signalid.



Here’s an example of how to call the command:



signal.mpl?cmd=signalstatus&signalid=20919494&pw=myc2password&c2email=matthew@collective2.com



The response might look like this:



<collective2>

<signal>

<signalid>20919494</signalid>

<systemname>Velocity Forex System</systemname>

<postedwhen>2006-05-19 15:34:50:000</postedwhen>

<emailedwhen>2006-05-19 15:45:28:000</emailedwhen>

<killedwhen>0</killedwhen>

<tradedwhen>2006-05-19 22:08:53:000</tradedwhen>

<tradprice>20.87</tradeprice>

</signal>

</collective2>



Note that all times are Eastern U.S. time. A time field of zero means it never happened (i.e. if “killedwhen” is zero, then the signal never was killed/canceled).



Of course, for the command to be useful you must know the signalid. Remember that you can specify your own signalids when placing orders, or you can extract a C2-assigned signalid if you do not use your own numbering scheme.



This command should help developers create order entry and order-tracking applications. Keep in mind that this command is not designed for AutoTrading use. It’s a light-weight command that simply reports order status on C2. It does not determine whether a user should place a trade, or at what quantities.



For AutoTrade devlopment, be sure you look at the C2ATI instead of the Trade Placement API.