Quant.Infra.Net is a .NET quantitative trading infrastructure library — data acquisition, statistical analysis, broker integration, portfolio analytics, and notifications in one package.
Quant.Infra.Net abstracts the complexity of connecting to financial data sources, brokers, and notification channels behind a unified C# API. You write strategy logic once — the library handles the rest.
Core Capabilities / 核心基础设施:
| Module | What It Does / 能力说明 |
|---|---|
| Data Source / 数据源 | Unified market data ingestion from Yahoo Finance & Binance (Spot/Futures), with local CSV/SQL persistence. 聚合多源行情(Yahoo/Binance),并支持本地持久化。 |
| Broker & Orders / 订单执行 | Standardized trading interfaces for Binance Futures, seamlessly switching between testnet simulation and live execution. 币安合约标准化交易接口,无缝切换测试网模拟与实盘下单。 |
| Notification / 通知推送 | Real-time strategy alerts via DingTalk bots, WeChat Work webhooks, and SMTP/Brevo email pipelines. 内置钉钉、企业微信及邮件通道,实现策略信号的即时触达。 |
For full module details and usage examples, see User Manual and Architecture Overview.
┌─────────────────────────────────────────────────────────────────┐
│ Your Strategy Logic │
│ (Write once, run anywhere) │
└──────────────────────┬──────────────────────────────────────────┘
│ IQuantInfraNet API
┌───────────────────┼──────────────────────────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────────┐ ┌──────────────┐
│ Source │ │ Broker │ │ Notification │
│ Data │ │ & Orders │ │ │
│ │ │ │ │ │
│ Yahoo │ │ Binance │ │ DingTalk │
│ Finance │ │ Futures │ │ WeChat Work │
│ Binance │ │ Alpaca │ │ Email (SMTP) │
│ Spot/Perp│ │ Schwab │ │ Brevo │
│ CSV/SQL │ │ Interactive │ │ │
└──────────┘ │ Brokers │ └──────────────┘
│ (Testnet/Live)│
└──────────────┘
Why this matters / 为什么重要:
- One NuGet package — no juggling multiple SDKs from different vendors
- Unified interfaces —
ITraditionalFinanceSourceDataService,IBrokerService,IEmailService— swap implementations without changing your strategy code - Out-of-the-box analysis — ADF test, OLS regression, Z-Score, Sharpe ratio — all included
# Install via NuGet
dotnet add package Quant.Infra.Net --version 1.5.1// Register all modules
var services = new ServiceCollection();
services.AddQuantInfraNet();
// Fetch OHLCV data from Yahoo Finance
var dataService = services.BuildServiceProvider()
.GetService<ITraditionalFinanceSourceDataService>();
var bars = await dataService.GetOhlcvListAsync("AAPL", DateTime.Now.AddDays(-30), DateTime.Now);
// Place order via Binance Futures (testnet)
var binance = services.BuildServiceProvider()
.GetService<IBinanceUsdFutureService>();
await binance.SetUsdFutureHoldingsAsync("BTCUSDT", 0.01, PositionSide.Long);
// Send notification alert when strategy triggers
var dingTalk = services.BuildServiceProvider()
.GetService<IDingtalkService>();
await dingTalk.SendNotificationAsync("[Alert] BTC long position opened", token, secret);| Document | Description |
|---|---|
| User Manual / 使用手册 | Installation, module usage guide, API examples |
| Architecture Overview / 架构概览 | System design, module relationships, data flow |
| Code Standards / 代码规范 | SOLID principles, XML docs, naming conventions, checklist |
📖 GitHub Pages — full documentation site
Disclaimer: See DISCLAIMER for full disclaimer and limitation of liability / 详见免责声明了解完整免责条款与责任限制。