This article explains how to set the “Security Preferences” to an entity in eclipse using the api. Security preference are those ticket specific preferences such as exclude from rebalance, min trade amounts, max trade amounts, buy and sell priorities and more.

Levels
These preferences can be set at different levels or entities in eclipse. These values are acceptable for the “level” json property.
- Firm
- Team
- Model
- Portfolio
- Account
Multiple (Mass) Updating
The endpoint described here has the ability to update multiple entities with a single call. But there is a very important distinction when updating a single entity vs. multiple enitities.
There is a very important distinction and difference in functionality when Updating multiple entities at one time, vs. updating a single entity. When updating multiple entities, it does not attempt to merge the list of security settings with existing settings. The list of securities and preferences included in this call will make all entities provided match the list provided. If you only want to add a security, and leave all other securities alone, then you cannot use the mass update endpoint. If you want to make all entities have the same securities and preferences, then you can use the mass update endpoint.
API Endpoint for multiple entities: https://test.orioneclipse.com/v1/preference/Action/massUpdateAll/securityPreferences
API Help Doc: https://api.orioneclipse.com/doc/#api-Preferences-MassUpdateSecurityPreferences
{
"level": "Account",
"id": null,
"ids": [
973,
1008,
952
],
"securityPreferences": {
"id": null,
"preferenceId": 103,
"addSecurities": [
{
"id": 867,
"securityName": "Apple Inc",
"securityType": "Equity",
"symbol": "AAPL",
"redemptionFeeTypeId": 1,
"redemptionFeeAmount": null,
"redemptionFeeDays": null,
"sellTradeMinAmtBySecurity": 1,
"sellTradeMinPctBySecurity": null,
"buyTradeMinAmtBySecurity": null,
"buyTradeMinPctBySecurity": null,
"buyTradeMaxAmtBySecurity": null,
"buyTradeMaxPctBySecurity": null,
"sellTradeMaxAmtBySecurity": 5555555,
"sellTradeMaxPctBySecurity": null,
"taxableDivReInvest": null,
"taxDefDivReinvest": null,
"taxExemptDivReinvest": null,
"capGainReinvestTaxable": null,
"capGainsReinvestTaxExempt": null,
"capGainsReinvestTaxDef": null,
"sellTransactionFee": null,
"buyTransactionFee": null,
"custodianRedemptionFeeTypeId": null,
"custodianRedemptionDays": null,
"custodianRedemptionFeeAmount": null,
"custodianRedemptionFeeMinAmount": null,
"custodianRedemptionFeeMaxAmount": null,
"excludeHolding": null,
"sellPriority": null,
"buyPriority": null,
"tBuyPriority": 0,
"tSellPriority": 0,
"teBuyPriority": 0,
"teSellPriority": 0,
"tdBuyPriority": 0,
"tdSellPriority": 0,
"minInitialBuyAmount": null,
"alternatives": [],
"tlh": [],
"doNotTLH": null,
"isAdd": true,
"isEdit": false,
"taxableAlternate": null,
"taxDeferredAlternate": null,
"taxExemptAlternate": null
},
{
"id": 183,
"securityName": "Microsoft Corp",
"securityType": "Equity",
"symbol": "MSFT",
"redemptionFeeTypeId": 1,
"redemptionFeeAmount": null,
"redemptionFeeDays": null,
"sellTradeMinAmtBySecurity": null,
"sellTradeMinPctBySecurity": 1,
"buyTradeMinAmtBySecurity": null,
"buyTradeMinPctBySecurity": null,
"buyTradeMaxAmtBySecurity": null,
"buyTradeMaxPctBySecurity": null,
"sellTradeMaxAmtBySecurity": null,
"sellTradeMaxPctBySecurity": 85,
"taxableDivReInvest": true,
"taxDefDivReinvest": true,
"taxExemptDivReinvest": false,
"capGainReinvestTaxable": null,
"capGainsReinvestTaxExempt": null,
"capGainsReinvestTaxDef": null,
"sellTransactionFee": null,
"buyTransactionFee": null,
"custodianRedemptionFeeTypeId": null,
"custodianRedemptionDays": null,
"custodianRedemptionFeeAmount": null,
"custodianRedemptionFeeMinAmount": null,
"custodianRedemptionFeeMaxAmount": null,
"excludeHolding": true,
"sellPriority": 1,
"buyPriority": 5,
"tBuyPriority": 0,
"tSellPriority": 0,
"teBuyPriority": 0,
"teSellPriority": 0,
"tdBuyPriority": 0,
"tdSellPriority": 0,
"minInitialBuyAmount": null,
"alternatives": [],
"tlh": [],
"doNotTLH": null,
"isAdd": true,
"isEdit": false,
"taxableAlternate": null,
"taxDeferredAlternate": null,
"taxExemptAlternate": null
}
],
"editSecurities": [],
"deleteSecurities": [],
"resetToParent": false,
"isSetFromParent": true
}
}
Single Entity
When updating a single entity, You are “editing” the existing list of securities. This is done by modifying these 3 collections on the json object. addSecurities[], editSecurities[], deleteSecurities[] collections.
For example, if the only thing you need to do is a add a new security to the existing list, you would only need to provide the new security preference object in the addSecurities[].
If you are editing an existing security preference, you will need to provide that security in the editSecurities collection.
Existing Security preferences for an entity can be retrieved using this endpoint.
API PUT Endpoint for single entity: https://test.orioneclipse.com/v1/preference/Action/updateAll/securityPreferences
Endpoint Help Doc: https://api.orioneclipse.com/doc/#api-Preferences-UpdateAllPreferences
The only change in payload from the mass update, is to use the “id” property, and not the “ids”[] array.
{
"level": "Account",
"id": 973,
"ids": null,
"securityPreferences": {
"id": 2313,
"preferenceId": 103,
"addSecurities": [],
"editSecurities": [
{
"tlh": [],
"alternatives": [],
"redemptionFeeTypeId": 2,
"redemptionFeeAmount": null,
"redemptionFeeDays": null,
"sellTradeMinAmtBySecurity": 2,
"sellTradeMinPctBySecurity": null,
"buyTradeMinAmtBySecurity": null,
"buyTradeMinPctBySecurity": null,
"sellTradeMaxAmtBySecurity": null,
"sellTradeMaxPctBySecurity": null,
"buyTradeMaxAmtBySecurity": null,
"buyTradeMaxPctBySecurity": null,
"taxableDivReInvest": null,
"taxDefDivReinvest": null,
"taxExemptDivReinvest": null,
"capGainReinvestTaxable": true,
"capGainsReinvestTaxDef": null,
"capGainsReinvestTaxExempt": null,
"custodianRedemptionFeeTypeId": null,
"custodianRedemptionFeeAmount": null,
"custodianRedemptionDays": null,
"excludeHolding": true,
"sellPriority": null,
"buyPriority": null,
"tBuyPriority": 0,
"tSellPriority": 0,
"teBuyPriority": 0,
"teSellPriority": 0,
"tdBuyPriority": 0,
"tdSellPriority": 0,
"doNotTLH": false,
"sellTransactionFee": 15,
"buyTransactionFee": null,
"minInitialBuyAmount": null,
"securityName": "Ford Motor Company",
"id": 426,
"isAdd": false,
"isEdit": true,
"securityType": "Equity",
"symbol": "F",
"taxableAlternate": null,
"taxDeferredAlternate": null,
"taxExemptAlternate": null
}
],
"deleteSecurities": [],
"resetToParent": false,
"isSetFromParent": false
}
}