Development Guides

Trade Instance Fields

Trade Instances have some metadata fields that provide information on how a Trade Instance was created. These fields are optional in most API requests, if they are part of the schema. If they are not in the schema, the API will generally determine those values automatically.

NOTE: These values are for record keeping purposes only. Setting these values in an API request does not guarantee trading behavior. For example, if you generate a Quick Trade using the API and set these values to Tactical Tool values, the instance will show that it came from the Tactical Tool, despite the trade being handled as if it were a Quick Trade.

DO NOT DO THIS: Setting these values incorrectly can be misleading when viewing Trade Instances in the UI. The example below will generate a trade using the Quick Trade tool and the business rules appropriate to a Quick Trade, but the Trade Instance will look as if it came from the Tactical Tool.

POST api/v2/tradeorder/trades

{
    "application": "QuickTrades", //This is what dictates that you are doing a Quick Trade
    "trades": [
        {
            "action": 1,
            "isSendImmediately": false,
            "portfolioId": 227,
            "accountId": 127,
            "tradeShares": null,
            "tradePercent": null,
            "tradeAmount": 2100.57,
            "securityId": 13
        }
    ],
    "tradeToolSelection": 10, //10=Tactical Tool
    "tradeInstanceType": 7, //7=Tactical Tool
    "tradeInstanceSubType": 15 //15=Tactical Tool
}

Trade Instance Selection Method

Selection Method indicates which method was used to determine what Accounts were selected for trading.

IdValue
1Portfolio
2Account
3Model
4Account Trade Group
5Sleeve Portfolio
6Excel Import
7Portfolio Trade Group
8Security Import
9Individual Sleeve
10Tactical Tool

Trade Instance Type

IdValue
1Astro
2Cash Movements
3Global Trades
4Option Trading*
5Quick Trade
6Rebalance
7Tactical Tool
8Tax Harvesting
9Tax Ticker Swap
10Trade to Target
11Liquidate
* Option Trading is currently in closed beta.

Trade Instance Sub Type

IdValue
1Automated Losses
2ASTRO
3Cash Needs
4Focused Rebalance
5Full Location Rebalance
6Global Trades
7Manual Gains
8Manual Losses
9Option Trading*
10Partial Location Rebalance
11Quick Trade
12Raise Cash
13Spend Cash
14Standard Rebalance
15Tactical Tool
16Tax Ticker Swap
17Trade Import
18Trade to Target
19Journal Only Cash
20Journal Cash and Holdings
21Money Market Rebalance
22Liquidate
* Option Trading is currently in closed beta.