API to automate your trading
API to automate your trading
curl -i -X GET \ 'https://api4-general.collective2.com/Autotrade/GetAutotradedStrategies?PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/Autotrade/GetAutotraders \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Autotrade/GetAutotradeSettings?PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
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.
curl -i -X PUT \ https://api4-general.collective2.com/Autotrade/SetAutotradeSettings \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ true ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Autotrade/GetDashBoard?Account=string&PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/Autotrade/SearchAccounts \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Autotrade/GetAutotradeActiveOrders?Account=string&PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Autotrade/GetAutotradeHistoricalOrders?Account=string&PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Autotrade/GetAutoTradeOpenPositions?Account=string' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X POST \ https://api4-general.collective2.com/Autotrade/NewAutotradeOrder \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ { "signalId": 0, "profitTargetSignalId": 0, "stopLossSignalId": 0, "exitSignalsOCAGroupId": 0, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X DELETE \ 'https://api4-general.collective2.com/Autotrade/CancelAutotradeOrder?Account=string&OrderId=string&PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "results": [ { "signalId": 0, "profitTargetSignalId": 0, "stopLossSignalId": 0, "exitSignalsOCAGroupId": 0, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X PUT \ https://api4-general.collective2.com/Autotrade/ReplaceAutotradeOrder \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ { "signalId": 0, "profitTargetSignalId": 0, "stopLossSignalId": 0, "exitSignalsOCAGroupId": 0, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/Autotrade/GetBrokers \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "results": [ { "id": 0, "name": "string", "isEnabled": true, "connectionName": "string" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
(optional) TRUE to enable the Futures asset class when autotrading this strategy. Default is FALSE
(optional) Set a maximum number of contracts to hold in a position for this strategy
(optional) TRUE to enable autotrading Forex for this strategy. Default is FALSE
(optional) Set a maximum number of units (each unit on C2 is 1000 currency units) to hold in a position for this strategy
(optional) TRUE to enable autotrading Stocks for this strategy. Default is FALSE
(optional) Set a maximum number of dollars to hold in a position for this strategy (no decimals)
(optional) TRUE to enable autotrading Options for this strategy. Default is FALSE
(optional) TRUE to enable the shorting of Options when autotrading this strategy. Default is FALSE
(optional) Set a maximum number of contracts to hold in a position for this strategy
(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.
(optional) Dollar value of the automated stop loss which will rest in addition to the strategy stop loss orders
(optional) The Brokerage account username. 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 '{}'
curl -i -X GET \ https://api4-general.collective2.com/Autotrade/GetSimResults \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X PUT \ https://api4-general.collective2.com/Autotrade/ResetPaperTrade \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ true ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X POST \ https://api4-general.collective2.com/General/Hello \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ "string" ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/General/GetProfile \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
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.
curl -i -X GET \ https://api4-general.collective2.com/General/SearchProfiles \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X PUT \ https://api4-general.collective2.com/General/UpdateProfile \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ { "personId": 0, "csrf": "string" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/General/GetInvestorPlanSubscriptions?PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/General/GetManagerPlanSubscriptions?PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/General/GetSubscribedStrategies?PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/General/GetAccessKey \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Strategies/GetStrategyDetails?StrategyId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/Strategies/SearchStrategies \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/Strategies/GetLeaderBoard \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Strategies/GetSubscribers?StrategyId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/Strategies/GetSubscriptionRevenue \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X POST \ https://api4-general.collective2.com/Strategies/NewStrategyOrder \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ { "signalId": 0, "profitTargetSignalId": 0, "stopLossSignalId": 0, "exitSignalsOCAGroupId": 0, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X DELETE \ 'https://api4-general.collective2.com/Strategies/CancelStrategyOrder?SignalId=0&StrategyId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "results": [ { "signalId": 0, "profitTargetSignalId": 0, "stopLossSignalId": 0, "exitSignalsOCAGroupId": 0, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X PUT \ https://api4-general.collective2.com/Strategies/ReplaceStrategyOrder \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ { "signalId": 0, "profitTargetSignalId": 0, "stopLossSignalId": 0, "exitSignalsOCAGroupId": 0, "parkedUntilDate": "2019-08-24T14:15:22Z" } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Strategies/GetStrategyActiveOrders?StrategyIds=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Strategies/GetStrategyOpenPositions?StrategyIds=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/Strategies/GetStrategyHistoricalOrders \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X POST \ https://api4-general.collective2.com/Strategies/AddStrategy \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ { "strategyId": 0 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X PUT \ https://api4-general.collective2.com/Strategies/UpdateStrategy \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ { "strategyId": 0 } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Strategies/GetStrategyHistoricalEquity?CommissionPlan=string&StrategyId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "results": [ { "strategyId": 0, "strategyName": "string", "startDate": "2019-08-24T14:15:22Z", "securityTypesEnabled": { … }, "monthlyCost": 0.1, "strategyOwnerId": 0, "monthlyResults": [ … ] } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Strategies/GetStrategyHistoricalDailyEquity?CommissionPlan=string&StrategyId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "results": [ { "strategyId": 0, "strategyName": "string", "startDate": "2019-08-24T14:15:22Z", "securityTypesEnabled": { … }, "monthlyCost": 0.1, "strategyOwnerId": 0, "monthlyResults": [ … ] } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Strategies/GetStrategyHistoricalClosedTrades?CommissionPlan=string' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X POST \ https://api4-general.collective2.com/Strategies/SetDesiredPositions \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ { "newSignals": [ … ], "canceledSignals": [ … ] } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
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 '{}'
{ "results": [ { "newSignals": [ … ], "canceledSignals": [ … ], "rejectedSignals": [ … ] } ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Strategies/GetWatchLists?PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
curl -i -X GET \ 'https://api4-general.collective2.com/Strategies/GetWatchListMembers?PersonId=0&WatchListId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }
The WatchList Id. Required except when ModificationAction=ADD and ModificationSource=LIST
The Type of list to modify. Valid values are 'LIST' (for the whole watchlist), 'MEMBER' (for the list items)
curl -i -X POST \ https://api4-general.collective2.com/Strategies/ManageWatchList \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>' \ -H 'Content-Type: application/json' \ -d '{}'
{ "results": [ true ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X DELETE \ 'https://api4-general.collective2.com/Strategies/ManageWatchList?ModificationAction=string&ModificationSource=string&PersonId=0' \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "results": [ true ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
curl -i -X GET \ https://api4-general.collective2.com/Strategies/GetSupportedSymbols \ -H 'Authorization: Bearer <YOUR_Bearer myAPIkey_HERE>'
{ "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": [ { … } ] } }