Developers

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 toCalls
See who the token isGET /me
List accounts and their holdingsGET /accounts → GET /accounts/{id}/positions
Enter, approve and release a simulated orderPOST /orders → POST /orders/{id}/approve (a different person) → POST /orders/{id}/release
Go from a sentence to checked ordersPOST /pipeline/runs → POST …/run → POST …/orders
Check complianceThe pre-trade check runs on every POST /orders (see result.compliance) and at stage 3 of the pipeline; breaches are violations
Sign off a ruleGET …/sign-off (a confirm token) → POST …/sign-off
Be told when things happenPOST /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

CallWhat it doesScope
GET/openapi.jsonThis API's OpenAPI 3.1 documentnone
GET/meWho the token acts as: user or service account, firm, role, privileges, scopesany token
GET/scopesEvery scope with its meaningany 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

CallWhat it doesScope
GET/accountsThe accounts you can see, valued at the latest simulated closesreference:read
GET/accounts/{id}One accountreference:read
POST/accountsAdd an account (simulated cash)reference:write
PATCH/accounts/{id}Change an account, incl. its model (If-Match)reference:write
GET/accounts/{id}/positionsPositions with value and weightportfolio:read
GET/accounts/{id}/lotsOpen tax lotsportfolio:read
GET/accounts/{id}/cashCash balance and recent (simulated) movementsportfolio:read
POST/accounts/{id}/cashDeposit or withdraw simulated cashportfolio:write
GET/accounts/{id}/driftDrift against the account's modelportfolio:read
GET/accounts/{id}/riskConcentration, exposures and factor betasportfolio:read
GET/modelsModel portfoliosreference:read
GET/models/{id}One model with targetsreference:read
POST/modelsCreate a modelreference:write
PUT/models/{id}Replace a model's targets (If-Match)reference:write
POST/rebalance-proposalsRebalance accounts: proposals in the Intent Pipeline (never orders); 202 with a job for more than 3 accountsportfolio:write
POST/what-ifsA what-if: sector changes for accounts, as a pipeline proposalportfolio:write
GET/proposalsRebalance proposalspipeline:read
GET/proposals/{id}One proposal with its tradespipeline:read

Pipeline

The Intent Pipeline: a request in plain English, checked in stages, before any order exists. Concepts and typical calls

CallWhat it doesScope
GET/pipeline/runsYour intent-pipeline requestspipeline:read
GET/pipeline/runs/{id}A request with its stagespipeline:read
POST/pipeline/runsInterpret a request in plain English (stage 0; the AI may be used)pipeline:write
POST/pipeline/runs/{id}/runRun the stages: entitlements, proposals, compliance pre-checkpipeline:write
POST/pipeline/runs/{id}/ordersCreate 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

