Free Crypto Paper Trading API — Test Your Trading Bot | MarginPad
MARGINPAD
Markets Tools
● 100% free · no deposit · real live prices

Test your trading bot — for free.

Point your bot at our paper-trading REST API. Real live crypto prices, leveraged positions up to 1000×, stop-loss/take-profit, partial closes and liquidation simulation — without risking a cent. Your bot's whole strategy, proven before it ever touches real money.

120 req/min50 open positionsup to 1000× leverageany USDT pairmax $100k margin per trade

Just want market data? See the free crypto data API — keyless live prices, OHLC, a scored screener, funding, open interest, liquidations, an economic calendar and calculators, all CORS-enabled with an OpenAPI spec.

1 · Get your free API key

Sign in with just an email (no password, no KYC), then generate your key. Your bot's positions persist on your account.

2 · Endpoints

GET/api/bot/v1/price?symbol=BTC

Live price for any USDT pair. No key needed — try it right now in your browser.

GET/api/bot/v1/klines?symbol=BTC&interval=60

OHLC candles for your strategy (intervals: 1, 5, 15, 30, 60, 240, 1440 minutes). No key needed.

POST/api/bot/v1/open

Open a simulated position at the live price. Body: {"symbol":"BTC","side":"long","margin_usd":100,"leverage":20,"sl":58000,"tp":66000} (sl/tp optional). Returns the position incl. its liq_price.

POST/api/bot/v1/close

Close a position at the live price. Body: {"id":"bp...","pct":50}pct is optional (default 100); partial closes split the position exactly like on the site.

POST/api/bot/v1/close_all

Panic button — closes every open position at the live price in one call.

GET/api/bot/v1/positions

All your positions with live mark_price and unrealized_pnl_usd; crossed liquidations and SL/TP are settled automatically.

GET/api/bot/v1/account

Account summary: open positions, margin in use, live unrealized P&L, realized P&L, wins/losses and win rate.

Authenticate with the X-API-Key header on every call except /price and /klines.

Free Liquidation Data API LIVE DATA

Real-time liquidations aggregated from Binance, Bybit, OKX, BitMEX, Hyperliquid and Bitfinex — the data behind our Rekt feed and Liquidation Heatmap, exposed as free JSON. Comparable data is normally paywalled at $300+/month elsewhere; here it needs no API key at all. Edge-cached and rate-limited, so it comfortably handles polling bots.

GET/api/v1/feed

The newest liquidations across ALL tracked symbols — {events:[{ts, exchange, symbol, side, price, qty, notional}]}. Freshness: events land here seconds after they happen (3s edge cache). Poll every 3–5s.

GET/api/v1/liquidations/live?symbol=BTC&limit=400

Raw recent liquidation events for one symbol (BTC, ETH, SOL, XRP, DOGE, BNB, ADA, LINK, AVAX, LTC). side is long_liquidated or short_liquidated, notional is the USD size.

GET/api/v1/liquidations/recent?symbol=BTC&minutes=1440

Time-bucketed histogram (long vs short $ per bucket) for charts — the exact source of our heatmap’s stats. minutes: up to 43200 (30 days).

GET/api/v1/clusters?symbol=BTC

Modeled liquidation clusters: price levels where liquidation liquidity is estimated to sit right now — {clusters:[{price, side, est_notional}]}. Refreshes continuously from live order flow.

# the last liquidations on the market, right now:
curl "https://marginpad.io/api/v1/feed"
# BTC liquidation clusters for your own heatmap:
curl "https://marginpad.io/api/v1/clusters?symbol=BTC"

Attribution appreciated (link marginpad.io) but not required. Coverage is ~70%+ of the market’s liquidation flow — the venues that move price. Educational use; no uptime SLA.

3 · Two-minute quickstart

# price (no key)
curl "https://marginpad.io/api/bot/v1/price?symbol=SOL"

# open a 20x long with $100 margin
curl -X POST "https://marginpad.io/api/bot/v1/open" \
  -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"symbol":"SOL","side":"long","margin_usd":100,"leverage":20}'

# check live P&L
curl "https://marginpad.io/api/bot/v1/positions" -H "X-API-Key: YOUR_KEY"

# close half, let the rest run
curl -X POST "https://marginpad.io/api/bot/v1/close" \
  -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"id":"POSITION_ID","pct":50}'
# python bot skeleton
import requests, time
API = "https://marginpad.io/api/bot"
H = {"X-API-Key": "YOUR_KEY"}

price = requests.get(f"{API}/v1/price", params={"symbol": "BTC"}).json()["price"]
if my_signal(price):  # your strategy here
    r = requests.post(f"{API}/v1/open", headers=H, json={
        "symbol": "BTC", "side": "long", "margin_usd": 50, "leverage": 10,
        "sl": price * 0.97, "tp": price * 1.06,
    }).json()
    print("opened", r["position"]["id"], "liq @", r["position"]["liq_price"])
