Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PIONEX_API_KEYNoPionex API credentials
PIONEX_API_SECRETNoPionex API credentials
PIONEX_MCP_AUDIT_LOGNoPath to the audit log~/.mcp_pionex/audit.jsonl
PIONEX_MCP_BOTS_ENABLEDNoEnables creating/closing grid botsfalse
PIONEX_MCP_EARN_ENABLEDNoEnables invest/revoke Dual Investmentfalse
PIONEX_MCP_TRADING_ENABLEDNoEnables spot orders (prepare/confirm)false
PIONEX_MCP_CONFIRMATION_TTLNoValidity in seconds of a confirmation token120
PIONEX_MCP_SYMBOL_WHITELISTNoComma-separated list of symbols (e.g., BTC_USDT,ETH_USDT) to restrict pairs
PIONEX_MCP_MAX_ORDER_NOTIONALNoNotional cap (quote currency) per action100
PIONEX_MCP_MAX_PRICE_DEVIATION_PCTNoMax deviation of a LIMIT price vs live price10

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
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_server_statusA

Server status: version, which capability gates (trading/bots/earn) are enabled, active limits, and whether API credentials are configured. Call this first when a session starts or when a tool reports it is disabled.

get_safety_rulesA

The full list of anti-hallucination and safety rules this server enforces. Use it to explain to the user why an action was blocked.

list_symbolsA

List real trading symbols on Pionex, exactly as the exchange spells them (format BASE_QUOTE, e.g. 'BTC_USDT'). market_type: 'SPOT' or 'PERP'. Optional case-insensitive search substring filter. Use this instead of guessing symbol names.

get_symbol_infoA

Exchange metadata for one symbol: precision (base/quote/amount), minimum trade size, minimum notional, enabled status. Call this before sizing any order — precision and minimums come from here, never from memory.

get_priceA

Live mid-price ((best bid + best ask) / 2) for a symbol, falling back to last traded price for illiquid pairs. This is the ONLY valid source for a current price — never quote prices from memory.

get_ticker_24hB

24-hour rolling stats (open/close/high/low/volume/amount/count) for one symbol, or for every symbol if symbol is empty.

get_book_tickerC

Best bid/ask (price and size) for one symbol, or all symbols if symbol is empty.

get_depthA

Order book (bids/asks) for a symbol. limit range 1-1000, default 20. Each level is [price, size] as strings, verbatim from the exchange.

get_recent_tradesC

Recent public trades for a symbol. limit range 10-500, default 100.

get_klinesA

Candlesticks for a symbol. interval MUST be one of: 1M, 5M, 15M, 30M, 60M, 4H, 8H, 12H, 1D (these exact strings). limit 1-500, default 100. end_time_ms: optional epoch-milliseconds upper bound (0 = now). Times in the response are epoch milliseconds.

get_klines_historyA

Fetch MORE than 500 candles by paging backwards through history. Returns a flat oldest-first list. Use for backtests/long lookbacks; capped at 5000 candles per call.

get_emasB

Valores actuales de EMAs sobre cierres de velas reales. periods: lista separada por comas (p. ej. "20,50,200"). Devuelve por periodo el valor de la EMA, si el precio está por encima, y la distancia en %. DERIVADO de klines vivas — no es un dato del exchange.

get_indicatorsB

Panel de indicadores clásicos sobre velas reales: RSI(14), MACD(12,26,9), ATR(14), Bollinger(20,2) y SMA/EMA 20/50/200 — últimos valores. DERIVADO de klines vivas con fórmulas estándar.

detect_fvgA

Fair Value Gaps (definición de 3 velas) sobre velas reales: FVG alcista cuando low[i+1] > high[i-1]; bajista cuando high[i+1] < low[i-1]. Cada gap incluye zona [bottom, top], timestamp de formación y estado (open / partially_filled / filled). only_open=True omite los ya rellenados. min_gap_pct filtra huecos menores a ese % del precio. HEURÍSTICA computada, no un hecho del exchange.

detect_order_blocksC

Order blocks sobre velas reales, heurística de desplazamiento: una vela con cuerpo > displacement_factor × ATR(14) marca impulso; el order block es la última vela contraria en las 3 previas (zona [low, high]). Estado: fresh / mitigated / broken. HEURÍSTICA computada — otras definiciones de OB darán zonas distintas.

get_market_structureA

Estructura de mercado sobre velas reales: puntos de giro (fractales de swing_strength velas por lado) etiquetados HH/LH/HL/LL, y lectura de tendencia (uptrend/downtrend/range) de las últimas 4 etiquetas. HEURÍSTICA computada.

get_balancesB

Account balances per coin: free, frozen and total. Requires API credentials (read permission). Balances are live account facts — never estimate them.

get_portfolioA

