Ctrl K
ComunidadGuías…

flint.toml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# ============================================================
# FlintTrade Project Configuration
# ============================================================

[project]
name = "FlintTrade"
version = "v0.0.1"
description = "Open-source self-hosted trading software with native backend"
license = "AGPL-3.0"
repository = "https://github.com/navaneeshnagarajan/FlintTrade"
# Canonical public site origin — the single source of truth for the domain that
# serves the one-line install and uninstall routes. Never edit a literal domain
# in a doc, script or test by hand: change this line, then run
# `python scripts/apply-site-url.py <new-url>` to rewrite every tracked mention.
# `python scripts/check-site-url-consistency.py` (and
# tests/test_site_url_single_source.py in CI) fail on any surface that disagrees.
site_url = "https://flinttrade.vercel.app"

# ============================================================
# Supported versions — the single source of truth
# ============================================================
#
# Two distinct numbers per runtime, and the difference matters:
#
#   *_requires  the FLOOR: the lowest version that actually works. It is set by
#               what the dependency tree genuinely needs, never by ambition.
#               Raising a floor past the real requirement breaks installs for
#               people whose platform is fine, and buys nothing.
#   *_target    what this repo develops against and moves toward. It tracks the
#               current stable release, so upgrades arrive continuously instead
#               of accumulating into a migration.
#
# Where each is actually exercised, because a version nobody runs is an
# aspiration rather than a guarantee:
#   floor   - every per-push lane in test.yml. This is the version users must be
#             able to run, so it is the one that gates a merge.
#   target  - the python-target-version and node-target-version legs of
#             nightly-cross-platform.yml, fail-soft by design: a target is ahead
#             of the supported floor, so a break there is information, not a
#             reason to block a release.
#
# The bootstrap pins are a third thing again, and deliberately conservative -
# they are what the one-line installer downloads onto a stranger's machine.
#
# tests/test_minimum_requirements_single_source.py fails, naming the file and
# line, when any tracked surface disagrees with the values below.
[requirements]
# Every pyproject.toml declares this floor.
python_requires = ">=3.14"
python_target = "3.14"
# The supported Node floor is 22.23.4. jsdom 30 accepts Node from 22.22.2;
# source installs and per-push lanes stay on 22.23.4 or newer. Node 22 is in
# maintenance, so the target stays on the 24 line. Electron 45.2.3 bundles
# Node 24.22.2.
node_requires = ">=22.23.4"
node_target = "24"
# Ubuntu 26.04 LTS ships Python 3.14. os_requires is the Linux source-install
# floor only. The one-line installer still provisions its own interpreter.
# os_macos and os_windows are the other platforms this repo ships. Nightly
# cross-platform runs macOS, Windows, and Ubuntu 26.04. Desktop release builds
# a universal macOS dmg, a Windows x64 exe, and Linux AppImages. Windows on
# ARM uses the x64 build through emulation.
os_requires = "Ubuntu 26.04 LTS"
os_target = "26.04"
os_macos = "macOS 13+"
os_windows = "Windows 10/11 x64"

[packages]
core = { path = "packages/core/core", lang = "python", description = "Framework, CLI, native broker boundary, config, models, logging" }
data = { path = "packages/core/data", lang = "python", description = "Tick storage and processing, audit logs, sandbox state" }
historical = { path = "packages/core/historical", lang = "python", description = "Historical data download, merge, DuckDB/Parquet, free NSE data" }
indicators = { path = "packages/core/indicators", lang = "python", description = "Pure-NumPy batch indicators (110 exports) + pure-Python streaming classes (optional Numba on 3 kernels) + Pine Script conversion" }
ticks = { path = "packages/core/ticks", lang = "rust", description = "High-performance tick processing engine — Rust core with Python bindings via PyO3" }
design-system = { path = "packages/core/design-system", lang = "typescript", description = "Shared FlintTrade design tokens, primitives, motion helpers, and UI kit" }
engine = { path = "packages/services/engine", lang = "python", description = "Strategy execution, order routing, safety layers, kill switches" }
screener = { path = "packages/services/screener", lang = "python", description = "Market scanner, OI spurt, PCR, max pain, portfolio Greeks" }
backtest = { path = "packages/services/backtest", lang = "python", description = "Event-driven simulation, vectorbt/raptorbt strategies, metrics" }
ai = { path = "packages/services/ai", lang = "python", description = "LLM chat, RAG, ML signals, autonomous trading, news sentiment" }
ditto = { path = "packages/services/ditto", lang = "python", description = "Multi-broker, multi-account orchestration, in-process mirroring, sizing rules, and risk manager" }
automation = { path = "packages/services/automation", lang = "python", description = "Cron jobs, Telegram bot (kill switch), post-market analysis" }
journal = { path = "packages/services/journal", lang = "python", description = "Trade journal, trade logging, execution analytics, and P&L tracking" }
gateway = { path = "packages/integrations/gateway", lang = "python", description = "Direct broker connections, adapter pattern, encrypted credentials, WebSocket bridge" }
webhooks = { path = "packages/integrations/webhooks", lang = "python", description = "Generic HMAC-signed custom webhooks" }
terminal = { path = "packages/apps/terminal", lang = "react", description = "Trading UI — manual orders, automation, option-chain views, OI analysis, DOM, charts" }
site = { path = "packages/apps/site", lang = "nextjs", description = "Documentation and MCP reference site" }
desktop = { path = "packages/apps/desktop", lang = "typescript", description = "Electron 45 shell — verified local-source bootstrap, guardian supervision, close-to-tray runtime and four-installer delivery" }

