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.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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, newest first. Returns { items, next_cursor }. items is this page of results; next_cursor is an opaque token for the next page, or null when this is the last page. To read the full history, keep calling with cursor: <previous next_cursor> until next_cursor is null. limit sets the size of ONE page, not a total. 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_balanceA

Get the authenticated account snapshot: collateral balance, equity, and positions. Positions carry per-position risk detail. notional_value, margin_used, roe, max_leverage, and leverage are derived from mirrored state, so any of them can be null with a companion <field>_error naming the reason (e.g. mark_price_unavailable); treat null as UNKNOWN, never as zero. leverage is currently always null (leverage_error: margin_state_not_mirrored) — do not infer it from margin_used. funding_paid is NOT one of those: it is always present and has no _error companion, so its "0" is a real zero (no funding accrued), not unknown. It is paid-positive — a negative value means funding was received. Requires API credentials.

get_account_summaryA

Get the authenticated account's portfolio summary (equity, margin usage, PnL rollup) — a richer view than get_balance. Includes withdrawable: the engine-authoritative free margin floored at zero, i.e. exactly what can leave the account (never negative). Because withdrawable comes from that authoritative margin view, this call fails closed with a 502 (authoritative_margin_unavailable) when the view is unavailable rather than returning a local estimate: retry after a short delay, do NOT read the error as a flat or empty account. Requires API credentials.

get_account_stateA

Get the authenticated account's full state in ONE call: the portfolio summary aggregates plus every open position ({ summary, positions }). Prefer this over pairing get_account_summary with get_positions — both parts come from one coherent read, so summary.open_positions_count always matches the positions length. If the engine-authoritative margin view is unavailable this fails closed with a 502 (authoritative_margin_unavailable) rather than returning an estimate: retry after a short delay, do NOT read the error as a flat or empty account. Positions carry per-position risk detail. notional_value, margin_used, roe, max_leverage, and leverage are derived from mirrored state, so any of them can be null with a companion <field>_error naming the reason (e.g. mark_price_unavailable); treat null as UNKNOWN, never as zero. leverage is currently always null (leverage_error: margin_state_not_mirrored) — do not infer it from margin_used. funding_paid is NOT one of those: it is always present and has no _error companion, so its "0" is a real zero (no funding accrued), not unknown. It is paid-positive — a negative value means funding was received. Requires API credentials.

get_account_feesA

Get the authenticated account's effective fee schedule: maker/taker rate in basis points (a NEGATIVE maker rate is a rebate paid TO the maker), fee tier, rolling 30-day traded volume, and any active discounts. This is the forward-looking schedule rate for the scope named by schedule (per-market rates differ), not a realized per-fill average; volume_30d_estimated: true means the 30-day volume may undercount. Requires API credentials.

get_portfolio_historyA

Get the authenticated account's portfolio time-series — equity, cumulative trading PnL, and cumulative traded volume — over a selectable window, oldest first. Richer than get_equity_history (equity only, 5s cadence, ~1h); both derive equity from the same source, so the two never disagree. Each window sets its own downsample cadence and point capacity: day 5m/288, week 1h/168, month 6h/120, all 1d/366. pnl is deposit-neutral (trading performance only) and volume is monotonically non-decreasing. This is a HEAVY read — the gateway charges it 5x an ordinary GET, so a single call draws about five requests' worth of budget and the remaining reported by get_rate_limit_status (counted in ordinary requests) drops by ~5. Poll it sparingly. Requires API credentials.

get_equity_historyA

Get the authenticated account's equity time-series (5s cadence, ~1h window), oldest first. For a longer window, or for PnL and volume series alongside equity, use get_portfolio_history. Returns { items, next_cursor }. items is this page of results; next_cursor is an opaque token for the next page, or null when this is the last page. To read the full history, keep calling with cursor: <previous next_cursor> until next_cursor is null. limit sets the size of ONE page, not a total. Requires API credentials.

get_positionsA

Get the authenticated account's open positions. Positions carry per-position risk detail. notional_value, margin_used, roe, max_leverage, and leverage are derived from mirrored state, so any of them can be null with a companion <field>_error naming the reason (e.g. mark_price_unavailable); treat null as UNKNOWN, never as zero. leverage is currently always null (leverage_error: margin_state_not_mirrored) — do not infer it from margin_used. funding_paid is NOT one of those: it is always present and has no _error companion, so its "0" is a real zero (no funding accrued), not unknown. It is paid-positive — a negative value means funding was received. Requires API credentials.

get_closed_positionsA

Get the authenticated account's closed positions (realized PnL per position). Returns { items, next_cursor }. items is this page of results; next_cursor is an opaque token for the next page, or null when this is the last page. To read the full history, keep calling with cursor: <previous next_cursor> until next_cursor is null. limit sets the size of ONE page, not a total. 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. Returns { items, next_cursor }. items is this page of results; next_cursor is an opaque token for the next page, or null when this is the last page. To read the full history, keep calling with cursor: <previous next_cursor> until next_cursor is null. limit sets the size of ONE page, not a total. Requires API credentials.

get_fillsA

