dsh-trading README

The project's README from github.com/zhu1090093659/dsh-trading. As one markdown file: README.md.

dsh-trading

dsh-trading — Your next trading terminal, and your AI Agent

Your next trading terminal can also be your AI agent. No chumps for the slaughter, just everyday traders.

DSH Baseline Markets Connectors License

First, a question for you:

Of the money you've lost trading, how much of it was lost before you had truly thought it through?

You chase a rally and become the exit liquidity. You buy the dip, and it keeps dipping. You cut the loss, and it bounces the moment you're out; you hold, and it grinds you into the deep red. (Veterans don't always dodge these either.)

Where does the problem lie? Not in luck. In discipline.

The market opens every day, and bulls and bears fight it out every day. The most dependable weapon a retail trader holds was never better information — it's discipline. A seasoned hunter waits nine-tenths of the time and strikes in the remaining tenth; most traders do the exact opposite — nine-tenths acting, one-tenth regretting.

That is why dsh-trading exists: an agent-native trading terminal built on DeepSeek Harness (DSH). A professional trading workflow, paired with an AI agent in sync with the market: quotes, news, and capital flow are all in its view; research follows institutional-grade playbooks; and before a real order goes out, every single one passes an approval gate that only your hand can click.

Crypto, US equities, China A-shares, Hong Kong stocks. One terminal. One agent. Nineteen-plus connectors. Zero vendor lock-in — every key stays on your machine.

dsh-trading terminal — watchlist, chart stage with indicators, order book and derivatives panel


What does agent-native mean?

What do most "AI trading tools" look like? A chat box glued to the side of the chart.

Glued on, not grown in.

dsh-trading turns that relationship upside down: the agent is a first-class citizen of the terminal, and the terminal is the agent's body. Four things separate it from every chatbot you've used:

  1. Quotes, news, capital flow — the agent has it all. One click on Send to Agent, and the symbol you're watching — live quote, current candle, the chart series' time range with a fetch locator (so the agent pulls the same routed data itself and analyzes it in code), the computed readings of your active indicators, available chart screenshot and derivatives snapshot, plus freshly requested announcements, news and a bounded fundamentals summary — is packaged into the composer without sending. Missing sources are explicit; the agent is guided to verify original disclosures and fill gaps with native research tools. No more screenshot-copy-paste ritual.

Send to Agent — chart snapshot and quote context injected into the composer

  1. The agent can trade, but the gate is in your hands. Market data, order books, derivatives positioning, news, and order placement are all native tools. Yet every order defaults to dry-run simulation; live routing requires an explicit liveTrading: true opt-in, and then each order still passes through interactive human approval. In headless environments it fails closed. One rule: no move without the gate. Nothing executes behind your back.

  2. The agent trained for this. Domain knowledge ships as bundled skills, not model improvisation: pre-trade risk checklists for every market (crypto · US · CN · HK), a five-step crypto instrument analysis framework, a full company analysis playbook, and a trading journal discipline that dual-tracks "what the agent did" versus "what you did" — append-only and auditable.

The risk checklist runs before every entry — a discipline most veterans never sustain in ten years (usually undone by "just this once").

  1. One master leading a role-based team. master (大师) is the all-capable multi-agent team lead: it grounds every trade question in the unified holdings ledger (holdings_list / holdings_stage) and per-market balance tools, pulls the user knowledge base first, then decomposes the task and delegates specialist work to persona-pinned subagents — instrument analysis to the researcher (researcher_subagent), trading-plan drafting to the trader (trader_subagent), plan review to the risk reviewer (risk_reviewer_subagent) — dispatching project skills by task type (analysis frameworks, market risk checklists, strategy paradigms with strategy_backtest, dynamic packages for one-off cross-instrument aggregation) before cross-checking and integrating a single conclusion. Cross-market overviews and order execution it can do itself, still dry-run by default behind the approval gate; delegates deliver analysis text only — execution stays with the master behind the gate. Beneath it: trader (交易员) for trading plans and gated execution, instrument-researcher (标的分析研究员) for disclosures, fundamentals and valuation, risk-reviewer (风险审查员) for exposure, stress scenarios and rejection conditions. Every role prioritizes project knowledge, news/announcements and fundamentals tools. Research and risk retain read-only quotes/candles but mount no order/cancel connectors; subagents inherit the session toolset with a persona pinning their duties — shared host tools remain visible, so role scoping is not a separate security sandbox.

