Rubin Exchange
trade.rubin/exchange · v1.0.2 · MCP 2025-11-25
Rubin: self-custody DEX for crypto perpetuals & spot - trade, read positions, orders, balances.
Reachability
reachable
checked 2026-07-14 04:33 UTC
Registry status active
Tools pinned 26
f6761df7ee71
Tools last changed
unchanged since first capture 2026-07-14
Provenance
Registry namespace trade.rubin
(domain verified by the official registry)
Repository
github.com/rubin-trade/rubin-mainnet-mcp
Website
https://code.rubin.trade/ai
Remote endpoints
https://mcp.mainnet.rubin.trade/mcp (streamable-http)
Observed changes
| When (UTC) | Event | Detail |
|---|---|---|
| 2026-07-14 03:26 | first capture | 26 tools pinned |
Pinned tool definitions (26)
| Tool | Description |
|---|---|
| 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. |
| get_block_height | Return the latest chain block height. Useful for SHORT_TERM order goodTilBlock math. |
| 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. |
| get_market | Get details for one perpetual market (clobPairId, atomicResolution, quantumConversionExponent, tick/step sizes, oracle price, status). |
| get_orderbook | Get the live orderbook (bids/asks) for a market, optionally truncated to a depth. |
| 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 {... |
| get_balance | Get the subaccount collateral (USDC asset position) and the on-chain wallet bank balances (gas). Collateral is what backs trading. |
| get_equity | Get the subaccount summary: equity, freeCollateral, marginEnabled, open perpetual positions and asset 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... |
| 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... |
| 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... |
| 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... |
| get_fills | Get executed fills for the subaccount, including price, size, fee and maker/taker liquidity. |
| get_pnl | Get historical PnL ticks for the subaccount (equity, totalPnl, netTransfers over time). Use createdOnOrAfter to bound the range. |
| 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)... |
| place_market_order | Place an IOC market order. Provide slippageBps to cap the fill price relative to the oracle price (omit → no price protection: the order sweeps the book). reduceOnly closes an existing position. Returns `confirmation` with the REAL... |
| 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... |
| 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. |
| batch_cancel | Cancel multiple SHORT_TERM orders in one tx. SHORT_TERM only (chain limitation) — for stateful/mixed use cancel_all_orders. |
| place_stop_loss | Place a reduce-only Stop loss (conditional market order) that triggers at triggerPrice. |
| place_take_profit | Place a reduce-only Take profit (conditional market order) that triggers at triggerPrice. |
| 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... |
| 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). Provide slippageBps to cap each fill vs oracle (omit → sweeps... |
| 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... |
| 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,... |
Status badge
[](https://toolpin.dev/servers/trade.rubin/exchange)
Maintain this server? Add the badge to your README — it links your users to this live status page.