List the authenticated account's fills (executed trades), newest first. Returns { items, next_cursor }. items is this page of results; next_cursor is an opaque token for the next page, or null when this is the last page. To read the full history, keep calling with cursor: <previous next_cursor> until next_cursor is null. limit sets the size of ONE page, not a total. 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_withdrawalsA

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.

get_cancel_on_disconnectA

Get the authenticated account's cancel-on-disconnect (COD) status. COD is an opt-in dead man's switch: when the account's last authenticated WebSocket connection drops and does not reconnect within the grace window, the exchange cancels all of the account's resting orders. Returns enabled (the account's own opt-in), active (whether it will actually fire — the opt-in AND the exchange-side feature switch), and grace_secs (the reconnect window in seconds, null when the feature is unavailable). Clients that trade purely over REST and never open a WebSocket are not covered. Requires API credentials.

set_cancel_on_disconnectA

Enable or disable cancel-on-disconnect (COD) for the authenticated account. Pass enabled: true to arm the dead man's switch (the exchange cancels all resting orders when your authenticated WebSocket drops and does not reconnect within the grace window) or enabled: false to disable it. Off by default. enabled is required and explicit — there is no default — so every call states the intended state and an argless call is rejected rather than silently toggling. Returns the resulting COD status. Requires API credentials.

place_orderA

Place an order on a market, buy/sell. Supports limit, market, stop-loss (stop_limit / stop_market), take-profit (take_profit_limit / take_profit_market), and trailing (trailing_stop / trailing_limit) orders. Limit-family orders require a price; stop / take-profit orders require a trigger_price; trailing orders require trailing_offset_bps (and trailing_limit also limit_offset_bps). 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, and the type-dependent price / trigger_price / trailing offsets / 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.

get_bridge_assetsA

List the bridgeable chains and, per chain, the depositable assets (USDC, USDX) and withdrawable assets (USDX) with their decimals, minimum amounts, required confirmations, and fees. Public catalog — no credentials needed. Use it to discover valid chain values for the other bridge tools.

create_bridge_deposit_addressA

Get or create the authenticated account's cross-chain deposit address on a chain. Sending a supported asset to the returned address credits the account. Idempotent per (account, chain): repeated calls return the same address rather than allocating a new one. Requires API credentials.

list_bridge_deposit_addressesA

List the authenticated account's cross-chain deposit addresses across chains. Requires API credentials.

list_bridge_depositsA

List the authenticated account's cross-chain (bridge) deposits, newest first. Optionally filter by source chain, asset (USDC|USDX), or status (detected|confirming|credited|failed). Distinct from list_deposits, which lists the account's ledger deposits. Requires API credentials.

get_bridge_depositA

Fetch a single cross-chain (bridge) deposit by id. Only deposits owned by the authenticated account are returned. Requires API credentials.

create_bridge_wallet_challengeA

Step 1 of registering a withdrawal wallet: returns the exact message to sign with that wallet's key (EIP-191 personal_sign) and the expires_at it is valid until. This server cannot sign for you — sign the message externally (in the wallet), then pass it and the signature to register_bridge_wallet. Treat message as opaque: echo it back verbatim, never reformat, re-encode or trim it. The nonce field is informational — sign message, not the nonce, and do not treat the challenge as single-use: until it expires the same signature can be submitted again, which is harmless because the message is bound to your account and to address. Mints nothing and changes no state, so it is safe to call before you have decided to register. A 503 wallet_registration_unavailable means this deployment has no challenge key configured — registration is off there, and retrying will not help. Requires API credentials.

register_bridge_walletA

Step 2 of registering a withdrawal wallet: submit the address, the message returned by create_bridge_wallet_challenge echoed back VERBATIM, and the EIP-191 signature over it. The address recovered from the signature must equal address, and the challenge must name the authenticated account. The registered wallet is where withdrawals are paid, so getting it wrong matters: an account holds ONE wallet in this cut and replacement is not supported — registering a different address afterwards is refused with 409 wallet_already_registered rather than updating the record. Because of that you must pass confirm: true. Re-registering the SAME address is idempotent and returns the existing record. Errors: invalid_address, invalid_challenge, challenge_expired, signature_mismatch, account_mismatch on 400; wallet_registration_unavailable on 503 when the deployment has no challenge key (not transient — do not retry). Requires API credentials.

list_bridge_walletsA

List the authenticated account's registered withdrawal wallets. Wallets are not chain-scoped: one EVM address is valid on every supported EVM chain, and the chain is chosen per withdrawal. In this cut an account holds at most one wallet and both verified and is_default are always true on it, so do not branch on either — they start varying only with the wallet-lifecycle follow-up. An empty wallets array means nothing is registered yet; use create_bridge_wallet_challenge then register_bridge_wallet. Requires API credentials.

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 response carries ws_endpoint — the URL to connect to for the configured network — so no host has to be guessed. 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. The response carries ws_endpoint for the configured network. Requires API credentials.

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_targetA

Get the on-chain deposit target (address/memo) to fund the account. Superseded on the direct surface by the bridge deposit-address tools (create_bridge_deposit_address / list_bridge_deposit_addresses), which return per-chain on-chain deposit addresses — prefer those. This legacy single-target lookup remains unbuilt server-side.

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