Skip to main content

AlphaMeta

PyPI - Version Python Version Platform Downloads WeChat

AlphaMeta is an algorithmic trading platform that unifies five surfaces in a single process:

  • REST API gateway — 80+ commands for market data, SEC EDGAR fundamentals, options analytics, trading, portfolio, automation, and watchlists, served over HTTP by a FastAPI gateway and callable via curl or any HTTP client.
  • Real-time streaming — a WebSocket endpoint (/ws/stream) broadcasting live ticks, quotes, and 1m–1h bars at tick rate, plus custom formula streams.
  • Backtesting engine — Rust-based strategy backtests with QuantStats/Plotly reports, available via the alphameta backtest CLI, REST API, Jupyter magics, and the web UI.
  • Live strategy hosting — hot-reloadable strategy files managed over REST, running against live market data.
  • Embedded MCP server — an MCP tool layer (/mcp) exposing the full command surface to AI agents: market data, fundamentals, portfolio, and live trading. Trading is opt-in and gated behind a three-step confirm-token flow with risk limits and audit logging.
  • AI agent harness — a built-in chat server that runs agents locally and plugs into any LLM, orchestrating MCP tools end-to-end from natural language.

Broker backends: IBKR (stocks, options, futures, crypto) and QMT (China A-shares). Also includes SEC EDGAR research commands — filing listing, 13F investors, insider trades, XBRL financial statements and segment data.

Quick start

uv tool install alphameta    # or: pip install alphameta

Get a free API key at alphameta.app, then create ~/.alphameta/.env:

# API Key (Required) — get one free at https://alphameta.app
ALPHAMETA_API_KEY=am-xxx

# IBKR Account ID (Required for trading)
ALPHAMETA_IBKR_ACCOUNT_ID=U1234567

# IBKR Gateway connection
ALPHAMETA_IBKR_HOST=127.0.0.1
ALPHAMETA_IBKR_PORT=4001
ALPHAMETA_IBKR_CLIENT_ID=0

# Timezone (default: US/Eastern)
# ALPHAMETA_TIMEZONE=Asia/Shanghai

Start the server (choose a broker backend: ibkr or qmt):

alphameta --broker ibkr

Open the web UI in your browser (server must be running first):

alphameta web

The API serves at http://127.0.0.1:18080 by default:

# Live quotes
curl -X POST "http://127.0.0.1:18080/api/v1/execute" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "quote AAPL"}'

# SEC research (no IBKR needed)
curl -X POST "http://127.0.0.1:18080/api/v1/execute" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "filings AAPL 10-K"}'

Real-time streaming

Connect to the WebSocket endpoint for push-based market data instead of polling:

ws://127.0.0.1:18080/ws/stream

The streamer broadcasts live ticks and quotes (throttled to tick rate), real-time bars (1m / 5m / 15m / 30m / 1h), and evaluated formula streams, with heartbeat and connection-state events.

Backtesting & strategies

Run backtests from the CLI with QuantStats or Plotly reports:

alphameta backtest --strategy my_strategy.py --symbol SPY --report quantstats --benchmark SPY

The same engine is available over REST (/api/v1/backtest, /history, /{id}/report), in Jupyter via alphameta.research (get_pricing / run_backtest) and IPython magics, and in the web UI backtest workbench with equity charts and run history.

Live strategies are hot-reloadable Python files in ~/.alphameta/strategies, managed over REST (/api/v1/strategies — list / start / stop / reload / logs).

MCP server (AI agents)

An embedded MCP server (streamable HTTP) is mounted at /mcp and enabled by default. It exposes the full command surface — quote, kline, chain, positions, balance, orders, gex/dex, maxpain, calendar, news, SEC filings, and more — to any MCP-compatible agent.

Trading tools are available but opt-in (ALPHAMETA_MCP_TRADING_ENABLED=true, default off); when enabled, every trade goes through a three-step confirm-token flow: trade_previewtrade_confirmtrade_transmit, with risk limits, symbol blacklists, and an audit log.

The built-in chat server doubles as a local agent harness: it can plug into any LLM provider and orchestrates these MCP tools end-to-end from natural language.

AI Agent Skills

alphameta-skills provides agent skills for AI coding assistants (Claude Code, Codex, Cursor, etc.) — use AlphaMeta in natural language for market data, trading, portfolio analysis, and more.

npx skills add intelliscale/alphameta-skills -g

Features

Commands by category

Category Commands
Market quote, add, remove (rm), kline, depth, chain, range, info, align, prequalify, oadd
Fundamentals financial-report, financial-statement, financial (fin, yf), sec, filings, investors, insider-trades, calc-index, consensus, earnings, fundamental (fund), news, operating, calendar
Technicals dex, gex, dge, maxpain, capital-flow, straddle, advice, reporter
Trading buy, cancel, modify, evict, fast, scale
Portfolio positions (ls), balance, orders, executions, report, cash
Automation ifthen, iflist, ifrm, ifclear, ifgroup, auto, sched-add, sched-list, sched-cancel, tasklist, taskcancel
Watchlist qadd, qremove, qlist, qsave, qrestore, qdelete, qclean, qsnapshot, qloadsnapshot, alert
Utilities math, say, expand, simulate, paper, daydumper, details, alias, clear, meta, qualify, reconnect, set

