
Sdk
io.github.Marginpadv2.9.1更新於 Oct 8, 2026
Free crypto-futures paper trading and live market data for AI agents. 28 tools; no key for data.
概覽
讓助理取得加密貨幣期貨即時行情,並以模擬資金進行紙上交易,包含手續費、資金費、強制平倉與停損。
- 功能
- 這是一個遠端 MCP 伺服器,用於加密貨幣期貨紙上交易與行情資料,說明中稱有 28 個工具。行情類工具不需金鑰即可使用;交易類工具可開倉與管理模擬部位,支援槓桿、限價單與停損單、移動停損,以及帳戶、權益曲線與回放檢視。它也支援同一帳戶下的多個交易帳簿,以及用歷史某日K線重跑相同呼叫的回放模式。
- 適用情境
- 適合讓助理在不冒真實資金風險的情況下,用即時價格測試交易策略或代理迴圈,也適合在對話中取得加密貨幣期貨報價與帳戶狀態。它是模擬器,結果在實際使用前仍需小額實盤驗證。
- 執行需求
- 透過 streamable HTTP 連線 marginpad.io 的遠端端點,不需在本機安裝套件。行情工具不需要憑證。交易工具需要在 X-API-Key 標頭中提供 MarginPad Bot API 金鑰。免費額度限制:每個金鑰每分鐘 120 次請求、3 個金鑰、50 個未平倉部位。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Sdk,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"sdk": {
"type": "http",
"url": "https://marginpad.io/mcp"
}
}
}README
MarginPad SDK
Free crypto-futures paper trading for bots and free market data. One key, no KYC, no deposit. Test a strategy or an AI agent against live prices with real fee schedules, funding, liquidations, limit and stop orders, trailing stops, webhooks and a WebSocket stream, then take the same code to a real exchange.
- Guide: https://marginpad.io/trading-api/
- Reference (OpenAPI, try it live): https://marginpad.io/api-docs/
- Status: https://marginpad.io/status/ - Changelog: https://marginpad.io/api/changelog.xml
- MCP server for Claude, ChatGPT and Cursor: https://marginpad.io/trading-api/#mcp
Install
Python
JavaScript
Books, reset, equity, replay (2.5 / 2.6)
A key minted with book ({"act":"create","name":"rsi","book":"rsi"} on POST /api/bot/key) trades a separate journal: one strategy, one key, one clean result. During a replay every trading call of that key acts on a replay journal priced from the candle under the cursor; stops, targets and liquidations are checked on every candle between two calls.
Examples
examples/agent_loop.py: a signal loop that opens, manages and closes positions once a minute without polling storms.examples/webhook_server.js: receiveposition.closed/order.filledevents with signature verification.examples/mcp.md: let Claude Desktop or Cursor trade on your paper account through the MCP server.
Limits
Free: 120 requests/minute per key, 3 keys, 50 open positions. Premium: 600/minute, 10 keys, 200 open positions.
Every response carries X-RateLimit-Limit / Remaining / Reset; on 429 both clients wait Retry-After and retry once.
Out-of-range input is refused with a named error (leverage_max carries the market's cap), never silently clamped.
Honesty note
This is a simulator. Fees, funding and liquidation math mirror real exchanges; there is no order book, so slippage is modelled, not measured on depth. A bot that passes here still needs a small live test. Educational use, not financial advice.
MIT licensed.
來源:README.md,提交 fcf5d5f
工具
0版本歷史
1- v2.9.1最新Oct 8, 2026
