MarginPad SDK: free crypto-futures paper trading for bots and AI agents, plus a remote MCP server (29 tools). Python and JavaScript, zero dependencies.
FAQ (answers come from our records)
How do I install it?
The repository provides this install command: pip install marginpad. It comes from the repository itself; we cannot guarantee it runs as-is in your client.
Who is it for?
We filed it under these tags: 开源项目. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository Marginpad/sdk;first catalogued 2026-10-10;last seen 2026-10-10。There is no official certification or quality rating here — we record sources and dates only.
MarginPad SDK
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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.
The simulation is yours to set
Eighteen fields and eight presets, so the paper venue can be the one you will actually trade. The defaults are deliberately frictionless, and nothing you have already built moves until you change them.
The **book** (start_balance_usd, margin_enforced, leverage_max, max_notional_usd), the **fill** (slippage, slippage_bps, impact_bps_per_100k, exit_slippage, latency_ms, partial_fills, min_fill_pct, reject_rate_pct), the **cost** (taker_bps, funding, funding_mult) and the **liquidation** (margin_venue, margin_tiers, mmr_pct).
Out-of-range values are refused, never clamped, and a position keeps the simulation it was filled under for life. margin_enforced turns the balance into a real budget: size past it and the open comes back 402, which is the failure a live bot has to handle and a frictionless simulator never shows you. reject_rate_pct is the one a retry loop is worth writing for.
Every field with its range: https://marginpad.io/trading-api/#sim
Examples
- examples/agent_loop.py: a signal loop that opens, manages and closes positions once a minute without polling storms.
- examples/webhook_server.js: receive position.closed / order.filled events with signature verification.
- examples/mcp.md: let Claude Desktop or Cursor trade on your paper account through the MCP server.
Limits
| Plan | Requests/min | Keys | Open positions | Books | Webhooks |
|---|---|---|---|---|---|
| Free $0 | 120 | 3 | 50 | 1 | - |
| Pro $39 | 600 | 10 | 200 | 5 | 3 |
| Max $99 | 2000 | 30 | 500 | 20 | 15 |
| Business $199 | 5000 | 100 | 1000 | 50 | 50 |
An API plan is its own product: a MarginPad Premium subscription buys nothing here, and an API plan buys nothing on the site. The whole engine, the simulation, several books per key, the replay, the WebSocket stream and every market-data endpoint are free - only webhooks and the AI read are gated. Trade history is 30 days on Free and 90 on a paid plan.