The base installer generates these four roles from enabled market bundles, including partial-market installations; the deployment default for new sessions is 大师 (master) — overridable per user in settings. Unmodified managed legacy market presets move to a sibling .legacy-backup root; custom, unstamped or extended directories remain untouched. No user preset data is deleted.

The terminal itself must be real software first

A shoddy terminal makes even the smartest agent an armchair general.

The operations surface is built in

One terminal, every market

Market Connectors
Crypto Binance, OKX (Paper/Live), Bybit, CCXT (100+ exchanges)
US Equities Yahoo Finance, Alpaca (Paper/Live), FMP, Finnhub, Polygon.io, Interactive Brokers
China A-Shares Tencent Finance, Eastmoney, Tushare Pro, AkShare, MiniQMT broker gateway
Hong Kong Tencent HK, Longbridge OpenAPI, Futu OpenD, Tiger OpenAPI

Hot-swappable data planes. Not happy with a data source? Swap it. Settings → Trading routes any market to any installed provider: the quote panel re-routes on save, agent sessions pick it up on their next turn — no restarts, no config archaeology.

Provider routing — per-market exchange selection with BYOK credential slots

Safety and privacy: discipline welded in, not preached

The formula of trading has always been: study + waiting + decisiveness + patience = survival.

The tool cannot wait for you, and it cannot be patient for you. But it can hold the gate in between:

  1. Dry-run by default. Every order/cancel tool simulates unless you explicitly flip liveTrading: true.
  2. A human reviews every live order. DSH's approval layer intercepts live routing; headless mode fails closed.
  3. BYOK. API keys live in your environment variables or local config. Nothing is bundled, relayed, or uploaded.
  4. No data re-distribution. Market data is fetched for you, under each provider's ToS; nothing is cached for resale or sharing.

Without your signature, not a single cent moves.

Quick start

Three steps, and you're in:

# Install into a dedicated DSH profile (pick your markets)
# Trading lives in its own DSH home (~/.dsh-trading) so it never mixes with your
# main dsh web home (~/.dsh); every dsh-trading package resolves data paths via $DSH_HOME
export DSH_HOME=~/.dsh-trading
dsh plugin --profile trading-web add @dshtrading/base @dshtrading/crypto @dshtrading/us
# …or all four markets
dsh plugin --profile trading-web add @dshtrading/base @dshtrading/crypto @dshtrading/us @dshtrading/cn @dshtrading/hk

# Serve the browser UI in this profile (once): add the in-box web host layer
# right after the dsh core layer in the profile manifest
node -e "const f=(process.env.DSH_HOME||require('os').homedir()+'/.dsh')+'/profiles/trading-web/package.json',fs=require('fs'),m=JSON.parse(fs.readFileSync(f,'utf8'));m.dsh.profile.bundles.includes('@deepseek-ai/dsh-web-app')||m.dsh.profile.bundles.splice(1,0,'@deepseek-ai/dsh-web-app');fs.writeFileSync(f,JSON.stringify(m,null,2)+'\n')"

# Launch the terminal
dsh --profile trading-web

Open the printed URL: watchlist left, chart center, your agent right. New conversation → pick a market preset → first ask it what it sees.

The architecture at a glance

A layered Cordis microkernel ecosystem where markets compose instead of collide:

@dshtrading/base          ← core: account/order/quote contracts, approval gate, GUI shell
├── @dshtrading/crypto    ← Binance / OKX / Bybit / CCXT + skills + preset
├── @dshtrading/us        ← Yahoo / Alpaca / FMP / Finnhub / Polygon / IBKR + skills + preset
├── @dshtrading/cn        ← Tencent / Eastmoney / Tushare / AkShare / MiniQMT + skills + preset
└── @dshtrading/hk        ← Tencent HK / Longbridge / Futu / Tiger + skills + preset

Six invariants lock the ecosystem down: insert-only bundle patches · knowledge lives in skills, not code · dual-track order gates · shared code earns its place in base (≥2 markets) · zero data re-distribution · the GUI shell is replaceable, the data contracts are not.

Data sources & terms

Market Default source Boundary
US Yahoo Finance / Alpaca Yahoo public endpoint (individual use); Alpaca official Paper/Live APIs
CN Tencent Finance / Eastmoney / HiThink (Fuyao) Public endpoints; HiThink REST API for fundamentals & auction data; live execution via local MiniQMT gateway
HK Tencent HK / Longbridge Public endpoint; licensed broker OpenAPI/Gateway for execution
Crypto Binance / OKX Official APIs; OKX paper trading with your own keys
Crypto fundamentals CoinCap Public REST, individual use only — no redistribution, no bulk scraping

