MA

mnemox-ai/tradememory-protocol

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

1434 stars 170 forks 品質 84 トレンド 38MIT

AIトレーディングエージェント向けの意思決定監査トレイル+永続メモリ。結果加重リコール、改ざん防止SHA-256チェーン(RFC 3161アンカリング付き)、20のMCPツール。

概要

毎回同じミスを繰り返します。なぜ取引したのか説明できません。コンテキストウィンドウが終わるとすべてを忘れてしまいます。一方で、MiFID IIはアルゴリズムによる意思決定記録の基準を引き上げています(第17条)。EU AI法はAIの行動を体系的に記録することを要求しています(第14条)。競合他社のエージェントはすべての取引から学んでいます。 AIトレーディングスタックには層が欠けています。すべてのMCPサーバーは実行を担当します — 注文の出入、価格の取得、チャートの読み取りなどです。 あなたのエージェントはAAPLの100株を購入できますが、「この状態でAAPLを買った前に何が起こったのか?」と答えられないのです。 1つのPIPインストールで、AIエージェントはすべての取引、すべての結果、すべてのミスを記憶し、SHA-256の改ざん防止監査記録で守ります。 各ポジションの前で事前チェックリストを実行するトレーダーや、EAシステムが毎日数千件の意思決定を記録しているなど、本番環境で使われています。 - 記憶に聞いてください — 前回この市場状況で何が起こったのか?どう終わったのか?

概要(AI 翻訳)

はじめ |ユースケース |APIリファレンス |OWMフレームワーク |制限事項 |中文版


TradeMemoryはコストを記憶します。 これはAI取引エージェントのためのオープンソースのローカルファーストメモリ兼ブレーキです。あなたのフィルを取り込み、あなたの履歴が損をした場所を見つけ、その損失を次の注文前にエージェントの前に提示し、ルール違反の注文はブローカーに届く前に拒否できます。

ブローカーは現在、AIエージェントがMCP上で取引できるようになり、異なるガードレールがあります。Webullやtastytradeはサイズや購買力の上限を設定し、Interactive Brokersはエージェントが注文を作成してあなたに提出できるようにし、RobinhoodやPublicは外部エージェントに課せる上限を設定していません(StockBrokers, 2026-09-30)。上限は固定された数字です。どの上限もあなたの過去の取引結果を反映していません。

まずは自分自身の歴史から始めましょう

クローズドされた取引は一度メモリに保存されます。再度実行すると新しいトレードのみが保存されます。その後、履歴が損をした箇所を印刷します。フォーマットと示す数字:

これらはあなたの過去の取引の詳細な統計であり、次の取引に関するアドバイスではありません。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。


TradeMemory remembers what it cost. It is an open-source, local-first memory and brake for AI trading agents: it pulls in your fills, finds where your own history loses money, puts those losing trades in front of your agent before the next order, and can refuse an order that breaks rules you set, before it reaches the broker.

Brokers now let AI agents trade over MCP, with different guardrails: Webull and tastytrade set size or buying-power limits, Interactive Brokers only lets the agent draft an order for you to submit, and Robinhood and Public set no cap you can impose on an external agent (StockBrokers, 2026-09-30). The caps are fixed numbers. None of them looks at how your own past trades went.

Start with your own history

pip install tradememory-protocol

# Hyperliquid: public fills, no key needed
tradememory sync hyperliquid --address 0xYourAddress

# Alpaca: read-only calls with your own keys, kept in a local file
tradememory sync alpaca --env-file ~/.secrets/alpaca.env

Each closed trade is stored in memory once; running it again stores only new trades. Then it prints where your history loses money. The format, with illustrative numbers:

After 2 losses in a row (20 trades):
  5 of them (25%) were 1.5x your usual size or more.
  All 20 won 60% and made -$1,500.
  The 5 sized-up trades won 20% and made -$1,700.

Median hold: winners 1.5h, losers 9.0h.

These are descriptive statistics of your own past trades, not advice about the next one. Hyperliquid’s API serves only an address’s recent fills, not its whole history, so the sooner it is synced, the more history is kept. Other venues: MT5 and Binance spot sync scripts are in scripts/, and any agent can record a trade with remember_trade.

GitHub で README 全文を見る

インストール

uvx tradememory-protocol
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "tradememory": { "command": "uvx", "args": ["tradememory-protocol"] } } }