Prerequisites

  1. Broker backend — pick one with --broker:

    • ibkr — Interactive Brokers (requires IB Gateway or TWS, see below)
    • qmt — QMT for China A-shares
  2. Interactive Brokers Account (for ibkr): You need an active IB account

  3. IB Gateway or TWS (for ibkr): Download and install either:

  4. API Configuration (for ibkr):

    • Enable API access in TWS/Gateway: Configure → API → Settings and check "Enable ActiveX and Socket Clients"
    • Set appropriate port (default: 7497 for TWS, 4001 for Gateway)
    • Add 127.0.0.1 to trusted IPs if connecting locally

Examples

Bulk symbol expansion:

# Add/remove multiple option strikes at once
curl -X POST "http://127.0.0.1:18080/api/v1/execute" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "add SPY240412{P,C}005{1,2,3}0000"}'

# Remove by row id
curl -X POST "http://127.0.0.1:18080/api/v1/execute" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "remove :{31..37}"}'

Multi-symbol orders:

# Buy ~$15k of each symbol
curl -X POST "http://127.0.0.1:18080/api/v1/execute" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "expand buy {META,MSFT,NVDA,AMD,AAPL} $15_000 MID"}'

Flexible order pricing:

# By quantity or dollar amount, with bracket orders
curl -X POST "http://127.0.0.1:18080/api/v1/execute" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "buy AAPL 100 AF @ 233.33 ± 10"}'

Conditional triggers:

# Execute command when price condition is met
curl -X POST "http://127.0.0.1:18080/api/v1/execute" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "if AAPL last > 300: buy AAPL 100 AF"}'

Backtest a strategy:

# QuantStats report against a benchmark
alphameta backtest --strategy my_strategy.py --symbol SPY --report quantstats --benchmark SPY

Account calculator:

# Calculate shares buyable on margin, combine with growth projections
curl -X POST "http://127.0.0.1:18080/api/v1/execute" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "(/ :BP3 AAPL)"}'

License

© 2026 Intelliscale Technologies, Inc.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

alphameta-2.9.1-cp314-cp314-win_amd64.whl (10.1 MB view details)

Uploaded CPython 3.14Windows x86-64

alphameta-2.9.1-cp314-cp314-win32.whl (8.8 MB view details)

Uploaded CPython 3.14Windows x86

alphameta-2.9.1-cp314-cp314-musllinux_1_2_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

