The one free API that gives you live prices, OHLC candles, a technically scored futures screener, funding & open interest, liquidations, an economic calendar, Fear & Greed, top coins, DeFi TVL, trading calculators — and a free paper-trading REST API to test bots. Every response is plain JSON. Nothing to sign up for.
curl https://marginpad.io/api/v1/price?symbol=BTCcurl https://marginpad.io/api/v1/price?symbol=BTCconst r = await fetch('https://marginpad.io/api/v1/price?symbol=BTC');
const { data } = await r.json();
console.log(data.price); // no key, works from the browser (CORS on)import requests
r = requests.get('https://marginpad.io/api/v1/price', params={'symbol': 'BTC'})
print(r.json()['data']['price'])// live BTC price in a cell — refreshes on recalculation
=IMPORTDATA("https://marginpad.io/api/v1/price?symbol=BTC")Every endpoint returns the same shape, so you can handle success and errors the same way everywhere.
// success
{
"ok": true,
"data": { ... the payload ... },
"ts": 1784956938109
}// error
{
"ok": false,
"error": { "code": "missing_symbol",
"message": "..." },
"ts": 1784956938109
}ts is the server time in unix milliseconds. Base URL for everything: https://marginpad.io
/api/v1/price?symbol=BTCLive price for one coin, aggregated across Binance, Bybit, OKX and Gate.
| Param | Req | Description |
|---|---|---|
symbol | yes | Ticker, e.g. BTC, ETH, SOL (no USDT suffix needed) |
{ "ok": true, "data": { "symbol": "BTC", "price": 64115.8 }, "ts": 1784956938109 }/api/v1/pricesBatch snapshot of the major coins (BTC, ETH, SOL, BNB, XRP, DOGE, ADA, AVAX) in one call.
/api/v1/klines?symbol=BTC&interval=60OHLC candlesticks. Use for charts, backtests and indicator math.
| Param | Req | Description |
|---|---|---|
symbol | yes | Ticker, e.g. BTC |
interval | no | Minutes per candle: 1, 5, 15, 60, 240 or 1440 (1 day) |
{ "ok": true, "data": [ { "time": 1784952000, "open": 63980, "high": 64230,
"low": 63910, "close": 64115 }, ... ], "ts": 1784956938109 }/api/v1/symbols~500 liquid USDT-perpetual tickers by volume. Use to validate a ticker or fill a picker.
/api/v1/screenerTop USDT-perps each scored 0–100 with a verdict (bullish/bearish), RSI, MACD, trend and an ATR-based trade setup (entry / stop / take-profits) when the read is decisive. Ask it "what looks bullish right now".
{ "ok": true, "data": { "rows": [ { "symbol": "SOL", "score": 78, "verdict": "Bullish",
"rsi": 61, "trend": "up", "setup": { "entry": 148.2, "sl": 142.0, "tp1": 156, "tp2": 164 } }, ... ] },
"ts": 1784956938109 }/api/v1/fundingPerp funding rates across ~160 pairs (aggregated majors + long tail). Positive = longs pay shorts.
/api/v1/open-interestOpen interest in USD across ~160 pairs. Rising OI with rising price = new money entering.
/api/v1/long-shortAggregated long vs short account ratio for major coins — crowd positioning.
/api/v1/liquidationsAggregated 24h liquidation totals per coin (longs vs shorts) across all exchanges.
/api/v1/calendar?year=2026FOMC, CPI, NFP, options-expiry and crypto milestones with exact UTC timestamps. Omit year for the upcoming window; pass a year (2023–2027) for the whole year including history.
/api/v1/fear-greedCrypto Fear & Greed index history — an array of { v, c, ts } (value 0–100, classification, timestamp), newest first.
/api/v1/coins?cat=layer-1Top ~250 coins: price, market cap, 1h/24h/7d change, sparkline. Optional cat: layer-1, decentralized-finance-defi, meme-token, artificial-intelligence, and more.
/api/v1/globalTotal market cap, 24h volume and BTC dominance.
/api/v1/trendingCurrently trending coins.
/api/v1/defiTotal DeFi TVL, top chains, biggest protocols and largest stablecoins.
/api/v1/calc/liquidationLiquidation price for a leveraged position.
| Param | Req | Description |
|---|---|---|
entry | yes | Entry price |
leverage | yes | Leverage, e.g. 10 |
side | no | long or short (default long) |
mmr | no | Maintenance margin rate %, default 0.5 |
curl "https://marginpad.io/api/v1/calc/liquidation?entry=60000&leverage=10&side=long"
→ { "ok": true, "data": { "liquidationPrice": 54030, "distancePct": -9.95, ... }, "ts": ... }/api/v1/calc/position-sizeRisk-based size from balance, risk %, entry and stop.
| Param | Req | Description |
|---|---|---|
balance | yes | Account balance |
risk | yes | Risk % of balance, e.g. 1 |
entry | yes | Entry price |
stop | yes | Stop-loss price |
leverage | no | Optional, for margin required |
/api/v1/calc/pnl GET/api/v1/calc/risk-reward GET/api/v1/calc/take-profitPnL / ROI, risk-reward ratio and take-profit price. Pass entry, exit, side (and stop/tp/roe as relevant).
Data endpoints above need no auth. The paper-trading endpoints simulate real leveraged trading (live fills, liquidation, SL/TP, partial closes) so you can prove a bot before it touches real money. Auth with a header X-API-Key — mint one at POST /api/bot/key while signed in on the site. Full guide: Paper Trading API.
/api/bot/v1/price?symbol=BTCPOST/api/bot/v1/openPOST/api/bot/v1/closeGET/api/bot/v1/positionsopen body: { symbol, side, margin, leverage, sl?, tp? } — margin $1–100000, leverage 1–1000. close body: { id, pct? } (pct 1–100 for a partial close). positions returns live mark price and unrealized PnL.
curl -X POST https://marginpad.io/api/bot/v1/open \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"symbol":"BTC","side":"long","margin":100,"leverage":10,"tp":68000,"sl":58000}'Every data response includes rate-limit headers so your client can pace itself:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 1784956980 # unix seconds when the window resets
Over the limit returns HTTP 429 with { ok:false, error:{ code:"rate_limited", ... } }. Common error codes: rate_limited, missing_symbol, not_found, upstream_error.
The full machine-readable spec lives at /api/openapi.json (OpenAPI 3.1, function-calling friendly descriptions). Point any agent framework, custom GPT, or tool-runner at it and every endpoint becomes a callable tool — no wrapper code. A native MCP server is on the way. Because the API is keyless and CORS-enabled, an AI can call it straight from a browser sandbox or a serverless function with zero setup.
| MarginPad | CoinGecko free | CoinMarketCap | Binance | CryptoCompare | |
|---|---|---|---|---|---|
| API key required | No | Demo key | Yes | For most | Yes |
| CORS from a browser | Yes | Limited | No | No | Limited |
| Free rate limit | 60/min | ~30/min | Credits | Weighted | Credits |
| Funding / OI / liquidations | Yes | No | No | Partial | No |
| Scored screener + setups | Yes | No | No | No | No |
| Paper-trading API | Yes | No | No | Testnet | No |
| Economic calendar | Yes | No | No | No | No |
| OpenAPI spec | Yes | Yes | Yes | Yes | No |
CoinGecko, CoinMarketCap and CryptoCompare offer far more coins and years of history. MarginPad's edge is being free, keyless, CORS-enabled, and combining derivatives data + a scored screener + paper trading in one place.
ts field is the server time of the response.