Development Guides

Accounts – Enable/Disable ASTRO Setting

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

propertydescriptionrequireddatatype
idThe eclipse account id. Recognize this is not the same Id for OrionConnect.yesInteger
isDoNotBuySellIf true, then the account is trade blocked, and cannot be traded.yesboolean
isCustodialRestrictionIndicates if the reason for the trade block is a custodian restriction. Informational only, no impact to logic.noboolean
astroSettings.astroEnabledIndicates if the account should be available to the Astro Optimizer for trading.yesboolean
astroSettings.strategyNameIndicates the astro template/model name to be assigned when astroEnabled=true.When astroEnabled=truestring
astroSettings.eclipseModelIdIndicates the eclipse model id. If AstroEnabled=false, this should be set to null.yesInteger
restrictedPlanIdIndicates the restricted plan this account is associated to.noInteger

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
}