Whole-portfolio view valued in the quote currency: per-coin amount, live price, value and weight, sorted by value, plus the total. Prices are fetched live; value and weight are computed from them.

get_open_ordersC

Currently open (unfilled) spot orders for a symbol.

get_orderB

Details of one order by its numeric orderId: status (OPEN/CLOSED), filled size, average price, fee.

get_order_by_client_idA

Details of one order by the clientOrderId string it was created with.

get_order_historyA

Historical orders for a symbol (default 50, max 200). Optional epoch-ms time range.

get_fillsA

Recent trade fills (executions) for a symbol — latest 100, with price, size, fee and role (taker/maker).

get_fills_by_orderB

All fills belonging to one order — use to compute the real average entry price of a filled order from exchange data.

prepare_orderA

STEP 1 of 2 to place a spot order. Validates everything against live exchange data and returns a confirmation token — NO order is sent.

Parameters (all numeric values as strings, exactly as they should reach the exchange):

  • side: 'BUY' or 'SELL'. order_type: 'LIMIT' or 'MARKET'.

  • LIMIT: requires price + size (base units).

  • MARKET BUY: requires amount (quote currency to spend, e.g. USDT).

  • MARKET SELL: requires size (base units to sell).

After this returns, show the summary to the user and only call confirm_action with the token once they explicitly approve.

prepare_cancel_all_ordersA

STEP 1 of 2 to cancel EVERY open order on a symbol. Returns a confirmation token; nothing is cancelled until confirm_action.

cancel_orderA

Cancel ONE specific open order by orderId. Direct (no token needed): cancelling a single identified order is low-risk and reversible in effect. The order_id must come from get_open_orders or a prior placement — never from memory.

compute_rebalance_planA

Compute (dry-run, nothing executed) the MARKET orders needed to move the portfolio to target weights. target_weights_json is a JSON object like {"BTC": 0.5, "ETH": 0.3, "USDT": 0.2} — fractions summing to ~1.0. threshold: minimum weight drift before an order is generated. Review the plan, then use prepare_rebalance to get a confirmation token.

prepare_rebalanceC

STEP 1 of 2 to EXECUTE a portfolio rebalance as MARKET orders. Recomputes the plan from live data, checks every order against the notional cap, and returns a confirmation token plus the exact plan that will run. Show the plan to the user before confirming.

confirm_actionA

STEP 2 of 2: execute a previously prepared action (order, cancel-all, rebalance, bot or investment) using its single-use token. Only call this after the human user has explicitly approved the summary shown by the prepare_* tool. The parameters executed are the ones stored at prepare time — nothing can be changed here.

list_bot_ordersB

List the account's trading bots. Optional filters: status (e.g. 'RUNNING', 'FINISHED'), base/quote coin, bot_types comma-separated (e.g. 'SPOT_GRID,FUTURES_GRID').

get_spot_gridA

Full state of one spot grid bot by its buOrderId: bounds, rows, investment, profit, status.

get_grid_ai_strategyA

Pionex's own AI-recommended grid parameters (top/bottom/row) for a pair. Use these exchange-provided numbers instead of inventing grid bounds.

check_spot_grid_paramsA

Ask the EXCHANGE to validate spot-grid parameters without creating anything. Always run this before prepare_create_spot_grid — the exchange's verdict beats any local reasoning.

prepare_create_spot_gridA

STEP 1 of 2 to create a spot grid bot. Validates locally (bounds, row 2-200, grid_type whitelist, notional cap) AND against the exchange's checkParams endpoint, then returns a confirmation token. Nothing is created until confirm_action with that token.

prepare_cancel_spot_gridB

STEP 1 of 2 to close a running spot grid bot. Fetches the bot's live state for the summary and returns a confirmation token.

list_dual_symbolsC

Pairs supported by Dual Investment. Note Pionex's quote convention: BTC/ETH pairs use quote 'USDXO' (USDC+USDT bundled); others use 'USDT'.

list_dual_productsB

Dual-investment products currently open for subscription. product_type MUST be 'DUAL_BASE' (invest the base coin, e.g. BTC) or 'DUAL_CURRENCY' (invest the quote, e.g. USDT). Yields and strike prices come verbatim from the exchange.

get_dual_pricesA

Current prices/yields for specific dual products (comma-separated productIds). The profit value used when investing MUST come from here — a stale or invented profit is rejected by the exchange.

get_dual_indexB

Underlying index price for a dual-investment pair.

get_dual_balancesC

The account's dual-investment balances/positions.

prepare_dual_investA

STEP 1 of 2 to subscribe to a dual-investment product. Provide EXACTLY ONE of base_amount or currency_amount. profit must be the live value from get_dual_prices. Returns a confirmation token.

prepare_dual_revokeC

STEP 1 of 2 to revoke an unsettled dual investment. Returns a confirmation token.

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/alejandrorodm/MCP-Pionex'

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