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

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.

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 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.

Get your free key ↑