# node.js bot skeleton
const API = "https://marginpad.io/api/bot";
const H = { "X-API-Key": "YOUR_KEY", "content-type": "application/json" };

const { price } = await (await fetch(`${API}/v1/price?symbol=ETH`)).json();
if (mySignal(price)) {  // your strategy here
  const r = await (await fetch(`${API}/v1/open`, { method: "POST", headers: H,
    body: JSON.stringify({ symbol: "ETH", side: "short", margin_usd: 50, leverage: 10 }) })).json();
  console.log("opened", r.position.id, "liq @", r.position.liq_price);
}

Why test a trading bot on paper first

Most crypto trading bots that look profitable in a backtest lose money the first week they go live. Backtests replay clean historical candles — they can't catch a race condition in your order logic, a position-sizing bug that only shows up after a losing streak, or leverage that quietly grows past what your margin survives.

Forward testing (paper trading) runs the same bot, the same code path, against real live prices in real time. Your bot places actual orders — they're just settled in simulated dollars. If the strategy has a flaw, it shows up here, where a bug costs you nothing, instead of on an exchange where it costs you the account.

The usual workflow: backtest the idea on historical data to filter out obvious losers, then point the bot at this API for days or weeks of live forward testing, and only fund a real exchange account once the paper results hold up. Track the results in the Trading Journal and compare against your manual trades in Paper Trade.

Backtesting vs paper trading vs going live

BacktestingPaper trading (this API)Live trading
PricesHistorical candlesReal live prices, real timeReal live prices
RiskNoneNone — simulated dollarsReal money at stake
Catches logic bugsRarely — replayed data hides themYes — same code path as liveYes, but each bug costs money
Overfitting checkNo — you tuned on this dataYes — unseen future dataYes
CostFreeFreeFees + losses + funding
Best forFiltering ideas fastProving the bot before funding itA strategy already proven twice

Do all three, in that order. The middle step is the one most people skip — and the one that would have saved them.

How the simulator works

Fills & prices

Orders fill instantly at the real live price (multi-exchange feed — the same prices as our Paper Trade). No slippage model yet, so treat results as an upper bound.

Margin, liquidation, SL/TP

Isolated margin. Losses are capped at your margin. The liquidation price uses a 0.5% maintenance margin rate; when the live price crosses it the position settles at the liq price automatically. Stop-loss and take-profit orders execute automatically too — when the live price crosses your sl or tp, the position settles at that level (status closed_sl / closed_tp).

Limits

120 requests/minute per key · 50 open positions · $1–$100,000 margin per trade · leverage 1–1000×. Need more for a serious project? Message us via the site.

See your bot's trades on the site

Positions opened via the API live on your account server-side. The Trading Journal and account profile analytics for API positions are on the roadmap.

FAQ

Is there a free liquidation data / heatmap API?

Yes — MarginPad exposes real-time liquidations aggregated from 6 exchanges as free JSON, no key needed: /api/v1/feed, /api/v1/liquidations/live, /api/v1/liquidations/recent and /api/v1/clusters. Comparable feeds are usually $300+/month. See the "Free Liquidation Data API" section above.

Is the trading bot API really free?

Yes. It's a paper-trading simulator — positions use real live market prices but no real money. Sign in with an email, generate an API key and start testing immediately.

Which programming languages can I use?

Any language that can make an HTTPS request — Python, JavaScript/Node.js, Go, Rust, PHP, or plain curl. Standard REST, JSON responses, one X-API-Key header.

Backtesting vs paper trading — what's the difference?

Backtesting replays historical candles (fast, but hides bugs and overfitting). Paper trading runs your bot on live prices in real time and catches what backtests can't. Do both — backtest here, then forward-test on this API.

Which coins can my bot trade?

Any USDT pair with a live price on major exchanges — BTC, ETH, SOL and hundreds of altcoins. Check a symbol with GET /api/bot/v1/price?symbol=SOL.

Do I need an exchange account or a deposit?

No. No deposit, no wallet, no KYC. You only sign in with an email so your API key and positions persist across sessions.

Guides & tutorials

Python Crypto Trading Bot Tutorial

Build a working bot in Python and point it at this API — full code: price feed, EMA-cross strategy, open/close orders and the loop.

How to Test a Crypto Trading Bot for Free

The three-stage workflow that separates working bots from blown accounts: backtest, paper trade, then go live.

Node.js Crypto Trading Bot Tutorial

The same bot in JavaScript — full Node.js code with zero dependencies, pointed at this API.

Grid Trading Bots Explained

How grid bots work, where they win and blow up, and how to forward-test one before funding it.

Backtesting vs Paper Trading vs Live

What each testing stage proves, and the exact order to use them.

AI Crypto Trading Strategies for 2026

The AI-assisted strategies that actually hold up — and how to test them risk-free before automating.

Can AI Trade Crypto Futures?

A clear-eyed look at what AI signals and bots can and cannot do.

Get your free key ↑