TradeAlertTriggeredPayload trade.alert.triggered@1
Generated at from
openvibe-contracts v0.33.0 and
openvibe-sdk v0.5.0.
- Version
- 1.0.0
- Owner
- trade
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Decision
- ADR-020
- Schema
https://openvibe.network/contracts/events/payloads/trade.alert.triggered.v1.json
trade.alert.triggered v1 (OpenVibe.Trade server/domain/alerts.js deliver). One delivery of one private alert rule: a threshold crossed by a new observation (trigger kind observation), or a newly seen document of the instrument (filing_type / new_document rules, trigger kind document). Written in the transaction that recorded the observation or document; at most one per (rule, trigger). Envelope: subject { type: user, id: <rule owner usr_…> }, visibility subject, priority important, actor service:trade. Data only, never rendered notification text (ADR-020): OpenVibe.Network renders a TRADE_ALERT notification (server/notifications/events-consumer.js). Information only, not investment advice.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
delivery_id | string | yes |
| |
rule | object | yes |
| |
rule.id | string | yes |
| |
rule.kind | enum | yes |
| |
rule.status | enum | yes |
| |
rule.instrument | object | yes |
| |
rule.instrument.id | string | yes |
| |
rule.instrument.symbol | string | |||
rule.instrument.name | string | |||
rule.metric | string | null | yes | Threshold rules: e.g. price.close, volume, us-gaap:Revenues. |
|
rule.operator | enum | yes |
| |
rule.threshold | string | null | yes | Decimal text as entered. |
|
rule.unit | string | null | yes |
| |
rule.currency | string | null | yes |
| |
rule.form_types | array | null | yes | filing_type rules: the 1–10 form types that trigger it (10-K, 8-K…). | |
rule.armed | boolean | null | yes | Threshold rules: armed before this delivery (always true when it fired); null for document rules. | |
rule.created_at | string | yes |
| |
rule.updated_at | string | yes |
| |
instrument | object | yes |
| |
instrument.id | string | yes |
| |
instrument.symbol | string | yes |
| |
instrument.name | string | yes |
| |
instrument.url | string | yes | Instrument page on Trade. |
|
trigger | one of | yes | ||
disclaimer | string | yes | Currently "Information only — not investment advice; no trading here." |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: filing
{
"delivery_id": "ald_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"rule": {
"id": "alr_01JAB2C3D4E5F6G7H8J9K0MNPR",
"kind": "filing_type",
"status": "active",
"instrument": {
"id": "ins_01JAB2C3D4E5F6G7H8J9K0MNPS",
"symbol": "AAPL",
"name": "Apple Inc."
},
"metric": null,
"operator": null,
"threshold": null,
"unit": null,
"currency": null,
"form_types": [
"10-K",
"8-K"
],
"armed": null,
"created_at": "2026-09-20T10:00:00.000Z",
"updated_at": "2026-09-20T10:00:00.000Z"
},
"instrument": {
"id": "ins_01JAB2C3D4E5F6G7H8J9K0MNPS",
"symbol": "AAPL",
"name": "Apple Inc.",
"url": "https://openvibe.trade/i/AAPL"
},
"trigger": {
"kind": "document",
"id": "doc_01JAB2C3D4E5F6G7H8J9K0MNPT",
"form_type": "8-K",
"title": "Current report",
"url": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000001/0000320193-26-000001-index.htm",
"published_at": "2026-09-22T12:00:00.000Z",
"retrieved_at": "2026-09-22T12:10:00.000Z",
"source_key": "sec-edgar-filings"
},
"disclaimer": "Information only — not investment advice; no trading here."
}Valid: threshold
{
"delivery_id": "ald_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"rule": {
"id": "alr_01JAB2C3D4E5F6G7H8J9K0MNPR",
"kind": "threshold",
"status": "active",
"instrument": {
"id": "ins_01JAB2C3D4E5F6G7H8J9K0MNPS",
"symbol": "AAPL",
"name": "Apple Inc."
},
"metric": "price.close",
"operator": "above",
"threshold": "250",
"unit": "USD",
"currency": "USD",
"form_types": null,
"armed": true,
"created_at": "2026-09-20T10:00:00.000Z",
"updated_at": "2026-09-22T21:00:00.000Z"
},
"instrument": {
"id": "ins_01JAB2C3D4E5F6G7H8J9K0MNPS",
"symbol": "AAPL",
"name": "Apple Inc.",
"url": "https://openvibe.trade/i/AAPL"
},
"trigger": {
"kind": "observation",
"id": "obs_01JAB2C3D4E5F6G7H8J9K0MNPT",
"metric": "price.close",
"value": "251.37",
"unit": "USD",
"currency": "USD",
"observed_at": "2026-09-22T20:00:00.000Z",
"retrieved_at": "2026-09-22T20:05:00.000Z",
"source_key": "stooq-daily",
"source_url": null
},
"disclaimer": "Information only — not investment advice; no trading here."
}Rejected: observation-without-value
{
"delivery_id": "ald_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"rule": {
"id": "alr_01JAB2C3D4E5F6G7H8J9K0MNPR",
"kind": "threshold",
"status": "active",
"instrument": {
"id": "ins_01JAB2C3D4E5F6G7H8J9K0MNPS",
"symbol": "AAPL",
"name": "Apple Inc."
},
"metric": "price.close",
"operator": "above",
"threshold": "250",
"unit": "USD",
"currency": "USD",
"form_types": null,
"armed": true,
"created_at": "2026-09-20T10:00:00.000Z",
"updated_at": "2026-09-22T21:00:00.000Z"
},
"instrument": {
"id": "ins_01JAB2C3D4E5F6G7H8J9K0MNPS",
"symbol": "AAPL",
"name": "Apple Inc.",
"url": "https://openvibe.trade/i/AAPL"
},
"trigger": {
"kind": "observation",
"id": "obs_01JAB2C3D4E5F6G7H8J9K0MNPT",
"metric": "price.close",
"unit": "USD",
"currency": "USD",
"observed_at": "2026-09-22T20:00:00.000Z",
"retrieved_at": "2026-09-22T20:05:00.000Z",
"source_key": "stooq-daily",
"source_url": null
},
"disclaimer": "Information only — not investment advice; no trading here."
}Rejected: rendered-text
{
"delivery_id": "ald_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"rule": {
"id": "alr_01JAB2C3D4E5F6G7H8J9K0MNPR",
"kind": "new_document",
"status": "active",
"instrument": {
"id": "ins_01JAB2C3D4E5F6G7H8J9K0MNPS"
},
"metric": null,
"operator": null,
"threshold": null,
"unit": null,
"currency": null,
"form_types": null,
"armed": null,
"created_at": "2026-09-20T10:00:00.000Z",
"updated_at": "2026-09-20T10:00:00.000Z"
},
"instrument": {
"id": "ins_01JAB2C3D4E5F6G7H8J9K0MNPS",
"symbol": "AAPL",
"name": "Apple Inc.",
"url": "https://openvibe.trade/i/AAPL"
},
"trigger": {
"kind": "document",
"id": "doc_01JAB2C3D4E5F6G7H8J9K0MNPT",
"form_type": null,
"title": null,
"url": null,
"published_at": null,
"retrieved_at": "2026-09-22T12:10:00.000Z",
"source_key": "sec-edgar-filings"
},
"message": "AAPL filed a new document",
"disclaimer": "Information only — not investment advice; no trading here."
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('trade.alert.triggered@1', value); // { valid, errors: [{ path, message }] }