TradeWatchlistRequest trade.watchlist-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/watchlist-request.v1.json

trade.watchlist-request@1: bodies of the watchlist writes on OpenVibe.Trade (the acting person). POST /api/v1/watchlists (trade.watchlist.create) and PATCH /api/v1/watchlists/:id (trade.watchlist.update): { name } (a string, at most 80 characters; your names are unique). PUT /api/v1/watchlists/:id/items/:symbol: { note? } (at most 300 characters). DELETE …/items/:symbol takes no body.

Fields

This schema has no named fields.

Examples

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

Valid: create
{
  "name": "Semis"
}
Valid: item-note
{
  "note": "earnings in Oct"
}
Rejected: not-text
{
  "name": 5,
  "note": 7
}

Validate

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