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)
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": [ {} ] } }

NewStrategyOrder

Request

Send a new order for the strategy. Non-paginated endpoint.

Bodyapplication/json
Orderobject(OrderDTO)required
idinteger(int64)

The row ID. Read-only. Only present in response

orderIdstring or null

The OrderId. Only required in NewAutotradeOrder and ReplaceAutotradeOrder endpoints

strategyIdinteger or null(int64)

The C2 StrategyId

strategyNamestring or null

The C2 Strategy name. Read-only. Only present in response

signalIdinteger or null(int64)

Only required in ReplaceAutotradeOrder endpoint. The C2 SignalId

orderTypestring or null

'1' = Market, '2' = Limit, '3' = Stop

Enum ValueDescription
1

Market

2

Limit

3

Stop

Example: "1"
sidestring or null

'1' = Buy, '2' = Sell

Enum ValueDescription
1

Buy

2

Sell

Example: "1"
openClosestring or null

Only required in ReplaceAutotradeOrder endpoint. 'O' = Open, 'C' = Close

Enum ValueDescription
O

Open

C

Close

Example: "O"
orderQuantitynumber or null(double)

The unsigned order quantity

limitnumber or null(double)

The C2-formatted Limit Price

stopnumber or null(double)

The C2-formatted Stop Price

tifstring or null

The time in force. 0 = Day, 1 = Good Till Cancel (GTC)

Enum ValueDescription
0

Day

1

GTC

Example: "0"
profitTargetnumber or null(double)

Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order

stopLossnumber or null(double)

Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order

doNotCreateOCAGroupboolean or null

Only available in NewStrategyOrder endpoint. Default is false. Used to indicate the ProfitTarget and StopLoss orders should not be added to a OCA group. Each exit order will be managed separately

Default null
cancelReplaceSignalIdinteger or null(int64)

Used to specify that this order replaces another

parentSignalIdinteger or null(int64)

Used to specify that this order is conditional (a child) on another

doNotSyncToOpenboolean or null

Used to indicate this order should not be synched in the brokerage account. Only applies to Opening non-market orders

Default null
c2Symbolobject(C2SymbolDTO)
exchangeSymbolobject(ExchangeSymbolDTO)
rejectMessagestring or null

