
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
