Deploy OpenBB
OpenBB Platform API: self-hosted investment research & market data.
openbb
Just deployed
Deploy and Host
OpenBB is an open-source, data-agnostic investment research platform. This template deploys OpenBB Platform API — the HTTP server that exposes the entire OpenBB data platform as a REST API — so you get a self-hosted endpoint for market data (equities, crypto, FX, commodities, fixed income, economy, news) from 70+ data providers, queryable over HTTP and streamable to LLM agents via MCP.
License note: OpenBB is AGPL-3.0. This template runs the installed packages from PyPI and their own
openbb-apilauncher — not a copy of the OpenBB source repo. If you modify and distribute, AGPLv3 obligations apply. For private, internal, or self-hosted use on your own Railway project, the AGPL network clause is typically fine, but consult your own counsel for commercial redistribution. More: OpenBB license.
About Hosting
The template deploys a single service — the OpenBB Platform REST API — built from one Dockerfile:
- openbb —
python:3.10-slim-bookworm+openbb[all](core + ~70 data providers + charting + MCP server) +openbb-platform-api, run by theopenbb-apilauncher (non-root,HEALTHCHECKon/openapi.json,EXPOSE 6900),PORT=6900.
No database, no volume. The API is stateless; provider credentials are sourced from environment variables at boot. Everything is provisioned by Railway — compute, TLS at the edge, and a public URL. You get one public base URL that serves the full REST API, Swagger UI, and OpenAPI spec.
Why Deploy
- Self-hosted market data API — 70+ providers (yfinance, FMP, Intrinio, FRED, TMX, ecb, econdb, SEC, CFTC, …) on one endpoint
- Works out of the box — free providers (yfinance) return real data with zero config
- Full OpenAPI/REST — 278+ documented endpoints;
provideris an explicit parameter, not a hidden default - LLM-ready (MCP) — ships
openbb-mcp; expose the same endpoints as MCP tools for Claude/Cursor/Gemini agents - Credential-based access control (optional) — flip
OPENBB_API_AUTH=truefor HTTP Basic auth on a shared/public project - One-click deploys and predictable scaling — no DB, no migrations, restart-safe
Common Use Cases
- Quant / research tooling — point backends, notebooks, or dashboards at a single market-data REST endpoint
- LLM agent market research — serve the API (or its MCP surface) to Claude, Cursor, Gemini, or any MCP client
- Private data layer — stand up OpenBB on your own Railway account so sensitive API keys and data never leave your infra
- Internal market-data hub — expose a single OpenAPI spec to product, research, and finance teams
Dependencies for OpenBB
No external accounts, databases, or client tools are required to deploy. Optional: one or more data-provider API keys to enable premium sources. This build's main premium sources are FMP (FMP_API_KEY), Intrinio (INTRINIO_API_KEY), and FRED (FRED_API_KEY, free). Free providers (yfinance, SEC, CFTC, TMX) return data with no credentials.
Deployment Dependencies
Railway builds the service from this repository's Dockerfile (one openbb[all] pip install, ~6.5 GB download, cached by Rails' build). No database. No volume. The PORT=6900 variable is injected automatically; the entrypoint maps it to the OpenBB launcher's bind port. All provider keys and the auth gate are set via the deploy form (see Environment).
Endpoints
| Surface | Path | Purpose |
|---|---|---|
| OpenAPI spec | /openapi.json | Full REST schema (278+ paths) |
| Swagger UI | /docs | Interactive endpoint browser |
| ReDoc | /redoc | Read-only docs |
| Health / readiness | /openapi.json | 200 = API up |
| Market data (samples) | /api/v1/equity/price/quote?provider=yfinance&symbol=AAPL | Real-time equity quote (no key) |
| Market data (samples) | /api/v1/equity/profile?provider=yfinance&symbol=AAPL | Company profile (no key) |
| Market data (samples) | /api/v1/equity/price/historical?provider=yfinance&symbol=AAPL&start_date=2025-01-01&end_date=2025-12-31 | Daily prices |
| Market data (keys) | /api/v1/economy/cpi?provider=fred | CPI (needs a free FRED key) |
provideris a required query parameter on every endpoint (there is no implicit default) — if you omit it you get a 422.yfinanceneeds no key; most others (FMP, Intrinio, FRED, econdb, …) need an API key. See each endpoint's schema in/openapi.jsonfor its fullprovider_choiceslist.
MCP (optional)
The same image also ships the openbb-mcp launcher (bundled with openbb[all]). To run it in a second service on the same project, point the service's start command at:
openbb-mcp --transport streamable-http --host 0.0.0.0 --port $PORT
and give it its own public domain. It exposes every OpenBB REST endpoint as an MCP tool, so LLM agents can list tools, call them, and receive data directly. REST and MCP are independent surfaces — the REST service does not proxy through MCP; both read the same Python package.
Environment
All variables are optional; the template works with zero config.
| Variable | Purpose | Default |
|---|---|---|
PORT | Listen port (injected by Railway; mapped to OPENBB_API_PORT by the entrypoint) | 6900 |
TZ | Timezone (IANA) for logs/output | UTC |
OPENBB_API_AUTH | true → enable HTTP Basic auth on every endpoint | false |
OPENBB_API_USERNAME / OPENBB_API_PASSWORD | Basic-auth credentials (used only when OPENBB_API_AUTH=true) | admin / auto-generated |
FMP_API_KEY | Financial Modeling Prep key — premium equity/ETF/FX. Paste a key to enable FMP; add later from the Variables tab | empty |
INTRINIO_API_KEY | Intrinio key — fundamentals & market data. Paste a key to enable Intrinio; add later from the Variables tab | empty |
FRED_API_KEY | FRED (free) — macro/economic series. Paste a key to enable FRED; add later from the Variables tab | empty |
yfinance is a genuine no-key provider (quotes, profiles, historical prices). The paid ones this build exposes (FMP, Intrinio) and the free-key one (FRED) expect their key in the matching variable shown above. Providers whose key you don't set simply return a clear 400 Missing credential error naming the key to add (or an empty result) — the API itself keeps working, and every key can be added or changed any time from the Variables tab.
Quick Start
- Click Deploy to Railway (button above).
- After the build + first deploy (~2–4 min), note the public URL shown on the service.
- Browse 278+ endpoints in Swagger by opening your service's public URL with
/docsappended. - Try this for free (no key): your service's public URL +
/api/v1/equity/price/quote?provider=yfinance&symbol=AAPL. - Optional: add provider API keys (
FMP_API_KEY,INTRINIO_API_KEY,FRED_API_KEY) to the Variables tab to unlock premium sources; setOPENBB_API_AUTH=trueto gate the API if you expose it publicly.
Troubleshooting
- 502 on first hit — the OpenBB platform takes ~30–60s to load ~70 provider plugins at cold start.
railway.jsonsetshealthcheckTimeout=300and start-period=90s on the DockerfileHEALTHCHECK; the deploy form uses these. Retry once if the first probe times out. {detail: {loc: query, provider}}(422) — every endpoint requires theprovider=query parameter. It is not optional.{detail: "Not Found"}— path format is/api/v1/+area/sub/action(e.g./api/v1/equity/price/quote), not the command-line form (openbb equity price quote). Use/openapi.jsonto discover exact paths.- Provider
auth_error/insufficient_scope— the key for that provider isn't set, is wrong, or the free tier is exhausted. Add the correct*_API_KEYvariable and redeploy. - AGPL concerns — see the note at the top.
Upstream
- OpenBB platform: https://github.com/OpenBB-finance/OpenBB
- Docs: https://docs.openbb.co
- This template is a thin wrapper around PyPI
openbb[all]+openbb-platform-api, based on the vendor's ownbuild/docker/platformAPI.Dockerfile.
Template Content
openbb
INAPP-Mobile/openbb