[groups]
core = ["core", "data", "historical", "indicators", "ticks", "design-system"]
services = ["engine", "screener", "backtest", "ai", "ditto", "automation", "journal"]
integrations = ["gateway", "webhooks"]
apps = ["terminal", "site", "desktop"]

# [infra] — external test-only dependencies, not bundled with FlintTrade.
# OpenClaw was formerly a git submodule under infra/. It is
# now external services that users install separately. Contributors who
# want a local copy for testing can clone them under .local/external/
# as an optional local reference; the directory is gitignored.
#
# AlgoMirror is intentionally absent: its multi-account mirroring patterns
# are fully absorbed into packages/services/ditto/ (PositionMirror, TrailingSLManager,
# MarginCalculator, RiskManager) and run in-process. There is no live
# integration; the upstream repo is no longer tracked.
[infra]
openclaw = { path = ".local/external/openclaw", type = "external-test-dep", upstream = "https://github.com/openclaw/openclaw.git" }

[safety]
# Self-imposed rate limit to stay within broker throttles.
max_orders_per_second = 10
audit_log_retention_years = 5
kill_switch_mandatory = true

[naming]
strategy_id_format = "{PACKAGE}-{TYPE}-{NUMBER}"
bug_id_format = "BUG-{NUMBER}"
branch_prefixes = ["feature/", "fix/", "hotfix/", "release/"]
commit_types = ["feat", "fix", "docs", "style", "refactor", "test", "chore", "perf", "ci", "hotfix"]

[deploy]
health_check_endpoint = "/api/v1/ping"
deploy_freeze_start = "09:15"
deploy_freeze_end = "15:30"
maintenance_window_start = "15:45"
maintenance_window_end = "18:00"

[exchanges]
# Exchange metadata understood by the domain model. The implemented native
# adapters expose NSE, BSE, NFO, BFO, CDS, BCD and MCX only.
# Index-only segments (NSE_INDEX, BSE_INDEX, MCX_INDEX, GLOBAL_INDEX) are
# quote-only and reject orders at the safety layer.
NSE = { name = "NSE Equity", hours = "09:15-15:30" }
BSE = { name = "BSE Equity", hours = "09:15-15:30" }
NFO = { name = "NSE F&O", hours = "09:15-15:30" }
BFO = { name = "BSE F&O", hours = "09:15-15:30" }
CDS = { name = "Currency Derivatives", hours = "09:00-17:00" }
BCD = { name = "BSE Currency", hours = "09:00-17:00" }
MCX = { name = "Commodities", hours = "09:00-23:55" }
NCDEX = { name = "Agri Commodities", hours = "10:00-17:00" }
NCO = { name = "NSE Commodities", hours = "09:00-17:00" }
NSE_INDEX = { name = "NSE Indices", hours = "09:15-15:30", quote_only = true }
BSE_INDEX = { name = "BSE Indices", hours = "09:15-15:30", quote_only = true }
MCX_INDEX = { name = "MCX Commodity Indices", hours = "09:00-23:30", quote_only = true }
GLOBAL_INDEX = { name = "Foreign + IFSC Indices (reference feed)", hours = "24/7", quote_only = true }

[exchanges.deploy_freeze]
# Deploy freeze must cover ALL active exchanges
equity_end = "15:30"
currency_end = "17:00"
mcx_end = "23:55"
# Safe deploy window: after MCX close (11:55 PM) until 8:30 AM next day

[brokers]
# Implemented native broker names.
# Mirrors BROKER_CATALOG in packages/integrations/gateway/src/flinttrade_gateway/adapter.py — keep in sync
# whenever native adapters change.
supported = ["Dhan", "Upstox", "Kotak Neo", "INDmoney", "Groww", "Delta Exchange"]