MarginPad Free Crypto API
Free, keyless, CORS-enabled crypto market-data API. Live prices, OHLC candles, a scored futures screener, funding rates, open interest, long/short ratios,…
Finance & banking#cryptocurrency
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Free, keyless, CORS-enabled crypto market-data API. Live prices, OHLC candles, a scored futures screener, funding rates, open interest, long/short ratios, liquidations, an economic calendar, the Fear & Greed index, top coins, global market stats, DeFi TVL, trading calculators, and a free paper-trading REST API for testing bots. No API key. No sign-up. about 60 requests/minute per client. Every response uses the envelope { ok, data, error, ts }, except the four liquidation-collector passthroughs (feed, liquidations/live, liquidations/recent, clusters), which return the raw collector object and are marked as such.
Endpoints 66
Market data
- GETLive price for one coin
/api/v1/price?symbol=BTCCurrent price for a single symbol, aggregated across Binance/Bybit/OKX/Gate. Use when a user asks "what is the price of X". - GETLive prices for major coins
/api/v1/pricesBatch snapshot of the top coins in one call (BTC, ETH, SOL, BNB, XRP, DOGE, ADA, AVAX). - GETOHLC candles
/api/v1/klines?symbol=BTCHistorical candlesticks for a symbol. Use for charts, backtests, and indicator math. - GETTradable symbols
/api/v1/symbolsList of ~500 liquid USDT-perpetual symbols by volume. Use to validate a ticker or populate a picker.
Derivatives
- GETFunding rates
/api/v1/fundingPerp funding rates across ~160 pairs, measured from the public endpoints of the exchanges. Positive = longs pay shorts. - GETOpen interest
/api/v1/open-interestOpen interest (USD) across ~160 pairs. Rising OI + rising price = new money entering. - GETLong/short ratio
/api/v1/long-shortAggregated long vs short account ratio for major coins. Crowd positioning. - GETLiquidations
/api/v1/liquidationsAggregated 24h liquidation totals per coin (longs vs shorts) across all exchanges. - GETLiquidations by exchange
/api/v1/venues24h liquidation total, market share and long/short split per venue (Binance, Bybit, OKX, Hyperliquid, Gate, HTX, dYdX, Bitfinex, Bitget, Aster, Lighter,… - GETNewest liquidation events
/api/v1/feedThe latest liquidation events across all tracked symbols: {events:[{ts, exchange, symbol, side, price, qty, notional}]}. Seconds behind the exchanges (3 s… - GETRecent liquidations for one symbol
/api/v1/liquidations/live?symbol=BTCRaw recent liquidation events for one symbol; side is long_liquidated or short_liquidated, notional is USD. Passthrough from the liquidation collector: this… - GETLiquidation histogram
/api/v1/liquidations/recent?symbol=BTCTime-bucketed long vs short liquidation dollars for one symbol - the source of the heatmap statistics. Passthrough from the liquidation collector: this route… - GETLiquidation clusters
/api/v1/clusters?symbol=BTCModelled price levels where liquidation liquidity is estimated to sit right now: {clusters:[{price, side, est_notional}]}, with updatedAt as the measurement…
Order book
- GETLive order book depth and slippage
/api/v1/book?symbol=BTCThe resting order book for one coin, reconstructed in real time from the websockets of Bybit, OKX, Bitget and Hyperliquid (snapshot plus incremental updates,… - GETThe order book over time, with walls and what ended them
/api/v1/bookmap?symbol=BTCThe consolidated book sampled every five seconds and kept for twenty minutes, bucketed by ABSOLUTE price against the shared mid - what a single snapshot… - GETLive trade tape with aggressor side
/api/v1/tape?symbol=BTCThe most recent executed trades for one coin from Bybit, OKX, Bitget, Hyperliquid and Binance, newest last. Each row carries the venue, price, quantity, USD…
Screener
- GETScored futures screener
/api/v1/screenerTop USDT-perps with a 0-100 technical score, verdict (bullish/bearish), RSI, MACD, trend, and an ATR-based trade setup (entry/SL/TP) when decisive. Use when a…
Macro
- GETCrypto economic calendar
/api/v1/calendarFOMC, CPI, NFP, options expiry and crypto milestones with exact UTC timestamps. Omit params for the upcoming window; pass year for a full year incl. history. - GETFear & Greed index
/api/v1/fear-greedCurrent crypto Fear & Greed value (0-100) and classification. - GETTop coins by market cap
/api/v1/coinsTop ~250 coins: price, market cap, 1h/24h/7d change, sparkline. Optional category filter. - GETGlobal market stats
/api/v1/globalTotal market cap, 24h volume, BTC dominance. - GETTrending coins
/api/v1/trendingCurrently trending coins (CoinGecko search trending). - GETDeFi TVL overview
/api/v1/defiTotal DeFi TVL, top chains, biggest protocols, largest stablecoins (DefiLlama-aggregated).
Calculators
- GETLiquidation price
/api/v1/calc/liquidation?entry=60000&leverage=10Compute the liquidation price for a leveraged position. - GETPosition size
/api/v1/calc/position-size?balance=10000&risk=1&entry=60000&stop=58000Risk-based position size from account balance, risk %, entry and stop. - GETPnL / ROI
/api/v1/calc/pnl?entry=60000&exit=63000&size=0.5Profit/loss and ROI for a position. Size is the position size in units of the asset, not in dollars. - GETRisk / reward
/api/v1/calc/risk-reward?entry=60000&stop=58000&tp=65000Risk-reward ratio from entry, stop and target. Entry and stop must differ. - GETTake-profit price
/api/v1/calc/take-profit?entry=60000&roe=50The price at which a position reaches a target return on equity.
Paper trading
- GETPaper price (keyless)
/api/bot/v1/price?symbol=BTCFill price used by the paper-trading engine. - GETServer time (keyless)
/api/bot/v1/timeServer clock. Pass client_ts to get drift_ms back - a bot bucketing candles against a drifting local clock builds bars nobody else sees. - POSTOpen a paper position
/api/bot/v1/openOpen a simulated position at the live price. Auth: header X-API-Key (mint one at POST /api/bot/key while signed in). Send client_order_id so a network retry… - POSTClose a paper position
/api/bot/v1/closeClose a simulated position fully or partially. P&L settles net of the round-trip taker fee and accrued funding. - POSTMove stop-loss / take-profit
/api/bot/v1/sltpChange the stop or target on an OPEN position without closing it. Both are side-checked against the entry price. Pass null to clear one. - GETList limit orders
/api/bot/v1/ordersResting limit orders plus the last 20 that filled, expired or were cancelled (a filled one carries the position_id it created). - POSTCancel a limit order
/api/bot/v1/cancel_orderCancel one resting order. Body: {"order_id":"lo..."}. - GETList paper positions
/api/bot/v1/positionsYour positions with live mark price and P&L net of fees. Supports If-None-Match (ETag over structural state, so a poll that changed nothing costs a 304) and… - GETClosed-trade ledger
/api/bot/v1/tradesFull closed-trade history with paging - /positions is capped at 100, this pages through the whole retention window. Follow next_before for the next page. - GETPaper account
/api/bot/v1/accountOpen positions, margin in use, unrealized P&L, LIFETIME realized P&L, wins/losses, win rate, plus balance_usd, equity_usd, free_margin_usd and return_pct. - POSTClose every open paper position
/api/bot/v1/close_allCloses all open bot positions at the live price. Fees and funding settle exactly as in /close. - GETPaper balance
/api/bot/v1/balanceStarting balance, balance, equity, margin in use, free margin, unrealized P&L. The balance is a scorecard: margin_enforced is false, so opens are never… - GETTradable markets
/api/bot/v1/marketsEvery tradable symbol with asset_class, max_leverage and taker_fee_pct (per side, charged as a round trip at close). Call once at startup instead of… - POSTModify a resting order
/api/bot/v1/modify_orderChange a resting limit or stop order in place: limit_price, sl, tp, margin_usd, leverage, trail_pct. The direction is re-derived from the market now and the… - GETList webhooks (API Pro and above)
/api/bot/v1/webhooksYour registered webhooks with delivery counts, consecutive failures, the last error and whether each is active. Also lists the event names and the signature… - POSTAdd / delete / test a webhook (API Pro and above)
/api/bot/v1/webhooksact:"add" {url, events?} registers an https URL (max 3 per account) and returns its secret once. act:"delete" {id}. act:"test" {id} delivers a ping right now… - GETThe market archive (API Premium)
/api/bot/v1/historyNo parameters: every dataset with its columns and its first and last archived UTC day, readable on any key. dataset + day: that day as one gzip CSV (header… - GETYour plan, limits and usage
/api/bot/v1/usageEverything this key is allowed to do, read back from the server so a bot never has to hardcode a limit: the plan name and when it ends (plan_until), requests… - GETThe simulation profile
/api/bot/v1/simThe whole paper-trading simulation, and what else it could be. Returns your profile, every field with its range, its default and what it changes, eight… - POSTSet the simulation
/api/bot/v1/simSend any subset of the fields, or {"preset":"realistic"} for a ready-made configuration (a preset starts from the defaults, so it is a clean slate plus that… - GETFill realism (read)
/api/bot/v1/realismTwo deliberate simplifications in the engine, made optional: a market order fills at the live price with no slippage, and maintenance margin is a flat 0.5%.… - POSTFill realism (set)
/api/bot/v1/realismSet the account default. Any field you omit keeps its current value. Applies to positions opened from now on - a position always keeps the maintenance margin… - GETFee schedules (venues) and your default
/api/bot/v1/feesThe exchanges whose taker schedule your paper fills can be charged at - Bybit, Binance, OKX, Bitget, MEXC, Gate, KuCoin, Kraken, Hyperliquid - each with… - POSTSet your default fee venue
/api/bot/v1/feesBody {"venue":"hyperliquid"} makes every open from now on (site and API) pay that schedule unless a call names its own fee_venue; {"venue":null} or… - GETBooks (sub-accounts) of this account
/api/bot/v1/accountsEvery book of the account behind the key with lifetime numbers and the keys bound to it. A book is a separate journal, balance, report and equity curve: mint… - POSTReset this book to $10,000
/api/bot/v1/resetBody {"confirm":true}. Closed trades are archived (never deleted), resting orders cancelled, the report / ledger / equity curve restart from the reset.… - GETEquity curve
/api/bot/v1/equitystarting_balance_usd + realized P&L per bucket from the ledger (fees and funding settled), the live unrealized point at the end, and max_drawdown_pct. Buckets… - GETReplay status, price and candles
/api/bot/v1/replayWhile a replay runs on this key’s book: cursor (market time), the price under it, progress, finished, and the candles up to the cursor.… - POSTStart or stop a replay of a past day
/api/bot/v1/replayStart: {symbol, day:"YYYY-MM-DD" (a complete past UTC day), speed (1-600 market seconds per real second, default 60)}. From then on the key’s trading calls… - GETBot arena (public)
/api/arenaThe current 14-day season board of bot-opened paper trades: every account or book with at least 5 closes, ranked by realized P&L. win_rate_pct counts CLOSED… - GETTrading report
/api/bot/v1/reportThe 30-day trading report for the account behind the key, measured from its own closed trades. Totals and the skill score on every plan; breakdowns by coin,… - GETWebhook test sink (read)
/api/whsink/:token - POSTWebhook test sink (write)
/api/whsink/:tokenPOST anything here and read it back with GET - the last 20 bodies for 15 minutes. Register https://marginpad.io/api/whsink/<token> as a webhook to see exactly… - GETSame API, standard envelope
/api/bot/v2/:endpointEvery /api/bot/v1/* path has a /v2 twin: identical parameters and identical data, wrapped as {ok:true,data,ts} or {ok:false,error:{code,message},ts}. v1…
Regional quotes
- GETDólar cripto (Argentina): USDT in pesos per exchange
/api/latam/arThe peso price of USDT on every exchange operating in Argentina, fees included (totalAsk/totalBid), sorted by buy price; mid = median across venues quoting… - GETBitcoin hoje (Brazil): BTC and USDT in reais per exchange
/api/latam/brBTC/BRL and USDT/BRL on every exchange operating in Brazil, fees included, sorted by buy price; btcMid/usdtMid = medians; agio = ask ÷ (BTC/USD × dólar…
Meta
- GETAPI status & version
/api/v1/pingHealth check. Returns service name, version, rate limit, and the list of available endpoints. Use this to confirm the API is reachable.
Plans
- GETConsumer plans and where the caller stands
/api/premium/statusKeyless. The live consumer plans and their prices - Premium and Premium AI+ - so an assistant never has to quote a figure off a cached page. Premium…
API details
- Base URL
https://marginpad.io- Authentication
- An API key in the X-API-Key header
- Operations
- 66 operations on 60 pathsGET 53POST 13
- Main resources
- Paper trading 34Derivatives 9Macro 6Calculators 5Market data 4Order book 3Regional quotes 2Meta 1Plans 1Screener 1
- Response formats
application/json- Description format
- OpenAPI 3.1.0, API version
2.9.1 - Links
- Documentation · OpenAPI document · Support
- Listed from
- Marginpad's published OpenAPI description
How to test the MarginPad Free Crypto API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the MarginPad Free Crypto API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the X-API-Key header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Live price for one coin” (GET /api/v1/price?symbol=BTC), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the MarginPad Free Crypto API?
Free, keyless, CORS-enabled crypto market-data API. Live prices, OHLC candles, a scored futures screener, funding rates, open interest, long/short ratios,… It is listed under Finance & banking and has 66 endpoints.
Who publishes the MarginPad Free Crypto API?
It is listed from Marginpad's public API description (an OpenAPI document), not published by Marginpad on Swastik Codes. Anyone who controls marginpad.io can claim the profile by adding a DNS TXT record.
What is the base URL of the MarginPad Free Crypto API?
Requests go to https://marginpad.io. Endpoint paths are added to this base URL.
How do I authenticate with the MarginPad Free Crypto API?
With an API key in the X-API-Key header.
How many endpoints does the MarginPad Free Crypto API have?
66 operations on 60 paths (53 GET, 13 POST). The largest groups are Paper trading, Derivatives, Macro, Calculators.
Is forking the MarginPad Free Crypto API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.