API guide and reference
All 149 endpoints of the Vestoris REST API, generated from the same registry that routes the calls, so this page always matches the API. Each endpoint has its scope, parameters, request and response fields, status codes and examples in curl, Python and JavaScript.
Paper trading: simulated orders and fills. Not investment advice. Vestoris is not a broker-dealer or investment adviser and the API connects to no broker.
How to read this reference
Each endpoint page has: what it does and who may call it (the scope, plus the privileges and account permissions of the person or service account behind the token); its path and query parameters and headers; the request body fields with their types; the response fields; the status codes and the stable problem codes of its errors; notes on idempotency, ETags, confirmations and jobs; and examples in curl, Python (requests) and JavaScript (fetch) with an example response. Each group page explains its objects, their life cycles and the usual call sequences.
Get a token
Every call is made as someone. For your own scripts, create a personal access token on My API access (vpt_…). For a system, an Admin creates a service account and you use the client credentials grant:
curl -X POST https://vestoris.com/oauth/token \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-d grant_type=client_credentials \
-d scope="portfolio:read orders:read orders:write"
# {"access_token":"vat_…","token_type":"Bearer","expires_in":3600,"scope":"portfolio:read orders:read orders:write"}import os, requests
tok = requests.post("https://vestoris.com/oauth/token",
auth=(os.environ["CLIENT_ID"], os.environ["CLIENT_SECRET"]),
data={"grant_type": "client_credentials", "scope": "portfolio:read orders:read"}, timeout=30).json()["access_token"]Apps acting for people use the authorization code flow with PKCE. Details: Authentication and Scopes.
The main flows
| You want to | Calls |
|---|---|
| See who the token is | GET /me |
| List accounts and their holdings | GET /accounts → GET /accounts/{id}/positions |
| Enter, approve and release a simulated order | POST /orders → POST /orders/{id}/approve (a different person) → POST /orders/{id}/release |
| Go from a sentence to checked orders | POST /pipeline/runs → POST …/run → POST …/orders |
| Check compliance | The pre-trade check runs on every POST /orders (see result.compliance) and at stage 3 of the pipeline; breaches are violations |
| Sign off a rule | GET …/sign-off (a confirm token) → POST …/sign-off |
| Be told when things happen | POST /webhooks |
Conventions in one paragraph
JSON over HTTPS. Ids are strings; money, prices and quantities are decimal strings; times are ISO 8601 UTC. Lists are cursor-paginated (limit, cursor, next_cursor, has_more). Every POST needs an Idempotency-Key. Updates need If-Match with the ETag of a GET. Errors are application/problem+json with a stable code. Long operations answer 202 with a job. Rate limits are in RateLimit-* headers. See Conventions and Errors.
Paper trading: simulated orders and fills. Not investment advice.
Endpoints by group
Meta
Who you are, the scopes, the OpenAPI document and long-running jobs. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/openapi.json | This API's OpenAPI 3.1 document | none |
GET/me | Who the token acts as: user or service account, firm, role, privileges, scopes | any token |
GET/scopes | Every scope with its meaning | any token |
GET/jobs/{id} | A long-running operation (202 responses point here) | any token |
Portfolio Center
Accounts, positions, lots, cash, drift, risk, model portfolios, rebalancing and what-ifs. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/accounts | The accounts you can see, valued at the latest simulated closes | reference:read |
GET/accounts/{id} | One account | reference:read |
POST/accounts | Add an account (simulated cash) | reference:write |
PATCH/accounts/{id} | Change an account, incl. its model (If-Match) | reference:write |
GET/accounts/{id}/positions | Positions with value and weight | portfolio:read |
GET/accounts/{id}/lots | Open tax lots | portfolio:read |
GET/accounts/{id}/cash | Cash balance and recent (simulated) movements | portfolio:read |
POST/accounts/{id}/cash | Deposit or withdraw simulated cash | portfolio:write |
GET/accounts/{id}/drift | Drift against the account's model | portfolio:read |
GET/accounts/{id}/risk | Concentration, exposures and factor betas | portfolio:read |
GET/models | Model portfolios | reference:read |
GET/models/{id} | One model with targets | reference:read |
POST/models | Create a model | reference:write |
PUT/models/{id} | Replace a model's targets (If-Match) | reference:write |
POST/rebalance-proposals | Rebalance accounts: proposals in the Intent Pipeline (never orders); 202 with a job for more than 3 accounts | portfolio:write |
POST/what-ifs | A what-if: sector changes for accounts, as a pipeline proposal | portfolio:write |
GET/proposals | Rebalance proposals | pipeline:read |
GET/proposals/{id} | One proposal with its trades | pipeline:read |
Pipeline
The Intent Pipeline: a request in plain English, checked in stages, before any order exists. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/pipeline/runs | Your intent-pipeline requests | pipeline:read |
GET/pipeline/runs/{id} | A request with its stages | pipeline:read |
POST/pipeline/runs | Interpret a request in plain English (stage 0; the AI may be used) | pipeline:write |
POST/pipeline/runs/{id}/run | Run the stages: entitlements, proposals, compliance pre-check | pipeline:write |
POST/pipeline/runs/{id}/orders | Create the orders (each checked again; nothing is executed) | pipeline:write |
Orders
Enter, amend, approve, release, cancel and allocate (simulated) orders; fills; blotter views. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/orders | Orders on the accounts you can see | orders:read |
GET/orders/{id} | One order with allocations, compliance and history | orders:read |
POST/orders | Enter an order: checked by compliance and routed by the workflow rules like any order (paper trading) | orders:write |
POST/orders/{id}/amend | Amend quantity or limit (compliance re-checked; If-Match) | orders:write |
POST/orders/{id}/cancel | Cancel the unfilled part | orders:write |
POST/orders/{id}/release | Release an approved order to the simulator (compliance re-checked) | orders:write |
POST/orders/{id}/rework | Re-plan a working order's unfilled shares with another algo | orders:write |
POST/orders/{id}/approve | Approve (four eyes: never the person who entered it) | orders:approve |
POST/orders/{id}/reject | Reject | orders:approve |
POST/orders/{id}/override | Override a soft compliance warning with a written reason | orders:write |
POST/orders/{id}/allocate | Confirm the allocation of executions (Operations) | orders:write |
GET/orders/{id}/fills | Simulated fills of an order | orders:read |
GET/executions | Simulated fills on the accounts you can see | orders:read |
GET/blotter/views | Saved blotter views (yours and the firm's) | orders:read |
POST/blotter/views | Save a blotter view (validated against the field registry) | orders:write |
PUT/blotter/views/{id} | Replace a blotter view | orders:write |
DELETE/blotter/views/{id} | Delete a blotter view | orders:write |
Compliance
Rules and their sign-off, violations, overrides, packages, the rule register and reports. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/overrides | Override requests | compliance:read |
POST/overrides/{id}/decision | Approve or reject an override (Compliance; four eyes) | orders:approve |
GET/compliance/rules | Rules (every version) | compliance:read |
GET/compliance/rules/{id} | One rule version with restatement and test bench | compliance:read |
GET/compliance/rules/{id}/versions | Every version of the rule's lineage | compliance:read |
POST/compliance/rules | Draft a rule (structured definition) | compliance:rules:write |
PATCH/compliance/rules/{id} | Change a draft (If-Match) | compliance:rules:write |
POST/compliance/rules/{id}/test-bench | Run the test bench (202: a job) | compliance:rules:write |
POST/compliance/rules/{id}/submit | Submit for sign-off | compliance:rules:write |
GET/compliance/rules/{id}/sign-off | What you would sign off, with a confirmation token for X-Vestoris-Confirm | compliance:rules:approve |
POST/compliance/rules/{id}/sign-off | Sign off (a person, never client credentials; X-Vestoris-Confirm) | compliance:rules:approve |
POST/compliance/rules/{id}/reject | Send back to the author with comments | compliance:rules:approve |
POST/compliance/rules/{id}/retire | Ask for an active rule to be retired (signed off like a change) | compliance:rules:write |
GET/compliance/violations | Violations | compliance:read |
GET/compliance/violations/{id} | One violation | compliance:read |
POST/compliance/violations/{id}/transition | Acknowledge, resolve, waive (with a reason) or escalate | compliance:violations:write |
GET/compliance/packages | Rule packages and their assignments | compliance:read |
GET/compliance/register | The rule register (JSON, or ?format=pdf) | compliance:reports:read |
GET/compliance/reports | Periodic compliance reports | compliance:reports:read |
POST/compliance/reports | Generate a report for a period (202: a job) | compliance:reports:read |
Surveillance
Wash-trade, spoofing, restricted-list and cross-component alerts. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/surveillance/alerts | Surveillance and anomaly alerts | surveillance:read |
GET/surveillance/alerts/{id} | One alert | surveillance:read |
POST/surveillance/alerts/{id}/review | Review an alert (reviewed, dismissed, escalated) with a note | surveillance:write |
Workflow
Items in flight, actions on them, my work, workflow rules, desks and SLAs. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/workflow/items | Items in flight you can see (the monitor's board) | workflow:read |
GET/workflow/items/{id} | One item with history, comments and approvals | workflow:read |
POST/workflow/items/{id}/actions | Claim, release, reassign, escalate, set the priority, move to a desk, comment, watch (never approve) | workflow:act |
GET/workflow/my-work | What waits on you, what you requested, what you watch | workflow:read |
GET/workflow/rules | Workflow rules (every version) | workflow:read |
GET/workflow/rules/{id} | One workflow rule | workflow:read |
POST/workflow/rules | Draft a rule from a structure, or from a sentence ("text"); replayed on the test bench | workflow:rules:write |
POST/workflow/rules/{id}/test-bench | Replay the last days of items (202: a job) | workflow:rules:write |
POST/workflow/rules/{id}/submit | Submit for sign-off | workflow:rules:write |
GET/workflow/rules/{id}/sign-off | What you would sign off, with a confirmation token | workflow:rules:approve |
POST/workflow/rules/{id}/sign-off | Sign off as Admin or Compliance (a person; X-Vestoris-Confirm) | workflow:rules:approve |
GET/workflow/desks | Desks, members and assignment modes | workflow:read |
GET/workflow/slas | SLA minutes and escalations per stage | workflow:read |
GET/workflow/views | Saved monitor views | workflow:read |
AI
Navigator questions and natural-language commands (plan, preview, confirm). Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
POST/copilot/questions | Ask Navigator (answers only from what you may see; logged) | ai:use |
POST/commands/{screen} | Plan a natural-language command and preview it (screen: portfolio, blotter, monitor, wfrules); nothing runs | ai:use |
GET/commands/{id} | A command with its plan, preview and results | ai:use |
POST/commands/{id}/execute | Execute the previewed plan (X-Vestoris-Confirm: the preview token; "typed" for large or destructive plans) | commands:execute |
POST/commands/{id}/cancel | Cancel a previewed command | ai:use |
Market data
Simulated or uploaded closes, FX rates, corporate actions and as-of history. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/prices | Daily (simulated) closes of a security | market:read |
GET/prices/latest | The latest close of securities | market:read |
GET/fx-rates | FX rates | market:read |
GET/corporate-actions | Corporate actions (splits, cash dividends) | market:read |
GET/as-of/{dataset}/{key} | A record as it was on a date (effective-dated history) | market:read |
Reference data
The security master, issuers, brokers, benchmarks, account groups and lists. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/securities | The security master | reference:read |
GET/securities/{id} | One security, with its user-defined fields | reference:read |
POST/securities | Add a security | reference:write |
PATCH/securities/{id} | Change a security (If-Match) | reference:write |
GET/issuers | Issuers | reference:read |
GET/brokers | Brokers (reference only: Vestoris connects to no broker) | reference:read |
GET/benchmarks | Benchmarks with constituents | reference:read |
GET/account-groups | Account groups (members limited to the accounts you can see) | reference:read |
POST/account-groups | Create an account group | reference:write |
GET/lists | Restricted, watch and exclusion lists | reference:read |
GET/lists/{id} | One list with its members | reference:read |
POST/lists/{id}/members | Add securities to a list | reference:write |
DELETE/lists/{id}/members/{securityId} | Remove a security from a list | reference:write |
User-defined fields
Definitions and values of the ten user-defined fields of each table. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/udf/{table} | The ten user-defined field definitions of a table | reference:read |
PUT/udf/{table}/{slot} | Define a field (Admins; versioned) | udf:admin |
GET/udf/{table}/records/{key} | The user-defined values of one record | reference:read |
PUT/udf/{table}/records/{key} | Set user-defined values of one record (If-Match) | reference:write |
Data
File loads, batches, folders, feeds, schedules, the start of day and data quality. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
POST/data/{dataset} | Load a file (CSV, TXT, XLSX or Vestoris XML) into a data set; the body is the file | data:load:<data set> |
GET/batches | Load history | data:read |
GET/batches/{id} | A batch's status and counts | data:read |
GET/batches/{id}/rows | A batch's rows: the diff and the rejected rows with codes | data:read |
POST/batches/{id}/apply | Apply a staged batch | data:write |
POST/batches/{id}/undo | Undo an applied batch (unless later trades depend on it) | data:write |
POST/batches/{id}/discard | Discard a staged batch | data:write |
POST/feeds/bundles | Load a folder of feed files (.zip); each file needs its data:load scope | data:load:<data set> |
GET/feeds/bundles/{id} | A folder's status, per file | data:read |
POST/feeds/{id}/files | Push a file to an HTTPS-push feed (the feed's data:load scope) | data:load:<data set> |
GET/feeds | Feeds and their schedule | data:read |
GET/feeds/runs | Feed runs of a business date | data:read |
POST/feeds/runs/{id}/review | Apply or reject a held feed file | data:write |
GET/schedules | Scheduled jobs and their last runs | data:read |
GET/start-of-day | The start-of-day chain of a business date | data:read |
GET/data-quality/issues | Data quality issues | data:read |
Records
The hash-chained event log and the AI interaction log. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/events | The hash-chained event log | events:read |
GET/events/verify | Verify the firm's hash chain | events:read |
GET/ai-log | AI interactions (metadata; inputs and outputs are on the AI log page) | ai_log:read |
Webhooks
Signed notifications of events to your HTTPS endpoint. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/webhooks | Webhooks | webhooks:read |
POST/webhooks | Add a webhook (the signing secret is returned once) | webhooks:write |
PATCH/webhooks/{id} | Change events, URL or status | webhooks:write |
DELETE/webhooks/{id} | Delete a webhook | webhooks:write |
GET/webhooks/{id}/deliveries | The delivery log | webhooks:read |
POST/webhooks/{id}/deliveries/{deliveryId}/redeliver | Send a delivery again | webhooks:write |
POST/webhooks/{id}/ping | Send a test event | webhooks:write |
Firm
The firm and its settings. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/firm | The firm and its settings | firm:read |
PATCH/firm | Change settings (If-Match) | firm:write |
Users
People and service accounts, invitations, roles and privileges. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/users | Users of the firm (people and service accounts) | users:read |
GET/users/{id} | One user with privileges | users:read |
POST/users | Invite a person (an email with a link) | admin:users |
PATCH/users/{id} | Change role or status (If-Match) | admin:users |
PUT/users/{id}/privileges/{privilege} | Grant, remove or reset one privilege | admin:users |
GET/roles | Roles, their default privileges and maximum account permissions | users:read |
Entitlements
Per-account permissions: view, propose, trade, approve. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/entitlements | Per-account permissions of every user | entitlements:read |
PUT/entitlements/{userId}/{accountId} | Set one user's permissions on one account | entitlements:write |
Access reviews
Periodic reviews of who can do what, signed off by a person. Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/access-reviews | Access reviews | access_reviews:read |
GET/access-reviews/{id} | One access review with its recommendations | access_reviews:read |
POST/access-reviews | Draft a new access review | access_reviews:write |
POST/access-reviews/{id}/sign-off | Sign off, applying the chosen recommendations (a person) | access_reviews:write |
Owner
The site owner's inquiries (never reachable with a firm's token). Concepts and typical calls
| Call | What it does | Scope |
|---|---|---|
GET/owner/inquiries | Inquiries from the site's forms (site administrators only) | owner:inquiries |