Documentation

Community

💬 QQ group: DSH Trading 交流群(群号 319737695) — questions, feedback, and everything dsh-trading. Scan with QQ to join:

dsh-trading QQ group QR code — group 319737695

One last word

Tools are dead things; discipline is alive. The finest terminal cannot press buy for you, and it should not — but it can make sure that every time your hand does move, the thinking has already happened.

Go experience it. Go make the mistakes. Go review your trades. The road is long — onwards, together.

This project is software, not investment advice. Markets carry risk — trade with care.

License

PolyForm Noncommercial 1.0.0 — free for personal study, research, and noncommercial use. Commercial use requires prior written authorization: open a GitHub issue or contact [email protected].

本项目采用 PolyForm Noncommercial 1.0.0 许可:非商业用途免费;商业用途须事先取得书面授权([email protected] 或 GitHub Issue)。

dsh-trading (zhu1090093659/dsh-trading)

Searching Database…

Что это?dsh-trading — agent-native торговый терминал на базе DeepSeek Harness (DSH): трёхколоночный GUI (список наблюдения, график, ИИ-агент) плюс агент, который видит рыночные данные и совершает сделки, но только с одобрения человека, на рынках криптовалют, США, Китая и Гонконга.
Это отдельное торговое приложение или плагин для чего-то ещё?Это плагин внутри экосистемы микроядра Cordis, построенной на DeepSeek Harness, упакованный как настоящий десктопный GUI-терминал (графики, стакан заявок, список наблюдения), а не чат-бот, прикрученный к торговому экрану.
Как его запустить?После запуска откройте выведенный локальный URL, где список наблюдения, график и агент показаны в трёх колонках, затем начните новый разговор, выберите рыночный пресет и спросите агента, что он видит.
Нужны ли свои API-ключи бирж и провайдеров данных?Да, это BYOK: ключи для коннекторов вроде Binance, Alpaca, Tushare Pro или Longbridge лежат в ваших переменных окружения или локальном конфиге — проект ничего не бандлит и не проксирует.
Может ли агент сам отправлять живые сделки?Нет, каждый ордер по умолчанию симулируется; живой роутинг требует явного включения liveTrading true, и даже тогда каждый ордер всё равно проходит интерактивное одобрение человека, а headless-конфигурации работают по принципу fail-closed.
Куда уходят мои рыночные данные и торговая активность?Рыночные данные берутся напрямую у каждого провайдера по его условиям обслуживания и никогда не кэшируются для перепродажи или передачи дальше, а учётные данные остаются локально, не проходя через какие-либо вендорские бэкенды.
Есть ли подвох в лицензии?Проект распространяется под PolyForm Noncommercial 1.0.0: личное изучение, исследования и некоммерческое использование бесплатны, но любое коммерческое использование требует предварительного письменного разрешения автора.
Какие рынки и коннекторы он на самом деле покрывает?Криптовалюты через Binance, OKX, Bybit и CCXT (100+ бирж); акции США через Yahoo Finance, Alpaca, FMP, Finnhub, Polygon.io и Interactive Brokers; китайские A-акции через Tencent Finance, Eastmoney, Tushare Pro, AkShare и брокерский шлюз MiniQMT; Гонконг через Tencent HK, Longbridge, Futu и Tiger OpenAPI — итого 19 и более коннекторов с горячей заменой.
Как ИИ-агент устроен внутри?Ведущий «master»-агент привязывает каждый вопрос к вашему реестру позиций, затем делегирует субагентам с закреплёнными ролями: исследователь занимается анализом инструментов, трейдер составляет планы, риск-ревьюер проверяет экспозицию и стресс-устойчивость — каждый использует свои встроенные skill-плейбуки.
Какие графики и инструменты глубины рынка встроены в терминал?Lightweight Charts v5 с таймфреймами от 5 минут до недели, редактируемыми индикаторами MA/EMA/BOLL/MACD/RSI/KDJ/SuperTrend, живым стаканом заявок с давлением покупателей и продавцов, данными деривативов вроде открытого интереса и ставок финансирования, плюс кросс-рыночный список наблюдения.
Можно сменить провайдера данных рынка без перенастройки всего?Да, в Settings → Trading можно направить любой рынок к любому установленному провайдеру; панель котировок перестраивается при сохранении, а сессии агента подхватывают изменение на следующем ходу — перезапуск не нужен.
Size
22.5 MB
Stars
266
Age
1mo
Commits · 90 Days