mcpbeat

Rubin Exchange MCP Server

trade.rubin/exchange
answering

Rubin Exchange is answering right now. Last checked 9 min ago. It exposes 26 tools. Last commit 1 Jul 2026.

Rubin: self-custody DEX for crypto perpetuals & spot - trade, read positions, orders, balances.

Uptime history 41 hours of history
41 hours agonow
100.0%
Uptime 24h
91 of 91 checks
26
Tools
read from the server
153 ms
Response time
average over 24h
0
Stars
last commit 1 Jul 2026

Connect this server

Endpoint below is the one we actually reach during checks — not the one copied from a README. Last verified 9 min ago.

run in your terminal
claude mcp add exchange --transport http https://mcp.mainnet.rubin.trade/mcp
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "exchange": {
      "url": "https://mcp.mainnet.rubin.trade/mcp"
    }
  }
}
~/.codex/config.toml
[mcp_servers.exchange]
url = "https://mcp.mainnet.rubin.trade/mcp"
.cursor/mcp.json
{
  "mcpServers": {
    "exchange": {
      "url": "https://mcp.mainnet.rubin.trade/mcp"
    }
  }
}
.vscode/mcp.json
{
  "mcpServers": {
    "exchange": {
      "url": "https://mcp.mainnet.rubin.trade/mcp"
    }
  }
}

Available tools 26

Read directly from the server with tools/list, grouped by what they act on. If a tool disappears, we record the date.

place
place_limit_order
Place a limit order. Default timeInForce=GTT (long-term, durable, broadcast-commit so errors return synchronously). Use SHORT_TERM only for latency-sensitive orders (expire within ~20 blocks, broadcast async). NOTE: stateful (GTT) orders are rate-limited to 2/block and 20 per 100 blocks — pace placements. Returns `confirmation` with the REAL outcome verified via the indexer (filled / partially_filled / resting / unfilled / pending) — broadcast `code: 0` only means the tx was accepted, NOT that it filled. Report from `confirmation.outcome`; if it is `pending`, the indexer is lagging — re-check shortly.
place_market_order
Place an IOC market order. It executes as an IOC limit at a worst-acceptable price mirrored around the oracle by side — BUY caps ABOVE the oracle, SELL below — at slippageBps distance (default 500 = 5%). Fills happen at book prices; the cap only limits how deep the sweep goes. reduceOnly closes an existing position. Returns `confirmation` with the REAL outcome verified via the indexer (filled / partially_filled / unfilled / pending): broadcast `code: 0` only means the tx was accepted — an IOC order cancels UNFILLED when the book is entirely beyond the slippage cap (thin/spread market). Always report from `confirmation.outcome`, not `code`; if `unfilled` or `partially_filled`, retry with a larger slippageBps to sweep deeper; if `pending`, the indexer is lagging — wait a few seconds and re-check before concluding.
place_stop_loss
Place a reduce-only Stop loss (conditional market order) that triggers at triggerPrice. Side must be the CLOSING side of the position: SELL closes a LONG, BUY closes a SHORT. Once triggered it executes as an IOC limit bounded at triggerPrice ± slippageBps in the direction of execution (BUY above the trigger, SELL below; default 500 bps) so the close can cross the book.
place_take_profit
Place a reduce-only Take profit (conditional market order) that triggers at triggerPrice. Side must be the CLOSING side of the position: SELL closes a LONG, BUY closes a SHORT. Once triggered it executes as an IOC limit bounded at triggerPrice ± slippageBps in the direction of execution (BUY above the trigger, SELL below; default 500 bps) so the close can cross the book.
cancel
cancel_all_orders
Cancel every OPEN order for the subaccount in a market (handles SHORT_TERM and LONG_TERM automatically). Returns `confirmation.remainingOpen` — orders still OPEN after the cancel (0 = all gone); if > 0, retry.
cancel_order
Cancel a single order by clientId. For SHORT_TERM pass goodTilBlock; for LONG_TERM/CONDITIONAL pass goodTilTimeSeconds (the original good-til value, available from get_open_orders). Returns `confirmation` with the verified result (canceled / still_open / filled / pending): `code: 0` only means the cancel was broadcast. If `still_open`, the goodTil value likely did not match the original — retry.
candles
get_candles
Get OHLCV candles for a market at a given resolution. Useful for trend/volatility analysis.
get_candles_multi
Get recent OHLCV candles for a market across MULTIPLE resolutions in one call — by default ALL indexer resolutions (1MIN, 5MINS, 15MINS, 30MINS, 1HOUR, 4HOURS, 1DAY) — so the agent can read the trend across timeframes at once. Returns { candles: { <resolution>: [...] } }, newest first. Lower `limit` (e.g. 20) or pass a `resolutions` subset to keep the payload small.
close
close_all_positions
Flatten EVERY open perpetual position with reduce-only MARKET orders (one per market). Respects the operator market allowlist (disallowed markets are skipped and reported). Each close is bounded at oracle ± slippageBps mirrored by side (default 500 bps = 5%). Returns a per-market result array — for any market reporting unfilled/partially_filled, re-run with a larger slippageBps.
close_position
Close all or part of an open perpetual position with a reduce-only MARKET order. Reads the current position, flips the side automatically (LONG→SELL, SHORT→BUY) and sizes the close. percent defaults to 100 (full close); a partial close is floored to the market step size. The close is bounded at oracle ± slippageBps mirrored by side (closing a SHORT buys up to oracle×(1+slip), closing a LONG sells down to oracle×(1−slip); default 500 bps = 5%). Returns the verified `confirmation` outcome — if it is `unfilled` or `partially_filled`, the book was thinner than the cap: re-run with a larger slippageBps to sweep deeper. Errors NOT_FOUND if there is no open position in the market.
open
get_open_orders
Get currently active ORDERS for the subaccount, optionally filtered by market and side. Includes OPEN resting orders and UNTRIGGERED conditional orders (TP/SL accepted on-chain but not yet triggered). Returns { orders: [...] }. This does NOT include filled positions — a filled market/limit order leaves NO open order, it becomes a POSITION (see get_positions). When there are 0 orders but open positions exist, the result carries a `note` pointing you there.
open_position
Enter a NEW position with a MARKET order, sized by base `size` OR quote `notionalUsd` (exactly one required; notionalUsd converts at the oracle price and is floored to the step size). Optionally attach a reduce-only stopLossPrice and/or takeProfitPrice as conditional orders in the SAME call (the bracket, placed with the opposite/closing side and a 500 bps execution bound past the trigger). slippageBps caps the entry fill vs oracle (default 500). Returns the entry `confirmation` plus any bracket order ids. Bracket legs are placed only if the entry broadcast succeeds; each is reduce-only so it can only close, never flip.
balance
get_balance
Get the subaccount collateral (USDC asset position) and the on-chain wallet bank balances (gas). Collateral is what backs trading.
batch
batch_cancel
Cancel multiple SHORT_TERM orders in one tx. SHORT_TERM only (chain limitation) — for stateful/mixed use cancel_all_orders.
block
get_block_height
Return the latest chain block height. Useful for SHORT_TERM order goodTilBlock math.
equity
get_equity
Get the subaccount summary: equity, freeCollateral, marginEnabled, open perpetual positions and asset positions.
fills
get_fills
Get executed fills for the subaccount, including price, size, fee and maker/taker liquidity.
market
get_market
Get details for one perpetual market (clobPairId, atomicResolution, quantumConversionExponent, tick/step sizes, oracle price, status).
markets
list_markets
List all perpetual markets with ticker, status and oracle price. Use this first to discover valid market tickers (e.g. BTC-USD) before placing orders.
news
get_news
Fetch the latest headlines from the ritbit news feed (curated crypto / markets / business channels, newest first). Filter by `category` (crypto|markets|business) or explicit `channels`, and/or a free-text `query` (a ticker or keyword, matched in the post text and hashtags, e.g. BTC). Each item returns { source, url, publishedAt, tags (hashtags — where tickers appear), text }. There is NO importance field: judge impact yourself from the content (hacks, regulation, large moves, ⚠️ warnings). Use this to factor sentiment/catalysts into an assessment, or to answer "what's the latest?". Headlines are ru/en.
orderbook
get_orderbook
Get the live orderbook (bids/asks) for a market, optionally truncated to a depth.
pnl
get_pnl
Get historical PnL ticks for the subaccount (equity, totalPnl, netTransfers over time). Use createdOnOrAfter to bound the range.
portfolio
get_portfolio
One-call snapshot of everything the account has "open": equity & freeCollateral, every open POSITION (with notional, unrealized PnL and estimated liquidation price), every active ORDER (resting + untriggered TP/SL), and account margin risk. Use this to answer "what do I have open?" or "how am I doing?" without worrying whether the user means orders or positions — it returns both.
position
get_position_risk
Margin health for the subaccount: equity, freeCollateral, total maintenance/initial margin, maintenanceMarginBufferUsd (the EXACT liquidation guard — liquidatable when < 0), marginUsageRatio (1.0 = at liquidation), account leverage, and per-position estimated liquidation price + distance to it. Use before adding risk or to decide whether to protect/close a position.
positions
get_positions
Get perpetual POSITIONS with size, side, entryPrice, unrealizedPnl, realizedPnl and netFunding. Defaults to OPEN positions. NOTE: a position is what you HOLD after an order fills — it is NOT an open order. When the user asks loosely "what is open?", check BOTH this and get_open_orders (or call get_portfolio for both at once).
whoami
whoami
Report what this session controls: the master account/subaccount, whether it can trade or is read-only, and the exact on-chain authorization scope (which messages, which subaccount, and that it CANNOT withdraw/transfer). Call this first.

