27 Commits
Author SHA1 Message Date
Henry 4364535f2d fix: upgrade pypdf security baseline 2026-09-02 14:02:52 +08:00
Henry 22a3da5c82 fix grid accounting and secure dependencies 2026-08-14 21:20:06 +08:00
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Henry
f5804c66f3 Bump the python-runtime group in /backend_api_python with 35 updates (#188)
* Bump the python-runtime group in /backend_api_python with 35 updates

Updates the requirements on [werkzeug](https://github.com/pallets/werkzeug), [flask-cors](https://github.com/corydolphin/flask-cors), [finnhub-python](https://github.com/Finnhub-Stock-API/finnhub-python), [yfinance](https://github.com/ranaroussi/yfinance), [ccxt](https://github.com/ccxt/ccxt), [pandas](https://github.com/pandas-dev/pandas), [ta-lib](https://github.com/ta-lib/ta-lib-python), [exchange-calendars](https://github.com/gerrymanoim/exchange_calendars), [requests](https://github.com/psf/requests), [websocket-client](https://github.com/websocket-client/websocket-client), [litellm](https://github.com/BerriAI/litellm), [certifi](https://github.com/certifi/python-certifi), [akshare](https://github.com/akfamily/akshare), [pyjwt](https://github.com/jpadilla/pyjwt), [python-dotenv](https://github.com/theskumar/python-dotenv), [cryptography](https://github.com/pyca/cryptography), [pyotp](https://github.com/pyauth/pyotp), [qrcode](https://github.com/lincolnloop/python-qrcode), [psycopg2-binary](https://github.com/psycopg/psycopg2), [prometheus-client](https://github.com/prometheus/client_python), [redis](https://github.com/redis/redis-py), [celery](https://github.com/celery/celery), [gunicorn](https://github.com/benoitc/gunicorn), [flask-smorest](https://github.com/marshmallow-code/flask-smorest), [marshmallow](https://github.com/marshmallow-code/marshmallow), [pyyaml](https://github.com/yaml/pyyaml), [pypdf](https://github.com/py-pdf/pypdf), [reportlab](https://www.reportlab.com/), [bcrypt](https://github.com/pyca/bcrypt), [alpaca-py](https://github.com/alpacahq/alpaca-py), [bandit](https://github.com/PyCQA/bandit), [pip-audit](https://github.com/pypa/pip-audit), [pytest](https://github.com/pytest-dev/pytest), [pytest-cov](https://github.com/pytest-dev/pytest-cov) and [ruff](https://github.com/astral-sh/ruff) to permit the latest version.

Updates `werkzeug` to 3.1.8
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.1.6...3.1.8)

Updates `flask-cors` from 6.0.0 to 6.0.5
- [Release notes](https://github.com/corydolphin/flask-cors/releases)
- [Changelog](https://github.com/corydolphin/flask-cors/blob/main/CHANGELOG.md)
- [Commits](https://github.com/corydolphin/flask-cors/compare/6.0.0...6.0.5)

Updates `finnhub-python` to 2.4.29
- [Changelog](https://github.com/Finnhub-Stock-API/finnhub-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Finnhub-Stock-API/finnhub-python/commits)

Updates `yfinance` to 1.5.2
- [Release notes](https://github.com/ranaroussi/yfinance/releases)
- [Changelog](https://github.com/ranaroussi/yfinance/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/ranaroussi/yfinance/compare/0.2.18...1.5.2)

Updates `ccxt` to 4.5.69
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Commits](https://github.com/ccxt/ccxt/compare/4.0.3...v4.5.69)

Updates `pandas` to 3.0.5
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Commits](https://github.com/pandas-dev/pandas/compare/v1.5.0...v3.0.5)

Updates `ta-lib` from 0.6.8 to 0.7.1
- [Release notes](https://github.com/ta-lib/ta-lib-python/releases)
- [Changelog](https://github.com/TA-Lib/ta-lib-python/blob/master/CHANGELOG)
- [Commits](https://github.com/ta-lib/ta-lib-python/compare/v0.6.8...v0.7.1)

Updates `exchange-calendars` to 4.13.2
- [Release notes](https://github.com/gerrymanoim/exchange_calendars/releases)
- [Changelog](https://github.com/gerrymanoim/exchange_calendars/blob/master/docs/changes_archive.md)
- [Commits](https://github.com/gerrymanoim/exchange_calendars/compare/4.13...4.13.2)

Updates `requests` to 2.34.2
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.0...v2.34.2)

Updates `websocket-client` to 1.9.0
- [Release notes](https://github.com/websocket-client/websocket-client/releases)
- [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog)
- [Commits](https://github.com/websocket-client/websocket-client/compare/v1.8.0...v1.9.0)

Updates `litellm` to 1.93.0
- [Release notes](https://github.com/BerriAI/litellm/releases)
- [Commits](https://github.com/BerriAI/litellm/compare/litellm_1.81.13-dev...v1.93.0)

Updates `certifi` to 2026.7.22
- [Commits](https://github.com/certifi/python-certifi/compare/2024.02.02...2026.07.22)

Updates `akshare` to 1.18.80
- [Release notes](https://github.com/akfamily/akshare/releases)
- [Changelog](https://github.com/akfamily/akshare/blob/main/docs/changelog.md)
- [Commits](https://github.com/akfamily/akshare/compare/release-v1.16.77...release-v1.18.80)

Updates `pyjwt` to 2.13.0
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.12.0...2.13.0)

Updates `python-dotenv` to 1.2.2
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/theskumar/python-dotenv/compare/v1.0.1...v1.2.2)

Updates `cryptography` to 49.0.0
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/43.0.0...49.0.0)

Updates `pyotp` to 2.10.0
- [Release notes](https://github.com/pyauth/pyotp/releases)
- [Changelog](https://github.com/pyauth/pyotp/blob/main/Changes.rst)
- [Commits](https://github.com/pyauth/pyotp/compare/v2.9.0...v2.10.0)

Updates `qrcode` to 8.2
- [Changelog](https://github.com/lincolnloop/python-qrcode/blob/main/CHANGES.rst)
- [Commits](https://github.com/lincolnloop/python-qrcode/compare/v7.4.2...v8.2)

Updates `psycopg2-binary` to 2.9.12
- [Changelog](https://github.com/psycopg/psycopg2/blob/master/NEWS)
- [Commits](https://github.com/psycopg/psycopg2/compare/2.9.9...2.9.12)

Updates `prometheus-client` to 0.26.0
- [Release notes](https://github.com/prometheus/client_python/releases)
- [Commits](https://github.com/prometheus/client_python/compare/v0.22.0...v0.26.0)

Updates `redis` to 8.0.1
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v5.0.0...v8.0.1)

Updates `celery` to 5.6.3
- [Release notes](https://github.com/celery/celery/releases)
- [Changelog](https://github.com/celery/celery/blob/v5.6.3/Changelog.rst)
- [Commits](https://github.com/celery/celery/compare/v5.5.0...v5.6.3)

Updates `gunicorn` to 26.0.0
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/22.0.0...26.0.0)

Updates `flask-smorest` to 0.47.0
- [Release notes](https://github.com/marshmallow-code/flask-smorest/releases)
- [Changelog](https://github.com/marshmallow-code/flask-smorest/blob/dev/CHANGELOG.rst)
- [Commits](https://github.com/marshmallow-code/flask-smorest/compare/0.44.0...0.47.0)

Updates `marshmallow` to 4.3.0
- [Changelog](https://github.com/marshmallow-code/marshmallow/blob/dev/CHANGELOG.rst)
- [Commits](https://github.com/marshmallow-code/marshmallow/compare/3.24.1...4.3.0)

Updates `pyyaml` to 6.0.3
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0...6.0.3)

Updates `pypdf` to 6.14.2
- [Release notes](https://github.com/py-pdf/pypdf/releases)
- [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/py-pdf/pypdf/compare/6.0.0...6.14.2)

Updates `reportlab` to 5.0.0

Updates `bcrypt` to 5.0.0
- [Changelog](https://github.com/pyca/bcrypt/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/bcrypt/compare/4.1.0...5.0.0)

Updates `alpaca-py` to 0.43.5
- [Release notes](https://github.com/alpacahq/alpaca-py/releases)
- [Commits](https://github.com/alpacahq/alpaca-py/compare/v0.30.0...v0.43.5)

Updates `bandit` to 1.9.4
- [Release notes](https://github.com/PyCQA/bandit/releases)
- [Commits](https://github.com/PyCQA/bandit/compare/1.8.6...1.9.4)

Updates `pip-audit` to 2.10.1
- [Release notes](https://github.com/pypa/pip-audit/releases)
- [Changelog](https://github.com/pypa/pip-audit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pypa/pip-audit/compare/v2.9.0...v2.10.1)

Updates `pytest` to 9.1.1
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/9.0.3...9.1.1)

Updates `pytest-cov` to 7.1.0
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v6.2.0...v7.1.0)

Updates `ruff` to 0.16.0
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.12.0...0.16.0)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-version: 3.1.8
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: flask-cors
  dependency-version: 6.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-runtime
- dependency-name: finnhub-python
  dependency-version: 2.4.29
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: yfinance
  dependency-version: 1.5.2
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: ccxt
  dependency-version: 4.5.69
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: pandas
  dependency-version: 3.0.5
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: ta-lib
  dependency-version: 0.7.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-runtime
- dependency-name: exchange-calendars
  dependency-version: 4.13.2
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: requests
  dependency-version: 2.34.2
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: websocket-client
  dependency-version: 1.9.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: litellm
  dependency-version: 1.93.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: certifi
  dependency-version: 2026.7.22
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: akshare
  dependency-version: 1.18.80
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: pyjwt
  dependency-version: 2.13.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: python-dotenv
  dependency-version: 1.2.2
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: cryptography
  dependency-version: 49.0.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: pyotp
  dependency-version: 2.10.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: qrcode
  dependency-version: '8.2'
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: psycopg2-binary
  dependency-version: 2.9.12
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: prometheus-client
  dependency-version: 0.26.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: redis
  dependency-version: 8.0.1
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: celery
  dependency-version: 5.6.3
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: gunicorn
  dependency-version: 26.0.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: flask-smorest
  dependency-version: 0.47.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: marshmallow
  dependency-version: 4.3.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: pyyaml
  dependency-version: 6.0.3
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: pypdf
  dependency-version: 6.14.2
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: reportlab
  dependency-version: 5.0.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: bcrypt
  dependency-version: 5.0.0
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: alpaca-py
  dependency-version: 0.43.5
  dependency-type: direct:production
  dependency-group: python-runtime
- dependency-name: bandit
  dependency-version: 1.9.4
  dependency-type: direct:development
  dependency-group: python-runtime
- dependency-name: pip-audit
  dependency-version: 2.10.1
  dependency-type: direct:development
  dependency-group: python-runtime
- dependency-name: pytest
  dependency-version: 9.1.1
  dependency-type: direct:development
  dependency-group: python-runtime
- dependency-name: pytest-cov
  dependency-version: 7.1.0
  dependency-type: direct:development
  dependency-group: python-runtime
- dependency-name: ruff
  dependency-version: 0.16.0
  dependency-type: direct:development
  dependency-group: python-runtime
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: synchronize upgraded Python dependency lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry <jinyuxu@JinyudeMacBook-Air.local>
2026-08-01 01:52:21 +08:00
Henry 1eb92e0279 improve grid and live execution reliability 2026-07-30 14:14:16 +08:00
TIANHE 88e19267eb release: finalize v5.0.1 backend 2026-07-18 14:59:18 +08:00
TIANHE a87ee6192f feat: harden backend contracts observability and delivery 2026-07-13 15:42:50 +08:00
TIANHE 90e60ffdea feat: split backend runtimes and add durable task workers 2026-07-13 03:47:59 +08:00
TIANHE e7e5064189 feat: prepare v5.0.1 beta backend 2026-07-13 02:44:50 +08:00
Dinger d6988cf108 v4.0.3
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-06-28 17:28:58 +08:00
TIANHE 8b8429b7b8 v4.0.2
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-06-22 02:38:39 +08:00
TIANHE 234224a776 v4.0.1
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-06-19 02:49:33 +08:00
RheagalFire a3a70802eb feat: add LiteLLM as unified LLM provider 2026-06-02 23:14:37 +05:30
Dinger a1a51e9afc v3.0.22
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-05-31 23:39:35 +08:00
DingerandCursor 2dd9fa0179 chore(deps): bump flask-cors 5.0.1 -> 6.0.0
Picks up three 2024 CVE fixes (CVE-2024-6839, CVE-2024-6844, CVE-2024-6866)
around path-regex specificity ordering, URL decoding, and case-insensitive
host/scheme matching. The one breaking change in 6.0.0 — path specificity
ordering when CORS is configured with `resources={"/path/.*": {...}}` — does
not affect us: app/__init__.py only passes a flat `origins=[...]` list to
`CORS()`, with no `resources=` mapping, no path regex, and no
`@cross_origin` decorators anywhere in the codebase.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-16 12:58:03 +08:00
VicJayandClaude Opus 4.7 160cc6c00f feat(broker): add Alpaca Markets adapter for US stocks, ETFs, and crypto
Mirrors the existing ibkr_trading/ module structure for consistency.
Alpaca complements IBKR for users who prefer:
- Zero commission on stocks/ETFs/crypto
- Stateless REST auth (no TWS/Gateway process to run)
- Unified client for stocks AND crypto
- Built-in paper trading at paper-api.alpaca.markets

What's included:
- backend_api_python/app/services/alpaca_trading/
  - __init__.py, client.py, symbols.py, README.md
  - AlpacaClient mirrors IBKRClient surface (connect, place_market_order,
    place_limit_order, cancel_order, get_account_summary, get_positions,
    get_open_orders, get_quote, get_connection_status)
  - Uses alpaca-py SDK (added to requirements.txt)
- backend_api_python/app/routes/alpaca.py
  - Endpoints mirror routes/ibkr.py: /status, /connect, /disconnect,
    /account, /positions, /orders, /order (POST + DELETE), /quote/<symbol>
- backend_api_python/app/routes/__init__.py
  - Registers alpaca_bp at /api/alpaca
- backend_api_python/env.example
  - ALPACA_API_KEY, ALPACA_SECRET_KEY, ALPACA_PAPER vars added

Tested locally against Alpaca paper account: round-trip BUY/SELL 1 SPY
filled in 5 seconds, $0.04 slippage cost, no commission.

Known gaps (planned for follow-up PRs):
- No bracket / stop / stop-limit order types yet
- No historical bar fetching helpers
- No WebSocket streaming
- No options trading

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 14:42:46 -07:00
dinger caaf294867 chore(security): 升级 Python 依赖并启用 Dependabot
- Flask 3.1.3、Werkzeug>=3.1.6、flask-cors 5.0.1(修复已知 GHSA)
- PyJWT>=2.12、cryptography>=43、requests>=2.32
- 新增 .github/dependabot.yml 每周检查 backend_api_python pip 依赖

Made-with: Cursor
2026-04-25 03:05:55 +08:00
dinger 5c3b4f6149 chore(deps): drop unused pymysql and SQLAlchemy (PostgreSQL-only stack)
Made-with: Cursor
2026-04-24 11:35:18 +08:00
Dinger f5c9a9b3b6 v3.0.1
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-04-09 22:38:47 +08:00
Dinger 8563e4ea53 v3.0.1
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-04-07 22:47:07 +08:00
Dinger 7626328c9c feat(backend): encrypt exchange credentials, remove IS_DEMO_MODE
- Fernet encrypt qd_exchange_credentials via SECRET_KEY (cryptography)

- Remove global read-only demo middleware; drop is_demo from auth payloads

- Egress whitelist: /api/credentials/egress-ip returns ipv4 + ipv6 (ipify)

- Exchange factory: demo/testnet URLs and OKX simulated-trading header

- Bitget spot connection test; misc route/service fixes

Made-with: Cursor
2026-03-24 19:10:18 +08:00
TIANHE ffdd2ffbae V2.2.1: Membership & Billing, USDT TRC20 payment, VIP free indicators, AI Trading Radar, simplified strategy creation, system settings simplification, bug fixes and UI improvements 2026-02-27 01:57:04 +08:00
TIANHE af8e46011e sss
Signed-off-by: TsssIANHE <TIANHE@GMAIL.COM>
2026-02-05 00:28:08 +08:00
TIANHE 61a5e5e6aa feat: Multi-user system with PostgreSQL - WIP temporary save 2026-01-14 05:29:55 +08:00
TIANHE 7053aefc33 Supports MT5 and forex trading.
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-01-13 04:10:05 +08:00
TIANHE e095f9be7e Supports MT5 and forex trading.
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-01-13 04:01:42 +08:00
TIANHE 7527d73f25 Supports Interactive Brokers, US and Hong Kong stocks.
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-01-13 02:35:48 +08:00
TIANHE f43312a858 creat
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2025-12-29 03:06:49 +08:00