Skip to main content
Glama
MCP Pionex Management

MCP Pionex Management

by Eurobertics

MCP Pionex Management

Ein lokaler TypeScript-MCP-Server für die öffentlich nutzbaren Pionex REST APIs. Der Server spricht ausschließlich MCP über stdio; er öffnet keinen HTTP-Port. Ausgehende HTTPS-Aufrufe gehen direkt an Pionex.

Umfang

Der Tool-Katalog wird aus den offiziellen Pionex OpenAPI Specifications erzeugt und enthält derzeit 70 Tools:

Bereich

Tools

Inhalt

Trade

17

Symbole, Marktdaten, Spot-Konto, Orders und Batch-Orders

Wallet

1

Vollständige Kontoübersicht

Bot

37

Futures Grid, Spot Grid, Smart Copy und Signals

Earn Arbitrage

4

Produkte, Guthaben, Stake und Unstake

Earn Dual

11

Produkte, Preise, Investments und Abrechnung

Die als Internal markierten Futures-, Institution-, Partner- und InstFund-APIs sowie WebSockets gehören bewusst noch nicht zu diesem Stand.

Die MCP-Toolnamen folgen, soweit vorhanden, der offiziellen Pionex-AI-Kit-Konvention, beispielsweise:

  • pionex_market_get_symbol_info

  • pionex_orders_new_order

  • pionex_orders_new_multiple_orders

  • pionex_bot_create_spot_grid_order

  • pionex_earn_dual_invest

Related MCP server: gate-local-mcp

Installation

npm install
npm run build

Voraussetzung ist Node.js 20 oder neuer.

Konfiguration

Der MCP-Prozess liest seine Konfiguration aus Umgebungsvariablen. Öffentliche Marktdaten funktionieren ohne Zugangsdaten. Private Tools benötigen:

PIONEX_API_KEY=...
PIONEX_API_SECRET=...

Weitere Einstellungen stehen in .env.example:

Variable

Standard

Bedeutung

PIONEX_API_BASE_URL

https://api.pionex.com

Pionex-Basis-URL

PIONEX_REQUEST_TIMEOUT_MS

15000

Request-Timeout

PIONEX_ALLOWED_SYMBOLS

unbegrenzt

Kommagetrennte Allowlist, z. B. BTC_USDT,ETH_USDT

PIONEX_MAX_ORDER_QUOTE_AMOUNT

unbegrenzt

Maximales Quote-Volumen einer Order

PIONEX_MAX_ORDER_BASE_SIZE

unbegrenzt

Maximale Base-Menge einer Order

PIONEX_MAX_BATCH_ORDERS

10

Maximale Anzahl in einer Batch-Order

PIONEX_MAX_BOT_INVESTMENT

unbegrenzt

Maximales Bot-Investment

Grenzwerte sind Dezimalstrings und werden ohne Fließkomma-Rundung verglichen. Für einen produktiven Trading-Key sollten mindestens Symbol-Allowlist und passende Betragsgrenzen gesetzt werden. Zusätzlich empfiehlt Pionex eine IP-Allowlist am API-Key.

Beispiel einer generischen MCP-Konfiguration:

{
  "mcpServers": {
    "pionex": {
      "command": "node",
      "args": ["/absoluter/pfad/mcp_pionex_management/dist/server.js"],
      "env": {
        "PIONEX_API_KEY": "...",
        "PIONEX_API_SECRET": "...",
        "PIONEX_ALLOWED_SYMBOLS": "BTC_USDT,ETH_USDT",
        "PIONEX_MAX_ORDER_QUOTE_AMOUNT": "250"
      }
    }
  }
}

Start aus Windows über WSL

Wenn der MCP-Host unter Windows läuft, das Projekt und Node.js aber in WSL liegen, kann der Server über wsl.exe gestartet werden. Ersetze Ubuntu-24.04 durch den Namen aus wsl.exe --list --verbose und passe den Linux-Pfad zum Projekt an:

{
  "mcpServers": {
    "pionex": {
      "command": "wsl.exe",
      "args": [
        "-d",
        "Ubuntu-24.04",
        "--exec",
        "node",
        "/home/eurobertics/projects/mcp_pionex_management/dist/server.js"
      ],
      "env": {
        "WSLENV": "PIONEX_API_KEY/u:PIONEX_API_SECRET/u:PIONEX_ALLOWED_SYMBOLS/u:PIONEX_MAX_ORDER_QUOTE_AMOUNT/u:PIONEX_MAX_ORDER_BASE_SIZE/u:PIONEX_MAX_BATCH_ORDERS/u:PIONEX_MAX_BOT_INVESTMENT/u",
        "PIONEX_API_KEY": "...",
        "PIONEX_API_SECRET": "...",
        "PIONEX_ALLOWED_SYMBOLS": "BTC_USDT,ETH_USDT",
        "PIONEX_MAX_ORDER_QUOTE_AMOUNT": "250"
      }
    }
  }
}

WSLENV sorgt dafür, dass die genannten Variablen aus dem Windows-Prozess an den Linux-Prozess weitergereicht werden. Werden weitere PIONEX_*-Variablen in env ergänzt, müssen sie ebenfalls in WSLENV mit dem Suffix /u aufgeführt werden. Existiert bereits ein eigener WSLENV-Wert, sind dessen Einträge zu erhalten und um diese Namen zu ergänzen.

Sicherheitsverhalten

  • Schreibende Tools sind per MCP-Annotation als destruktiv markiert.

  • Spot-Orders werden abhängig von Typ und Richtung validiert.

  • Fehlende clientOrderId-Werte werden bei Einzel- und Batch-Orders automatisch erzeugt.

  • Betragsgrenzen gelten auch für verschachtelte Batch- und Bot-Parameter.

  • Der Client wiederholt schreibende Requests niemals automatisch.

  • Ein gewichteter Limiter berücksichtigt Pionex' IP- und Account-Limit von jeweils 10 Requests pro Sekunde.

  • Der Authentifizierungs-Timestamp wird intern unmittelbar vor dem Request erzeugt und ist kein Tool-Argument.

Die API-Key-Berechtigungen bei Pionex bleiben die härteste Grenze. Ein Key sollte nur die tatsächlich benötigten Rechte besitzen.

Antwort- und Fehlerformat

Erfolgreiche Pionex-JSON-Antworten werden unverändert als MCP structuredContent und zusätzlich als formatiertes JSON im Textinhalt zurückgegeben. Es gibt keine eigene fachliche Response-Schicht.

Fehler werden mit isError: true und einer kleinen Transportbeschreibung ausgegeben:

{
  "error": "PionexError",
  "message": "Original Pionex message",
  "httpStatus": 429,
  "code": "PIONEX_CODE",
  "retryable": true,
  "response": {}
}

retryable ist nur ein Hinweis für sichere Leseoperationen. Der Server führt selbst keine automatischen Wiederholungen aus.

Entwicklung

npm run check
npm test
npm run build

Tool-Katalog nach einem Update des offiziellen OpenAPI-Repositories neu erzeugen:

npm run generate:catalog -- /pfad/zu/pionex-open-api

Der Generator berücksichtigt openapi.yaml, openapi_wallet.yaml, openapi_bot.yaml, openapi_earn.yaml und openapi_earn_dual.yaml.

Skill

Unter skills/pionex-management liegt ein begleitender Codex-Skill für die sichere Verwendung der MCP-Werkzeuge. Er beschreibt Analyse-, Trading-, Bot- und Earn-Abläufe sowie den Umgang mit unklaren Ergebnissen schreibender Aktionen.

Available Tools

70 tools
pionex_account_get_balanceGet account balancesA
Read-onlyIdempotent

Get account balances

Get trading account balances (excludes bot and earn accounts). Weight: 1.

Inputs: no named parameters.

pionex_bot_add_margin_futures_gridAdd margin to futures grid orderA
Destructive

Add margin to futures grid order

Transfer margin into a futures grid order. Runs the same validation as addMarginCheck, then executes asynchronously. Directly affects available balance and the order's liquidation price — a funds operation, call with care. Does not return a status field (async processing). Weight: 1.

Inputs: coin (required), amount (required), buOrderId (required).

pionex_bot_add_margin_futures_grid_checkCheck futures grid add margin (dry-run)A
Read-only

Check futures grid add margin (dry-run)

Validate whether the add-margin amount is valid and return the estimated liquidation prices before and after the change, without executing. Does not accept openPrice; the backend uses the live market price. Weight: 1.

Inputs: amount (required), buOrderId (required).

pionex_bot_adjust_futures_grid_paramsAdjust futures grid (add investment / modify range)B
Destructive

Adjust futures grid (add investment / modify range)

Add investment, modify grid range, or set trigger investment for a futures grid order. Weight: 1.

Inputs: type (required), buOrderId (required), openPrice (required), extraMargin (required), +14 more.

pionex_bot_adjust_futures_grid_params_checkCheck futures grid adjust parameters (dry-run)A
Read-only

Check futures grid adjust parameters (dry-run)

Validate adjust params / invest-in parameters and return estimated data without executing. Use this before calling adjustParams to preview the impact. Weight: 1.

Inputs: type (required), buOrderId (required), openPrice (required), extraMargin (required), +14 more.

pionex_bot_adjust_spot_grid_paramsAdjust spot grid parametersB
Destructive

Adjust spot grid parameters

Modify grid range (top/bottom/row) or adjust investment for a running spot grid order. Weight: 1.

Inputs: buOrderId (required), row, top, bottom, +1 more.

pionex_bot_cancel_futures_grid_orderCancel futures grid orderB
Destructive

Cancel futures grid order

Close and cancel a futures grid bot order. Weight: 1.

Inputs: buOrderId, closeNote, immediate, closeSlippage, +1 more.

pionex_bot_cancel_smart_copy_orderCancel smart copy orderB
Destructive

Cancel smart copy order

Close and cancel a smart copy bot order. Weight: 1.

Inputs: bu_order_id (required), close_note, convert_into_earn_coin.

pionex_bot_cancel_spot_grid_orderCancel spot grid orderB
Destructive

Cancel spot grid order

Close and cancel a spot grid bot order. Weight: 1.

Inputs: buOrderId (required), slippage, closeSellModel.

pionex_bot_check_futures_grid_paramsCheck futures grid parametersA
Read-only

Check futures grid parameters

Validate futures grid bot creation parameters and estimate investment values without creating an order. Weight: 1.

Pass a positive quote_investment to receive full estimate fields. The current market price is fetched automatically — open_price is not required.

Extra Margin Modes (controlled by extra_margin):

extra_margin=false (Manual)

extra_margin=true (Auto-split)

quote_investment meaning

Trading capital only

Total input (auto-split into trading capital + extra margin)

extra_margin_amount

User-specified extra margin, on top of quote_investment

Typically omitted; system auto-calculates

estimate_investment

= quote_investment

< quote_investment (trading capital portion)

estimate_extra_margin

= extra_margin_amount

