TradeInstrumentManageRequest trade.instrument-manage-request@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/instrument-manage-request.v1.json

trade.instrument-manage-request@1: bodies of trade.instrument.manage on OpenVibe.Trade (editors, or a service with the capability). POST /api/v1/instruments: { symbol, name, kind?, exchange?, cik?, currency? } (kind defaults to equity; aliases for the symbol, CIK and name are added). PATCH /api/v1/instruments/:symbol: any of name, kind, exchange, cik, currency, status (active or archived). POST /api/v1/instruments/:symbol/aliases: { kind: ticker | cik | name, value }. Text fields must be strings; a symbol or CIK another instrument holds is 409.

Fields

This schema has no named fields.

Examples

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

Valid: alias
{
  "kind": "ticker",
  "value": "ACME.B"
}
Valid: create
{
  "symbol": "ACME",
  "name": "Acme Corporation",
  "exchange": "NASDAQ",
  "cik": "123456",
  "currency": "usd"
}
Rejected: bad
{
  "status": "deleted",
  "kind": "bond"
}

Validate

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