The order rejection message. Only available in response when OrderStatus = '8' (Rejected)

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(SignalIdDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "signalId": 0, "profitTargetSignalId": 0, "stopLossSignalId": 0, "exitSignalsOCAGroupId": 0 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

CancelStrategyOrder

Request

Cancel a order. Non-paginated endpoint.

Query
StrategyIdinteger or null(int64)required

The Strategy ID

SignalIdinteger or null(int64)required

The Signal ID to be cancelled

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(SignalIdDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "signalId": 0, "profitTargetSignalId": 0, "stopLossSignalId": 0, "exitSignalsOCAGroupId": 0 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

ReplaceStrategyOrder

Request

Send a cancel/replace a order for the strategy. Non-paginated endpoint.

Bodyapplication/json
Orderobject(OrderDTO)required
idinteger(int64)

The row ID. Read-only. Only present in response

orderIdstring or null

The OrderId. Only required in NewAutotradeOrder and ReplaceAutotradeOrder endpoints

strategyIdinteger or null(int64)

The C2 StrategyId

strategyNamestring or null

The C2 Strategy name. Read-only. Only present in response

signalIdinteger or null(int64)

Only required in ReplaceAutotradeOrder endpoint. The C2 SignalId

orderTypestring or null

'1' = Market, '2' = Limit, '3' = Stop

Enum ValueDescription
1

Market

2

Limit

3

Stop

Example: "1"
sidestring or null

'1' = Buy, '2' = Sell

Enum ValueDescription
1

Buy

2

Sell

Example: "1"
openClosestring or null

Only required in ReplaceAutotradeOrder endpoint. 'O' = Open, 'C' = Close

Enum ValueDescription
O

Open

C

Close

Example: "O"
orderQuantitynumber or null(double)

The unsigned order quantity

limitnumber or null(double)

The C2-formatted Limit Price

stopnumber or null(double)

The C2-formatted Stop Price

tifstring or null

The time in force. 0 = Day, 1 = Good Till Cancel (GTC)

Enum ValueDescription
0

Day

1

GTC

Example: "0"
profitTargetnumber or null(double)

Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order

stopLossnumber or null(double)

Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order

doNotCreateOCAGroupboolean or null

Only available in NewStrategyOrder endpoint. Default is false. Used to indicate the ProfitTarget and StopLoss orders should not be added to a OCA group. Each exit order will be managed separately

Default null
cancelReplaceSignalIdinteger or null(int64)

Used to specify that this order replaces another

parentSignalIdinteger or null(int64)

Used to specify that this order is conditional (a child) on another

doNotSyncToOpenboolean or null

Used to indicate this order should not be synched in the brokerage account. Only applies to Opening non-market orders

Default null
c2Symbolobject(C2SymbolDTO)
exchangeSymbolobject(ExchangeSymbolDTO)
rejectMessagestring or null

The order rejection message. Only available in response when OrderStatus = '8' (Rejected)

curl -i -X PUT \
  https://api4-general.collective2.com/Strategies/ReplaceStrategyOrder \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Order": {}
  }'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(SignalIdDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "signalId": 0, "profitTargetSignalId": 0, "stopLossSignalId": 0, "exitSignalsOCAGroupId": 0 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetStrategyActiveOrders

Request

Request the open orders for the strategies. Non-paginated endpoint.

Query
StrategyIdsArray of integersrequired

A list of Strategy IDs

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/GetStrategyActiveOrders?StrategyIds=0' \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(OrderStatusDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "orderId": "string", "strategyId": 0, "strategyName": "string", "signalId": 0, "orderType": "1", "side": "1", "openClose": "O", "orderQuantity": 0.1, "limit": 0.1, "stop": 0.1, "tif": "0", "profitTarget": 0.1, "stopLoss": 0.1, "doNotCreateOCAGroup": null, "cancelReplaceSignalId": 0, "parentSignalId": 0, "doNotSyncToOpen": null, "c2Symbol": {}, "exchangeSymbol": {}, "rejectMessage": "string", "brokerId": 0, "orderStatus": "string", "filledQuantity": 0.1, "avgFillPrice": 0.1, "postedDate": "2019-08-24T14:15:22Z", "signalType": 0, "info": "string" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetStrategyOpenPositions

Request

Request the open positions for the strategy. Non-paginated endpoint.

Query
StrategyIdsArray of integersrequired

A list of Strategy IDs

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/GetStrategyOpenPositions?StrategyIds=0' \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(PositionDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "quantity": 0.1, "c2Symbol": {}, "exchangeSymbol": {}, "strategyId": 0, "strategyName": "string", "currency": "string", "openedDate": "2019-08-24T14:15:22Z", "avgPx": 0.1 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetStrategyHistoricalOrders

Request

Returns the historical orders of the strategy. Paginated endpoint.

Query
StrategyIdinteger or null(int64)

StrategyId (optional: StrategyId or SignalId must be present)

SignalIdinteger or null(int64)

SignalId (optional: StrategyId or SignalId must be present)

OrderStatusstring or null

Optional. Available values: '2' = Filled, '4' = Canceled, 'C' = Expired

StartDatestring or null

UTC StartDate (Optional)

EndDatestring or null

UTC EndDate (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/GetStrategyHistoricalOrders \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(OrderStatusDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "orderId": "string", "strategyId": 0, "strategyName": "string", "signalId": 0, "orderType": "1", "side": "1", "openClose": "O", "orderQuantity": 0.1, "limit": 0.1, "stop": 0.1, "tif": "0", "profitTarget": 0.1, "stopLoss": 0.1, "doNotCreateOCAGroup": null, "cancelReplaceSignalId": 0, "parentSignalId": 0, "doNotSyncToOpen": null, "c2Symbol": {}, "exchangeSymbol": {}, "rejectMessage": "string", "brokerId": 0, "orderStatus": "string", "filledQuantity": 0.1, "avgFillPrice": 0.1, "postedDate": "2019-08-24T14:15:22Z", "signalType": 0, "info": "string" } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

AddStrategy

Request

Create a new, empty, publicly visible strategy. Non-paginated endpoint.

Bodyapplication/json
StrategyNamestring or nullrequired

The desired strategy name

StartingCapitalinteger or null(int64)

(Optional) The starting capital. Must be set when Account is not specified, ignored when Account is specified

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(StrategyIdDTO)

Result array

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

UpdateStrategy

Request

Modify a strategy. Not available yet. Please contact us if you ened this endpoint. Non-paginated endpoint.

Bodyapplication/json
StrategyIdinteger or null(int64)required

The C2 StrategyId

curl -i -X PUT \
  https://api4-general.collective2.com/Strategies/UpdateStrategy \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "StrategyId": 0
  }'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(StrategyIdDTO)

Result array

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

GetStrategyHistoricalEquity

Request

Returns general equity stats and a list of equity data points. Non-paginated endpoint.

Query
StrategyIdinteger or null(int64)required

The Strategy ID to get data for

DoNotAggregateDailyEquityboolean or null

If TRUE, DailyEquity will not be aggregated by day

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(StrategyHistoricalEquityDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "strategyId": 0, "strategyName": "string", "startDate": "2019-08-24T14:15:22Z", "securityTypesEnabled": {}, "monthlyCost": 0.1, "strategyOwnerId": 0, "dailyEquity": [], "monthlyResults": [] } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

SetDesiredPositions

Request

The list of positions that must exist in the strategy. All C2 positions not in this list will be closed with market orders. Non-paginated endpoint.

Bodyapplication/json
StrategyIdinteger or null(int64)required

The C2 StrategyId

PositionsArray of objects or null(PositionBase)required

The list of positions that must exist in the strategy

quantitynumber or null(double)

The net signed position quantity. Short positions will be negative.

c2Symbolobject(C2SymbolDTO)
exchangeSymbolobject(ExchangeSymbolDTO)
curl -i -X POST \
  https://api4-general.collective2.com/Strategies/SetDesiredPositions \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "StrategyId": 0,
    "Positions": [
      {}
    ]
  }'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(DesiredPositionResponseDTO)

