TradeContextProposal trade.context-proposal@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
trade
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/trade/context-proposal.v1.json

trade.context-proposal@1: the body of POST /api/v1/instruments/:symbol/context on OpenVibe.Trade (trade.context.propose). An editor: { body, cites?, expected_revision?, publish?, message? } (Markdown up to 20000 characters). OpenVibe.AI (X-OV-Origin: ai): { workflow: { id: trade.summarize_market_context, run_id, version?, model? }, input_sources: [{ source_type, source_id }], output: { summary, observations?, gaps?, citations? }, stub_provider? } — always a draft that needs a person's review. Context that recommends buying, selling or holding, or gives price targets, is refused (422 context.advice_refused).

Fields

This schema has no named fields.

Examples

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

Valid: ai
{
  "workflow": {
    "id": "trade.summarize_market_context",
    "run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "model": "claude-sonnet-4-5"
  },
  "input_sources": [
    {
      "source_type": "trade.observation",
      "source_id": "obs_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    }
  ],
  "output": {
    "summary": "Acme closed at 182.40 USD on 2026-09-24.",
    "citations": [
      0
    ],
    "gaps": [
      "No filings in the last 30 days."
    ]
  }
}
Valid: editor
{
  "body": "Acme reported Q3 results on 2026-09-20; see the 10-Q.",
  "cites": [
    {
      "kind": "document",
      "id": "doc_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    }
  ],
  "publish": true
}
Rejected: wrong-workflow
{
  "workflow": {
    "id": "wiki.page_refresh",
    "run_id": "r"
  },
  "output": {
    "summary": ""
  }
}

Validate

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