Rubin Exchange
Rubin: self-custody DEX for crypto perpetuals & spot - trade, read positions, orders, balances.
Connect it
Settings → Connectors → Add custom connector
URL: https://mcp.mainnet.rubin.trade/mcpSettings → Apps & Connectors → Advanced → Developer mode
Create connector with URL: https://mcp.mainnet.rubin.trade/mcp{
"mcpServers": {
"exchange": {
"url": "https://mcp.mainnet.rubin.trade/mcp",
"headers": {
"Authorization": "<YOUR_AUTHORIZATION>"
}
}
}
}claude mcp add --transport http exchange https://mcp.mainnet.rubin.trade/mcp --header "Authorization: <value>"{
"servers": {
"exchange": {
"type": "http",
"url": "https://mcp.mainnet.rubin.trade/mcp",
"headers": {
"Authorization": "<YOUR_AUTHORIZATION>"
}
}
}
}33 tools, verified live
whoamiread-onlyReport what this session controls: the master account (its address in BOTH forms â cosmos rit1⦠and EVM 0xâ¦, the same 20 bytes), the 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). Also states what this session can NOT do: create wallets, reveal keys/mnemonics, or switch acc
get_block_heightread-onlyReturn the latest chain block height. Useful for SHORT_TERM order goodTilBlock math.
list_marketsread-onlyList 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_marketread-onlyGet details for one perpetual market (clobPairId, atomicResolution, quantumConversionExponent, tick/step sizes, oracle price, status).
get_orderbookread-onlyGet the live orderbook (bids/asks) for a market, optionally truncated to a depth.
get_candlesread-onlyGet OHLCV candles for a market at a given resolution. Useful for trend/volatility analysis.
get_candles_multiread-onlyGet 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.
get_balanceread-onlyGet the subaccount collateral (USDC asset position) and the on-chain wallet bank balances. Collateral is what backs trading; the WALLET balance is where money sent to the account lands and is NOT collateral until deposited. `funding` summarizes it: depositableUsdc (wallet minus the $0.95 gas reserve) and a suggestedAction â deposit_to_subaccount when the wallet holds spare USDC, top_up_gas when
get_equityread-onlyGet the subaccount summary: equity, freeCollateral, marginEnabled, open perpetual positions and asset positions.
get_positionsread-onlyGet 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).
get_open_ordersread-onlyGet 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 pos
get_portfolioread-onlyOne-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.
get_position_riskread-onlyMargin 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.
get_fillsread-onlyGet executed fills for the subaccount, including price, size, fee and maker/taker liquidity.
get_pnlread-onlyGet historical PnL ticks for the subaccount (equity, totalPnl, netTransfers over time). Use createdOnOrAfter to bound the range.
get_funding_statusread-onlyWhere the account's USDC sits: in the WALLET (bank balance â money sent to the account lands here and is NOT collateral) vs in the trading SUBACCOUNT (equity / free collateral). Returns depositableUsdc (wallet minus the $0.95 gas reserve), whether gas is low, and a suggestedAction (deposit_to_subaccount / top_up_gas / null). Call this when the user says they sent funds, when collateral reads 0,
deposit_to_subaccountDeposit USDC from the account's WALLET into its trading SUBACCOUNT so it becomes collateral. Without amountUsd it moves everything above the $0.95 gas reserve (what the web app does); with amountUsd it moves exactly that much, as long as $0.95 stays in the wallet. Funds never leave the account â this is an internal transfer the trading key is allowed to make. Use it when the user has sent money
top_up_gasMove a little USDC from the trading subaccount back to the WALLET when the wallet is at or below $0.55 â just enough to restore the $0.95 gas reserve that deposit/withdraw transactions need. Only the gas reserve, only to the account's own wallet; it cannot send funds anywhere else. Use after a transaction fails for lack of gas.
place_limit_orderPlace 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_f
place_market_orderPlace 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
cancel_ordercan modifyCancel 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.
cancel_all_orderscan modifyCancel 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_cancelcan modifyCancel multiple SHORT_TERM orders in one tx. SHORT_TERM only (chain limitation) â for stateful/mixed use cancel_all_orders.
place_stop_lossPlace 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_profitPlace 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.
close_positionClose 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
close_all_positionsFlatten 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.
open_positionEnter 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). slippag
get_newsread-onlyFetch 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 importa
get_leaderboardread-onlyThe trader PnL leaderboard for a time span (ONE_DAY, SEVEN_DAYS, THIRTY_DAYS, ONE_YEAR, ALL_TIME): rank, username, address, PnL (USD), ROI (%) and current equity per trader, paginated. Also returns `me` â this account's own row on that board, if it is ranked. Use `search` to find a trader by username or address. For this account's rank across ALL time spans at once, use get_my_rank.
get_my_rankread-onlyWhere THIS account ranks on the PnL leaderboard: rank, board size ("21 of 66"), PnL, ROI and equity â for one time span, or for every time span (ONE_DAY ⦠ALL_TIME) when none is given. A null entry means the account is not ranked on that board (no qualifying activity in the window).
get_fee_tierread-onlyThis account's current trading fee tier and conditions: maker/taker fee (% of notional; a negative maker fee is a rebate), the 30-day maker/taker volume it is judged on, any staking discount, the next tier and how much more 30d volume it takes, plus the full fee-tier table. Referred users start at the program's minimum fee tier (see get_referral_program).
get_referral_programread-onlyThis account's referral / affiliate program status: referral code and link, whether the link is unlocked (lifetime volume threshold, or already an affiliate), current affiliate tier and taker-fee share, referred volume (30d / all-time), earnings and referred-user stats, who referred this account, the full affiliate tier table and the program parameters (referee starting fee tier, 30d caps).
Alternatives in Crypto & Web3
Compare →CHChainstackA
Deploy and manage blockchain nodes across 70+ protocols, search docs, request testnet funds.
TraderSpyA
AI crypto signals, whale positions, 19 technical indicators, derivatives, screener and backtests
WSwalletlink.socialA
Resolve wallet addresses to X and Farcaster accounts, and back again.
three.ws pump.fun MCPA
Free pump.fun and Solana token discovery and on-chain analysis tools, by three.ws.
DTDCL Trust Oracle — AI/LLM Output Audit (x402 MCP)A
AI/LLM agent output audit MCP: policy eval, tamper-evident chain, AI safety, x402 USDC on Base.
DWDaedalMap Wildfire EventsA
Wildfire events and aggregates across global, U.S., and Canada sources. Paid via x402 USDC.