---
title: "trade.context-revision@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/trade.context-revision"
updated: null
---

# trade.context-revision@1 · OpenVibe.Services

HTML: [trade.context-revision@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/trade.context-revision)

# TradeContextRevision `trade.context-revision@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: trade
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/trade/context-revision.v1.json`](/docs/contracts/trade.context-revision.json)

trade.context-revision@1: one revision of an instrument's market context on OpenVibe.Trade (server/domain/context.js view): the Markdown, HTML and text, what it cites (observations and documents; a citation whose source is gone is marked missing), its authorship and disclosure, and whether it still needs a person's review (AI drafts do).

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `revision` | integer | yes |  | - `minimum 1` |
| `published` | boolean | yes |  |  |
| `published_at` | string \| null |  |  | - `format date-time` |
| `written_at` | string \| integer \| null |  |  |  |
| `as_of` | any |  |  |  |
| `origin` | enum |  |  | - `one of "editor", "ai", null` |
| `body_markdown` | string | yes |  |  |
| `body_html` | string |  |  |  |
| `text` | string |  |  |  |
| `cites` | array of object | yes |  |  |
| `cites[].kind` | enum | yes |  | - `one of "observation", "document"` |
| `cites[].id` | string | yes |  |  |
| `cites[].observation` | [trade.observation](/docs/contracts/trade.observation) |  |  |  |
| `cites[].document` | object |  |  |  |
| `cites[].missing` | const |  |  | - `= true` |
| `authorship` | any |  |  |  |
| `disclosure` | any |  |  |  |
| `review` | object \| null |  |  |  |
| `needs_review` | boolean | yes |  |  |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: published-ai

~~~~
{
  "revision": 2,
  "published": true,
  "published_at": "2026-09-25T12:00:00.000Z",
  "written_at": "2026-09-25T11:00:00.000Z",
  "as_of": "2026-09-24T21:05:00.000Z",
  "origin": "ai",
  "body_markdown": "Acme closed at 182.40 USD on 2026-09-24 [1].",
  "body_html": "<p>Acme closed at 182.40 USD on 2026-09-24 [1].</p>",
  "text": "Acme closed at 182.40 USD on 2026-09-24 [1].",
  "cites": [
    {
      "kind": "observation",
      "id": "obs_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "observation": {
        "id": "obs_01JAB2C3D4E5F6G7H8J9K0MNPQ",
        "metric": "close",
        "value": "182.40",
        "unit": "USD",
        "currency": "USD",
        "period": "2026-09-24",
        "observed_at": "2026-09-24T20:00:00.000Z",
        "retrieved_at": "2026-09-24T21:05:00.000Z",
        "recorded_at": "2026-09-24T21:05:02.000Z",
        "max_age_sec": 172800,
        "source": {
          "key": "example-quotes",
          "item_id": null,
          "url": "https://quotes.example.com/ACME",
          "ref": "ACME:2026-09-24:close"
        },
        "freshness": {
          "stale": false,
          "stale_since": null,
          "reason": null,
          "source_status": "healthy",
          "source_last_success_at": "2026-09-24T21:05:00.000Z"
        }
      }
    }
  ],
  "authorship": {
    "mode": "ai"
  },
  "disclosure": "AI-generated, reviewed by a person",
  "review": {
    "decision": "approved",
    "reviewed_at": "2026-09-25T12:00:00.000Z",
    "reviewer": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "needs_review": false
}
~~~~

Rejected: zero

~~~~
{
  "revision": 0,
  "published": false,
  "body_markdown": "",
  "cites": [],
  "needs_review": true
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('trade.context-revision@1', value);   // { valid, errors: [{ path, message }] }
~~~~