Result array

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

SearchHistoricalStrategies

Request

Request a list of strategies available for the nearest date. Non-Paginated endpoint.

Bodyapplication/json
ReportDateinteger or null(int64)required

The date to look for. The server will automatically adjust the date to the nearest previous available day. Format must be YYYYMMDD.

RequirementsArray of objects or null(HistoricalStatDTO)

(optional) Add a maximum of 6 statistics requirements here. Use the GetHistoricalStrategiesStatsList endpoint for a list of available statistics for the specified date

curl -i -X POST \
  https://api4-general.collective2.com/Strategies/SearchHistoricalStrategies \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ReportDate": 0
  }'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(HistoricalStrategyResponseDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "strategyId": 0, "reportDate": 0, "statistics": [] } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetHistoricalStrategiesStatsList

Request

Request a list of statistics available for the nearest date. Non-paginated endpoint.

Query
ReportDateinteger or null(int64)required

The date to look for. The server will automatically adjust the date to the nearest previous available day. Format must be YYYYMMDD.

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

Responses

OK

Bodyapplication/json
resultsArray of strings or null

Result array

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

GetWatchLists

Request

Request all watchlists available to the user. Paginated endpoint.

Query
PersonIdinteger or null(int64)required

The C2 PersonId

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/GetWatchLists?PersonId=0' \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(WatchListDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "personId": 0, "createdDate": "2019-08-24T14:15:22Z", "listName": "string" } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetWatchListMembers

Request

Request a list of strategies in the watchlist. Paginated endpoint.

Query
PersonIdinteger or null(int64)required

The C2 PersonId

WatchListIdinteger or null(int64)required

The WatchList Id

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/GetWatchListMembers?PersonId=0&WatchListId=0' \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(WatchListMemberDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "addedDate": "2019-08-24T14:15:22Z", "strategyId": 0, "personId": 0 } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

ManageWatchList

Request

Edit watchlists and their members. Non-paginated endpoint.

Bodyapplication/json
PersonIdinteger or null(int64)required

The C2 PersonId

ModificationSourcestring or nullrequired

The Type of list to modify. Valid values are 'LIST' (for the whole watchlist), 'MEMBER' (for the list items)

Enum"LIST""MEMBER"
ModificationActionstring or nullrequired

The change to make. Valid values are: ADD, DELETE

Enum"ADD""DELETE"
WatchListIdinteger or null(int64)

The WatchList Id. Required except when ModificationAction=ADD and ModificationSource=LIST

StrategyIdinteger or null(int64)

The Strategy Id. Only required when ModificationSource=MEMBER

WatchListNamestring or null

The name of the watchlist. Only required when ModificationAction=ADD and ModificationSource=LIST

curl -i -X POST \
  https://api4-general.collective2.com/Strategies/ManageWatchList \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "PersonId": 0,
    "ModificationSource": "LIST",
    "ModificationAction": "ADD"
  }'

Responses

OK

Bodyapplication/json
resultsArray of booleans or null

Result array

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

ManageWatchList

Request

Edit watchlists and their members. Non-paginated endpoint.

Query
PersonIdinteger or null(int64)required

The C2 PersonId

ModificationSourcestring or nullrequired

The Type of list to modify. Valid values are 'LIST' (for the whole watchlist), 'MEMBER' (for the list items)

ModificationActionstring or nullrequired

The change to make. Valid values are: ADD, DELETE

WatchListIdinteger or null(int64)

The WatchList Id. Required except when ModificationAction=ADD and ModificationSource=LIST

StrategyIdinteger or null(int64)

The Strategy Id. Only required when ModificationSource=MEMBER

WatchListNamestring or null

The name of the watchlist. Only required when ModificationAction=ADD and ModificationSource=LIST

curl -i -X DELETE \
  'https://api4-general.collective2.com/Strategies/ManageWatchList?ModificationAction=string&ModificationSource=string&PersonId=0' \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of booleans or null

Result array

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