View as Markdown

Data checks

The quality checks on each cash or custody account and day: the steps the platform runs before it releases a day's figures, and the checks an agent or a person adds. A check is written once and never changed; a new check is written instead. Reads need platform:read, writes platform:write, and both the operations module in one of your groups, on read for a read and on read and write for a write (an admin, Aleta, or a user in no group always has it); without it the routes answer 403. Writes take ?dry_run=true and an Idempotency-Key header and are logged in the change history.

The legacy platform's publish checks are listed too, as platform checks, per cash or custody account that came from the legacy platform: their id is <release_group_id>:<day>:<account id>, and checked_at is when the legacy check was mirrored, not when it ran.

Data model

idstring

A UUID, or <release_group_id>:<day>:<account id> for a legacy check.

typestring

The step, e.g. publish_validation, reconcilable_entities, portfolio_market_values, holding_returns, principal_returns, owners_share_partnerships, lens_coverage, or an agent's own type.

sourcestring

platform or agent.

originstring

legacy for a legacy check, v1 otherwise.

custody_account_id, cash_account_idstring or null

The cash or custody account; one of the two is set.

as_of_datedate

The day checked.

statusstring

passed, failed or skipped.

messagestring or null

What the check found.

measured_value, threshold_percent, threshold_absolutestring or null

Decimals as strings, without trailing zeros.

checked_attimestamp

RFC 3339, UTC, with microseconds.


GET/v1/data-checks

List data checks

Returns the checks on the cash and custody accounts you can see, newest day first, then newest id, as a cursor list. An unknown parameter is a 400.

Query parameters

custody_account_id, cash_account_idstring

One cash or custody account's checks.

as_of_datedate

One day's checks.

statusstring

passed, failed or skipped.

typestring

One step.

cursor, limitstring, integer

The page: limit defaults to 100, at most 1000.

Request
GET/v1/data-checks
curl -G https://api.aleta.ai/v1/data-checks \
  -H "Authorization: Bearer {access_token}" \
  -d status=failed
Response
{
  "data": [
    {
      "id": "019f95f0-2d40-7b58-8f6e-9a3c1d7e5b02",
      "type": "agent.price_gap",
      "source": "agent",
      "origin": "v1",
      "custody_account_id": null,
      "cash_account_id": "019dfeb0-0511-77a7-a8be-a911ab988a0a",
      "as_of_date": "2026-10-07",
      "status": "failed",
      "message": "Price older than three days",
      "measured_value": "2.5",
      "threshold_percent": null,
      "threshold_absolute": null,
      "checked_at": "2026-10-08T05:00:00.000000Z"
    }
  ],
  "next_cursor": null,
  "limit": 100
}

POST/v1/data-checks

Create a data check

Writes your own check on one cash or custody account and day; 201 with the check, the same body on an Idempotency-Key replay. Writing takes a grant on the whole cash or custody account (403 otherwise); one you cannot see is a 404. An unknown field is a 400.

Body parameters

typestring

Required: 1-64 characters of a-z, 0-9, _ and .; not one of the platform's types.

custody_account_id, cash_account_idstring

Exactly one.

as_of_datedate

Required, YYYY-MM-DD.

statusstring

Required: passed, failed or skipped.

message, measured_value, threshold_percent, threshold_absolutestring, decimal

Optional.

Request
POST/v1/data-checks
curl -X POST https://api.aleta.ai/v1/data-checks \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{"type": "agent.price_gap", "cash_account_id": "019dfeb0-0511-77a7-a8be-a911ab988a0a", "as_of_date": "2026-10-07", "status": "failed", "measured_value": "2.50"}'