Tradeledger

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 4, 2026

Read the iBitLabs live trading experiment: account status, recent trades, rules and saga.

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

唯讀的 MCP 用戶端,讓助理引用 iBitLabs 實盤交易實驗的真實資料:餘額、交易、影子規則與敘事章節。

可以做什麼
  • 讀取帳戶狀態:餘額、總損益、勝率、交易次數、市場狀態及目前持倉
  • 列出最近已平倉交易,含方向、平倉原因、損益、市場狀態、MFE 與 MAE
  • 依已採用、排隊或全部篩選貢獻者提出的影子規則
  • 查看單一規則的各分桶命中率及距晉升門檻的差距
  • 取得最新一篇敘事章節(英文或中文)
適用情境
適合希望助理引用實驗真實數字而非編造看似合理數值的場合,例如回答目前績效、近期交易或規則進度相關問題。
執行需求
透過 npx 或 Docker 以 stdio 在本機執行。不需要也不接受任何憑證。所有呼叫都轉送到單一上游 MCP 端點,可用 IBITLABS_MCP_URL 設定(預設 設定單次請求逾時。
安裝前請注意
五個工具皆為唯讀,沒有下單、錢包或帳戶寫入操作。呼叫會轉送至第三方上游端點,查詢內容與結果會離開本機。該端點與轉送方式標示為重建實作,數據取決於該上游,出錯時回傳以 tradeledger error: 開頭的文字。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Tradeledger,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

tradeledger

A read-only window onto a live trading experiment. tradeledger lets an agent quote the experiment's actual state — its current balance and open position, the trades it has actually closed, the contributor shadow rules it runs, and the story it tells about itself — instead of inventing plausible numbers.

Nothing here trades. The five tools only read public data; there is no order, wallet, or account-write operation in the surface, and no credential is needed or accepted.

Tools

ToolArgumentsWhat it answers
get_live_status—Balance, total PnL, win rate, trade count, market regime, and the open position if one is running.
get_recent_tradeslimit (optional integer)The most recent closed trades, each with direction, exit reason, PnL, and regime.
list_adopted_rulesstatus (optional: adopted, queued, or all)The contributor-proposed shadow rules, filtered by where they stand.
get_rule_statusrule_id (required string)One rule's per-bucket hit rates and how far it sits from its promotion bar.
get_latest_saga_chapterlang (optional: en or zh)The newest entry in the experiment's narrated saga.

How it works

tradeledger is a forwarding client. A tool call is packaged as a JSON-RPC tools/call request and sent to a single upstream MCP endpoint; whatever the upstream returns is handed back untouched. When the upstream fails, the answer is an error text beginning tradeledger error: — never a locally invented figure.

Provenance

The endpoint and the forwarding shape are labelled reconstructions. The original server's public description names its data sources in prose but publishes no per-tool endpoint, so this rebuild points every call at one configurable upstream:

  • IBITLABS_MCP_URL — upstream MCP endpoint. Default: https://www.ibitlabs.com/api/mcp (labelled reconstruction).
  • REQUEST_TIMEOUT_MS — per-request timeout. Default: 15000.

Run it as an MCP server

json
{  "mcpServers": {    "tradeledger": {      "command": "npx",      "args": ["-y", "@reneturcios/tradeledger", "mcp"]    }  }}

Or in a container:

bash
docker run -i ghcr.io/cloudcorprecords/tradeledger

Run it as a CLI

bash
npx @reneturcios/tradeledger get_live_status '{}'npx @reneturcios/tradeledger get_recent_trades '{"limit": 2}'npx @reneturcios/tradeledger get_rule_status '{"rule_id": "F"}'npx @reneturcios/tradeledger --version

Each tool subcommand takes exactly one JSON object string with the tool's arguments and prints the result text. Exit codes are 0 on success, 1 on an error result, and 2 on a usage error.

Development

bash
npm installnpm run build   # tsc -> dist/ (dist/cli.js is the bin)npm test        # tsx --test test/*.test.ts — offline; the upstream is stubbednpm run dev     # tsx src/cli.ts — run the CLI from source

The test suite never touches the network: it drives the core with a stubbed JSON-RPC upstream whose payloads are the public worked-example responses, and checks they pass through untouched, that failures become tradeledger error: results, and that the served tool list matches the contracted five tools exactly.

License

MIT. See LICENSE.

來源:README.md,提交 3f47566

工具

5

get_live_status

Current balance, PnL, win rate, open position, reconciliation

無需輸入參數。

get_recent_trades

Last N closed trades with entry/exit/PnL/regime/MFE/MAE

輸入參數limit

list_adopted_rules

Contributor-proposed shadow rules (adopted | queued | all)

輸入參數status

get_rule_status

Per-rule bucket hit-rates + distance from promotion bar

輸入參數rule_id必填

get_latest_saga_chapter

Latest narrated saga entry (en | zh)

輸入參數lang

版本歷史

1
  1. v0.1.0最新Nov 4, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分