Skip to main content

IBKR trading + SEC research API gateway

Project description

AlphaMeta

AlphaMeta is a REST API gateway for IBKR (Interactive Brokers) — live trading and real-time market data for stocks, options, futures, and crypto via a standardized REST API. Commands run as HTTP endpoints behind a FastAPI gateway, callable via curl or any HTTP client.

Also includes SEC EDGAR research commands — filing listing, 13F investors, insider trades, XBRL financial statements and segment data.

Quick start

pip install alphameta

Requires an IBKR Gateway or TWS instance for trading operations.

# Start the API server
alphameta start

# 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": "filing AAPL 10-K"}'

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

Features

Commands by category

Category Commands
Live Market Quotes quote, add, remove (rm), kline, depth, chain, range, info, align, prequalify, oadd, filing (filings), investors (inv), insider-trades (insider), financial-report (frep), financial-statement (fstmt), sec, calc-index (calcidx), capital-flow (capflow), consensus, operating (ops)
Order Management buy, cancel, modify, evict, fast, scale, straddle
Portfolio positions (ls), balance, orders, executions, report
Technical Indicators dex, gex, dge, maxpain
Predicate Management ifthen, iflist (ifls), ifrm, ifclear, ifgroup, auto
Quote Management qadd, qremove (qrm), qlist, qsave, qrestore, qdelete, qclean, qsnapshot, qloadsnapshot, colorset, colorsload
Schedule Management sched-add (sadd), sched-list (slist), sched-cancel (scancel)
Task Management tasklist, taskcancel
Connection rid
Utilities cash, math, alert, say, expand, simulate, paper, reporter, daydumper, details, advice, alias, clear, meta, qualify, reconnect, calendar, set, unset

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": "rm :{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"}'

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

Apache-2.0

Project details


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.4.4-cp313-cp313-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.13Windows x86-64

alphameta-2.4.4-cp313-cp313-win32.whl (5.8 MB view details)

Uploaded CPython 3.13Windows x86

alphameta-2.4.4-cp313-cp313-musllinux_1_2_aarch64.whl (48.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

alphameta-2.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (49.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

alphameta-2.4.4-cp313-cp313-macosx_11_0_arm64.whl (7.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

alphameta-2.4.4-cp312-cp312-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.12Windows x86-64

alphameta-2.4.4-cp312-cp312-win32.whl (5.8 MB view details)

Uploaded CPython 3.12Windows x86

alphameta-2.4.4-cp312-cp312-musllinux_1_2_aarch64.whl (49.0 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

alphameta-2.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (50.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

alphameta-2.4.4-cp312-cp312-macosx_11_0_arm64.whl (7.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: alphameta-2.4.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for alphameta-2.4.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a2a6282c282d02171437238812c68e8729d182c6dc7faad6025b057da294c0f1
MD5 1fb0793d108b265d34589778e6361f76
BLAKE2b-256 3c73feebc6e954ff8fd2fbdec3b091f811d3ff322c902b0f175233432721a7e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alphameta-2.4.4-cp313-cp313-win32.whl
  • Upload date:
  • Size: 5.8 MB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for alphameta-2.4.4-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 558ed88caf347dcce756945648f99427af760ebcd0ab118f5c9290b9bf5f9abd
MD5 5e01d9165859f59d4a5e11cec71ff6bb
BLAKE2b-256 d1e1647ac450e257786a1f9f79e70d1b065d8553ba44bcce722c1628b59febbc

See more details on using hashes here.

File details

Details for the file alphameta-2.4.4-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for alphameta-2.4.4-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e89400a273dcec9007cdf7a3a2e95b17ffbfff1c05a985f3514c7e09474a1fe8
MD5 573368ea2e612718bd55a1001bad6ac4
BLAKE2b-256 1be6289025804cf7be385ef7d5e11825323c6a600191e315bfec9fbd68272d4e

See more details on using hashes here.

File details

Details for the file alphameta-2.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for alphameta-2.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3f916596019b3c169dfbd61df6a83411e3c8af5d8d16bd2978654f9983bf95f8
MD5 e04734912931ebdb7735fd3271fabbf5
BLAKE2b-256 1b32b7e34e04de9fafed6f8b411d517a335aa0c2ac65b16ff1d8f7beaf8d7065

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for alphameta-2.4.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c45ed4da275b07f46b7e70497089a56a1c286ea64a4beff49c312ebbbae3774a
MD5 82331b1a223b899246f38e49bedb39c1
BLAKE2b-256 6bacb824af605efaa96c4ae08fa9409012dc1bffb92a0515bfdea5a89c6054ac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alphameta-2.4.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for alphameta-2.4.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1b490f7aa848ca77d6cff7481fc7a7d9b4a117291d80d0d80236f3576b95a2a4
MD5 bf3a5da2f082a43d408bc11de1f7c417
BLAKE2b-256 1a1b0f52001f7da7020e3d2d8bfd936eb4edb04944f396909fdcdac0e5425300

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alphameta-2.4.4-cp312-cp312-win32.whl
  • Upload date:
  • Size: 5.8 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for alphameta-2.4.4-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 25ce20828e8809d48eb58789804f051459ff579a62bf3bcaf44fc79ec1a52cb4
MD5 70fc4bd18baaf4fd94f82863308e7f61
BLAKE2b-256 604151c1fe761535329943bda1b8169fa702fefec3dbab5f0cf23e148c3d72b8

See more details on using hashes here.

File details

Details for the file alphameta-2.4.4-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for alphameta-2.4.4-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d79c34e42cd70cccbdc340dc4bb744a132ec2e596c290e15f3bc361f4a5d9775
MD5 8dc508c5a64d5039cba091c86620134a
BLAKE2b-256 8b80f49aa87550b9bb478e456fff000aabc94b2db1c5f7dd278510d8442fe111

See more details on using hashes here.

File details

Details for the file alphameta-2.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for alphameta-2.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3b93f7d990236cc87ded99473a84d6abf7783970410b71661be9dea73c9eeca2
MD5 e0f4d5c2120b8364ed696fbd9763407d
BLAKE2b-256 683f4e4b62070a0289bb8ebb627d455a096e402c952c55b48d1ff5167fe3c07c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for alphameta-2.4.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c884d98ae879b911c52c7a22f38bf50a695a0c7884c878824245c43716ec962b
MD5 da630bb77484561026cee8b8188cfacb
BLAKE2b-256 fac05531e8ed48786452ed54fd096031a77dbb4d8dcdd21ea894fb6c82f84155

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page