Endpoints

URLTransportStateLatencyChecked
https://mcp.mainnet.rubin.trade/mcp streamable-http answering 161 ms 9 min ago

Rubin Exchange — questions

Answers built from our own checks of this server.

What can Rubin Exchange do?
It exposes 26 tools, read directly from the server on our last check. Among them: batch_cancel, cancel_all_orders, cancel_order, close_all_positions, close_position, get_balance and 20 more. The full list with descriptions is on this page — we take it from the server itself via tools/list, not from a README. How MCP servers expose tools in the first place →
What is Rubin Exchange mostly used for?
Its tools cluster around place, cancel and candles. That is what this server is built to work with — the grouping comes from the actual tool names, not from a category we assigned.
Is Rubin Exchange working right now?
We send a real MCP handshake every 15 minutes. Over the last 24 hours 91 of 91 checks got a reply (100.0%), average response time 153 ms. The bar chart above shows every period we have measured.
How do I connect Rubin Exchange?
Copy the ready config from this page — we generate it for Claude Code, Claude Desktop, Codex, Cursor and VS Code, each with the file path that client actually reads. It is a remote server, so there is nothing to install — the client connects to the address.
Does Rubin Exchange need an API key?
No. Rubin Exchange completed a full MCP handshake with us as an anonymous client and listed its tools without asking for anything. All 26 of them are readable on this page. This is what we observed, not what the docs claim.
How fast is Rubin Exchange?
It answers our handshake in 153 ms on average, which is faster than 73% of all working MCP servers we measure. The comparison comes from our own checks across the whole registry, every 15 minutes.
Is Rubin Exchange open source?
Yes — it is published under the MIT licence and 0 stars on GitHub. The source link is on this page, so you can read exactly what it does with your data before you connect it.