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, "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": [ { … } ] } }
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 '{ "Account": "string", "PersonId": 0, "BrokerId": 0 }'
{ "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>'