Skip to main content
Glama
Eurobertics

MCP Pionex Management

by Eurobertics

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

pionex_bot_update_trigger_profit_loss_futures_grid
Destructive

Set, update, or clear take-profit and stop-loss triggers on an already running futures grid order, using price, ratio, or amount thresholds.

Instructions

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": "" }
  ]
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listYesOne item per trigger to configure. May include a `stop_loss` item, a `stop_profit` item, or both.
bu_order_idYesBot order ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the write/destructive/non-idempotent profile, but the description adds genuinely new behavior: the write is asynchronous and a success response only means the request was accepted. It also surfaces the exact rejection messages (e.g. `order is disable change tp`, `forbidden for future_grid_bonus order`) and the clear-via-empty-string convention, which annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded — the one-line summary plus the create-vs-update routing appears before any tables. The tables and restriction list are scannable, but the eight example bodies are more repetition than most agents need, so it is slightly longer than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no output schema, the description still closes the loop: it explains the asynchronous persistence model and the exact read-back fields (`lossStop`/`profitStop`) to confirm success. Combined with the error catalogue and clearing semantics, nothing an agent needs to invoke this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema alone does not: the snake_case-vs-camelCase divergence from sibling endpoints, the rejection of legacy `type` spellings, how `value`/`limit_price` interact per `stop_type`, and worked request bodies. Only `stop_delay` is covered solely by an example rather than prose, which keeps it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb set (set/update/clear) and a precise resource (take-profit & stop-loss of an already-running futures grid order). It immediately distinguishes itself from the sibling `create` flow and from the other futuresGrid endpoints. An agent can identify the tool without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states this is only for an already-running order and points to `create` (with `lossStopType`/`profitStopType`) for a not-yet-started order. It also names the confirmation path (poll `GET /futuresGrid/order`) and enumerates the states that reject the call, so when-to-use and when-not-to-use are both covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools