[ getting started · 2 of 3 ]

Setup wizard

The Setup Wizard is an agent-driven flow that walks you through linking every provider NVTrader can talk to — brokers, market-data sources, LLM endpoints — and runs a smoke connection test on each. It reads from skills/setup/*.md so the steps stay in sync with the operator playbooks.

What it is · how it works · why it matters

[ what ]

An agent-driven flow that links every supported provider — brokers, data sources, LLMs — and smoke-tests each before activation. 18 providers supported.

[ how ]

Reads skills/setup/<cat>/<id>.md — same files double as operator playbooks. Steps: pre-flight (cost, account type) → get-the-key (link + URL) → paste-and-encrypt (Fernet at rest) → smoke-test → activate. Adding a provider = one markdown file + one adapter class.

[ why ]

Provider onboarding runs through a typed chat flow; each step links the right account-setup URL and runs a smoke connection test. Providers are optional, so the base install surface stays small.

How to invoke it

  1. From any page, click 🪄 Wizard in the embedded chat panel or
  2. type get_setup_guide alpaca in chat (substitute the provider id), or
  3. navigate to Account → API keys and click Configure next to a provider.

The wizard reads the matching markdown file from skills/setup/<category>/<provider>.md and reformats it as a step-by-step in-chat experience. Each step ends with a button that copies the right URL to your clipboard or pre-fills the right field.

Supported providers

CategoryProviderStatusSource
BrokersSimBrokerliveskills/setup/brokers/sim.md
Alpaca paper + liveliveskills/setup/brokers/alpaca.md
Webull OpenAPIUAT pendingskills/setup/brokers/webull.md
IBKR · Tradierstub
Datayfinanceliveskills/setup/data/yfinance.md
Finnhubliveskills/setup/data/finnhub.md
Tavilyliveskills/setup/data/tavily.md
SEC EDGARliveskills/setup/data/edgar.md
Polygonoptionalskills/setup/data/polygon.md
LLMNVIDIA Buildliveskills/setup/llm/nvidia.md
OpenRouteroptionalskills/setup/llm/openrouter.md
Hugging Face Inferenceoptionalskills/setup/llm/huggingface.md
OpenAI-compatible (vLLM, Groq, Ollama …)optionalskills/setup/llm/openai_compatible.md

What the wizard does

For every provider the steps are the same shape, so the flow is predictable:

  1. Pre-flight — wizard tells you what kind of account you need and the rough cost (e.g. Alpaca paper is free; Finnhub free tier caps at 60 req/min; Tavily free credits drop after the first 1000 calls).
  2. Get the key — link to the exact dashboard URL and the click path. For OAuth providers (Webull, IBKR) it walks the consent flow.
  3. Paste & encrypt — paste the key into the in-chat form. NVTrader Fernet-encrypts at rest immediately; you cannot read it back, only the masked prefix/suffix.
  4. Smoke test — the wizard fires test_provider_connection. For brokers that's a no-op call (e.g. get_account()); for data providers it pulls one bar/snapshot; for LLMs it sends a one-token "ping".
  5. Activate — if the smoke test passes you can pick the provider as active right then (e.g. Active broker → Alpaca).

Adding a provider yourself

Drop a new markdown file into skills/setup/<category>/<id>.md using the existing playbooks as a template. The wizard picks it up automatically because it discovers via filesystem scan.

If the provider needs a custom adapter (rather than the generic OpenAI-compatible / REST shape), wire it under src/traderspace/broker/<id>.py or src/traderspace/data/<id>.py and import it from the relevant __init__.py. The BrokerAdapter and DataAdapter ABCs spell out the wire shape — keep new adapters drop-in compatible and the rest of the platform inherits broker switching, audit trails, and OTel spans for free.

info

Per-provider playbooks live in skills/setup/. They double as the wizard's content and as docs you can hand a teammate.

Reading the wizard output

The wizard's final message includes a JSON block:

{
  "provider": "alpaca",
  "category": "broker",
  "linked": true,
  "test": {
    "endpoint": "https://paper-api.alpaca.markets",
    "ok": true,
    "elapsed_ms": 612,
    "account_status": "ACTIVE",
    "buying_power": 200000.00,
    "cash": 100000.00
  }
}

If linked: true but test.ok: false, the key was stored but the smoke call failed. Common causes: paper vs live mismatch (Alpaca), expired sandbox token (Webull), or wrong region (Polygon).

REST surface

VerbPathPurpose
GET/api/setup/providersList supported providers + current link status.
GET/api/setup/guide/{category}/{provider}Return the markdown playbook the wizard reads.
POST/api/setup/linkStore an API key (encrypted at rest).
POST/api/setup/testRun a smoke call against a linked provider.
POST/api/setup/activateSet the active broker or data source.
NVTrader v0.1.18 · docs ·⚠ Not financial advice ·Docs home ·App