Skip to main content
Glama
nexus-xyz

nexus-exchange-mcp

Official
by nexus-xyz

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NEXUS_EXCHANGE_API_KEYNoHMAC API key id (x-api-key). Required for account/trade tools.
NEXUS_EXCHANGE_API_URLNoAPI base URL. Defaults to https://exchange.nexus.xyz/api/exchange.https://exchange.nexus.xyz/api/exchange
NEXUS_EXCHANGE_API_SECRETNoHMAC secret (hex). Required for account/trade tools.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_marketsA

List all tradable markets with their current summary (mark price, 24h change, volume, open interest, funding). Public — no credentials needed.

get_tickerA

Get the ticker (last price, bid/ask, 24h stats) for one market, e.g. "BTC-USDX-PERP". Public — no credentials needed.

get_orderbookA

Get the current order book (bids/asks with price + size) for one market. Public — no credentials needed.

list_market_specsA

List all markets with their static specs (tick size, lot size, leverage, contract details) — the raw market definitions without live summary stats. Public — no credentials needed. (Use list_markets for live mark price / volume / funding.)

get_tickersA

Get tickers (last price, bid/ask, 24h stats) for ALL markets in one call. Public — no credentials needed.

get_mark_priceA

Get the current mark price for one market. Public — no credentials needed.

get_market_statusA

Get a market's trading status and halt info (whether trading is open, halted, or in auction). Public — no credentials needed.

get_tradesA

Get recent public trades (prints) for one market. Public — no credentials needed.

get_candlesB

Get OHLCV candles for one market. Public — no credentials needed. Timeframe is one of 1s, 1m, 5m, 1h (default 1m).

get_funding_historyA

Get the funding-rate history for one perpetual market. Public — no credentials needed.

get_funding_samplesA

Get the dense per-tick funding premium-index samples for one perpetual market (60s cadence, up to 480 points = 8h). Finer-grained than get_funding_history, which returns the settled hourly rates. Public — no credentials needed.

get_market_risk_paramsA

Get one market's risk parameters: margin requirements and maximum leverage, from the engine's market registry. Public — no credentials needed.

get_statsA

Get aggregate venue statistics (volume, trades, throughput) plus rolling unique-trader counts. Public — no credentials needed.

get_stats_historyA

Get the venue's per-second throughput history (ring buffer, up to 3600 points). Public — no credentials needed.

get_demo_accountA

Get a live, public demo account snapshot (balance, equity, positions). No credentials needed — useful to show the account flow before API keys are wired up.

get_demo_positionsA

Get the public demo account's open positions. No credentials needed.

get_demo_ordersA

Get the public demo account's open orders. No credentials needed.

get_balanceB

Get the authenticated account snapshot: collateral balance, equity, and positions. Requires API credentials.

get_account_summaryA

Get the authenticated account's portfolio summary (equity, margin usage, PnL rollup) — a richer view than get_balance. Requires API credentials.

get_equity_historyA

Get the authenticated account's equity time-series (5s cadence, ~1h window), oldest first. Requires API credentials.

get_positionsB

Get the authenticated account's open positions. Requires API credentials.

get_closed_positionsA

Get the authenticated account's closed positions (realized PnL per position). Requires API credentials.

get_open_ordersA

Get the authenticated account's resting (open) orders. Requires API credentials.

get_orderA

Get a single order by its id (status, fills, remaining size). Pass market_id when known — the spec marks it required for routing, though the gateway currently resolves the order without it. Requires API credentials.

get_order_historyA

Get the authenticated account's terminal-status order history (filled / cancelled / rejected / expired), newest first. Requires API credentials.

get_fillsB

List the authenticated account's recent fills (executed trades). Requires API credentials.

get_funding_paymentsA

Get the authenticated account's funding-payment history, newest first, optionally filtered to a single market. Requires API credentials.

get_withdrawalsB

List the authenticated account's withdrawal history. Requires API credentials.

list_depositsB

List the authenticated account's deposit history. Requires API credentials.

get_rate_limit_statusA

Get the authenticated account's current rate-limit status (remaining request budget). Useful for an agent to pace itself. Requires API credentials.

get_adl_historyA

Get the auto-deleveraging (ADL) events that touched a given account. Requires API credentials.

place_orderA

Place an order on a market. Supports limit and market orders, buy/sell. For limit orders a price is required. Requires API credentials. This submits a REAL order to the matching engine.

place_orders_batchA

Submit multiple orders in one request. Each order has the same shape as place_order (market_id, side, type, size, optional price/time_in_force/reduce_only). Requires API credentials. This submits REAL orders to the matching engine.

cancel_orderA

Cancel a resting order. Pass order_id to cancel one order. To cancel ALL open orders you must explicitly pass cancel_all: true — an empty or argless call is rejected so a stray call can't mass-cancel by accident. Requires API credentials.

