アルパカトレーディングMCPサーバー
Alpaca 取引 API へのインターフェイスを提供するモデル コンテキスト プロトコル (MCP) サーバー。これにより、株式および暗号通貨ポートフォリオの管理、取引の実行、市場データへのアクセスが可能になります。
特徴
- アカウント管理: アカウントの詳細、残高、ポートフォリオのステータスを表示します
- 取引:成行注文、指値注文、逆指値注文、ストップリミット注文を出す
- ポートフォリオ管理: ポジションの表示、パフォーマンスの計算、ポジションのクローズ
- 市場データ: リアルタイムの相場情報と過去の価格データにアクセス
- 資産情報: 取引可能な資産の詳細を取得します
インストール
- このリポジトリをクローンする
- 依存関係をインストールします:
またはuvを使用します:
構成
.env.example
ファイルを.env
にコピーします。
- Alpaca Paper Trading API の資格情報を
.env
ファイルに追加します。
Alpacaでアカウントを作成すると、これらの資格情報を取得できます。
使用法
MCP サーバーを実行します。
サーバーが起動し、MCP クライアントが接続できるようになります。
利用可能なリソース
サーバーは次のリソースを提供します。
account://info
- 現在のアカウント情報を取得するpositions://all
- 現在のポジションをすべて取得するpositions://{symbol}
- 特定のシンボルのポジション詳細を取得しますorders://recent/{limit}
- 指定された制限内で最新の注文を取得しますmarket://{symbol}/quote
- 特定のシンボルの現在の市場相場を取得しますmarket://{symbol}/bars/{timeframe}
- 指定した時間枠のシンボルの過去の価格バーを取得します。assets://list
- Alpaca で取引可能な資産をリストしますassets://{symbol}
- シンボルで詳細な資産情報を取得します
利用可能なツール
サーバーは次のツールを提供します。
get_account_info_tool
- 現在のアカウント情報を取得するplace_market_order
- 株式の売買の成行注文を出すplace_limit_order
- 指定した価格で株式を売買するための指値注文を出すplace_stop_order
- 指定された価格に達したときに株を買ったり売ったりするストップ注文を出すplace_stop_limit_order
- ストップ注文とリミット注文の機能を組み合わせたストップリミット注文を出すcancel_order
- ID でオープン注文をキャンセルするclose_position
- 特定のシンボルのオープンポジションをクローズするget_portfolio_summary
- ポートフォリオの包括的な概要を取得します
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Alpaca 取引 API とインターフェイスするモデル コンテキスト プロトコル サーバー。これにより、ユーザーは自然言語による対話を通じてポートフォリオを管理し、取引を行い、市場データにアクセスできるようになります。
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides real-time access to financial market data through the free Alpha Vantage API. This server implements a standardized interface for retrieving stock quotes and company information.Last updated -564PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server enabling LLMs like Claude to interact with the Alpaca trading API through natural language for stock trading, checking positions, fetching market data, and managing your account.Last updated -23PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables interaction with the Tradovate API for managing trading contracts, positions, orders, and accounts.Last updated -1JavaScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs like Claude to interact with the Alpaca trading API, allowing for trading stocks, checking positions, fetching market data, and managing accounts through natural language.Last updated -3PythonMIT License