Developers › API reference

Compliance API

Rules and their sign-off, violations, overrides, packages, the rule register and reports.

Objects

  • Rule: one version of a compliance rule: a rule type (25 types, e.g. max_issuer_pct, restricted_list, wash_sale, udf_condition), parameters, a scope (firm, groups, packages or accounts), a severity (block, warn, info) and run points (pretrade, intrade, posttrade). Versions of one rule share a lineage_id. The restatement is written by code from the definition; definition_hash fingerprints the exact version.
  • Violation: a breach with an owner, a due date and a history. Override: a request to proceed past a soft warning. Package: rules plus a mandate, assigned to groups or accounts. Register: every rule with its versions, sign-offs and violations. Report: a periodic report.

Rule life cycle

draft ─(test bench, submit)→ pending_approval ─(sign-off by a person)→ active ─(new version signed)→ superseded
      ←────────(reject: sent back)────────────┘                         └─(retire, signed)→ retired
  1. POST /compliance/rules drafts (or {"change_of": id} drafts a new version).
  2. POST /compliance/rules/{id}/test-bench (202, a job) runs it against today's holdings and recent orders. Required.
  3. POST /compliance/rules/{id}/submit.
  4. A person with approve compliance rules, never the author: GET /compliance/rules/{id}/sign-off (what you sign, and a confirm_token), then POST /compliance/rules/{id}/sign-off with X-Vestoris-Confirm and a reason. Client-credentials tokens are refused (user_token_required).

Violation life cycle

open → acknowledged → resolved | waived (note required) | escalated with POST /compliance/violations/{id}/transition. Post-trade breaches resolve themselves when the holding is fixed.

Overrides

POST /orders/{id}/override with a reason; above the firm's threshold Compliance decides with POST /overrides/{id}/decision (four eyes).

Endpoints

CallWhat it doesScope
GET/overridesOverride requestscompliance:read
POST/overrides/{id}/decisionApprove or reject an override (Compliance; four eyes)orders:approve
GET/compliance/rulesRules (every version)compliance:read
GET/compliance/rules/{id}One rule version with restatement and test benchcompliance:read
GET/compliance/rules/{id}/versionsEvery version of the rule's lineagecompliance:read
POST/compliance/rulesDraft a rule (structured definition)compliance:rules:write
PATCH/compliance/rules/{id}Change a draft (If-Match)compliance:rules:write
POST/compliance/rules/{id}/test-benchRun the test bench (202: a job)compliance:rules:write
POST/compliance/rules/{id}/submitSubmit for sign-offcompliance:rules:write
GET/compliance/rules/{id}/sign-offWhat you would sign off, with a confirmation token for X-Vestoris-Confirmcompliance:rules:approve
POST/compliance/rules/{id}/sign-offSign off (a person, never client credentials; X-Vestoris-Confirm)compliance:rules:approve
POST/compliance/rules/{id}/rejectSend back to the author with commentscompliance:rules:approve
POST/compliance/rules/{id}/retireAsk for an active rule to be retired (signed off like a change)compliance:rules:write
GET/compliance/violationsViolationscompliance:read
GET/compliance/violations/{id}One violationcompliance:read
POST/compliance/violations/{id}/transitionAcknowledge, resolve, waive (with a reason) or escalatecompliance:violations:write
GET/compliance/packagesRule packages and their assignmentscompliance:read
GET/compliance/registerThe rule register (JSON, or ?format=pdf)compliance:reports:read
GET/compliance/reportsPeriodic compliance reportscompliance:reports:read
POST/compliance/reportsGenerate a report for a period (202: a job)compliance:reports:read