Collective2 General API (v4)

API to automate your trading

Download OpenAPI description
Languages
Servers
https://api4-general.collective2.com/

Schemas

Autotrade

Operations

Hello

Request

Test endpoint that can be used to test your API Key, RateLimits, Headers, etc

Bodyapplication/json
Namestring or nullrequired

Your name (or any string)

curl -i -X POST \
  https://api4-general.collective2.com/General/Hello \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Name": "string"
  }'

Responses

OK

Bodyapplication/json
resultsArray of strings or null

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ "string" ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }

General

Operations

Strategies

Operations

GetStrategyDetails

Request

Request the strategy statistics. Non-paginated endpoint.

Query
StrategyIdinteger or null(int64)required

The Strategy ID

curl -i -X GET \
  'https://api4-general.collective2.com/Strategies/GetStrategyDetails?StrategyId=0' \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(StrategyDetailsDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "strategyId": 0, "strategyName": "string", "isAlive": true, "startDate": "2019-08-24T14:15:22Z", "primarySecurityTypes": "string", "securityTypesEnabled": { … }, "monthlyCost": 0.1, "strategyOwnerId": 0, "strategyOwnerName": "string", "suggestedCapital": 0, "lastModified": "2019-08-24T14:15:22Z", "score": 0, "isTradeOwnSystem": true, "whiteLabelSiteId": 0, "isHidden": true, "hiddenReason": "string", "isPrivate": true, "aum": 0, "auM_NumberOfAccounts": 0, "return": 0.1, "equity": 0.1, "cash": 0.1, "startingCash": 0.1, "profitFactor": 0.1, "cashDividends": 0.1, "buyingPower": 0.1, "marginUsed": 0.1, "ageInDays": 0, "modelAccountValue": 0.1, "numTrades": 0, "winTrades": 0.1, "winMonths": 0.1, "maxDrawdown": 0.1, "avgWinDollars": 0.1, "avgLossDollars": 0.1, "correlationSP500": 0.1, "alpha": 0.1, "beta": 0.1, "treynor": 0.1, "avgLeverage": 0.1, "maxLeverage": 0.1 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }

SearchStrategies

Request

Request a list of strategies available to the user. Paginated endpoint.

Query
SecurityTypestring or null

(optional) SecurityType filter. e.g. Stocks = 'CS', Futures = 'FUT', Options = 'OPT', Forex = 'FOR'

Enum"CS""FUT""OPT""FOR"
CreatedBeforeDatestring or null

(optional) Filter used to search old stategies. The date must be in ISO 8601 Date Format.

StrategyNamestring or null

Search strategies on name (optional). Partial matches will be returned. Wildcards % and _ are supported

StrategyOwnerPersonIdinteger or null(int64)

The C2 PersonId (optional)

WhiteLabelSiteIdinteger or null(int64)

The White Label site Id (optional)

Cursorstring or null

The Cursor from the previous resultset

Limitinteger(int32)

Result size limit. We will enforce a max size limit for all endpoints. Default is 1000

AscendingOrderboolean

Set to FALSE if you want to get the newest results first. Default is TRUE (oldest results first)

curl -i -X GET \
  https://api4-general.collective2.com/Strategies/SearchStrategies \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(StrategyBasicDetailsDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "strategyId": 0, "isAlive": true, "isHidden": true, "hiddenReason": "string", "isPrivate": true, "strategyName": "string", "startDate": "2019-08-24T14:15:22Z", "securityTypesEnabled": { … }, "monthlyCost": 0.1, "strategyOwnerId": 0, "whiteLabelSiteId": 0 } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }

GetLeaderBoard

Request

Request the curated public leaderboard of strategies. Non-Paginated endpoint.

Query
SecurityTypestring or null

(optional) SecurityType filter. e.g. Stocks = 'CS', Futures = 'FUT', Options = 'OPT', Forex = 'FOR'

Enum"CS""FUT""OPT""FOR"
curl -i -X GET \
  https://api4-general.collective2.com/Strategies/GetLeaderBoard \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(StrategyBasicDetailsDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "strategyId": 0, "isAlive": true, "isHidden": true, "hiddenReason": "string", "isPrivate": true, "strategyName": "string", "startDate": "2019-08-24T14:15:22Z", "securityTypesEnabled": { … }, "monthlyCost": 0.1, "strategyOwnerId": 0, "whiteLabelSiteId": 0 } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }

GetSubscribers

Request

Request the list of subscribers of a strategy and their subscrition history. Paginated endpoint.

Query
StrategyIdinteger or null(int64)required

The C2 StrategyId

ActiveOnlyboolean or null

Set to True to include only currently active subscribers. Default is False

Cursorstring or null

The Cursor from the previous resultset

Limitinteger(int32)

Result size limit. We will enforce a max size limit for all endpoints. Default is 1000

AscendingOrderboolean

Set to FALSE if you want to get the newest results first. Default is TRUE (oldest results first)

curl -i -X GET \
  'https://api4-general.collective2.com/Strategies/GetSubscribers?StrategyId=0' \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(StrategySubscriberDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "strategyId": 0, "strategyName": "string", "personId": 0, "subscriptionId": 0, "subscriberId": 0, "isStrategyOwner": true, "alias": "string", "firstName": "string", "lastName": "string", "email": "string", "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "basePrice": 0.1, "markup": 0.1, "cost": 0.1, "lastTransactionDate": "2019-08-24T14:15:22Z", "lastTransactionAmount": 0.1, "isResale": 0.1, "whiteLabelSiteId": 0, "geoSiteId": "string" } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }

GetSubscriptionRevenue

Request

Request the subscriber revenue of a strategy. Paginated endpoint. You must provide at least one parameter other than Start/End date.

Query
StrategyIdinteger or null(int64)

The C2 StrategyId (Optional)

StartDatestring or null

StartDate (Optional)

EndDatestring or null

EndDate (Optional)

StrategyOwnerPersonIdinteger or null(int64)

The Strategy Owner's PersonId (Optional)

SubscriberPersonIdinteger or null(int64)

The Subscriber's PersonId (Optional)

WhiteLabelSiteIdinteger or null(int64)

The White Label Site Id (Optional)

Cursorstring or null

The Cursor from the previous resultset

Limitinteger(int32)

Result size limit. We will enforce a max size limit for all endpoints. Default is 1000

AscendingOrderboolean

Set to FALSE if you want to get the newest results first. Default is TRUE (oldest results first)

curl -i -X GET \
  https://api4-general.collective2.com/Strategies/GetSubscriptionRevenue \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(StrategySubscriberDTO)

Result array

paginationobject(PaginationProperties)