This article explains how to use the eclipse account api to enable/disable astro accounts, and assign the astro model (aka sma model).

API Endpoint:
PUT https://test.orioneclipse.com/api/v2/account/accounts/<eclipseaccountid>/Details?withReverseSync=true
property | description | required | datatype |
id | The eclipse account id. Recognize this is not the same Id for OrionConnect. | yes | Integer |
isDoNotBuySell | If true, then the account is trade blocked, and cannot be traded. | yes | boolean |
isCustodialRestriction | Indicates if the reason for the trade block is a custodian restriction. Informational only, no impact to logic. | no | boolean |
astroSettings.astroEnabled | Indicates if the account should be available to the Astro Optimizer for trading. | yes | boolean |
astroSettings.strategyName | Indicates the astro template/model name to be assigned when astroEnabled=true. | When astroEnabled=true | string |
astroSettings.eclipseModelId | Indicates the eclipse model id. If AstroEnabled=false, this should be set to null. | yes | Integer |
restrictedPlanId | Indicates the restricted plan this account is associated to. | no | Integer |
Example Payload:
Enable account (id 403) for Astro, assigning to template “Astro Core Global”, modelid 1117.
{
"id": 403,
"isDoNotBuySell": false,
"isCustodialRestriction": false,
"astroSetting": {
"astroEnabled": true,
"strategyName": "ASTRO Core Global",
"eclipseModelId": 1117
}
Disable account (id: 403) from astro.
{
"id": 403,
"isDoNotBuySell": false,
"isCustodialRestriction": false,
"astroSetting": {
"astroEnabled": false,
"strategyName": null,
"eclipseModelId": null
}