amend_orderA

Amend a resting order's price and/or size in one atomic cancel-replace operation. At least one of price or size is required; a pre-trade margin check is applied to the replacement before it is accepted. Liquidation orders cannot be amended. Requires API credentials. This modifies a REAL order on the matching engine.

preview_orderA

Preview an order without submitting it: projects the margin, equity, and fee impact of the order. Takes the same arguments as place_order. Nothing reaches the matching engine. Requires API credentials.

get_market_adl_eventsA

Get the auto-deleveraging (ADL) settlement history for one market — the events where the engine force-closed positions to cover a shortfall. Requires API credentials.

deposit_collateralB

Deposit USDX collateral into the authenticated account. amount is a positive decimal string. Requires API credentials. This moves REAL collateral on the account.

claim_creditA

Claim synthetic USDX credit from the testnet faucet, up to a per-key daily allowance (default 500 USDX, resets midnight UTC). Pass amount (positive decimal string) to claim a specific amount, or omit it to claim the full remaining allowance. The credited USDX is synthetic testnet value. Requires API credentials.

submit_depositA

Submit a (testnet/synthetic) deposit for the authenticated account via the deposits ledger (POST /deposits — unlike deposit_collateral, the deposit is recorded and listable with list_deposits). amount is a positive decimal string; asset defaults to USDX. Requires API credentials. This moves REAL collateral on the account.

claim_faucetA

Claim the fixed testnet faucet amount of synthetic USDX for the authenticated account, subject to a per-wallet cooldown and cumulative cap. Unlike claim_credit the amount is fixed server-side — no arguments. Requires API credentials.

adjust_isolated_marginA

Add or remove isolated margin on an open position. Fails if the position is not in isolated margin mode (MarginModeNotIsolated), if there is no open position in the market (NoOpenPosition), or if a removal breaches the margin floor. amount is a positive decimal string. Requires API credentials. This moves REAL margin on the position.

list_agentsA

List the delegated agent keys registered for the authenticated wallet (address, label, expiry). Requires API credentials.

register_agentA

Register a delegated agent key so an AI agent can trade on a wallet's behalf without holding the wallet key. Authorized by an EIP-712 signature from the OWNER WALLET over RegisterAgent{agent, expiresAt, nonce} (domain NexusExchange v1). This server cannot produce that wallet signature — sign it externally (e.g. in the wallet) and pass it as signature. No API credentials are needed; the signature is the authorization.

revoke_agentA

Revoke a previously registered delegated agent key by its address. Destructive: the agent can no longer trade on the wallet's behalf. To avoid an accidental revoke you must pass confirm: true. Requires API credentials.

loginA

Sign in with an EVM wallet to get a 24h session token. Submit an EIP-191 personal_sign signature over the exact message "Sign in to Nexus Exchange". This server cannot sign for you — produce the signature in the wallet and pass it as signature. The returned token is used as the Bearer credential for the *_api_key tools (set it as NEXUS_EXCHANGE_SESSION_TOKEN). No credentials needed to call this.

list_api_keysA

List the HMAC API keys for the authenticated wallet (key ids and metadata; never the secrets). Authenticates with a session token from login — set NEXUS_EXCHANGE_SESSION_TOKEN.

create_api_keyA

Create a new HMAC API key for the authenticated wallet. The secret is returned ONCE and never shown again — store it immediately. Authenticates with a session token from login — set NEXUS_EXCHANGE_SESSION_TOKEN.

delete_api_keyA

Delete (revoke) an HMAC API key by its key id. Destructive: any caller using that key stops working. You must pass confirm: true. Authenticates with a session token from login — set NEXUS_EXCHANGE_SESSION_TOKEN.

get_ws_tokenA

Mint a short-lived (60s, single-use) token for an authenticated per-account WebSocket stream (order/fill/position updates). Uses the current /ws/token endpoint, which supports HMAC keys and registered agents. The caller connects to GET /ws?token=… with the token. Requires API credentials.

get_ws_token_legacyA

Mint a short-lived (60s, single-use) token for the legacy public /stream endpoint via POST /ws-tokens. Prefer get_ws_token (/ws/token) for new code; this is kept for /stream compatibility. Requires API credentials.

get_healthA

Health check for the exchange gateway (liveness/readiness). Public — no credentials needed.

get_readinessA

Engine readiness probe: 200 once every configured market has received its first oracle price this run, 503 while any market is still in the oracle warm-up window. Distinct from get_health (liveness). Public — no credentials needed.

get_service_statusA

Aggregate service health of the exchange stack (indexer / engine / oracle / bots), as used by status pages. Public — no credentials needed.

get_deposit_targetC

Get the on-chain deposit target (address/memo) to fund the account. Not yet available — the gateway exposes deposit submission but no deposit-address endpoint yet.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nexus-xyz/nexus-exchange-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server