System Management API
The System Management API is available to customers of Collective2's Private Platform product. C2's Private Platform allows companies to build their own customized version of Collective2, entirely without Collective2 branding, and to conduct all subscription processing commerce offsite, without any involvement by C2. Please contact us to learn more about our Private Platform product.
Table of Contents
createSystem
https://collective2.com/api/createSystem?apikey=yourAPIkeyValue&platformid=[platformID]&ownerpersonid=[personid]&name=A%20Great%20System&startingcapital=50000&stocks=1
<createSystem> <ok>1</ok> <error></error> <systemID>987654</systemID> </createSystem>
This command allows you to create a new trading system on your platform. The system will be visible on your Platform Management : Systems screen.
At a minimum, in addition to your platform ID number and API key, you must specify the following parameters:
- ownerpersonid - the person ID number who will be the primary owner of the system
- name - the system name, in encoded URI format
- startingcapital - initial system cash in Model Account, in USD
Optional parameters include:
- stocks - does system trade stocks? 1=yes, 0=no
- options - does system trade options? 1=yes, 0=no
- futures - does system trade futures? 1=yes, 0=no
- forex - does system trade forex? 1=yes, 0=no
These optional parameters are not required, and are only useful during the early days of a system, before any trades have been made. They help C2 categorize a system before a trading history has been established. After a trading history has been established, system categorization happens automatically, and these initial values are ignored.
A successful call will return a new system ID number.
Systems created through the createSystem API call will have no ability to enter new trade signals, because no signal-credit is applied. See the creditSystem call (below) to learn how to apply system credit to your newly-created system.
creditSystem
https://collective2.com/api/creditSystem?apikey=yourAPIkeyValue&platformid=[platformID]&ownerpersonid=[personid]&systemid=[systemid]&credituntil=201501012359
or
https://collective2.com/api/creditSystem?apikey=yourAPIkeyValue&platformid=[platformID]&ownerpersonid=[personid]&systemid=[systemid]&creditincrement=7776000
or
https://collective2.com/api/creditSystem?apikey=yourAPIkeyValue&platformid=[platformID]&ownerpersonid=[personid]&systemid=[systemid]&signalEntryCredits=10
creditSystem applies a system credit to a specific system, granting the system rights to enter new trade signals. You can specify either a fixed date until which all signal entry will be allowed (credituntil), or a relative amount of time to be added to the current credit-period (creditincrement) or, finally, a fixed number of allowed signal entry attempts (this includes successful and failed signal entries).
credituntil - either a date in YYYYMMDD format, or a date-time in YYYYMMDDHHMM, where HH MM are 24-hour clock format. All dates/times will be treated as USA Eastern Time (New York).
creditincrement - The number of seconds by which to push forward the existing credit-period. If system has no existing credit, this will be treated as number of seconds from now to allow signal entry.
A successful creditSystem call will return the following:
<creditSystem> <ok>1</ok> <error></error> <systemID>987654</systemID> <systemName>A Great System</systemName> <creditExtendsUntilEpoch>1403127439</creditExtendsUntilEpoch> <creditExtendsUntilDateTime>2014-06-18 17:37</creditExtendsUntilDateTime> <creditFreeSignalEntries>0</creditFreeSignalEntries> </creditSystem>
creditExtendsUntilEpoch is the UNIX epoch time, in seconds, since January 1, 1970. creditExtendsUntilDateTime conveys the same information, in human-readable form.
deleteSystem
https://collective2.com/api/deleteSystem?apikey=yourAPIkeyValue&platformid=[platformID]&systemid=[systemid]
deleteSystem removes a system from your Private Platform, and removes the system entirely from the main Collective2 database. (It is still kept in a secondary database for compliance/regulatory reasons, but will no longer be visible or retrievable to anyone under normal circumstances.)
A successful deleteSystem call will return the following:
<deleteSystem> <ok>1</ok> <error></error> <systemID>987654</systemID> </deleteSystem>