API to automate your trading
API to automate your trading
When the Account was Authenticated. Some broker connections (e.g. CQG, Rithmic, ETNA, ORBIS, StoneX, Tradovate, TransACT) require the broker to approve the account, while others (e.g. IB) don't, in which case the date will be when the client setup Autotrading. NULL if never approved by the broker and it is a broker that requires account approval
{ "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" }
{ "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": [ { … } ] } }
{ "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, "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", "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 }
Option Underlying symbol. Read-only value sent in responses. It is ignored in requests.
Option expiry. Format is 'May21'. Read-only value sent in responses. It is ignored in requests.
Option 'put' or 'call'. Read-only value sent in responses. It is ignored in requests.
Option strike price. Read-only value sent in responses. It is ignored in requests.
{ "fullSymbol": "string", "symbolType": "string", "underlying": "string", "expiry": "string", "putOrCall": "string", "strikePrice": 0.1, "description": "string" }
The MIC Exchange code e.g. DEFAULT (for stocks & options), XCME, XEUR, XICE, XLIF, XNYB, XNYM, XASX, XCBF, XCBT, XCEC, XKBT, XSES. See details at http://www.iso15022.org/MIC/homepageMIC.htm
The MaturityMonthYear e.g. '202103' (March 2021), or if the contract requires a day: '20210521' (May 21, 2021)
{ "symbol": "string", "currency": "string", "securityExchange": "string", "securityType": "string", "maturityMonthYear": "string", "putOrCall": 0, "strikePrice": 0.1, "priceMultiplier": 0.1 }
{ "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": [ { … } ] } }
{ "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": [ { … } ] } }
GetAutotradeHistoricalOrders
'A' = PendingNew, '0' = Working, '1' = Partially filled, '2' = Filled, '4' = Canceled, '5' = Replaced, '6' = Pending Cancel, '8' = Rejected, 'C' = Expired, 'E' = Pending Replace (Optional)
Result size limit. We will enforce a max size limit for all endpoints. Default is 1000
{ "Account": "string", "PersonId": 0, "BrokerId": 0, "StrategyId": 0, "OrderStatus": "A", "StartDate": "2019-08-24T14:15:22Z", "EndDate": "2019-08-24T14:15:22Z", "Cursor": "string", "Limit": 0, "AscendingOrder": true }
{ "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": [ { … } ] } }
{ "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, "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", "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": [ { … } ] } }
{ "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": [ { … } ] } }
{ "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": [ { … } ] } }
{ "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": [ { … } ] } }
{ "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": [ { … } ] } }
{ "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": [ { … } ] } }
{ "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": [ { … } ] } }
{ "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": [ { … } ] } }
{ "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": [ { … } ] } }
{ "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" } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
{ "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
Result size limit. We will enforce a max size limit for all endpoints. Default is 1000
{ "StrategyId": 0, "StartDate": "string", "EndDate": "string", "StrategyOwnerPersonId": 0, "SubscriberPersonId": 0, "WhiteLabelSiteId": 0, "Cursor": "string", "Limit": 0, "AscendingOrder": true }
{ "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": [ { … } ] } }
ManageWatchList
The Type of list to modify. Valid values are 'LIST' (for the whole watchlist), 'MEMBER' (for the list items)
The change to make. Valid values are: ADD, DELETE
The WatchList Id. Required except when ModificationAction=ADD and ModificationSource=LIST
{ "PersonId": 0, "WatchListId": 0, "ModificationSource": "LIST", "ModificationAction": "ADD", "StrategyId": 0, "WatchListName": "string" }
NewAutotradeOrder
The OrderId. Only required in NewAutotradeOrder and ReplaceAutotradeOrder endpoints
'1' = Market, '2' = Limit, '3' = Stop
Enum Value | Description |
---|---|
1 | Market |
2 | Limit |
3 | Stop |
Only required in ReplaceAutotradeOrder endpoint. 'O' = Open, 'C' = Close
Enum Value | Description |
---|---|
O | Open |
C | Close |
The time in force. 0 = Day, 1 = Good Till Cancel (GTC)
Enum Value | Description |
---|---|
0 | Day |
1 | GTC |
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
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
Used to specify that this order is conditional (a child) on another
Used to indicate this order should not be synched in the brokerage account. Only applies to Opening non-market orders
{ "Account": "string", "PersonId": 0, "Order": { "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": { "fullSymbol": "string", "symbolType": "string", "underlying": "string", "expiry": "string", "putOrCall": "string", "strikePrice": 0.1, "description": "string" }, "exchangeSymbol": { "symbol": "string", "currency": "string", "securityExchange": "string", "securityType": "string", "maturityMonthYear": "string", "putOrCall": 0, "strikePrice": 0.1, "priceMultiplier": 0.1 }, "rejectMessage": "string" } }
NewStrategyOrder
The OrderId. Only required in NewAutotradeOrder and ReplaceAutotradeOrder endpoints
'1' = Market, '2' = Limit, '3' = Stop
Enum Value | Description |
---|---|
1 | Market |
2 | Limit |
3 | Stop |
Only required in ReplaceAutotradeOrder endpoint. 'O' = Open, 'C' = Close
Enum Value | Description |
---|---|
O | Open |
C | Close |
The time in force. 0 = Day, 1 = Good Till Cancel (GTC)
Enum Value | Description |
---|---|
0 | Day |
1 | GTC |
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
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
Used to specify that this order is conditional (a child) on another
Used to indicate this order should not be synched in the brokerage account. Only applies to Opening non-market orders
{ "Order": { "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": { "fullSymbol": "string", "symbolType": "string", "underlying": "string", "expiry": "string", "putOrCall": "string", "strikePrice": 0.1, "description": "string" }, "exchangeSymbol": { "symbol": "string", "currency": "string", "securityExchange": "string", "securityType": "string", "maturityMonthYear": "string", "putOrCall": 0, "strikePrice": 0.1, "priceMultiplier": 0.1 }, "rejectMessage": "string" } }
The OrderId. Only required in NewAutotradeOrder and ReplaceAutotradeOrder endpoints
'1' = Market, '2' = Limit, '3' = Stop
Enum Value | Description |
---|---|
1 | Market |
2 | Limit |
3 | Stop |
Only required in ReplaceAutotradeOrder endpoint. 'O' = Open, 'C' = Close
Enum Value | Description |
---|---|
O | Open |
C | Close |
The time in force. 0 = Day, 1 = Good Till Cancel (GTC)
Enum Value | Description |
---|---|
0 | Day |
1 | GTC |
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
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
Used to specify that this order is conditional (a child) on another
Used to indicate this order should not be synched in the brokerage account. Only applies to Opening non-market orders
{ "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": { "fullSymbol": "string", "symbolType": "string", "underlying": "string", "expiry": "string", "putOrCall": "string", "strikePrice": 0.1, "description": "string" }, "exchangeSymbol": { "symbol": "string", "currency": "string", "securityExchange": "string", "securityType": "string", "maturityMonthYear": "string", "putOrCall": 0, "strikePrice": 0.1, "priceMultiplier": 0.1 }, "rejectMessage": "string" }
The OrderId. Only required in NewAutotradeOrder and ReplaceAutotradeOrder endpoints
'1' = Market, '2' = Limit, '3' = Stop
Enum Value | Description |
---|---|
1 | Market |
2 | Limit |
3 | Stop |
Only required in ReplaceAutotradeOrder endpoint. 'O' = Open, 'C' = Close
Enum Value | Description |
---|---|
O | Open |
C | Close |
The time in force. 0 = Day, 1 = Good Till Cancel (GTC)
Enum Value | Description |
---|---|
0 | Day |
1 | GTC |
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
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
Used to specify that this order is conditional (a child) on another
Used to indicate this order should not be synched in the brokerage account. Only applies to Opening non-market orders
The order rejection message. Only available in response when OrderStatus = '8' (Rejected)
'A' = PendingNew, '0' = Working, '1' = Partially filled, '2' = Filled, '4' = Canceled, '5' = Replaced, '6' = Pending Cancel, '8' = Rejected, 'C' = Expired, 'E' = Pending Replace
The type of signal. 1 = StrategySignal, 4 = ManualSignal, 5 = StrategySignalManualOverride, 6 = AutoStopLoss
{ "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": { "fullSymbol": "string", "symbolType": "string", "underlying": "string", "expiry": "string", "putOrCall": "string", "strikePrice": 0.1, "description": "string" }, "exchangeSymbol": { "symbol": "string", "currency": "string", "securityExchange": "string", "securityType": "string", "maturityMonthYear": "string", "putOrCall": 0, "strikePrice": 0.1, "priceMultiplier": 0.1 }, "rejectMessage": "string", "brokerId": 0, "orderStatus": "string", "filledQuantity": 0.1, "avgFillPrice": 0.1, "postedDate": "2019-08-24T14:15:22Z", "signalType": 0, "info": "string" }
The list of approved brokerage accounts for this person
{ "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": [ { "personId": 0, "addedDate": "2019-08-24T14:15:22Z", "account": "string", "brokerId": 0, "connectionType": 0, "addedByPersonId": 0 } ], "isManager": true, "isInvestor": true, "geoSite": "string", "isGeoSiteAdmin": true }
{ "quantity": 0.1, "c2Symbol": { "fullSymbol": "string", "symbolType": "string", "underlying": "string", "expiry": "string", "putOrCall": "string", "strikePrice": 0.1, "description": "string" }, "exchangeSymbol": { "symbol": "string", "currency": "string", "securityExchange": "string", "securityType": "string", "maturityMonthYear": "string", "putOrCall": 0, "strikePrice": 0.1, "priceMultiplier": 0.1 } }
{ "quantity": 0.1, "c2Symbol": { "fullSymbol": "string", "symbolType": "string", "underlying": "string", "expiry": "string", "putOrCall": "string", "strikePrice": 0.1, "description": "string" }, "exchangeSymbol": { "symbol": "string", "currency": "string", "securityExchange": "string", "securityType": "string", "maturityMonthYear": "string", "putOrCall": 0, "strikePrice": 0.1, "priceMultiplier": 0.1 }, "strategyId": 0, "strategyName": "string", "currency": "string", "openedDate": "2019-08-24T14:15:22Z", "avgPx": 0.1 }
{ "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 } ], "pagination": { "prev_cursor": "string", "next_cursor": "string" }, "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }
ReplaceStrategyOrder
The OrderId. Only required in NewAutotradeOrder and ReplaceAutotradeOrder endpoints
'1' = Market, '2' = Limit, '3' = Stop
Enum Value | Description |
---|---|
1 | Market |
2 | Limit |
3 | Stop |
Only required in ReplaceAutotradeOrder endpoint. 'O' = Open, 'C' = Close
Enum Value | Description |
---|---|
O | Open |
C | Close |
The time in force. 0 = Day, 1 = Good Till Cancel (GTC)
Enum Value | Description |
---|---|
0 | Day |
1 | GTC |
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
Only available in NewStrategyOrder endpoint. The C2-formatted Price at which to place a exit conditional order
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
Used to specify that this order is conditional (a child) on another
Used to indicate this order should not be synched in the brokerage account. Only applies to Opening non-market orders
{ "Order": { "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": { "fullSymbol": "string", "symbolType": "string", "underlying": "string", "expiry": "string", "putOrCall": "string", "strikePrice": 0.1, "description": "string" }, "exchangeSymbol": { "symbol": "string", "currency": "string", "securityExchange": "string", "securityType": "string", "maturityMonthYear": "string", "putOrCall": 0, "strikePrice": 0.1, "priceMultiplier": 0.1 }, "rejectMessage": "string" } }
SearchAccounts
Result size limit. We will enforce a max size limit for all endpoints. Default is 1000
{ "Account": "string", "PersonId": 0, "BrokerId": 0, "FirstName": "string", "LastName": "string", "Email": "string", "WhiteLabelSiteId": 0, "CountryCode": "string", "IPAddress": "string", "Phone": "string", "Cursor": "string", "Limit": 0, "AscendingOrder": true }
SearchProfiles
The person's country code. Not case-sensitive. (optional) See https://en.wikipedia.org/wiki/ISO_3166-2
The person's subdivision (e.g. provinces or states). Not case-sensitive. (optional) See https://en.wikipedia.org/wiki/ISO_3166-2
Result size limit. We will enforce a max size limit for all endpoints. Default is 1000
{ "PersonId": 0, "FirstName": "string", "LastName": "string", "Email": "string", "WhiteLabelSiteId": 0, "CountryCode": "string", "DivisionCode": "string", "IPAddress": "string", "Phone": "string", "IsAlive": true, "IsEmailValidated": true, "Cursor": "string", "Limit": 0, "AscendingOrder": true }
SearchStrategies
(optional) SecurityType filter. e.g. Stocks = 'CS', Futures = 'FUT', Options = 'OPT', Forex = 'FOR'
(optional) Filter used to search old stategies. The date must be in ISO 8601 Date Format.
Search strategies on name (optional). Partial matches will be returned. Wildcards % and _ are supported
Result size limit. We will enforce a max size limit for all endpoints. Default is 1000
{ "SecurityType": "CS", "CreatedBeforeDate": "string", "StrategyName": "string", "StrategyOwnerPersonId": 0, "WhiteLabelSiteId": 0, "Cursor": "string", "Limit": 0, "AscendingOrder": true }
{ "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": [ { … } ] } }
SetAutotradeSettings
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.
{ "Account": "string", "PersonId": 0, "BrokerId": 0, "IsAutotradeEnabled": true, "IsAutoSyncEnabled": true }
{ "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 }
StartAutotrade
(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) Set a maximum number of units (each unit on C2 is 10000 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
{ "Account": "string", "PersonId": 0, "BrokerId": 0, "StrategyId": 0, "ScalingPercentage": 0, "FuturesEnabled": true, "MaxFutures": 0, "ForexEnabled": true, "MaxForex": 0, "StocksEnabled": true, "MaxStocksDollars": 0, "OptionsEnabled": true, "ShortOptionsEnabled": true, "MaxOptions": 0, "DoNotJoinCurrentSystemPositions": true, "AutoStopLoss": 0, "AccountUserName": "string", "AccountPassword": "string" }
TRUE if Strategy is a hidden for some users
The reason why it is private, if any
{ "id": 0, "strategyId": 0, "isAlive": true, "isHidden": true, "hiddenReason": "string", "isPrivate": true, "strategyName": "string", "startDate": "2019-08-24T14:15:22Z", "securityTypesEnabled": { "property1": true, "property2": true }, "monthlyCost": 0.1, "strategyOwnerId": 0, "whiteLabelSiteId": 0 }
TRUE if Strategy is a hidden for some users
The reason why it is private, if any
{ "strategyId": 0, "strategyName": "string", "isAlive": true, "startDate": "2019-08-24T14:15:22Z", "primarySecurityTypes": "string", "securityTypesEnabled": { "property1": true, "property2": true }, "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 }
Daily stats for the strategy. One row per date.
{ "strategyId": 0, "strategyName": "string", "startDate": "2019-08-24T14:15:22Z", "securityTypesEnabled": { "property1": true, "property2": true }, "monthlyCost": 0.1, "strategyOwnerId": 0, "dailyEquity": [ { "date": "2019-08-24T14:15:22Z", "equity": 0.1, "index": 0.1 } ], "monthlyResults": [ { "month": 0, "monthName": "string", "yearZeroName": 0, "yearOneName": 0, "yearTwoName": 0, "yearThreeName": 0, "yearFourName": 0, "yearZeroReturn": 0.1, "yearOneReturn": 0.1, "yearTwoReturn": 0.1, "yearThreeReturn": 0.1, "yearFourReturn": 0.1 } ] }
{ "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" }
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" }'
{ "results": [ "string" ], "responseStatus": { "errorCode": "string", "message": "string", "errors": [ { … } ] } }