Webhooks
A firm administrator subscribes an https address to events. An event carries the id of the object and a link to the API path where your own key fetches it; it never carries the content. Each request is signed: the Nyquist-Signature header is t=<unix seconds>,v1=<hex HMAC-SHA256 of '<t>.<raw body>' with the subscription secret>, and a receiver should also refuse a timestamp older than 300 s. A delivery that does not get a 2xx answer is retried up to 6 times, after 30 s, 2 min, 8 min, 32 min, 128 min. Redirects are not followed, and only public https addresses are called.
| Event | Refers to | Fetch it at | Meaning |
|---|
alert.fired | alert | /api/alerts/feed | An alert was delivered to a user of the firm. |
|---|
approval.requested | approval | /api/governance/approvals/inbox | A second-key approval was requested. |
|---|
approval.decided | approval | /api/governance/approvals/inbox | An approval request was decided. |
|---|
import.completed | import_attempt | /api/portfolios/{portfolio_id}/import/attempts | A book import reached its rows. |
|---|
recon.break | recon_run | /api/book-reconciliation/portfolios/{portfolio_id}/breaks | A reconciliation run opened new breaks; the reference is the run. |
|---|
run.completed | analysis_run | /api/ontology/runs/{run_id} | A run record was written for your firm (leaf, SDK, notebook or a nightly job). data carries the route, the moment and the outcome; the card is read with your key. |
|---|
brief.ready | book_brief | /api/pms/portfolios/{portfolio_id}/briefs/{brief_id} | A morning book brief was built. data carries its day, the trigger and the run card. |
|---|
Request headers: Content-Type Nyquist-Signature Nyquist-Event Nyquist-Event-Id Nyquist-Delivery Nyquist-Attempt
{
"id": "3f9c2a7e5b1d4c8a9e0f6b2d7a1c5e48",
"type": "alert.fired",
"occurred_at": "2026-01-01T12:00:00+00:00",
"ref": {
"kind": "alert",
"id": "a-1b2c3d"
},
"link": "https://api.nyquist.pro/api/alerts/feed"
}
from nyquist import construct_event
event = construct_event(secret, request_body_bytes, request.headers["Nyquist-Signature"])
# event["ref"]["id"] is fetched from event["link"] with your own key
stream
GET /api/alerts/stream
Your new alert-feed entries; ``after`` is the last ``alert_id`` you received. In Python: nq.stream.alerts(after=None, *, max_reconnects=None)
| Parameter | Type | Required | Meaning |
|---|
after | string | null | no | query. alert_id of the last entry already received. |
|---|
The reply is a server-sent event stream.
curl -X GET "$NYQUIST_API/api/alerts/stream" -H "X-API-Key: $NYQUIST_API_KEY" -H "Accept: text/event-stream" -N
GET /api/v1/stream/sse
Public market prices for ``symbols``; not replayed after a reconnect. In Python: nq.stream.prices(symbols, *, max_reconnects=None)
| Parameter | Type | Required | Meaning |
|---|
token | string | null | no | query. |
|---|
topics | string | no | query. |
|---|
The reply is a server-sent event stream.
curl -X GET "$NYQUIST_API/api/v1/stream/sse" -H "X-API-Key: $NYQUIST_API_KEY" -H "Accept: text/event-stream" -N
backtest
POST /api/backtest/historical
Historical backtest over caller-supplied price paths. In Python: nq.backtest.historical(payload)
| Request field | Type | Required | Meaning |
|---|
historical_prices | array of array of number | yes | — |
|---|
asset_names | array of string | null | no | — |
|---|
rebalance_frequency | one of daily, weekly, monthly, quarterly | no | — |
|---|
strategy_type | one of equal_weight, min_variance, risk_parity, max_sharpe, custom | no | — |
|---|
initial_weights | array of number | null | no | — |
|---|
lookback_window | integer | no | — |
|---|
transaction_cost_bps | number | no | — |
|---|
risk_free_rate | number | no | — |
|---|
initial_capital | number | no | — |
|---|
dates | array of string | null | no | — |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/backtest/historical" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"historical_prices": []}'
GET /api/backtest/job/{job_id}
Fetch the current HASH state for ``job_id``. In Python: nq.backtest.job(job_id)
| Parameter | Type | Required | Meaning |
|---|
job_id | string | yes | path. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/backtest/job/{job_id}" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/backtest/run
Synchronous backtest run (for long runs prefer :meth:`submit` + :meth:`job`; this route is not scheduled for removal). In Python: nq.backtest.run(payload)
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/backtest/run" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/backtest/submit
Enqueue an async backtest job, returning its ``job_id``. In Python: nq.backtest.submit(payload)
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/backtest/submit" -H "X-API-Key: $NYQUIST_API_KEY"
datasets
GET /api/datasets
The caller's own datasets as a DataFrame (empty-safe). In Python: nq.datasets.list()
| Parameter | Type | Required | Meaning |
|---|
limit | integer | no | query. |
|---|
offset | integer | no | query. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/datasets" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/datasets
Upload a DataFrame or a local CSV/parquet file path. In Python: nq.datasets.upload(data, name=None)
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/datasets" -H "X-API-Key: $NYQUIST_API_KEY"
DELETE /api/datasets/{dataset_id}
Delete a dataset (best-effort storage cleanup server-side). In Python: nq.datasets.delete(dataset_id)
| Parameter | Type | Required | Meaning |
|---|
dataset_id | string | yes | path. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X DELETE "$NYQUIST_API/api/datasets/{dataset_id}" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/datasets/{dataset_id}
Fetch one dataset's metadata. In Python: nq.datasets.get(dataset_id)
| Parameter | Type | Required | Meaning |
|---|
dataset_id | string | yes | path. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/datasets/{dataset_id}" -H "X-API-Key: $NYQUIST_API_KEY"
ledger
GET /api/execution-ledger/positions
Net positions per (instrument, source). In Python: nq.ledger.positions(account_id=None)
| Parameter | Type | Required | Meaning |
|---|
account_id | string | null | no | query. |
|---|
portfolio_id | string | null | no | query. |
|---|
scope | one of mine, all | no | query. mine = my tenant; all = every tenant (admin only) |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/execution-ledger/positions" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/execution-ledger/reconciliation
Origin-store vs ledger counts per source (nonzero lag = sync drift). In Python: nq.ledger.reconciliation()
| Parameter | Type | Required | Meaning |
|---|
scope | one of mine, all | no | query. mine = my tenant; all = every tenant (admin only) |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/execution-ledger/reconciliation" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/execution-ledger/sources
The four unioned execution sources. In Python: nq.ledger.sources()
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/execution-ledger/sources" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/execution-ledger/sync
Force a full (no-watermark) resync from all sources; idempotent. In Python: nq.ledger.sync()
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/execution-ledger/sync" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/execution-ledger/trades
Unified trade blotter. In Python: nq.ledger.trades()
| Parameter | Type | Required | Meaning |
|---|
source | string | null | no | query. |
|---|
account_id | string | null | no | query. |
|---|
portfolio_id | string | null | no | query. |
|---|
instrument | string | null | no | query. |
|---|
limit | integer | no | query. |
|---|
offset | integer | no | query. |
|---|
scope | one of mine, all | no | query. mine = my tenant; all = every tenant (admin only) |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/execution-ledger/trades" -H "X-API-Key: $NYQUIST_API_KEY"
macro
GET /api/macro-data/cbr/key-rate
Current CBR key rate + history. In Python: nq.macro.cbr_key_rate()
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/macro-data/cbr/key-rate" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/macro-data/ecb/history
Historical ECB exchange rates (Frankfurter), date-indexed. In Python: nq.macro.ecb_history()
| Parameter | Type | Required | Meaning |
|---|
base | string | no | query. |
|---|
start | string | yes | query. Start date (YYYY-MM-DD) |
|---|
end | string | null | no | query. End date (YYYY-MM-DD) |
|---|
symbols | string | null | no | query. Comma-separated currencies |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/macro-data/ecb/history" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/macro-data/fred/series
FRED economic series observations, date-indexed. In Python: nq.macro.fred(series_id)
| Parameter | Type | Required | Meaning |
|---|
series_id | string | yes | query. FRED series ID (e.g. GDP, CPIAUCSL, UNRATE) |
|---|
limit | integer | no | query. |
|---|
sort_order | string | no | query. |
|---|
observation_start | string | null | no | query. |
|---|
observation_end | string | null | no | query. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/macro-data/fred/series" -H "X-API-Key: $NYQUIST_API_KEY"
marketdata
GET /api/market-data/currency/{base}/{quote}
Spot rate for a currency pair. In Python: nq.marketdata.fx(base, quote='USD')
| Parameter | Type | Required | Meaning |
|---|
base | string | yes | path. |
|---|
quote | string | yes | path. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/market-data/currency/{base}/{quote}" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/market-data/history/{ticker}
Daily OHLCV for ``ticker`` from the Golden Record store. In Python: nq.marketdata.history(ticker, days=365, source=None)
| Parameter | Type | Required | Meaning |
|---|
ticker | string | yes | path. |
|---|
lookback_days | integer | no | query. |
|---|
source | string | null | no | query. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/market-data/history/{ticker}" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/market-data/stock/{ticker}
Latest quote + fundamentals for one equity. In Python: nq.marketdata.price(ticker)
| Parameter | Type | Required | Meaning |
|---|
ticker | string | yes | path. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/market-data/stock/{ticker}" -H "X-API-Key: $NYQUIST_API_KEY"
ontology
POST /api/ontology/query/ask
Answer a natural-language question grounded in ontology state. In Python: nq.ontology.ask(query, language='en')
| Request field | Type | Required | Meaning |
|---|
query | string | yes | — |
|---|
language | string | no | — |
|---|
| Response field | Type | Required | Meaning |
|---|
query | string | yes | — |
|---|
intent | string | null | no | — |
|---|
plan | object | null | no | — |
|---|
n_results | integer | yes | — |
|---|
answer | string | yes | — |
|---|
results | array of object | no | — |
|---|
model_id | string | no | — |
|---|
provider | string | no | — |
|---|
error | string | null | no | — |
|---|
language_used | string | no | — |
|---|
language_fallback | boolean | no | — |
|---|
curl -X POST "$NYQUIST_API/api/ontology/query/ask" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"query": "string"}'
POST /api/ontology/search/semantic
Vector semantic search over ontology objects. In Python: nq.ontology.search(query, k=10, kind=None)
| Request field | Type | Required | Meaning |
|---|
query | string | yes | — |
|---|
kind | string | null | no | — |
|---|
k | integer | no | — |
|---|
| Response field (a list of these) | Type | Required | Meaning |
|---|
object | AgentVerdict | AnalysisRun | BacktestResult | Case | Check | CheckReport | CollateralAllocation | CommitteePack | CorrelationMatrix | Counterparty | CreditEventRecord | CsaMarginCall | DataBuild | DataJob | DataSchedule | DataSource | DecisionRecord | ExecutionAnalytics | ExecutionQualityReport | FactorModelFit | GeoEntity | GreekSnapshot | HedgeProgram | Indicator | Instrument | InstrumentValuation | JointScenarioSample | MarginRequirement | ModelCalibration | Observation | OperationalPicture | OrderAttestation | OtcStructuredTrade | PeFund | PointProcessFit | PortfolioCompany | PortfolioOptimization | Position-Output | PricingModel | RegimeState | RegulatoryNorm | RiskLimit | Scenario | ScenarioDetection | Sensor | SettlementInstructionObject | StressScenario-Output | StressTestResult | Trade | TransformRun | VaRReport | VolSurface | VolatilityEstimate | WikiPage | YieldCurve | yes | — |
|---|
distance | number | yes | — |
|---|
curl -X POST "$NYQUIST_API/api/ontology/search/semantic" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"query": "string"}'
runs
GET /api/ontology/runs
Your runs, newest first: ``{"results": [...], "total": n}`` (``total`` is this page). In Python: nq.runs.list(*, status=None, label=None, since=None, until=None, limit=50, offset=0)
| Parameter | Type | Required | Meaning |
|---|
status | one of ok, error | null | no | query. |
|---|
label | string | null | no | query. |
|---|
since | string | null | no | query. |
|---|
until | string | null | no | query. |
|---|
limit | integer | no | query. |
|---|
offset | integer | no | query. |
|---|
| Response field | Type | Required | Meaning |
|---|
results | array of AnalysisRun | yes | — |
|---|
total | integer | yes | — |
|---|
curl -X GET "$NYQUIST_API/api/ontology/runs" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/ontology/runs/diff
The difference between the inputs and the results of two of your runs. In Python: nq.runs.compare(a, b)
| Parameter | Type | Required | Meaning |
|---|
a | string | yes | query. |
|---|
b | string | yes | query. |
|---|
| Response field | Type | Required | Meaning |
|---|
a | string | yes | — |
|---|
b | string | yes | — |
|---|
inputs | array of DiffEntryModel | yes | — |
|---|
inputs_truncated | boolean | yes | — |
|---|
results | array of ResultPairModel | yes | — |
|---|
unpaired_a | array of string | yes | — |
|---|
unpaired_b | array of string | yes | — |
|---|
unreadable | array of string | yes | — |
|---|
curl -X GET "$NYQUIST_API/api/ontology/runs/diff" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/ontology/runs/{run_id}
The card of one of your runs; without an id, the latest call of this client. In Python: nq.runs.get(run_id=None)
| Parameter | Type | Required | Meaning |
|---|
run_id | string | yes | path. |
|---|
| Response field | Type | Required | Meaning |
|---|
object_id | string | yes | — |
|---|
kind | string | no | — |
|---|
created_at | string | no | — |
|---|
marking | one of public, internal, confidential, restricted | no | — |
|---|
run_id | string | yes | — |
|---|
label | string | yes | — |
|---|
route | string | null | no | — |
|---|
request_id | string | null | no | — |
|---|
actor_id | string | null | no | — |
|---|
auth_kind | one of jwt, api_key, demo_guest, dev | null | no | — |
|---|
tenant_id | string | null | no | — |
|---|
status | one of ok, error | yes | — |
|---|
error_type | string | null | no | — |
|---|
error_message | string | null | no | — |
|---|
started_at | string | null | no | — |
|---|
finished_at | string | yes | — |
|---|
duration_ms | number | null | no | — |
|---|
inputs_digest | string | null | no | — |
|---|
inputs | object | null | no | — |
|---|
inputs_truncated | boolean | no | — |
|---|
result_urns | array of string | no | — |
|---|
as_of | string | yes | — |
|---|
attributes | object | no | — |
|---|
curl -X GET "$NYQUIST_API/api/ontology/runs/{run_id}" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/ontology/runs/{run_id}/lineage
Where the numbers of a run come from: inputs, objects, sources and runs beneath it. In Python: nq.runs.lineage(run_id=None, *, depth=None, kind=None)
| Parameter | Type | Required | Meaning |
|---|
run_id | string | yes | path. |
|---|
depth | integer | no | query. |
|---|
kind | string | null | no | query. |
|---|
| Response field | Type | Required | Meaning |
|---|
run_id | string | yes | — |
|---|
max_depth | integer | yes | — |
|---|
nodes | array of LineageNodeModel | yes | — |
|---|
edges | array of LineageEdgeModel | yes | — |
|---|
truncated | boolean | yes | — |
|---|
depth_limited | boolean | yes | — |
|---|
cycles_skipped | integer | yes | — |
|---|
unreadable | integer | yes | — |
|---|
results_omitted | integer | yes | — |
|---|
curl -X GET "$NYQUIST_API/api/ontology/runs/{run_id}/lineage" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/ontology/tools/governance
What the surface contains, by permission and verb — and whether it is on. In Python: nq.tools.governance()
| Response field | Type | Required | Meaning |
|---|
enabled | boolean | yes | — |
|---|
total_tools | integer | yes | — |
|---|
by_permission | object | yes | — |
|---|
by_method | object | yes | — |
|---|
curl -X GET "$NYQUIST_API/api/ontology/tools/governance" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/ontology/tools/search
Rank tools against free-text ``query``. In Python: nq.tools.search(query, limit=20)
| Parameter | Type | Required | Meaning |
|---|
q | string | no | query. |
|---|
limit | integer | no | query. |
|---|
| Response field | Type | Required | Meaning |
|---|
query | string | yes | — |
|---|
results | array of GeneratedToolView | yes | — |
|---|
total_available | integer | yes | — |
|---|
enabled | boolean | yes | — |
|---|
curl -X GET "$NYQUIST_API/api/ontology/tools/search" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/ontology/tools/{tool_id}
One tool's view — path, method, parameter schema, required permission. In Python: nq.tools.get(tool_id)
| Parameter | Type | Required | Meaning |
|---|
tool_id | string | yes | path. |
|---|
| Response field | Type | Required | Meaning |
|---|
tool_id | string | yes | — |
|---|
path | string | yes | — |
|---|
method | string | yes | — |
|---|
description | string | yes | — |
|---|
parameters_schema | object | yes | — |
|---|
requires | string | yes | — |
|---|
reason | string | yes | — |
|---|
curl -X GET "$NYQUIST_API/api/ontology/tools/{tool_id}" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/ontology/tools/{tool_id}/execute
Run one tool with ``params`` and return its result. In Python: nq.tools.execute(tool_id, params=None)
| Parameter | Type | Required | Meaning |
|---|
tool_id | string | yes | path. |
|---|
| Request field | Type | Required | Meaning |
|---|
parameters | object | no | — |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/ontology/tools/{tool_id}/execute" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{}'
portfolio
GET /api/portfolio/plans
The caller's plans, newest first, as a DataFrame. In Python: nq.portfolio.list(portfolio_id=None)
| Parameter | Type | Required | Meaning |
|---|
portfolio_id | string | null | no | query. |
|---|
| Response field (a list of these) | Type | Required | Meaning |
|---|
id | string | yes | — |
|---|
status | string | yes | — |
|---|
portfolio_id | string | null | yes | — |
|---|
portfolio_snapshot_id | string | null | yes | — |
|---|
body | object | yes | — |
|---|
impact | ImpactMetrics | null | no | — |
|---|
validations | array of RecValidationOut | no | — |
|---|
approved_order_ids | array of string | no | — |
|---|
prompt_tokens | integer | no | — |
|---|
completion_tokens | integer | no | — |
|---|
verification | Verification | null | no | — |
|---|
curl -X GET "$NYQUIST_API/api/portfolio/plans" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/portfolio/plans/{plan_id}
Owner-scoped fetch of one plan. In Python: nq.portfolio.get(plan_id)
| Parameter | Type | Required | Meaning |
|---|
plan_id | string | yes | path. |
|---|
| Response field | Type | Required | Meaning |
|---|
id | string | yes | — |
|---|
status | string | yes | — |
|---|
portfolio_id | string | null | yes | — |
|---|
portfolio_snapshot_id | string | null | yes | — |
|---|
body | object | yes | — |
|---|
impact | ImpactMetrics | null | no | — |
|---|
validations | array of RecValidationOut | no | — |
|---|
approved_order_ids | array of string | no | — |
|---|
prompt_tokens | integer | no | — |
|---|
completion_tokens | integer | no | — |
|---|
verification | Verification | null | no | — |
|---|
curl -X GET "$NYQUIST_API/api/portfolio/plans/{plan_id}" -H "X-API-Key: $NYQUIST_API_KEY"
reports
GET /api/reports/download
Turn a saved report ``key`` into a short-lived presigned URL. In Python: nq.reports.download_url(key)
| Parameter | Type | Required | Meaning |
|---|
key | string | yes | query. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/reports/download" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/reports/list
The caller's own saved reports (owner-scoped). In Python: nq.reports.list()
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/reports/list" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/reports/save
Generate and persist a strategy report, returning its storage key. In Python: nq.reports.save(*, title, returns, metrics, weights=None, benchmark_returns=None)
| Request field | Type | Required | Meaning |
|---|
title | string | yes | — |
|---|
returns | array of number | yes | — |
|---|
metrics | object | yes | — |
|---|
weights | object | null | no | — |
|---|
benchmark_returns | array of number | null | no | — |
|---|
save | boolean | no | Save to MinIO for later access |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/reports/save" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"title": "string", "returns": [], "metrics": {}}'
risk
POST /api/risk/portfolio-var
Historical VaR/CVaR for a weighted book. In Python: nq.risk.portfolio_var(tickers, weights, returns_data, *, confidence_level=0.99, portfolio_value=1000000.0)
| Request field | Type | Required | Meaning |
|---|
portfolio_weights | object | yes | symbol → weight |
|---|
returns_data | object | yes | symbol → daily returns |
|---|
confidence_level | number | no | — |
|---|
portfolio_value | number | yes | Portfolio NAV |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/risk/portfolio-var" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"portfolio_weights": {}, "returns_data": {}, "portfolio_value": 0}'
POST /api/risk/symbol/var
VaR/CVaR with returns auto-fetched from the Golden Record store. In Python: nq.risk.symbol_var(symbols, start_date, end_date, *, weights=None, method='parametric', confidence=0.95, horizon=1, portfolio_value=1.0, use_garch=False, garch_model='garch_11')
| Request field | Type | Required | Meaning |
|---|
symbols | array of string | yes | — |
|---|
start_date | string | yes | — |
|---|
end_date | string | yes | — |
|---|
method | one of parametric, historical, monte_carlo | no | VaR method |
|---|
confidence | number | no | Confidence level |
|---|
horizon | integer | no | Horizon in trading days |
|---|
portfolio_value | number | no | Portfolio NAV |
|---|
weights | array of number | null | no | Portfolio weights |
|---|
n_simulations | integer | no | Monte Carlo simulations |
|---|
use_garch | boolean | no | Use GARCH-conditional volatility |
|---|
garch_model | string | no | GARCH model variant |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/risk/symbol/var" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"symbols": [], "start_date": "string", "end_date": "string"}'
POST /api/risk/var
Single-method VaR/CVaR on a caller-supplied return series. In Python: nq.risk.var(returns, *, method='parametric', confidence=0.95, horizon=1, portfolio_value=1.0, n_simulations=10000, use_garch=False, garch_model='garch_11', seed=None)
| Request field | Type | Required | Meaning |
|---|
returns | array of number | yes | Daily return series |
|---|
method | one of parametric, historical, monte_carlo | no | VaR method |
|---|
confidence | number | no | Confidence level |
|---|
horizon | integer | no | Horizon in trading days |
|---|
portfolio_value | number | no | Portfolio NAV |
|---|
n_simulations | integer | no | Monte Carlo simulations |
|---|
use_garch | boolean | no | Use GARCH-conditional volatility |
|---|
garch_model | string | no | GARCH model variant |
|---|
seed | integer | null | no | Monte Carlo RNG seed; set for reproducible/audit-replayable VaR |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/risk/var" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"returns": []}'
stress
GET /api/stress/historical-scenarios
List available historical crisis scenarios. In Python: nq.stress.scenarios()
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X GET "$NYQUIST_API/api/stress/historical-scenarios" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/stress/symbol/test
Stress a book given by tickers: returns and covariance come from the Golden Record. In Python: nq.stress.symbol_test(payload)
| Request field | Type | Required | Meaning |
|---|
symbols | array of string | yes | — |
|---|
start_date | string | yes | — |
|---|
end_date | string | yes | — |
|---|
initial_capital | number | yes | — |
|---|
risk_free_rate | number | no | — |
|---|
gamma | number | no | — |
|---|
scenarios | array of src__api__stress__StressScenario | yes | — |
|---|
n_paths | integer | no | — |
|---|
seed | integer | null | no | — |
|---|
weights | array of number | null | no | — |
|---|
reoptimize_under_shock | boolean | no | — |
|---|
asset_classes | array of one of equities, bonds, commodities, fx, real_estate, options | null | no | — |
|---|
portfolio_hint | string | null | no | Optional portfolio identifier — when provided, per-scenario stress P&L is persisted to the ontology as StressTestResult rows. |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/stress/symbol/test" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"symbols": [], "start_date": "string", "end_date": "string", "initial_capital": 0, "scenarios": []}'
POST /api/stress/test
Stress a book given by return/covariance inputs and scenarios. In Python: nq.stress.test(payload)
| Request field | Type | Required | Meaning |
|---|
mu | array of number | null | no | — |
|---|
cov_matrix | array of array of number | yes | — |
|---|
initial_capital | number | yes | — |
|---|
risk_free_rate | number | yes | — |
|---|
gamma | number | yes | — |
|---|
scenarios | array of src__api__stress__StressScenario | yes | — |
|---|
asset_names | array of string | null | no | — |
|---|
n_paths | integer | no | — |
|---|
seed | integer | null | no | — |
|---|
weights | array of number | null | no | — |
|---|
reoptimize_under_shock | boolean | no | — |
|---|
asset_classes | array of one of equities, bonds, commodities, fx, real_estate, options | null | no | — |
|---|
portfolio_hint | string | null | no | Optional portfolio identifier — when provided, per-scenario stress P&L is persisted to the ontology as StressTestResult rows. |
|---|
factor_shock | FactorShockBook | null | no | — |
|---|
The reply has no declared schema; the SDK returns it as parsed JSON.
curl -X POST "$NYQUIST_API/api/stress/test" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"cov_matrix": [], "initial_capital": 0, "risk_free_rate": 0, "gamma": 0, "scenarios": []}'
handoffs
GET /api/studio/sdk/handoffs/{handoff_id}
The handoff and its notebook (``nbformat`` dict under ``notebook``). In Python: nq.handoffs.get(handoff_id)
| Parameter | Type | Required | Meaning |
|---|
handoff_id | string | yes | path. |
|---|
| Response field | Type | Required | Meaning |
|---|
id | string | yes | — |
|---|
leaf_code | string | null | yes | — |
|---|
leaf_key | string | null | yes | — |
|---|
created_at | string | yes | — |
|---|
filename | string | yes | — |
|---|
calls | array of HandoffCallOut | yes | — |
|---|
notebook | object | yes | The notebook in nbformat 4.5, built from this handoff on every read. |
|---|
curl -X GET "$NYQUIST_API/api/studio/sdk/handoffs/{handoff_id}" -H "X-API-Key: $NYQUIST_API_KEY"
webhooks
GET /api/webhooks/events
The event catalog: type, object kind, API path, meaning. ``GET /api/webhooks/events``. In Python: nq.webhooks.events()
| Response field (a list of these) | Type | Required | Meaning |
|---|
type | string | yes | Event type to subscribe to, for example alert.fired. |
|---|
ref_kind | string | yes | Kind of object the event refers to. |
|---|
link | string | yes | API path, relative to the API base URL, where the object is fetched with your key. |
|---|
description | string | yes | What the event means. |
|---|
curl -X GET "$NYQUIST_API/api/webhooks/events" -H "X-API-Key: $NYQUIST_API_KEY"
GET /api/webhooks/subscriptions
Your firm's subscriptions (no secrets). ``GET /api/webhooks/subscriptions``. In Python: nq.webhooks.list()
| Response field (a list of these) | Type | Required | Meaning |
|---|
id | string | yes | Subscription id. |
|---|
url | string | yes | Address the events are sent to (https, public host). |
|---|
events | array of string | yes | Event types this subscription receives. |
|---|
description | string | yes | Free-text note set by the administrator. |
|---|
active | boolean | yes | False while deliveries are switched off for this subscription. |
|---|
created_at | string | yes | When the subscription was created, UTC. |
|---|
updated_at | string | yes | When the subscription was last changed, UTC. |
|---|
curl -X GET "$NYQUIST_API/api/webhooks/subscriptions" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/webhooks/subscriptions
Subscribe ``url`` (https, public host) to ``events``; the reply carries ``secret`` once. In Python: nq.webhooks.create(url, events, description=None)
| Request field | Type | Required | Meaning |
|---|
url | string | yes | https address of the receiving endpoint. |
|---|
events | array of string | yes | Event types from the catalog. |
|---|
description | string | null | no | Free-text note. |
|---|
| Response field | Type | Required | Meaning |
|---|
id | string | yes | Subscription id. |
|---|
url | string | yes | Address the events are sent to (https, public host). |
|---|
events | array of string | yes | Event types this subscription receives. |
|---|
description | string | yes | Free-text note set by the administrator. |
|---|
active | boolean | yes | False while deliveries are switched off for this subscription. |
|---|
created_at | string | yes | When the subscription was created, UTC. |
|---|
updated_at | string | yes | When the subscription was last changed, UTC. |
|---|
secret | string | yes | Signing secret. Shown once, here; only a sealed copy is stored. Use it to verify Nyquist-Signature. |
|---|
curl -X POST "$NYQUIST_API/api/webhooks/subscriptions" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{"url": "string", "events": []}'
DELETE /api/webhooks/subscriptions/{subscription_id}
Remove a subscription and its queue (the attempt log stays). In Python: nq.webhooks.delete(subscription_id)
| Parameter | Type | Required | Meaning |
|---|
subscription_id | string | yes | path. |
|---|
| Response field | Type | Required | Meaning |
|---|
removed | integer | yes | 1 when the subscription and its queue were removed. |
|---|
curl -X DELETE "$NYQUIST_API/api/webhooks/subscriptions/{subscription_id}" -H "X-API-Key: $NYQUIST_API_KEY"
PATCH /api/webhooks/subscriptions/{subscription_id}
Change a subscription, leaving omitted fields as they are. In Python: nq.webhooks.update(subscription_id, *, url=None, events=None, description=None, active=None)
| Parameter | Type | Required | Meaning |
|---|
subscription_id | string | yes | path. |
|---|
| Request field | Type | Required | Meaning |
|---|
url | string | null | no | New https address. |
|---|
events | array of string | null | no | New set of event types. |
|---|
description | string | null | no | New note. |
|---|
active | boolean | null | no | Switch deliveries on or off. |
|---|
| Response field | Type | Required | Meaning |
|---|
id | string | yes | Subscription id. |
|---|
url | string | yes | Address the events are sent to (https, public host). |
|---|
events | array of string | yes | Event types this subscription receives. |
|---|
description | string | yes | Free-text note set by the administrator. |
|---|
active | boolean | yes | False while deliveries are switched off for this subscription. |
|---|
created_at | string | yes | When the subscription was created, UTC. |
|---|
updated_at | string | yes | When the subscription was last changed, UTC. |
|---|
curl -X PATCH "$NYQUIST_API/api/webhooks/subscriptions/{subscription_id}" -H "X-API-Key: $NYQUIST_API_KEY" -H 'Content-Type: application/json' -d '{}'
GET /api/webhooks/subscriptions/{subscription_id}/attempts
The delivery log, newest first: status code and outcome class of every attempt. In Python: nq.webhooks.attempts(subscription_id, limit=100)
| Parameter | Type | Required | Meaning |
|---|
subscription_id | string | yes | path. |
|---|
limit | integer | no | query. |
|---|
| Response field (a list of these) | Type | Required | Meaning |
|---|
id | integer | yes | Journal row number, newest first. |
|---|
delivery_id | string | yes | Id of the delivery the attempt belongs to. |
|---|
event_id | string | yes | Id of the event, the same on every attempt of one delivery. |
|---|
event_type | string | yes | Event type. |
|---|
attempt | integer | yes | Attempt number within the delivery, from 1. |
|---|
outcome | string | yes | delivered, http_error, timeout, unreachable, address_refused, inactive or secret_error. |
|---|
http_status | integer | null | yes | Status code your server answered with, if it answered. |
|---|
duration_ms | integer | yes | How long the attempt took, milliseconds. |
|---|
at | string | null | yes | When the attempt was made, UTC. |
|---|
curl -X GET "$NYQUIST_API/api/webhooks/subscriptions/{subscription_id}/attempts" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/webhooks/subscriptions/{subscription_id}/ping
Send a signed ``webhook.ping`` now; the reply is what your server answered. In Python: nq.webhooks.ping(subscription_id)
| Parameter | Type | Required | Meaning |
|---|
subscription_id | string | yes | path. |
|---|
| Response field | Type | Required | Meaning |
|---|
event_id | string | yes | Id of the test event. |
|---|
outcome | string | yes | delivered, http_error, timeout, unreachable or address_refused. |
|---|
http_status | integer | null | yes | Status code your server answered with, if it answered. |
|---|
duration_ms | integer | yes | How long the attempt took, milliseconds. |
|---|
curl -X POST "$NYQUIST_API/api/webhooks/subscriptions/{subscription_id}/ping" -H "X-API-Key: $NYQUIST_API_KEY"
POST /api/webhooks/subscriptions/{subscription_id}/rotate-secret
A new signing secret (in the reply, once); the old one stops verifying at once. In Python: nq.webhooks.rotate_secret(subscription_id)
| Parameter | Type | Required | Meaning |
|---|
subscription_id | string | yes | path. |
|---|
| Response field | Type | Required | Meaning |
|---|
id | string | yes | Subscription id. |
|---|
url | string | yes | Address the events are sent to (https, public host). |
|---|
events | array of string | yes | Event types this subscription receives. |
|---|
description | string | yes | Free-text note set by the administrator. |
|---|
active | boolean | yes | False while deliveries are switched off for this subscription. |
|---|
created_at | string | yes | When the subscription was created, UTC. |
|---|
updated_at | string | yes | When the subscription was last changed, UTC. |
|---|
secret | string | yes | Signing secret. Shown once, here; only a sealed copy is stored. Use it to verify Nyquist-Signature. |
|---|
curl -X POST "$NYQUIST_API/api/webhooks/subscriptions/{subscription_id}/rotate-secret" -H "X-API-Key: $NYQUIST_API_KEY"