CallWhat it doesScope
GET/ordersOrders on the accounts you can seeorders:read
GET/orders/{id}One order with allocations, compliance and historyorders:read
POST/ordersEnter an order: checked by compliance and routed by the workflow rules like any order (paper trading)orders:write
POST/orders/{id}/amendAmend quantity or limit (compliance re-checked; If-Match)orders:write
POST/orders/{id}/cancelCancel the unfilled partorders:write
POST/orders/{id}/releaseRelease an approved order to the simulator (compliance re-checked)orders:write
POST/orders/{id}/reworkRe-plan a working order's unfilled shares with another algoorders:write
POST/orders/{id}/approveApprove (four eyes: never the person who entered it)orders:approve
POST/orders/{id}/rejectRejectorders:approve
POST/orders/{id}/overrideOverride a soft compliance warning with a written reasonorders:write
POST/orders/{id}/allocateConfirm the allocation of executions (Operations)orders:write
GET/orders/{id}/fillsSimulated fills of an orderorders:read
GET/executionsSimulated fills on the accounts you can seeorders:read
GET/blotter/viewsSaved blotter views (yours and the firm's)orders:read
POST/blotter/viewsSave a blotter view (validated against the field registry)orders:write
PUT/blotter/views/{id}Replace a blotter vieworders:write
DELETE/blotter/views/{id}Delete a blotter vieworders:write

Compliance

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

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

Surveillance

Wash-trade, spoofing, restricted-list and cross-component alerts. Concepts and typical calls

CallWhat it doesScope
GET/surveillance/alertsSurveillance and anomaly alertssurveillance:read
GET/surveillance/alerts/{id}One alertsurveillance:read
POST/surveillance/alerts/{id}/reviewReview an alert (reviewed, dismissed, escalated) with a notesurveillance:write

Workflow

Items in flight, actions on them, my work, workflow rules, desks and SLAs. Concepts and typical calls

CallWhat it doesScope
GET/workflow/itemsItems in flight you can see (the monitor's board)workflow:read
GET/workflow/items/{id}One item with history, comments and approvalsworkflow:read
POST/workflow/items/{id}/actionsClaim, release, reassign, escalate, set the priority, move to a desk, comment, watch (never approve)workflow:act
GET/workflow/my-workWhat waits on you, what you requested, what you watchworkflow:read
GET/workflow/rulesWorkflow rules (every version)workflow:read
GET/workflow/rules/{id}One workflow ruleworkflow:read
POST/workflow/rulesDraft a rule from a structure, or from a sentence ("text"); replayed on the test benchworkflow:rules:write
POST/workflow/rules/{id}/test-benchReplay the last days of items (202: a job)workflow:rules:write
POST/workflow/rules/{id}/submitSubmit for sign-offworkflow:rules:write
GET/workflow/rules/{id}/sign-offWhat you would sign off, with a confirmation tokenworkflow:rules:approve
POST/workflow/rules/{id}/sign-offSign off as Admin or Compliance (a person; X-Vestoris-Confirm)workflow:rules:approve
GET/workflow/desksDesks, members and assignment modesworkflow:read
GET/workflow/slasSLA minutes and escalations per stageworkflow:read
GET/workflow/viewsSaved monitor viewsworkflow:read

AI

Navigator questions and natural-language commands (plan, preview, confirm). Concepts and typical calls

CallWhat it doesScope
POST/copilot/questionsAsk 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 runsai:use
GET/commands/{id}A command with its plan, preview and resultsai:use
POST/commands/{id}/executeExecute the previewed plan (X-Vestoris-Confirm: the preview token; "typed" for large or destructive plans)commands:execute
POST/commands/{id}/cancelCancel a previewed commandai:use

Market data

Simulated or uploaded closes, FX rates, corporate actions and as-of history. Concepts and typical calls

CallWhat it doesScope
GET/pricesDaily (simulated) closes of a securitymarket:read
GET/prices/latestThe latest close of securitiesmarket:read
GET/fx-ratesFX ratesmarket:read
GET/corporate-actionsCorporate 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

CallWhat it doesScope
GET/securitiesThe security masterreference:read
GET/securities/{id}One security, with its user-defined fieldsreference:read
POST/securitiesAdd a securityreference:write
PATCH/securities/{id}Change a security (If-Match)reference:write
GET/issuersIssuersreference:read
GET/brokersBrokers (reference only: Vestoris connects to no broker)reference:read
GET/benchmarksBenchmarks with constituentsreference:read
GET/account-groupsAccount groups (members limited to the accounts you can see)reference:read
POST/account-groupsCreate an account groupreference:write
GET/listsRestricted, watch and exclusion listsreference:read
GET/lists/{id}One list with its membersreference:read
POST/lists/{id}/membersAdd securities to a listreference:write
DELETE/lists/{id}/members/{securityId}Remove a security from a listreference:write

User-defined fields

Definitions and values of the ten user-defined fields of each table. Concepts and typical calls

CallWhat it doesScope
GET/udf/{table}The ten user-defined field definitions of a tablereference:read
PUT/udf/{table}/{slot}Define a field (Admins; versioned)udf:admin
GET/udf/{table}/records/{key}The user-defined values of one recordreference: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

CallWhat it doesScope
POST/data/{dataset}Load a file (CSV, TXT, XLSX or Vestoris XML) into a data set; the body is the filedata:load:<data set>
GET/batchesLoad historydata:read
GET/batches/{id}A batch's status and countsdata:read
GET/batches/{id}/rowsA batch's rows: the diff and the rejected rows with codesdata:read
POST/batches/{id}/applyApply a staged batchdata:write
POST/batches/{id}/undoUndo an applied batch (unless later trades depend on it)data:write
POST/batches/{id}/discardDiscard a staged batchdata:write
POST/feeds/bundlesLoad a folder of feed files (.zip); each file needs its data:load scopedata:load:<data set>
GET/feeds/bundles/{id}A folder's status, per filedata:read
POST/feeds/{id}/filesPush a file to an HTTPS-push feed (the feed's data:load scope)data:load:<data set>
GET/feedsFeeds and their scheduledata:read
GET/feeds/runsFeed runs of a business datedata:read
POST/feeds/runs/{id}/reviewApply or reject a held feed filedata:write
GET/schedulesScheduled jobs and their last runsdata:read
GET/start-of-dayThe start-of-day chain of a business datedata:read
GET/data-quality/issuesData quality issuesdata:read

Records

The hash-chained event log and the AI interaction log. Concepts and typical calls

CallWhat it doesScope
GET/eventsThe hash-chained event logevents:read
GET/events/verifyVerify the firm's hash chainevents:read
GET/ai-logAI 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

CallWhat it doesScope
GET/webhooksWebhookswebhooks:read
POST/webhooksAdd a webhook (the signing secret is returned once)webhooks:write
PATCH/webhooks/{id}Change events, URL or statuswebhooks:write
DELETE/webhooks/{id}Delete a webhookwebhooks:write
GET/webhooks/{id}/deliveriesThe delivery logwebhooks:read
POST/webhooks/{id}/deliveries/{deliveryId}/redeliverSend a delivery againwebhooks:write
POST/webhooks/{id}/pingSend a test eventwebhooks:write

Firm

The firm and its settings. Concepts and typical calls

CallWhat it doesScope
GET/firmThe firm and its settingsfirm:read
PATCH/firmChange settings (If-Match)firm:write

Users

People and service accounts, invitations, roles and privileges. Concepts and typical calls

CallWhat it doesScope
GET/usersUsers of the firm (people and service accounts)users:read
GET/users/{id}One user with privilegesusers:read
POST/usersInvite 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 privilegeadmin:users
GET/rolesRoles, their default privileges and maximum account permissionsusers:read

Entitlements

Per-account permissions: view, propose, trade, approve. Concepts and typical calls

CallWhat it doesScope
GET/entitlementsPer-account permissions of every userentitlements:read
PUT/entitlements/{userId}/{accountId}Set one user's permissions on one accountentitlements:write

Access reviews

Periodic reviews of who can do what, signed off by a person. Concepts and typical calls

CallWhat it doesScope
GET/access-reviewsAccess reviewsaccess_reviews:read
GET/access-reviews/{id}One access review with its recommendationsaccess_reviews:read
POST/access-reviewsDraft a new access reviewaccess_reviews:write
POST/access-reviews/{id}/sign-offSign 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

CallWhat it doesScope
GET/owner/inquiriesInquiries from the site's forms (site administrators only)owner:inquiries