> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allocait.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Check result

> Every field a check returns and how to read it.

A check returns facts about your own rules before and after a change. It carries no approval, verdict on the change or suggested trade.

To send a check, see [Check a change](https://docs.allocait.app/guides/check-before-you-trade.md).

## What comes back

| Field | Meaning |
| - | - |
| `within_rules` | Whether the whole book is inside every rule after the change. |
| `newly_or_further_outside_count` | How many rules the change put outside range or pushed further outside. |
| `rules_judged_count` | The class bands in the scenario plus the holdings that have a size range for the side they end on. |
| `rules` | Each rule outside its range before or after the change. |
| `not_covered` | Symbols no rule judged. |
| `trades` | Each change with `shares_before`, `shares_after`, price and notional. |
| `cash` | Cash `before` and `after`, and whether it is `sufficient`. |
| `total_value` | The book's value at the prices you gave. |
| `exposure_after` | Long, short, net and gross exposure after the change. |
| `positions_updated_at` | The newest update among the portfolio's positions, or `null`. Report it with the status: the book is what Allocait has recorded, not your live account. |
| `basis` | What the result is computed from. |
| `checked_at` | When the check ran. REST only. |

Illustrative example. The figures are hypothetical, not a recommendation.

```json theme={null}
{
  "portfolio_id": "uuid",
  "scenario_id": "uuid",
  "within_rules": false,
  "newly_or_further_outside_count": 2,
  "rules_judged_count": 4,
  "rules": [
    { "kind": "class_band", "symbol": null, "asset_class_id": "uuid", "asset_class": "Equities",
      "min_pct": 29, "max_pct": 39, "before_pct": 37.2981, "after_pct": 41.0188,
      "before_status": "COMPLIANT", "after_status": "ABOVE_MAX",
      "gap_before_pts": 0, "gap_after_pts": 2.0188, "change": "newly_outside" },
    { "kind": "position_size", "symbol": "ALFA", "asset_class_id": "uuid", "asset_class": "Equities",
      "min_pct": 15, "max_pct": 39.5, "before_pct": 37.2981, "after_pct": 41.0188,
      "before_status": "COMPLIANT", "after_status": "ABOVE_MAX",
      "gap_before_pts": 0, "gap_after_pts": 1.5188, "change": "newly_outside" }
  ],
  "not_covered": [ { "symbol": "GOLF", "asset_class": "Commodities", "reason": "NO_SIZE_RANGE", "traded": true } ],
  "trades": [
    { "index": 0, "symbol": "ALFA", "side": "BUY", "shares": 41, "price": 181.5, "notional": 7441.5,
      "shares_before": 411, "shares_after": 452 },
    { "index": 1, "symbol": "GOLF", "side": "SELL", "shares": 11, "price": 61.3, "notional": 674.3,
      "shares_before": 301, "shares_after": 290 }
  ],
  "cash": { "before": 54200.1, "after": 47432.9, "sufficient": true },
  "total_value": 200001,
  "exposure_after": { "total_value": 200001, "long_pct": 76.28, "short_pct": 0, "net_pct": 76.28, "gross_pct": 76.28, "options_counted": 0, "options_not_counted": 0 },
  "positions_updated_at": "2026-10-09T18:22:04Z",
  "basis": "Computed from this rule set's saved ranges, the holdings Allocait has recorded, and the prices you supplied. Taxes, fees, liquidity and accounts outside Allocait are not considered.",
  "checked_at": "2026-10-11T14:03:11Z"
}
```

The MCP result leaves out `checked_at` and starts with a `summary`: one line with the number of rules outside their range before and after the change, how many are newly or further outside, and how many are back inside. It adds a note when no rule was checked, when cash would fall below 0, or when `within_rules` is false only because rules already outside stay outside.

## The rules list

`rules` lists only the rules outside their range before or after the change, with `newly_outside` first, then `further_outside`, `still_outside` and `back_inside`, and class bands before size rules inside each. Rules that stay inside are counted in `rules_judged_count` and not listed.

* `kind` is `class_band`, `position_size` (a long, judged against the class's size range) or `short_position_size` (a short, judged against its short size range). Both size kinds judge the size without its sign.
* Percentages are shares of total value: priced non-cash holdings plus the cash row. A class's total is the net of its holdings, so a short subtracts, and a total below zero counts as 0.
* `gap_before_pts` and `gap_after_pts` are the distance outside the range in percentage points, 0 when inside. A percent within 0.01 of a point of an edge counts as inside, and `further_outside` needs a gap more than 0.01 of a point larger than before. The gap itself is reported as measured.
* `shares_after` is signed, so a negative number is a short. A change worth 100000000000000 or more is refused with `INVALID_INPUT`, and so is a portfolio worth nothing or less at the prices you gave.

## How to read `change`

Each row in `rules` has one of four words. They describe a rule's distance from its range. They say nothing about the trade.

| `change` | Meaning |
| - | - |
| `newly_outside` | Inside its range before, outside after. |
| `further_outside` | Outside both times, and the gap after is larger than before. |
| `still_outside` | Outside both times, and not further. This includes closer but still outside. |
| `back_inside` | Outside before, inside after. |

A holding sold to zero is no longer judged on size, so a size breach it had is `back_inside`. A holding added for the first time wasn't judged on size before, so a size breach it creates is `newly_outside`.

A holding sold past zero becomes a short, and it is judged on the side it ends on, so a size breach it had as a long is not listed as `back_inside`. If its class has no short size range, the symbol appears in `not_covered`.

## The two questions

`newly_or_further_outside_count` and `within_rules` answer different questions.

* **`newly_or_further_outside_count`** counts the `newly_outside` and `further_outside` rows. It answers: did this change add a breach or deepen one. A script that wants to avoid both can check that it equals 0, and read `not_covered` for what no rule judged.
* **`within_rules`** answers: is the whole book inside every rule after the change. It is `true` only when no rule is outside its range after the change, `rules_judged_count` is above 0, and `cash.sufficient` is `true`. A breach that already existed keeps it `false`.

Treat `within_rules: false` as "not confirmed", never as a block Allocait enforces. `false` with `rules_judged_count: 0` means no rule was checked. `true` says nothing about anything no rule covers.

## What no rule covered

`not_covered` has one entry for each changed symbol whose class has no band in the scenario (`NO_CLASS_RULE`), or has a band but no size range for the side it ends on (`NO_SIZE_RANGE`: a long needs a position size, a short a short size; a symbol sold to zero from a short is named only when the class has neither).

It also lists each holding the change does not touch that no band judges (`NO_CLASS_RULE`, `traded: false`), as `/compliance/check` lists it as unchecked. It is there so `within_rules: true` is never read as "a rule looked at this symbol".

## Exposure after the change

`exposure_after` says how much of the book gains if prices rise once the whole change is applied. It is a reading beside the rules, and `within_rules` doesn't read it. See [Exposure](https://docs.allocait.app/concepts/exposure.md).

## Related

> [card] [Check a change](https://docs.allocait.app/guides/check-before-you-trade.md)
>
> What to send and how a failed call reads.

> [card] [Status words](https://docs.allocait.app/concepts/status-words.md)
>
> What the status values mean.

> [card] [Shorts](https://docs.allocait.app/concepts/shorts.md)
>
> How a negative share count is judged.

> [card] [Options](https://docs.allocait.app/concepts/options.md)
>
> How options are priced and expire.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.