Auto-calculated (= quote_investment − estimate_investment)

min/max_investment

Range for trading capital (excl. extra margin)

Range for total input (incl. extra margin)

FailedWithData: For errors marked "Yes" below, the response includes a data field even when result=false, containing min_investment, max_investment, and slippage so the client can display the valid investment range.

Validation error messages (returned in message when result is false):

Message

Cause

Includes data

base should end with .PERP

base must end with .PERP, e.g. BTC.PERP

No

invalid trend

trend must be long, short, or no_trend

No

invalid grid_type

grid_type must be arithmetic or geometric

No

bottom must greater than 0

bottom must be a positive number

No

top must greater than bottom

top must be strictly greater than bottom

No

top must less or equal than max:{maxPrice}

top exceeds the symbol's maximum allowed price

No

top not match quote precision

top has more decimal places than the symbol allows

No

bottom not match quote precision

bottom has more decimal places than the symbol allows

No

row must greater than 1

row must be >= 2

No

row must less than 501

row must be <= 500

No

invalid leverage

leverage is outside the symbol's allowed leverage range

No

extra_margin should greater than or equal 0

extra_margin_amount must be >= 0

No

invalid condition_direction

condition_direction must be "", "1", or "-1"

No

quote_investment not match spending precision: max {N} decimal places

quote_investment exceeds the allowed decimal precision

Yes

extra_margin_amount not match spending precision: max {N} decimal places

extra_margin_amount exceeds the allowed decimal precision

Yes

grid profit per volume less than 0

Grid range too narrow or row too large — profit per grid is negative

Yes

less than min investment

quote_investment is "0" or less than min_investment

Yes

Inputs: base (required), quote (required), buOrderData (required).

pionex_bot_check_smart_copy_paramsCheck smart copy parametersA
Read-only

Check smart copy parameters

Validate smart copy bot creation parameters and check the maximum investment limit. Weight: 1.

Requires Bot reading permission.

Returns the maximum allowed investment, maximum leverage, and notional/available limits for the given base/quote/signal combination.

Inputs: base (required), quote (required), leverage (required), quote_investment (required), +2 more.

pionex_bot_check_spot_grid_paramsCheck spot grid parametersA
Read-only

Check spot grid parameters

Validate spot grid bot creation parameters and estimate investment values without creating an order. Weight: 1.

Pass a positive quote_total_investment to receive full estimate fields. The current market price is fetched automatically — open_price is not required.

FailedWithData: For errors marked "Yes" below, the response includes a data field even when result=false, containing min_investment, max_investment, and slippage so the client can display the valid investment range.

Validation error messages (returned in message when result is false):

Message

Cause

Includes data

number invalid: {value}

top or bottom is not a valid numeric string

No

number int too long: {value}

Integer part of top or bottom exceeds 15 digits

No

number decimal too long: {value}

Decimal part of top or bottom exceeds 15 digits

No

invalid quote total investment

quote_total_investment must be >= 0

No

bottom must be less than top

bottom must be strictly less than top

No

row must be between 2 and 1000

row must be in the range [2, 1000]

No

invalid grid_type

grid_type must be arithmetic or geometric

No

grid price duplicated: reduce row or widen range

Grid range too narrow or row too large — adjacent grid prices are identical

Yes

quote_total_investment not match quote precision: max {N} decimal places

quote_total_investment exceeds the allowed decimal precision

Yes

less than min investment

quote_total_investment is "0" or less than min_investment

Yes

Inputs: base (required), quote (required), buOrderData (required).

pionex_bot_create_futures_grid_orderCreate futures grid orderC
Destructive

Create futures grid order

Create a new futures grid bot order. Weight: 1.

Inputs: base (required), quote (required), buOrderData (required), copyFrom, +2 more.

pionex_bot_create_smart_copy_orderCreate smart copy orderC
Destructive

Create smart copy order

Create a new smart copy bot order. Weight: 1.

Inputs: base (required), quote (required), bu_order_data (required), note, +3 more.

pionex_bot_create_spot_grid_orderCreate spot grid orderC
Destructive

Create spot grid order

Create a new spot grid bot order. Weight: 1.

Inputs: base (required), quote (required), buOrderData (required), note.

pionex_bot_create_user_signalCreate user custom signalA
Destructive

Create user custom signal

Create a new user-defined signal. Each user can have at most 100 signals. Weight: 1.

Requires Bot trading permission.

Inputs: title (required), description.

pionex_bot_delete_user_signalDelete user custom signalA
DestructiveIdempotent

Delete user custom signal

Delete a user-defined signal. Weight: 1.

Requires Bot trading permission.

Deletion is rejected if the signal has any non-cancelled orders. Error code SIGNAL_HAS_UNCLOSED_ORDERS is returned with the open order count in data.cnt.

Inputs: signalType (required).

pionex_bot_edit_user_signalEdit user custom signalA
Destructive

Edit user custom signal

Update the title and/or description of an existing user-defined signal. Weight: 1.

Requires Bot trading permission.

At least one of title or description must be provided.

Inputs: signalType (required), title, description.

pionex_bot_get_bot_ordersGet bot order listA
Read-onlyIdempotent

Get bot order list

Query bot order list with optional filters by order type, status, and trading pair. Supports pagination. Weight: 1.

Inputs: base, quote, status, pageToken, +1 more.

pionex_bot_get_futures_grid_orderGet futures grid orderB
Read-onlyIdempotent

Get futures grid order

Query a futures grid bot order by ID. Weight: 1.

Inputs: buOrderId (required), lang.

pionex_bot_get_kol_select_copy_trade_listGet KOL curated copy-trade order listA
Read-onlyIdempotent

Get KOL curated copy-trade order list

Query a KOL's curated/pinned copy-trade order list by share code, with optional filters by symbol, trend, and leverage. Supports pagination and sorting. Weight: 1.

Inputs: shareCode (required), buOrderType (required), page, sort, +6 more.

pionex_bot_get_smart_copy_orderGet smart copy orderB
Read-onlyIdempotent

Get smart copy order

Query a smart copy bot order by ID. Weight: 1.

Inputs: buOrderId (required), lang.

pionex_bot_get_spot_grid_ai_strategyGet spot grid AI strategyC
Read-onlyIdempotent

Get spot grid AI strategy

Query AI-recommended grid strategy parameters for a trading pair. Weight: 1.

Inputs: base (required), quote (required).

pionex_bot_get_spot_grid_orderGet spot grid orderB
Read-onlyIdempotent

Get spot grid order

Query a spot grid bot order by ID. Weight: 1.

Inputs: buOrderId (required).

pionex_bot_get_user_signalGet user custom signal detailA
Read-onlyIdempotent

Get user custom signal detail

Return detail of a specific user-defined signal including webhook URL and message template. Weight: 1.

Requires Bot reading permission.

Inputs: signalType (required).

pionex_bot_invest_in_spot_gridAdd investment to spot gridC
Destructive

Add investment to spot grid

Add additional investment to a running spot grid order. Weight: 1.

Inputs: buOrderId (required), quoteInvest (required).

pionex_bot_list_user_signalsList user custom signalsA
Read-onlyIdempotent

List user custom signals

Return a paginated list of user-defined signals. Weight: 1.

Requires Bot reading permission.

Inputs: pageToken.

pionex_bot_pause_futures_gridPause futures grid orderA
Destructive

Pause futures grid order

Pause a running futures grid order. Runs the same validation as pauseCheck, then executes asynchronously. Once paused the grid stops auto-refilling orders while the position is retained; immediate mode takes effect at the live market price. Does not return a status field (async processing). Weight: 1.

Inputs: mode (required), buOrderId (required), stopLossEnabled, stopProfitEnabled, +2 more.

pionex_bot_pause_futures_grid_checkCheck futures grid pause (dry-run)A
Read-only

Check futures grid pause (dry-run)

Validate whether a futures grid order can be paused (immediate or conditional mode) and return current plus post-trigger estimated liquidation prices without executing. Does not accept openPrice; the backend uses the live market price. triggerPausePriceUp / triggerPausePriceDown are independent — set either or both. Weight: 1.

Inputs: mode (required), buOrderId (required), triggerPausePriceUp, triggerPausePriceDown.

pionex_bot_profit_spot_gridExtract profit from spot gridC
Destructive

Extract profit from spot grid

Extract accumulated grid profit from a running spot grid order. Weight: 1.

Inputs: amount (required), buOrderId (required).

pionex_bot_reduce_futures_gridReduce futures grid positionB
Destructive

Reduce futures grid position

Reduce position size of a futures grid order. Weight: 1.

Inputs: buOrderId (required), openPrice (required), reduceNum (required), slippage, +2 more.

pionex_bot_reduce_futures_grid_checkCheck futures grid reduce (dry-run)A
Read-only

Check futures grid reduce (dry-run)

Validate reduce parameters and return estimated data without executing. Use this before calling reduce to preview the impact. Weight: 1.

Inputs: buOrderId (required), openPrice (required), reduceNum (required), slippage, +2 more.

pionex_bot_reduce_margin_futures_gridReduce margin of futures grid orderA
Destructive

Reduce margin of futures grid order

Transfer margin out of a futures grid order. Runs the same validation as reduceMarginCheck (including the maxAmount check), then executes asynchronously. Directly reduces the order's available margin and raises liquidation risk — a funds operation, call with care. Does not return a status field (async processing). Weight: 1.

Inputs: coin (required), amount (required), buOrderId (required).

pionex_bot_reduce_margin_futures_grid_checkCheck futures grid reduce margin (dry-run)A
Read-only

Check futures grid reduce margin (dry-run)

Validate whether the reduce-margin amount is valid (subject to the maxAmount hard limit) and return the estimated liquidation prices before and after the change, without executing. Exceeding maxAmount returns checkResult=false with reason EXCEEDS_MAX_AMOUNT. Weight: 1.

Inputs: amount (required), buOrderId (required).

pionex_bot_resume_futures_gridResume futures grid orderA
Destructive

Resume futures grid order

Resume a paused futures grid order. Runs the same validation as resumeCheck, then executes. After resuming the grid restarts auto-refilling and the liquidation price moves with the market. Weight: 1.

Inputs: buOrderId (required).

pionex_bot_resume_futures_grid_checkCheck futures grid resume (dry-run)A
Read-only

Check futures grid resume (dry-run)

Validate whether a paused futures grid order can be resumed and return the estimated liquidation prices after resuming, without executing. Order must be in paused state. Weight: 1.

Inputs: buOrderId (required).

pionex_bot_signal_listenerPush custom trading signalC
Destructive

Push custom trading signal

Push a custom trading signal to drive smart copy orders. Weight: 1.

Requires Enable trading permission.

Inputs: base (required), data (required), time (required), price (required), +3 more.

pionex_bot_update_trigger_profit_loss_futures_gridSet / update / clear take-profit & stop-lossA
Destructive

Set / update / clear take-profit & stop-loss

Set, update, or clear the take-profit and/or stop-loss of an already running futures grid order. Weight: 1.

This does NOT create triggers for a not-yet-started order — use create (fields lossStopType / profitStopType etc.) for that. This endpoint mutates the take-profit / stop-loss of an existing order in place.

Request field naming: unlike the other futuresGrid endpoints (which use camelCase), this endpoint takes snake_case field names, and the trigger settings are passed as a list of items — one item per trigger you want to set. A single call may contain a stop_loss item, a stop_profit item, or both.

type — which trigger the item configures. Only two values are accepted (App-side legacy spellings such as stop-loss and the entry-trigger value condition are rejected here):

type

Meaning

stop_loss

Configure the stop-loss trigger

stop_profit

Configure the take-profit trigger

stop_type — decides how value (and limit_price) is interpreted. Required; unlike the App, an empty value is NOT accepted (no implicit fallback to price):

stop_type

value means

limit_price

price

Trigger price

ignored

price_limit

Trigger price; order is placed as a limit order at limit_price when hit

required

profit_amount

Profit/loss amount in the settlement currency

ignored

profit_ratio

Profit/loss ratio (e.g. 0.5 = +50%, -0.2 = −20%)

ignored

Clearing a trigger: pass value as an empty string "" for that item to remove the previously set take-profit / stop-loss.

value validation: when value is non-empty it only needs to be a valid decimal — the endpoint does not enforce a positive value. 0 and negative values are accepted (a stop-loss expressed as a negative profit_ratio / profit_amount is meaningful).

Neutral grid (no_trend) upper stop-loss: for a neutral grid, a stop-loss can additionally set an upper threshold above the grid range using stop_high_price (and limit_high_price when stop_type=price_limit). These two fields apply only to a stop_loss item on a neutral grid and only when stop_type is price or price_limit; they are ignored otherwise.

*_sell_model — settlement currency for the position closed by the trigger. Optional; when empty the order's default is used:

Value

Meaning

TO_QUOTE

Settle to the quote currency

TO_USDT

Settle to USDT

Use loss_stop_sell_model on a stop_loss item and profit_stop_sell_model on a stop_profit item.

Asynchronous write: a successful response only means the request was accepted and forwarded. The take-profit / stop-loss is persisted onto the order record asynchronously — poll GET /futuresGrid/order and read lossStop / profitStop (and related fields) to confirm the update took effect.

Restrictions (return result=false with the message shown):

Message

Cause

trigger price list nil

list is empty

invalid type: {v}, must be one of stop_loss/stop_profit

type not in the allow-list

invalid stop_type: {v}, must be one of price/price_limit/profit_amount/profit_ratio

stop_type missing or not in the allow-list

invalid amount: {v}

value / limit_price / limit_high_price is not a valid decimal

invalid loss_stop_sell_model: {v}

loss_stop_sell_model not TO_QUOTE / TO_USDT

invalid profit_stop_sell_model: {v}

profit_stop_sell_model not TO_QUOTE / TO_USDT

order is disable change tp

The order forbids changing take-profit / stop-loss

forbidden by invalid status:{s}, order_id:{id}

Order is closing/unlocking/canceled

forbidden for future_grid_bonus order

Bonus-funded orders cannot set a stop-loss

Examples — request bodies for common combinations:

Set a stop-loss at a fixed price:

{
  "bu_order_id": "1234567890",
  "list": [
    { "type": "stop_loss", "stop_type": "price", "value": "70000" }
  ]
}

Set a take-profit at a fixed price:

{
  "bu_order_id": "1234567890",
  "list": [
    { "type": "stop_profit", "stop_type": "price", "value": "150000" }
  ]
}

Set both take-profit and stop-loss in one call:

{
  "bu_order_id": "1234567890",
  "list": [
    { "type": "stop_loss",   "stop_type": "price", "value": "70000" },
    { "type": "stop_profit", "stop_type": "price", "value": "150000" }
  ]
}

Stop-loss by loss ratio (−20%) and take-profit by profit ratio (+50%):

{
  "bu_order_id": "1234567890",
  "list": [
    { "type": "stop_loss",   "stop_type": "profit_ratio", "value": "-0.2" },
    { "type": "stop_profit", "stop_type": "profit_ratio", "value": "0.5" }
  ]
}

Take-profit by profit amount, settled to USDT:

{
  "bu_order_id": "1234567890",
  "list": [
    { "type": "stop_profit", "stop_type": "profit_amount", "value": "500", "profit_stop_sell_model": "TO_USDT" }
  ]
}

Take-profit as a limit order (place a limit at 149000 when 150000 is hit), with a 30s trigger delay:

{
  "bu_order_id": "1234567890",
  "list": [
    { "type": "stop_profit", "stop_type": "price_limit", "value": "150000", "limit_price": "149000", "stop_delay": 30 }
  ]
}

Neutral grid (no_trend) — lower and upper stop-loss prices:

{
  "bu_order_id": "1234567890",
  "list": [
    { "type": "stop_loss", "stop_type": "price", "value": "70000", "stop_high_price": "160000" }
  ]
}

Clear a previously set stop-loss (empty value):

{
  "bu_order_id": "1234567890",
  "list": [
    { "type": "stop_loss", "stop_type": "price", "value": "" }
  ]
}

Inputs: list (required), bu_order_id (required).

pionex_earn_arbitrage_fetch_productsList Arbitrage productsA
Read-onlyIdempotent

List Arbitrage products

Returns the list of Term Arbitrage products currently available. Requires View permission. Weight: 1.

Example request:

GET /api/v1/earn/arbitrage/fetchProducts?timestamp=1774959429596

Inputs: no named parameters.

pionex_earn_arbitrage_fetch_user_balancesGet user Arbitrage balancesA
Read-onlyIdempotent

Get user Arbitrage balances

Returns the authenticated user's Term Arbitrage positions and balances. Requires View permission. Weight: 1.

Example request:

GET /api/v1/earn/arbitrage/fetchUserBalances?timestamp=1774959429596

Inputs: no named parameters.

pionex_earn_arbitrage_stakeStake into an Arbitrage productA
Destructive

Stake into an Arbitrage product

Subscribes to a Term Arbitrage product. Requires Earn permission. Weight: 1.

Validation:

  • amount must be a valid decimal amount.

  • productId must exist in the product list returned by GET /api/v1/earn/arbitrage/fetchProducts.

  • coin must be one of USDT or USDC.

Example request body:

{
  "productId": "ARB-USDT-30D",
  "coin": "USDT",
  "amount": "100"
}

Example response:

{
  "result": true,
  "data": {
    "request_id": "req-abcdef",
    "status": "success",
    "txid": "tx-123456"
  },
  "timestamp": 1774959429596
}

Inputs: coin (required), amount (required), productId (required).

pionex_earn_arbitrage_un_stakeRedeem from an Arbitrage productA
Destructive

Redeem from an Arbitrage product

Redeems from a Term Arbitrage product. Requires Earn permission. Weight: 1.

Validation:

  • amount must be a valid decimal amount.

  • productId must exist in the product list returned by GET /api/v1/earn/arbitrage/fetchProducts.

  • coin must be one of USDT or USDC.

Example request body:

{
  "productId": "ARB-USDT-30D",
  "coin": "USDT",
  "amount": "100"
}

Example response:

{
  "result": true,
  "data": {
    "status": "success"
  },
  "timestamp": 1774959429596
}

Inputs: coin (required), amount (required), productId (required).

pionex_earn_delivery_pricesGet historical delivery pricesA
Read-onlyIdempotent

Get historical delivery prices

Returns historical settlement delivery prices for a Dual Investment pair. Weight: 1.

The delivery price is the index price recorded at the exact moment of each product's expiry, used to determine the settlement direction (base or quote currency payout).

base is required. quote is optional but recommended to narrow results — use USDXO for BTC/ETH pairs and USDT for all other base currencies.

Example request (BTC/USDXO):

GET /api/v1/earn/dual/deliveryPrices?base=BTC&quote=USDXO

Example request (XRP/USDT):

GET /api/v1/earn/dual/deliveryPrices?base=XRP&quote=USDT

Example response:

{
  "result": true,
  "data": {
    "prices": [
      {
        "delivery": "69142.6",
        "date": "2026-04-01",
        "deliveryTime": 1775030400000
      }
    ]
  },
  "timestamp": 1775026529937
}

Inputs: base (required), quote, endTime, startTime.

pionex_earn_dual_balancesGet user balancesA
Read-onlyIdempotent

Get user balances

Returns the authenticated user's Dual Investment account balances. Requires View permission. Weight: 1.

Example request:

GET /api/v1/earn/dual/balances?timestamp=1774959429596

Example response:

{
  "result": true,
  "data": {
    "balances": [
      {
        "base": "BTC",
        "coin": "USDT",
        "free": "100.00",
        "frozen": "50.00",
        "updateTime": 1774959429596
      }
    ]
  },
  "timestamp": 1774959429596
}

Inputs: merge.

pionex_earn_dual_collectCollect settled earningsA
Destructive

Collect settled earnings

Collects settled Dual Investment earnings into the user's spot account. Requires Earn permission. Weight: 1.

Only orders in a settled state can be collected.

Example request body:

{
  "base": "BTC",
  "clientDualId": "my-order-001"
}

Example response:

{
  "result": true,
  "data": {
    "clientDualId": "my-order-001"
  },
  "timestamp": 1774959429596
}

Inputs: base (required), productId (required), clientDualId (required).

pionex_earn_dual_get_investsBatch query investment ordersC
Destructive

Batch query investment orders

Returns details for a batch of Dual Investment orders by client order ID list. Requires View permission. Weight: 1.

Example request body:

{
  "base": "BTC",
  "clientDualIds": ["my-order-001", "my-order-002"]
}

Inputs: base, clientDualIds.

pionex_earn_dual_indexGet underlying index priceA
Read-onlyIdempotent

Get underlying index price

Returns the real-time index price for a Dual Investment underlying asset. Weight: 1.

Both base and quote are required. Works for both USDT and USDXO quoted pairs.

The index price is the reference price used at settlement to determine whether the strike price was hit.

Example request (USDXO pair):

GET /api/v1/earn/dual/index?base=BTC&quote=USDXO

Example request (USDT pair):

GET /api/v1/earn/dual/index?base=LRC&quote=USDT

Example response:

{
  "result": true,
  "data": {
    "index": "69142.6",
    "base": "BTC",
    "quote": "USDXO",
    "updateTime": 1775025942486
  },
  "timestamp": 1775025942754
}

Inputs: base (required), quote (required).

pionex_earn_dual_investCreate investment orderA
Destructive

Create investment order

Creates a new Dual Investment order. Requires Earn permission. Weight: 1.

Provide either baseAmount (invest in base currency) or currencyAmount (invest in investment currency), not both.

Workflow: Call GET /api/v1/earn/dual/prices first to obtain the current profit value, then pass it unchanged to this endpoint. The profit field must match the live price — a stale or mismatched value will be rejected.

Example request body:

{
  "base": "BTC",
  "productId": "BTC-USDXO-260402-68000-P-USDT",
  "clientDualId": "my-order-001",
  "currencyAmount": "100",
  "profit": "0.0039"
}

Example response:

{
  "result": true,
  "data": {
    "clientDualId": "my-order-001",
    "state": "CONFIRMED"
  },
  "timestamp": 1775027817297
}

Inputs: base (required), profit, productId, baseAmount, +2 more.

pionex_earn_dual_invest_recordsGet investment historyA
Read-onlyIdempotent

Get investment history

Returns paginated Dual Investment history for the authenticated user. Requires View permission. Weight: 1.

Example request:

GET /api/v1/earn/dual/records?base=BTC&quote=USDXO&limit=10&endTime=1775027817297&timestamp=1775027817297

Inputs: base (required), endTime (required), limit, quote, +3 more.

pionex_earn_dual_pricesGet product pricesA
Read-onlyIdempotent

Get product prices

Returns the latest yield rate and investability status for Dual Investment products. Weight: 1.

All three parameters are required: base, quote, and productIds. Omitting any one of them will return a DUAL_PARAMETER_ERROR.

productIds is a comma-separated list of product IDs. Works for both USDT and USDXO quoted pairs.

When canInvest is false, profit and baseSize will be empty strings.

Workflow note: Always call this endpoint before placing an order. The profit value returned here must be passed as-is to POST /api/v1/earn/dual/invest. Submitting a stale or mismatched profit will be rejected.

Example request (USDT pair):

GET /api/v1/earn/dual/prices?base=LRC&quote=USDT&productIds=LRC-USDT-260410-0.03-C-USDT,LRC-USDT-260410-0.02-C-USDT

Example request (USDXO pair):

GET /api/v1/earn/dual/prices?base=ETH&quote=USDXO&productIds=ETH-USDXO-260410-3000-C-USDT,ETH-USDXO-260410-2900-C-USDT

Example response:

{
  "result": true,
  "data": {
    "products": [
      {
        "productId": "LRC-USDT-260410-0.02-C-USDT",
        "canInvest": true,
        "profit": "0.01242",
        "baseSize": "8000000",
        "updateTime": 1775026225630
      },
      {
        "productId": "LRC-USDT-260410-0.03-C-USDT",
        "canInvest": false,
        "profit": "0",
        "baseSize": "",
        "updateTime": 0
      }
    ]
  },
  "timestamp": 1775026244892
}

Inputs: base (required), quote (required), productIds (required).

pionex_earn_dual_productsList open productsA
Read-onlyIdempotent

List open products

Returns currently open Dual Investment products for a specific trading pair and type. Weight: 1.

Type semantics:

  • DUAL_BASE: invest in base currency (e.g. BTC); if price rises above strike at expiry, principal + yield are returned in base currency, otherwise converted to quote currency

  • DUAL_CURRENCY: invest in quote/investment currency (e.g. USDT); if price falls below strike at expiry, principal + yield are returned in quote currency, otherwise converted to base currency

Quote currency rules:

  • base=BTC or base=ETH: use quote=USDXO, currency=USDT or USDC

  • All other base currencies: use quote=USDT, currency=USDT

Example request (BTC, DUAL_BASE):

GET /api/v1/earn/dual/openProducts?base=BTC&quote=USDXO&currency=USDT&type=DUAL_BASE

Example request (XRP, DUAL_BASE):

GET /api/v1/earn/dual/openProducts?base=XRP&quote=USDT&currency=USDT&type=DUAL_BASE

Example response:

{
  "result": true,
  "data": {
    "products": [
      {
        "productId": "BTC-USDXO-260401-69000-C-USDT",
        "base": "BTC",
        "quote": "USDXO",
        "currency": "USDT",
        "type": "DUAL_BASE",
        "createTime": 1774686600000,
        "expireTime": 1775030400000,
        "strike": "69000",
        "expired": false
      }
    ]
  },
  "timestamp": 1775025855477
}

Inputs: base (required), type (required), quote (required), currency.

pionex_earn_dual_revoke_investRevoke investment orderA
DestructiveIdempotent

Revoke investment order

Revokes a pending Dual Investment order before it is matched. Requires Earn permission. Weight: 1.

Parameters are passed as a JSON request body, not query string. Only orders in a pending/unmatched state can be revoked.

Example request body:

{
  "base": "BTC",
  "productId": "BTC-USDXO-260402-68000-P-USDT",
  "clientDualId": "my-order-001"
}

Example response:

{
  "result": true,
  "data": {
    "clientDualId": "my-order-001"
  },
  "timestamp": 1775027817297
}

Inputs: base (required), productId (required), clientDualId (required).

pionex_earn_dual_symbolsList supported trading pairsA
Read-onlyIdempotent

List supported trading pairs

Returns all trading pairs supported by Dual Investment, optionally filtered by base currency. Weight: 1.

Supported quote currencies include: USDT, USDC, USD, USDXO.

Example request:

GET /api/v1/earn/dual/symbols?base=BTC

Example response:

{
  "result": true,
  "data": {
    "coins": [
      {
        "base": "BTC",
        "quote": "USDT",
        "currency": "USDT",
        "basePrecision": 8,
        "currencyPrecision": 8,
        "baseMin": "0.00001",
        "currencyMin": "1",
        "baseMax": "80",
        "currencyMax": "2000000"
      }
    ]
  },
  "timestamp": 1774959429596
}

Inputs: base.

pionex_market_get_book_tickersGet book tickersC
Read-onlyIdempotent

Get book tickers

Get best bid/ask prices. Weight: 1.

Inputs: type, symbol.

pionex_market_get_depthGet order book depthB
Read-onlyIdempotent

Get order book depth

Get order book snapshot. Weight: 1.

Inputs: symbol (required), limit.

pionex_market_get_klinesGet klines (candlestick data)B
Read-onlyIdempotent

Get klines (candlestick data)

Get OHLCV candlestick data. Weight: 1. Maximum 10,000 records.

Inputs: symbol (required), interval (required), limit, endTime.

pionex_market_get_symbol_infoGet symbols infoC
Read-onlyIdempotent

Get symbols info

Get trading pair information. Weight: 5.

Inputs: type, symbols.

pionex_market_get_tickersGet 24hr tickersB
Read-onlyIdempotent

Get 24hr tickers

Get 24-hour price change statistics. Weight: 1.

Inputs: type, symbol.

pionex_market_get_tradesGet market tradesB
Read-onlyIdempotent

Get market trades

Get recent trades. Weight: 1.

Inputs: symbol (required), limit.

pionex_orders_cancel_all_ordersCancel all ordersA
DestructiveIdempotent

Cancel all orders

Cancel all open orders for a symbol. Weight: 1.

Inputs: symbol (required).

pionex_orders_cancel_orderCancel orderB
DestructiveIdempotent

Cancel order

Cancel an existing order. Weight: 1.

Inputs: symbol (required), orderId (required).

pionex_orders_get_all_ordersGet all ordersB
Read-onlyIdempotent

Get all orders

Get all orders (open and closed) for a symbol. Weight: 5.

Inputs: symbol (required), limit, endTime, startTime.

pionex_orders_get_fillsGet fillsB
Read-onlyIdempotent

Get fills

Get trade fills for a symbol. Returns latest 100 fills when exceeding limit. Weight: 5.

Inputs: symbol (required), endTime, startTime.

pionex_orders_get_fills_by_order_idGet fills by order IDC
Read-onlyIdempotent

Get fills by order ID

Get trade fills for a specific order. Weight: 5.

Inputs: orderId (required), fromId.

pionex_orders_get_open_ordersGet open ordersA
Read-onlyIdempotent

Get open orders

Get all open orders for a symbol. Maximum 200 open orders per symbol. Weight: 5.

Inputs: symbol (required).

pionex_orders_get_orderGet orderB
Read-onlyIdempotent

Get order

Get order details by order ID. Weight: 1.

Inputs: orderId (required).

pionex_orders_get_order_by_client_order_idGet order by client order IDB
Read-onlyIdempotent

Get order by client order ID

Get order details by client order ID. Weight: 1.

Inputs: clientOrderId (required).

pionex_orders_new_multiple_ordersNew multiple ordersB
Destructive

New multiple orders

Place multiple orders at once (up to 20, LIMIT only). Weight: 1.

Inputs: orders (required), symbol (required).

pionex_orders_new_orderNew orderC
Destructive

New order

Place a new order. Weight: 1.

Inputs: side (required), type (required), symbol (required), IOC, +4 more.

pionex_wallet_get_balance_fullGet full account balances overviewB
Read-onlyIdempotent

Get full account balances overview

Query all account balances overview including Spot (Bot Account) and Futures (Trader Account) dimensions, with price information for each coin and total USDT/BTC valuations. Weight: 1.

Inputs: appLang, sysLang.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 70 tools

    Disambiguation4/5

    Most tools have clear resource+action boundaries (market data vs. orders vs. bots vs. earn), and the many dry-run variants are marked with a `_check` suffix. However, there are several easily confused pairs: `get_bot_orders` vs. `get_futures_grid_order`/`get_spot_grid_order`, `adjust_futures_grid_params` vs. `add_margin_futures_grid`, and `reduce_futures_grid` vs. `reduce_margin_futures_grid`.

    Naming Consistency3/5

    The server broadly follows a `pionex_<domain>_<action>` snake_case pattern, which is readable and predictable. But verb conventions are mixed: `new_order` vs. `create_*`, `fetch_products` vs. `get_*`, several earn endpoints lack a verb (`dual_symbols`, `dual_products`, `dual_prices`), and `signal_listener` is a noun rather than an action.

    Tool Count1/5

    With 70 tools, the server is far beyond a reasonable MCP surface and exceeds the 50+ threshold for extreme mismatch. Even though the domain is broad (market, orders, wallet, bots, earn), this should be split into several focused servers or consolidated.

    Completeness4/5

    Coverage is broad: market data, order lifecycle, balances, grid/copy bots, signals, and earn products are all represented. Minor gaps remain, such as wallet deposit/withdraw/transfer operations and order modification, but core trading workflows are largely complete.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Interact seamlessly with the Bybit API to fetch market data, manage your account, and execute trades. Leverage powerful tools to enhance your trading experience and automate your strategies effortlessly. If you wish to use an API key restricted to your personal IP address, you must configure the MCP
      15
      9
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Exposes the full Gate API v4 to MCP clients with 384 tools for spot, futures, margin, wallet, and more. Supports both public endpoints (no auth) and authenticated trading operations.
      330 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to interact with the Pionex exchange through MCP, providing market data, account info, spot trading, grid bots, and Dual Investment tools with strict anti-hallucination guardrails including two-phase order confirmation and live symbol/price validation.
      43
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Enables natural-language access to HTX exchange spot and USDT-margined futures market data, accounts, orders, positions, and trading operations, with safety confirmations and a read-only mode.
      15
      -