alphameta-2.9.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (15.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

alphameta-2.9.1-cp314-cp314-macosx_11_0_arm64.whl (13.6 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

alphameta-2.9.1-cp313-cp313-win_amd64.whl (9.9 MB view details)

Uploaded CPython 3.13Windows x86-64

alphameta-2.9.1-cp313-cp313-win32.whl (8.6 MB view details)

Uploaded CPython 3.13Windows x86

alphameta-2.9.1-cp313-cp313-musllinux_1_2_x86_64.whl (15.6 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

alphameta-2.9.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (15.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

alphameta-2.9.1-cp313-cp313-macosx_11_0_arm64.whl (13.7 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

alphameta-2.9.1-cp312-cp312-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.12Windows x86-64

alphameta-2.9.1-cp312-cp312-win32.whl (8.6 MB view details)

Uploaded CPython 3.12Windows x86

alphameta-2.9.1-cp312-cp312-musllinux_1_2_x86_64.whl (15.7 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

alphameta-2.9.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

alphameta-2.9.1-cp312-cp312-macosx_11_0_arm64.whl (13.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file alphameta-2.9.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: alphameta-2.9.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 10.1 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for alphameta-2.9.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c0fe7b7a3b3622894a0dea29fb399471bb55ba4697621b927830209da135cba4
MD5 caaa72c8279b99487530cee38cd64b05
BLAKE2b-256 2e707756981f8e1de3fcd4223bf9924427c8570b40d6bfa558c3e730251172bb

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp314-cp314-win32.whl.

File metadata

  • Download URL: alphameta-2.9.1-cp314-cp314-win32.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.14, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for alphameta-2.9.1-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 1f72a4f3df37bbcea1e032a1bb1500f22447e59c3b2ff95124af4f7869f1897e
MD5 b219b17968793cf6bf4c3d10fadf5e25
BLAKE2b-256 4fa18622d0b4ba00f2783ef2dc2393820e8f6b642ebde43964b1f7b78f96288b

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for alphameta-2.9.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3b4005bca7a46f6c976e8e9866aee9fe1b9ba2f14e7767a4b75db3aabfc9a697
MD5 0426d8a823a95a77c73d92836ad64f77
BLAKE2b-256 1deaebe707396efb8def56e01bc79c342714676b36aa206539e78cdf3853ec33

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for alphameta-2.9.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e1f4b2f60f417bf48f0f0f99423a437396fe60dea21866f488f0df3445910760
MD5 c5444014618adb4227e926175a9beac3
BLAKE2b-256 593a70e83d5bea48d2fdeeb00696b2609cdb15e821a6a6eb8ff74c8d706b4419

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for alphameta-2.9.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 733b806741ce0b54c5be27874c0672eae2a27ea95b312d54d5957fe7fc94010d
MD5 24ec1e4871a55e62bf62d421ca7f4849
BLAKE2b-256 679382185afe1f75bb77cc5d195abe789166d97641a7b947f2f475677af11e48

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: alphameta-2.9.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 9.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for alphameta-2.9.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 01956a27accf373342da19f9b2fd287cddf821e61953297596d0036aa0ff61c3
MD5 0bfcb349cd7b8c19a72f3f4355de3bda
BLAKE2b-256 af5b43a7a871a42f4acbe879e8da078b25ed15d89025f4beb54249d5092fcd97

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp313-cp313-win32.whl.

File metadata

  • Download URL: alphameta-2.9.1-cp313-cp313-win32.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for alphameta-2.9.1-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 b9b9364289e23ac4fd66b61521128e1c93539d8d731da03e473a911a936122e0
MD5 40462b667ef5a27a9e95efbfc6dbfea1
BLAKE2b-256 e8069c53cf2aa5f16482f7b73cee125db1df6c221f6fefada400cbb960b55e13

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for alphameta-2.9.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fa831244884f976c75a4dbb957351d7cd83fb9d2f88877ab4957b1e3d47d18af
MD5 adf601af4600328e2a0d04dd21dedf40
BLAKE2b-256 50efaf1556f6e71b3e56bab9dc00b18f2f166fc72fb01d6f04cf876bdaec8c03

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for alphameta-2.9.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f7153ea162546dbd897328160ef068868ccbcd8f163bda436c8ab4df281ed446
MD5 0f521bed4a1aee03a970469c44589f2a
BLAKE2b-256 83984cf813aa9e530f57439fcc4f24f41c6ccc0e2f5eb510ffa0c72399518114

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for alphameta-2.9.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f07c7893f18d84acce0725efd409d3282f2ae8e86b055d39ae5a517f39c9c58
MD5 1ca2584a083f540f8df392e5a3d00b8e
BLAKE2b-256 d6f230405dab71c4eef5b30ff37b15cdd459dc1b0693f73276921af625d0839d

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: alphameta-2.9.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 10.0 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for alphameta-2.9.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 505f1ab4950b54df6579bbc1c97a4426cc7019eb5889ae460045959102c733b4
MD5 277b75fcc902427f9209528c79454bf8
BLAKE2b-256 7310df982b0addd77badaf41190054f288bc83e4f0982002bc5945f98d3a9b2c

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp312-cp312-win32.whl.

File metadata

  • Download URL: alphameta-2.9.1-cp312-cp312-win32.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for alphameta-2.9.1-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 34bb1f8e8b96730c1553921843655db805f9597f98f3f99673e343d4eb1046c0
MD5 dcdfe85632b089741217c24de634d53c
BLAKE2b-256 e80c7c841e98239e6c891e4dd3a1d1ed5a22bb38241c15b14c792ce1170d5651

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for alphameta-2.9.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5929c3c6aaa582a8eb5f48f56d332e3f7708cda8160359e1dabd47acc82ced79
MD5 3cc3bcce30f2562be0b689f83ba87ce9
BLAKE2b-256 aa136d77af29a5efc108a2e4533de26f04d073422c15e3329120df936fa42146

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for alphameta-2.9.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3169616fd4cf72fe6a53919c7e17946989dc5255581de890a9f073e5940c34ed
MD5 c13d29d53c7c8ea4a056cd7646796609
BLAKE2b-256 6b427d226a01eaf70d1f8f31ecad6f010956610e7d9176ca985600bcaa99152f

See more details on using hashes here.

File details

Details for the file alphameta-2.9.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for alphameta-2.9.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9f942a742a64c96bff525acf7e7e4a2b509147a6ffc7dda150ca77118c1a7fd0
MD5 693be5454fdc789150060ac9f84b8c08
BLAKE2b-256 6e1323c029012316f4d4c63654520aa7c3d10e01f20255a3a3d6bce34d3144a7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.9.1 This release

15 files

2.9.0

15 files

2.6.7

15 files

2.6.6

15 files

2.6.5

15 files

2.6.4

15 files

2.6.3

15 files

2.6.2

15 files

2.6.1

15 files

2.6.0

15 files

2.5.2

15 files

2.5.1

15 files

2.4.4

10 files

2.4.3

6 files

2.4.2

6 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page