Collective2 General API (v4)

API to automate your trading

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

Schemas

GetAutotradedStrategies

Request

Request the Autotraded strategies of the person. Paginated endpoint.

Query
PersonIdinteger or null(int64)required

PersonId

Accountstring

The Autotrade account (optional)

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(AutotradedStrategyDTO)

Result array

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

GetAutotraders

Request

A list of Autotraders. Paginated endpoint.

Query
StrategyIdinteger or null(int64)

(Optional) StrategyId filter

BrokerIdinteger or null(int32)

(optional) The Autotrade BrokerId

WhiteLabelSiteIdinteger or null(int64)

(optional) The White Label Site Id

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(AutotradedStrategyDTO)

Result array

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

GetAutotradeSettings

Request

The Autotrade Settings. Non-paginated endpoint.

Query
PersonIdinteger or null(int64)required

PersonId

Accountstring

(Optional) Account

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(AutotradeSettingsDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "personId": 0, "firstName": "string", "lastName": "string", "email": "string", "country": "string", "state": "string", "language": "string", "siteDomain": "string", "brokerId": 0, "connection": "string", "introducingBrokerId": 0, "introducingBroker": "string", "strategyId": 0, "strategyName": "string", "account": "string", "accountType": 0, "brokerUserID": "string", "currency": "string", "salesRepId": 0, "salesRep": "string", "isTradeLeader": true, "isManualDiscardedPosition": true, "isConfirmationNeeded": true, "isSyncEnabled": true, "willSyncToOpenStocksUSA": true, "willSyncToOpenStocksEurope": true, "willSyncToOpenOptionsUSA": true, "willSyncToOpenOptionsEurope": true, "willSyncToOpenFuturesUSA": true, "willSyncToOpenFuturesEurope": true, "willSyncToOpenFuturesAsia": true, "willSyncToOpenForex": true, "lastSyncStocksUSA": "2019-08-24T14:15:22Z", "lastSyncStocksEurope": "2019-08-24T14:15:22Z", "lastSyncOptionsUSA": "2019-08-24T14:15:22Z", "lastSyncOptionsEurope": "2019-08-24T14:15:22Z", "lastSyncFuturesUSA": "2019-08-24T14:15:22Z", "lastSyncFuturesEurope": "2019-08-24T14:15:22Z", "lastSyncFuturesAsia": "2019-08-24T14:15:22Z", "lastSyncForex": "2019-08-24T14:15:22Z", "isBrokerEnabled": true, "isAutotradeDisabled": true, "isAutotradeDisabledReason": "string", "syncDisabledReason": "string", "firstBrokerActivationDate": "2019-08-24T14:15:22Z", "netLiquidationValue": 0.1, "netLiquidationValueDate": "2019-08-24T14:15:22Z", "virtualLimitOrdersEnabled": true, "scalingPercentage": 0.1, "settingsLastUpdateUTC": "2019-08-24T14:15:22Z", "approved": true, "enabledFutures": true, "futuresLong": true, "futuresShort": true, "minFutures": 0, "maxFutures": 0, "enabledForex": true, "forexEnabledLong": true, "forexEnabledShort": true, "forexLotSize": 0, "minForex": 0, "maxForex": 0, "enabledStocks": true, "stocksLong": true, "stocksShort": true, "maxStocksDollars": 0, "tradeStocksAsCFD": true, "enabledOptions": true, "optionsLong": true, "optionsShort": true, "minOptions": 0, "maxOptions": 0 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

SetAutotradeSettings

Request

Enable or disable Autotrade or Autosync in the specified account.

Bodyapplication/jsonrequired
accountstring or null

The Autotrade account

personIdinteger or null(int64)

The C2 PersonID

brokerIdinteger or null(int32)

The C2 PersonID

isAutotradeEnabledboolean or null

Set to TRUE if you want to enable the account for Autotrade. The StartAutotrade endpoint will automatically enable this setting. It may be disabled if your account is delinked by the broker, or if we detect rare unexpected activity in your account such as a margin call, pattern day trader, account becomes restricted by the broker, etc.

isAutoSyncEnabledboolean or null

Set to TRUE if you want to enable or disable AutoSync for the account. AutoSync automatically gets disabled whenever an external (i.e. non-C2) order is executed in the account.

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

Responses

OK

Bodyapplication/json
resultsArray of booleans or null

Result array

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

GetDashBoard

Request

Request the Person's Autotraded strategies and a performance summary. Non-paginated endpoint.

Query
PersonIdinteger or null(int64)required

PersonId

Accountstringrequired

The brokerage Account

curl -i -X GET \
  'https://api4-general.collective2.com/Autotrade/GetDashBoard?Account=string&PersonId=0' \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
resultsArray of objects or null(DashBoardItemDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "personId": 0, "brokerName": "string", "account": "string", "strategyId": 0, "strategyName": "string", "startDate": "2019-08-24T14:15:22Z", "todayReturn": 0.1, "totalReturn": 0.1 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

SearchAccounts

Request

Request a list of Autotrade and Papertrade accounts. Partial matches will be returned. Paginated endpoint. Only visible to the account owner or White-label site owner

Query
Accountstring

The Autotrade account (optional)

PersonIdinteger or null(int64)

PersonId (optional)

BrokerIdinteger or null(int32)

The Autotrade BrokerId (optional)

FirstNamestring

The FirstName (optional). Not case-sensitive

LastNamestring

The FirstName (optional). Not case-sensitive

Emailstring

The Email (optional)

WhiteLabelSiteIdinteger or null(int64)

The White Label site Id (optional)

CountryCodestring

The person's country code. Not case-sensitive (optional)

IPAddressstring

The person's last known IP address (optional)

Phonestring

The Phone number (optional)

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(AccountDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "personId": 0, "account": "string", "brokerName": "string", "brokerId": 0, "firstName": "string", "lastName": "string", "email": "string", "language": "string", "whiteLabelSiteId": 0, "geoSite": "string", "countryCode": "string", "divisionCode": "string", "authenticatedDate": "2019-08-24T14:15:22Z" } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetAutotradeActiveOrders

Request

Request the Working orders of the Account. Non-paginated endpoint.

Query
Accountstringrequired

The Brokerage Account

PersonIdinteger or null(int64)required

The PersonId owning the account

StrategyIdinteger or null(int64)

(Optional) StrategyId filter

curl -i -X GET \
  'https://api4-general.collective2.com/Autotrade/GetAutotradeActiveOrders?Account=string&PersonId=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, "avgPx": 0.1, "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, "parkedUntilDate": null, "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": [ {} ] } }

GetAutotradeHistoricalOrders

Request

Request the historical orders of the Account. Paginated endpoint.

Query
Accountstringrequired

Brokerage Account filter

PersonIdinteger or null(int64)required

The PersonId owning the account

BrokerIdinteger or null(int32)

BrokerId (Optional)

StrategyIdinteger or null(int64)

StrategyId (Optional)

OrderStatusstring

'A' = PendingNew, '0' = Working, '1' = Partially filled, '2' = Filled, '4' = Canceled, '5' = Replaced, '6' = Pending Cancel, '8' = Rejected, 'C' = Expired, 'E' = Pending Replace (Optional)

StartDatestring or null(date-time)

StartDate (Optional)

EndDatestring or null(date-time)

EndDate (Optional)

curl -i -X GET \
  'https://api4-general.collective2.com/Autotrade/GetAutotradeHistoricalOrders?Account=string&PersonId=0' \
  -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, "avgPx": 0.1, "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, "parkedUntilDate": null, "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": [ {} ] } }

GetAutoTradeOpenPositions

Request

Request the open positions of the Account. Non-paginated endpoint.

Query
Accountstringrequired

Brokerage Account filter

StrategyIdinteger or null(int64)

(Optional) StrategyId filter

curl -i -X GET \
  'https://api4-general.collective2.com/Autotrade/GetAutoTradeOpenPositions?Account=string' \
  -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": [ { "strategyId": 0, "quantity": 0.1, "avgPx": 0.1, "c2Symbol": {}, "exchangeSymbol": {}, "strategyName": "string", "currency": "string", "openedDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

NewAutotradeOrder

Request

Send a new closing order to the specified account. Only Stop and Limit OrderTypes are supported. Non-paginated endpoint.

Bodyapplication/jsonrequired
accountstring or null

The Autotrade account

personIdinteger or null(int64)

The C2 PersonID

orderobject(OrderDTO)
curl -i -X POST \
  https://api4-general.collective2.com/Autotrade/NewAutotradeOrder \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{}'

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, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

CancelAutotradeOrder

Request

Cancel an order in the specified account. Auto Stop-Loss orders are not currently supported. Non-paginated endpoint.

Query
Accountstringrequired

The Autotrade account

PersonIdinteger or null(int64)required

The C2 PersonID

OrderIdstringrequired

The OrderID to be cancelled

curl -i -X DELETE \
  'https://api4-general.collective2.com/Autotrade/CancelAutotradeOrder?Account=string&OrderId=string&PersonId=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, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

ReplaceAutotradeOrder

Request

Cancel/Replace an open closing order in the specified account. Only strategy and manual exit orders are currently supported.

Bodyapplication/jsonrequired
accountstring or null

The Autotrade account

personIdinteger or null(int64)

The C2 PersonID

orderIdstring or null

The OrderID to be replaced

pricenumber or null(double)

The new Order price

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

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, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetBrokers

Request

Get a list of Autotrade brokers. Non-Paginated endpoint.

Query
IncludeDisabledboolean or null

Include the disabled brokers. Default is FALSE. (optional)

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(BrokerDTO)

Result array

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

StartAutotrade

Request

Start or modify an Autotrade setup. Non-paginated endpoint.

Bodyapplication/jsonrequired
accountstring or null

The Autotrade account

personIdinteger or null(int64)

The C2 PersonID

brokerIdinteger or null(int32)

The BrokerId

strategyIdinteger or null(int64)

The StrategyId

scalingPercentageinteger(int64)

The Autotrade Scaling factor. e.g. Enter 105 for 105%

futuresEnabledboolean

(optional) TRUE to enable the Futures asset class when autotrading this strategy. Default is FALSE

Default false
maxFuturesinteger or null(int32)

(optional) Set a maximum number of contracts to hold in a position for this strategy

forexEnabledboolean

(optional) TRUE to enable autotrading Forex for this strategy. Default is FALSE

Default false
maxForexinteger or null(int32)

(optional) Set a maximum number of units (each unit on C2 is 1000 currency units) to hold in a position for this strategy

stocksEnabledboolean

(optional) TRUE to enable autotrading Stocks for this strategy. Default is FALSE

Default false
maxStocksDollarsinteger or null(int32)

(optional) Set a maximum number of dollars to hold in a position for this strategy (no decimals)

optionsEnabledboolean

(optional) TRUE to enable autotrading Options for this strategy. Default is FALSE

Default false
shortOptionsEnabledboolean

(optional) TRUE to enable the shorting of Options when autotrading this strategy. Default is FALSE

Default false
maxOptionsinteger or null(int32)

(optional) Set a maximum number of contracts to hold in a position for this strategy

doNotJoinCurrentSystemPositionsboolean or null

(optional) TRUE to prevent joining currently open positions in the strategy. Only applies to new Autotrade setups: this setting must not be set when modifing an existing Autotrade setup.

Default null
autoStopLossinteger or null(int64)

(optional) Dollar value of the automated stop loss which will rest in addition to the strategy stop loss orders

accountUserNamestring or null

(optional) The Brokerage account username. Only needed for specific Brokers, please enquire with support at help@collective2.com

accountPasswordstring or null

(optional) The Brokerage account password. Only needed for specific Brokers, please enquire with support at help@collective2.com

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

Responses

OK

Bodyapplication/json
boolean
Response
application/json
true

StopAutotrade

Request

Stop a autotrade setup. Non-paginated endpoint.

Query
Accountstringrequired

The Autotrade account

PersonIdinteger or null(int64)required

The C2 PersonID

StrategyIdinteger or null(int64)required

The StrategyId

BrokerIdinteger or null(int32)

The BrokerId

LeavePositionsOpenboolean

TRUE to leave positions open in the autotraded account. Default is FALSE

TerminateStrategySubscriptionboolean

TRUE to stop the Strategy subscription. Default is FALSE

curl -i -X DELETE \
  'https://api4-general.collective2.com/Autotrade/StopAutotrade?Account=string&PersonId=0&StrategyId=0' \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'

Responses

OK

Bodyapplication/json
boolean
Response
application/json
true

GetSimResults

Request

Return SIM trading results for all subscribers who are using “free sims.”. Non-Paginated endpoint.

Query
PersonIdinteger or null(int64)

PersonId (optional)

WhiteLabelSiteIdinteger or null(int64)

The WhiteLabel SiteId (optional)

ActiveOnlyboolean

Set to FALSE to get the full history of all Simulation results (optional). Default is TRUE

MaxAccountDaysinteger or null(int32)

The maximum account number of days to include (optional). Maximum default value is 365 days

MinLoginDaysinteger or null(int32)

The minimum number of days since the user logged in (optional)

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(SimResultDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "personId": 0, "firstName": "string", "lastName": "string", "email": "string", "account": "string", "strategyId": 0, "strategyName": "string", "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "startEquity": 0, "endEquity": 0, "totalReturn": 0.1, "totalDelta": 0.1, "scalingFactor": 0 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

ResetPaperTrade

Request

Reset the specified PaperTrade account.

Bodyapplication/jsonrequired
accountstring or null

The Autotrade account

personIdinteger or null(int64)

The C2 PersonID

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

Responses

OK

Bodyapplication/json
resultsArray of booleans or null

Result array

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

Hello

Request

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

Bodyapplication/jsonrequired
namestring or null

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 '{}'

Responses

OK

Bodyapplication/json
resultsArray of strings or null

Result array

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

GetProfile

Request

Request details of a Person. Public profiles are visible to all. Private profile information will only be visible to the account owner. Non-paginated endpoint.

Query
PersonIdinteger or null(int64)

The C2 PersonId. If omitted, the requester's information will be returned.

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(PersonDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "alias": "string", "firstName": "string", "lastName": "string", "email": "string", "phone": "string", "isPhoneVerified": true, "language": "string", "whiteLabelSiteId": 0, "countryCode": "string", "divisionCode": "string", "created": "2019-08-24T14:15:22Z", "lastLoggedIn": "2019-08-24T14:15:22Z", "lastIP": "string", "isEmailValidated": true, "isAlive": true, "approvedAccounts": [], "isManager": true, "isInvestor": true, "geoSite": "string", "isGeoSiteAdmin": true, "supportCompanyName": "string", "supportSiteURL": "string", "supportEmail": "string" } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

SearchProfiles

Request

Search profiles using any field combination. Partial matches will be returned. Paginated endpoint. Only Admins, Geo and White-Label Admins can access this endpoint. If you're a GeoSite admin, you will see all your GeoSite members including your WhiteLabel members. If you're a WhiteLabel admin, you will see your WhiteLabel members, but not other GeoSite members. If you're neither, you will get a 403 error.

Query
PersonIdinteger or null(int64)

The C2 PersonId (optional)

FirstNamestring

The FirstName. Not case-sensitive (optional)

LastNamestring

The FirstName. Not case-sensitive (optional)

Emailstring

The Email. Not case-sensitive (optional)

WhiteLabelSiteIdinteger or null(int64)

The White Label site Id (optional)

CountryCodestring

The person's country code. Not case-sensitive. (optional) See https://en.wikipedia.org/wiki/ISO_3166-2

DivisionCodestring

The person's subdivision (e.g. provinces or states). Not case-sensitive. (optional) See https://en.wikipedia.org/wiki/ISO_3166-2

IPAddressstring

The person's last known IP address (optional)

Phonestring

The verified Phone number (optional)

IsAliveboolean or null

The Person's Status (optional)

IsEmailValidatedboolean or null

The Person's email validation status (optional)

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(PersonDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "alias": "string", "firstName": "string", "lastName": "string", "email": "string", "phone": "string", "isPhoneVerified": true, "language": "string", "whiteLabelSiteId": 0, "countryCode": "string", "divisionCode": "string", "created": "2019-08-24T14:15:22Z", "lastLoggedIn": "2019-08-24T14:15:22Z", "lastIP": "string", "isEmailValidated": true, "isAlive": true, "approvedAccounts": [], "isManager": true, "isInvestor": true, "geoSite": "string", "isGeoSiteAdmin": true, "supportCompanyName": "string", "supportSiteURL": "string", "supportEmail": "string" } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

UpdateProfile

Request

Update an existing C2 profile. Not available. Please contact us if you need this endpoint.

Bodyapplication/jsonrequired
personIdinteger or null(int64)

The C2 PersonId

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(AddPersonResponseDTO)

Result array

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

GetInvestorPlanSubscriptions

Request

Request details of a Person's strategy subscriptions. Paginated endpoint

Query
PersonIdinteger or null(int64)required

The C2 PersonId

ActiveOnlyboolean

Set to FALSE to get all transactions (optional). Default is TRUE

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(SubscriptionDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "personId": 0, "licenseType": "string", "licenseTypeId": 0, "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "isRecurring": true, "cost": 0.1 } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetManagerPlanSubscriptions

Request

Request details of a Person's strategy manager subscriptions. Paginated endpoint

Query
PersonIdinteger or null(int64)required

The C2 PersonId

ActiveOnlyboolean

Set to FALSE to get all transactions (optional). Default is TRUE

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(SubscriptionDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "personId": 0, "licenseType": "string", "licenseTypeId": 0, "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "isRecurring": true, "cost": 0.1 } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetSubscribedStrategies

Request

Request the subscribed strategies of the person. Paginated endpoint.

Query
PersonIdinteger or null(int64)required

PersonId

ActiveOnlyboolean

Set to FALSE to get all transactions (optional). Default is TRUE

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(SubcribedStrategyDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "personId": 0, "strategyId": 0, "strategyName": "string", "isSimulation": true, "isPaperTrade": true, "isAlive": true, "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "monthlyCost": 0.1 } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetAccessKey

Request

Get the requester's APIKey Role and expiration

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(AccessKeyDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "accessKey": "string", "personId": 0, "firstName": "string", "lastName": "string", "email": "string", "whiteLabelSiteId": 0, "role": "string", "message": "string", "createDate": "2019-08-24T14:15:22Z", "deleteDate": "2019-08-24T14:15:22Z", "comment": "string" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

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, "isPrivate": true, "aum": 0, "auM_NumberOfAccounts": 0, "return": 0.1, "returnLabel": "string", "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, "numWinners": 0, "numLosers": 0, "percentWinTrades": 0.1, "sumDollarWinners": 0.1, "sumDollarLosers": 0.1, "numMonths": 0, "winMonthsInUI": 0, "winMonths": 0.1, "winMonthsRatio": 0.1, "maxDrawdown": 0.1, "maxDrawdownDays": 0.1, "maxDrawdownStartDate": "string", "maxDrawdownEndDate": "string", "avgWinDollars": 0.1, "avgLossDollars": 0.1, "avgTradeDuration": 0.1, "correlationSP500": 0.1, "sP500Return": 0.1, "returnVsSP500": 0.1, "avgLeverage": 0.1, "maxLeverage": 0.1, "correlationToSP500": 0.1, "alpha": 0.1, "beta": 0.1, "treynor": 0.1, "sortino": 0.1, "sharpe": 0.1, "calmar": 0.1 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

SearchStrategies

Request

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

Query
SecurityTypestring

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

CreatedBeforeDatestring

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

StrategyNamestring

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)

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, "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

(optional) SecurityType filter. e.g. Stocks = 'CS', Futures = 'FUT', Options = 'OPT', Forex = '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, "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

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

StartDate (Optional)

EndDatestring

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)

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/jsonrequired
orderobject(OrderDTO)
curl -i -X POST \
  https://api4-general.collective2.com/Strategies/NewStrategyOrder \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{}'

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, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "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, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

ReplaceStrategyOrder

Request

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

Bodyapplication/jsonrequired
orderobject(OrderDTO)
curl -i -X PUT \
  https://api4-general.collective2.com/Strategies/ReplaceStrategyOrder \
  -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{}'

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, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetStrategyActiveOrders

Request

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

Query
StrategyIdsArray of integers(int64)required

A list of Strategy IDs

SecurityTypestring

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

OrderTypestring

(optional) OrderType filter. e.g. '1' = Market, '2' = Limit, '3' = Stop

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, "avgPx": 0.1, "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, "parkedUntilDate": null, "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 integers(int64)required

A list of Strategy IDs

SecurityTypestring

(optional) SecurityType filter. e.g. Stocks = 'CS', Futures = 'FUT', Options = 'OPT', Forex = '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": [ { "strategyId": 0, "quantity": 0.1, "avgPx": 0.1, "c2Symbol": {}, "exchangeSymbol": {}, "strategyName": "string", "currency": "string", "openedDate": "2019-08-24T14:15:22Z" } ], "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

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

StartDatestring

UTC StartDate (Optional)

EndDatestring

UTC EndDate (Optional)

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, "avgPx": 0.1, "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, "parkedUntilDate": null, "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/jsonrequired
strategyNamestring or null

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 '{}'

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/jsonrequired
strategyIdinteger or null(int64)

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 '{}'

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 monthly returns for the strategy. Non-paginated endpoint.

Query
StrategyIdinteger or null(int64)required

The Strategy ID to get data for

CommissionPlanstringrequired

(Optional) The commission plan to use. The default C2 web site CommissionPlan is used if none is specified. Available values: 0 = Default, 1 = C2Europe, 3 = IB, 4 = Tradovate, 5 = StoneX

curl -i -X GET \
  'https://api4-general.collective2.com/Strategies/GetStrategyHistoricalEquity?CommissionPlan=string&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, "monthlyResults": [] } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetStrategyHistoricalDailyEquity

Request

Returns daily returns for the strategy. Non-paginated endpoint.

Query
StrategyIdinteger or null(int64)required

The Strategy ID to get data for

CommissionPlanstringrequired

(Optional) The commission plan to use. The default C2 web site CommissionPlan is used if none is specified. Available values: 0 = Default, 1 = C2Europe, 3 = IB, 4 = Tradovate, 5 = StoneX

curl -i -X GET \
  'https://api4-general.collective2.com/Strategies/GetStrategyHistoricalDailyEquity?CommissionPlan=string&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, "monthlyResults": [] } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }

GetStrategyHistoricalClosedTrades

Request

Returns the historical closed trades of the strategy. The difference between an order and a trade is trades group orders on 'tradeid', much like you would see on our web site. Non-paginated endpoint.

Query
CommissionPlanstringrequired

(Optional) The commission plan to use. The default web site CommissionPlan is used if none is specified. Available values: 0 = Default, 1 = C2Europe, 3 = IB, 4 = Tradovate, 5 = StoneX

StrategyIdinteger or null(int64)

The StrategyId

PersonIdinteger or null(int64)

(optional) The PersonId who will view the information. Available to WhiteLabel and GeoSite admins only. Default is the requester's PersonId

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(HistoricalTradeDTO)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "tradeId": 0, "strategyId": 0, "openDate": "2019-08-24T14:15:22Z", "closeDate": "2019-08-24T14:15:22Z", "avgOpenFillPrice": 0.1, "avgCloseFillPrice": 0.1, "openedQuantity": 0.1, "closedQuantity": 0.1, "openSide": "1", "closeSide": "1", "profitLoss": 0.1, "commission": 0.1, "maxDrawdown": 0.1, "maxDrawdown_DateCalculated": "2019-08-24T14:15:22Z", "maxDrawdown_WorstPrice": 0.1, "maxDrawdown_WorstPriceDate": "2019-08-24T14:15:22Z", "maxDrawdown_StrategyEquity": 0.1, "maxDrawdown_EntryPrice": 0.1, "maxDrawdown_OpenQuantity": 0.1, "c2Symbol": {}, "exchangeSymbol": {} } ], "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/jsonrequired
strategyIdinteger or null(int64)

The C2 StrategyId

positionsArray of objects or null(PositionBase)

The list of positions that must exist in the strategy. Quantity must be non-zero. To close a position, simply omit it from the Positions array. Sending an empty Positions array will close all positions.

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

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

SetDesiredPositionsV2

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/jsonrequired
strategyIdinteger or null(int64)

The C2 StrategyId

positionsArray of objects or null(PositionBase)

The list of positions that must exist in the strategy. Quantity must be non-zero. To close a position, simply omit it from the Positions array. Sending an empty Positions array will close all positions.

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(DesiredPositionResponseDTOV2)

Result array

responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "newSignals": [], "canceledSignals": [], "rejectedSignals": [] } ], "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

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

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/jsonrequired
personIdinteger or null(int64)

The C2 PersonId

watchListIdinteger or null(int64)

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

modificationSourcestring or null

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

modificationActionstring or null

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

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 '{}'

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

ModificationSourcestringrequired

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

ModificationActionstringrequired

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

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

GetSupportedSymbols

Request

Request a list of supported Futures and Forex symbols. All US stocks > $5 and all US equity options are supported by default so they will not be sent in the response. We will include a few non-standard stock symbols that require special C2 symbology. Paginated and cached endpoint.

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

Responses

OK

Bodyapplication/json
resultsArray of objects or null(SupportedSymbolDTO)

Result array

paginationobject(PaginationProperties)
responseStatusobject(ResponseStatus)
Response
application/json
{ "results": [ { "id": 0, "currency": "string", "description": "string", "pointValue": 0.1, "tickSize": 0.1, "decimalPrecision": 0, "c2Symbol": {}, "exchangeSymbol": {}, "marginRequirements": {} } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ {} ] } }