In some cases, Eclipse APIs return trade errors just as a set of Id/Argument pairs in JSON. Those will look like this:
{
"error": [
{
"tradeId": 0,
"errorMessageId": 14,
"errorMessageArguments": "1834502;3/15/2024 4:48:49 PM"
},
{
"tradeId": 0,
"errorMessageId": 93,
"errorMessageArguments": ""
}
]
}
The the meaningful part of the errors are a set of templates the UI uses to make them human readable. Using response data above, you can use the reference tables below to determine the actual error.
Each error has a severity level, an error code, and a message. The errorMessageId above corresponds to a message template below.
Trade Error Severity Definition
Each message has a severity level of Info, Warning or Error, defined as follows:
severityId | severityLevel |
---|---|
1 | Info |
2 | Warning |
3 | Error |
Trade Error Messages Definition
Error data in the response can be decoded by cross referencing the errorMessageId in the JSON to the table below. The placeholders in the template are resolved by applying the contents of errorMessageArguments in the order given to the errorMessage template. Using the sample at the top of this page, that gives you 2 errors:
Warning: Possible duplicate order – id 1834502 created 3/15/2024 4:48:49 PM
Warning: Security Already Traded
errorMessageId | severityId | code | errorMessage |
---|---|---|---|
1 | 3 | AccountNegativeValue | Account value is negative. |
2 | 3 | ProductZeroPrice | Holding ID {0} for stock_{1} is tradable, but has a price of $0.00. |
3 | 2 | Cash | Cash has an overage for the remaining sell amount, no trade needed. |
4 | 3 | CashTargetGreaterThan100 | Cash target is greater than {100}%. Check minimum cash settings. Target is {369.23531315399}%. |
5 | 2 | BuyAsset_PurchaseOnly | From asset is in ‘Hard Close’ status |
6 | 2 | SellAsset_HardClose | From asset is in ‘Hard Close’ status |
7 | 2 | SellAssetPurchaseOnly | From asset is in ‘Purchase Only’ status |
8 | 2 | SellAsset_SellOnly | From asset is in ‘Sell Only’ status |
9 | 2 | SellAsset_SoftClose | When an equivalent ticker is traded put the reason the primary ticker was skipped. |
10 | 3 | AccountNoModel | Model record does not exist. |
11 | 3 | InvalidModelAllocation | Model {0} does not add up to {100}%. Check model and exclusions. |
12 | 3 | NoAssets | No assets found for portfolio ID {0}. |
13 | 2 | Trade file error | No Trade file assigned; some exchange formats are not compatible with TOM. |
14 | 2 | Possible Duplicate | Possible duplicate order – id {0} created {1} |
15 | 2 | ShortTermFees | Short Term Fee |
16 | 2 | SWD | SWD |
17 | 2 | BuyAssetHardClose | To asset is in ‘Hard Close’ status |
18 | 2 | BuyAssetSellOnly | To asset is in ‘Sell Only’ status |
19 | 2 | BuyAsset_SoftClose | To asset is in ‘Soft Close’ status |
20 | 2 | BuyAssetSoftCloseNotOwned | To asset is in ‘Soft Close’ status |
21 | 3 | TradeBlockedAssetBuy | Trade blocked: buy |
22 | 3 | TradeBlockedAssetSell | Trade blocked: sell |
23 | 3 | TradeBlockedAccount | Trading blocked. |
24 | 2 | TradeAmountMore | The requested trade amount is more than what is available. The value is {0}. |
25 | 2 | OverspendCash | The selected buy amount will overspend cash. The current cash value is {0} and reserve cash is {1} |
26 | 2 | ODisabled | Order is disabled due to the security being excluded at account level. |
27 | 2 | NoCash | Not enough cash for account id |
28 | 2 | RPercent | Resulting percentage will be |
29 | 2 | ReserveC | Reserve cash preference leaves available cash at $0 |
30 | 2 | AvailableC | Available Cash is $0 |
31 | 2 | COverspent | Cash was overspent due to the Full Trade selection |
32 | 3 | PZeroPrice | Security has $0 price or no price. |
33 | 3 | BlockedBuy | When a trade tool creates an excluded holding. |
34 | 3 | BlockedSell | When a trade tool creates an excluded holding. |
35 | 2 | SmaAccount | SMA account is not tradable |
36 | 3 | TRADE_DISCARD | Trade discarded – {0} |
38 | 3 | MinimumTradePercent | Minimum Trade Percent is more than the target Percent |
39 | 3 | MinimumTradeDollar | Minimum Trade Dollar is more than the target Amount |
40 | 3 | BuyMinimumTradePercent | Buy percent is less than the min percent trade limit set |
41 | 3 | BuyMaximumTradeDollar | Buy trade dollar is more than the max amount limit set |
42 | 3 | SellMinimumTradePercent | Sell trade percent is less than the min percent trade limit set |
43 | 3 | SellMaximumTradePercent | Sell trade percent is more than the max percent trade limit set |
44 | 3 | BuyMaximumTradePercent | Buy trade percent is more than the max percent trade limit set |
45 | 3 | SellMaximumTradeDollar | Sell trade dollar is more than the max amount limit set |
46 | 3 | TransactionCostLimit | Transaction cost is more than the limit set |
47 | 2 | DoNotTradePortfolio | This portfolio is not tradable |
48 | 2 | NotEnoughCash | Not enough cash for account id {0}. Resulting percentage will be {1}% |
49 | 3 | ExcludedForSell | This security is excluded for sell |
50 | 3 | ExcludedForBuy | This security is excluded for buy |
51 | 3 | ShortTermLoss | Do not trade due to short term loss |
52 | 3 | WashSale | Do not trade due to wash sale |
53 | 3 | MinTransactionAmount | Trade value is less then the minimum transaction amount |
54 | 3 | MaxTransactionAmount | Trade value is more then the maximum transaction amount |
55 | 3 | MinTransactionPercent | Trade value is less then the minimum transaction percent |
56 | 3 | MaxTransactionPercent | Trade value is more then the maximum transaction percent |
57 | 3 | BuyPriority | The buy security is not tradable |
58 | 3 | SellPriority | The sell security is not tradable |
60 | 3 | SecurityExcludedHolding | This security is with excluded holding |
61 | 3 | MinimumInitialBuy | Minimum Initial Buy amout is more then the input price |
62 | 3 | AllowShortTermGain | Allow short term gain |
63 | 2 | FullCashNotSpent | Unable to spend full amount requested. ${0} has been spent of the requested ${1}. |
64 | 2 | FullCashNotRaised | Unable to raise full amount requested. ${0} has been raised of the requested ${1}. |
65 | 3 | RestrictedPlan | Security is not in the restricted Plan |
66 | 2 | Cusip | Security Cusip is blank |
67 | 3 | TacticalRebalanceUnselectedSecurity | Order is disabled due to security un-selected during Tactical Rebalance. |
68 | 1 | MAX_GAIN_AMOUNT | Max Capital Gain Amount has been reached. |
69 | 2 | MaxGainAmount | Portfolio max gain and carry forward loss amount of {0} has been reached on your portfolio, current gain loss of trades is potentially ${1}. Please adjust trades as needed. |
70 | 3 | PossibleStalePrice | Possible stale price (last price : {0}) |
71 | 2 | WashSaleWarning | This trade will cause wash sale |
72 | 2 | TradesOnHold | This account has trades on hold which are updating the account’s pending value. Please review the trades on hold dashboard for more information. |
73 | 2 | RedemptionFeePenalty | This trade has a potential redemption fee penalty, please review prior to execution |
74 | 2 | AccountTradeBlocked | Account is trade blocked |
75 | 2 | RealTimePriceError | Real Time prices not applied due to retrieval error |
76 | 3 | RoundingShares | Trade could not be generated Rounding for {0} = {1}; trade rounded to 0 shares, no trade generated. |
77 | 3 | PortfolioNotFound | Portfolio {0} not found. |
78 | 3 | AccountNotFound | Account {0} not found. |
79 | 3 | AccountNotActive | Account {0} is not active. |
80 | 3 | SecurityNotFound | Security {0} not found. |
81 | 3 | PositionNotFound | Position {0} not found. |
82 | 3 | TradeWithZeroAmount | Account {0}, Security {1}. |
83 | 2 | AmountGreaterThanValue | Amount requested is greater than account value |
84 | 2 | Aggregated_Trade | Deleted due to the trade aggregation in tactical |
85 | 2 | ExpiredOption | Contract expired on {0} and cannot be traded on {1}. |
86 | 3 | OverCloseOption | Over closing contract {0}. |
87 | 2 | SystematicWithdrawal | This account has a systematic withdrawal setup. The next one is for {0} on {1}. |
88 | 2 | SystematicPurchase | This account has a systematic purchase setup. The next one is for {0} on {1}. |
89 | 2 | PortfolioCashNegative | Creating further trades will make portfolio cash negative. |
90 | 2 | ReduceTradeAmountToTotalCash | Reducing the trade amount to total cash available in sleeved portfolio i.e. {0}. |
91 | 2 | UnsettledLotSold | Trade has sold unsettled lots. |
92 | 2 | PortfolioCashBelowMinimumThreshold | Further buy trades will bring portfolio cash below its minimum cash threshold. |
93 | 2 | SecurityAlreadyTraded | Security Already Traded |
94 | 2 | SweepCashNegative | Total cash post trade is positive but sweep cash is negative ${0}. |
95 | 3 | ViolatesMinInitialInvestmentAmount | Trade amount is less than initial investment amount for money market funds. |
96 | 3 | MoneyMarketTradingDisabled | Money market trading preference is off. |
97 | 2 | MaxShortTermGain | Portfolio max short term gain and carry forward loss amount of {0} has been reached on your portfolio, current short term gain loss of trades is potentially ${1}. Please adjust trades as needed. |