Skip to content
AI agents

Automate model refreshes with the API and webhooks.

Combine scheduled ENSEMBLE refreshes, Business HMAC-signed webhooks, and REST allocation exports to automate model review and reporting pipelines.

By Updated 2 min read

Running a backtest once proves an idea worked historically. Keeping an allocation model current across trading days requires scheduled execution, failure visibility, and an event-driven handoff to your team's reporting or review workflow.

On ENSEMBLE, scheduled refreshes are available on every plan (metered at list rates within your spending cap), and Business adds signed HTTPS webhooks, broker-format CSV exports, and white-label PDF fact sheets.

Architecture of an automated review pipeline

A reliable advisor or quant operations pipeline separates computation (ENSEMBLE) from notification and human review (your receiver):

  1. Enable scheduled refresh on the model. Once a model is built and its defaults are reviewed, enable its schedule. On supported trading days, when upstream market data settles and child dependencies are ready, ENSEMBLE refreshes the model within your account spending cap.
  2. Receive a signed webhook POST (Business). When the refresh completes, ENSEMBLE dispatches a signed HTTPS POST to your registered endpoint for model.refresh.completed (with source set to scheduled, manual, cascade, or mcp) or model.rebuild.completed.
  3. Verify signature and fetch exact allocations. Your receiver validates the HMAC signature, checks the model ID and completion status, and calls GET /v1/models/{model}/exports (or GET /v1/models/{model}/history?include=latest) to retrieve the exact dated target weights or broker CSV.
  4. Compare against prior target weights. Diff the new target book against the last approved allocation. If weights changed beyond your operational threshold, post a summary to Slack/email and attach the Altruist or IBKR file for human sign-off.

Registering and managing webhooks via REST API

Webhooks require the Business plan ($99/month with $200 included monthly usage). Register an HTTPS receiver with POST /v1/webhooks (the signing secret is revealed only at creation time):

# Register a webhook receiver (Business)
curl -X POST "https://api.ensemble.markets/v1/webhooks" \
  -H "Authorization: Bearer $ENSEMBLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://ops.yourfirm.example/webhooks/ensemble",
    "description": "Model refresh review queue"
  }'

# Inspect delivery status (secrets are omitted on list)
curl "https://api.ensemble.markets/v1/webhooks" \
  -H "Authorization: Bearer $ENSEMBLE_API_KEY"

When your receiver handles model.refresh.completed, pull the exact export file for the completed run_id:

# Pull the dated target allocation CSV for review
curl "https://api.ensemble.markets/v1/models/MODEL_ID/exports?format=altruist&book=target" \
  -H "Authorization: Bearer $ENSEMBLE_API_KEY"

Operational safeguards you should build in

Never treat a cron schedule or a webhook notification as blind proof that weights are ready to trade:

  • Check as_of and decision_date. Verify that the returned data date matches the latest completed U.S. trading session before forwarding weights to your review queue.
  • Handle stale or paused refreshes gracefully. If an account hits its spending cap or upstream market data is incomplete, ENSEMBLE retains the last published result with its original date rather than publishing corrupt weights. Alert your ops channel if as_of lags expected market calendars.
  • Make webhook handlers idempotent. Key downstream notifications by (model_id, run_id) so retried deliveries never generate duplicate review tickets.
  • Keep execution human-reviewed. ENSEMBLE prepares dated research records and broker-format files; it does not place orders or verify account-level broker tradability.

Start designing your pipeline

Use the workflow below to inspect a saved model, review its CLI and API retrieval commands, and map out scheduled refreshes and Business webhook notifications for your team.

Start with this request

Use ENSEMBLE to confirm my connected account. Inspect one of my saved models and its latest run, show the equivalent REST API and CLI commands to read its target allocations and metrics, and explain how scheduled refreshes and Business webhooks fit into an automated review pipeline.

Frequently asked questions

Which webhook events does ENSEMBLE send?
On the Business plan, ENSEMBLE sends signed HTTPS POST deliveries for model.refresh.completed (fired after manual, scheduled, cascade, or mcp refreshes, identified by the payload source field) and model.rebuild.completed.
How should my receiver verify ENSEMBLE webhook authenticity?
When you create a webhook via POST /v1/webhooks, ENSEMBLE returns a signing secret once. Store that secret securely and verify the HMAC signature on every incoming POST request before fetching allocations or triggering internal notifications.
What determines whether a scheduled model refresh actually runs?
Scheduled refreshes execute on supported trading days subject to model readiness, child-model dependency readiness (for composed models), underlying data availability, and your account's credit or spending cap. Always inspect the latest successful run and its data date before acting on weights.
Can a webhook automatically execute trades in my brokerage account?
ENSEMBLE never places trades or connects to brokerage execution APIs. A webhook notifies your own infrastructure that a fresh model run completed so your system can pull the dated allocation file, alert an advisor, or stage a human review checklist.

Backtests are illustrative. Past performance does not guarantee future results. ENSEMBLE is a software platform, not an investment adviser.

Part of Keep investment research available across conversations..

Use the same models across MCP, REST API, CLI, and the web.Connect your agent