@pionex/pionex-trade-mcp 0.2.23 → 0.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,14 +40,33 @@ Credentials are read from `~/.pionex/config.toml` when the server starts; the cl
40
40
  - **Orders** (auth): `pionex_orders_new_order`, `pionex_orders_get_order`, `pionex_orders_get_order_by_client_order_id`, `pionex_orders_get_open_orders`, `pionex_orders_get_all_orders`, `pionex_orders_cancel_order`, `pionex_orders_get_fills`, `pionex_orders_cancel_all_orders`
41
41
  - **Bot / Futures Grid** (auth): `pionex_bot_get_futures_grid_order`, `pionex_bot_create_futures_grid_order`, `pionex_bot_adjust_futures_grid_params`, `pionex_bot_reduce_futures_grid_position`, `pionex_bot_cancel_futures_grid_order`
42
42
 
43
- For `pionex_bot_create_futures_grid_order`:
44
- - `keyId` is optional.
45
- - `exchange` defaults to `pionex.v2` if missing.
46
- - `quote` defaults to `USDT` if missing.
47
- - `base` is normalized to `<BASE>.PERP` when the suffix is missing.
48
- - If `buOrderData.top`/`bottom` are missing, defaults are computed from current market price (`+5%`/`-5%`).
49
- - `buOrderData.openPrice` is optional; if missing, it is not sent.
50
- - If `buOrderData.row` is missing, default is `10`.
51
- - If `buOrderData.grid_type` is missing, default is `arithmetic`.
52
- - If `buOrderData.leverage` is missing, default is `2`.
53
- - If `buOrderData.extraMargin` is missing, default is `"0"`.
43
+ ### `pionex_bot_create_futures_grid_order` (strict OpenAPI)
44
+
45
+ Source: [openapi_bot.yaml](https://github.com/pionex-official/pionex-open-api/blob/main/openapi_bot.yaml) `CreateFuturesGridRequest` / `CreateFuturesGridOrderData`.
46
+
47
+ Implementation (JSON Schema + runtime validation): `@pionex-ai/core` `schemas/futures-grid-create.ts` (exported as `createFuturesGridCreateToolInputSchema`, `parseAndValidateCreateFuturesGridBuOrderData`).
48
+
49
+ **Tool arguments = `CreateFuturesGridRequest` (+ internal `__dryRun` optional)**
50
+
51
+ | Field | Required | OpenAPI |
52
+ |-------|----------|---------|
53
+ | `base` | yes | yes |
54
+ | `quote` | yes | yes |
55
+ | `buOrderData` | yes | yes |
56
+ | `copyFrom` | no | no |
57
+ | `copyType` | no | no |
58
+ | `copyBotOrderId` | no | no |
59
+ | `__dryRun` | no | internal (CLI): preview body without POST |
60
+
61
+ **`buOrderData` = `CreateFuturesGridOrderData` — only these keys allowed** (`additionalProperties: false` in schema; unknown keys rejected at runtime).
62
+
63
+ **Required in `buOrderData`:** `top`, `bottom`, `row`, `grid_type`, `trend`, `leverage`, `quoteInvestment`
64
+
65
+ **Optional in `buOrderData` (if present, types must match YAML):**
66
+ `extraMargin`, `condition`, `conditionDirection`, `lossStopType`, `lossStop`, `lossStopDelay`, `profitStopType`, `profitStop`, `profitStopDelay`, `lossStopHigh`, `shareRatio`, `investCoin`, `investmentFrom`, `uiInvestCoin`, `lossStopLimitPrice`, `lossStopLimitHighPrice`, `profitStopLimitPrice`, `slippage`, `bonusId`, `uiExtraData`, `movingIndicatorType`, `movingIndicatorInterval`, `movingIndicatorParam`, `movingTrailingUpParam`, `cateType`, `movingTop`, `movingBottom`, `enableFollowClosed`
67
+
68
+ **Not in create schema:** `openPrice`, `keyId` are ignored if provided inside `buOrderData`. Unknown keys are rejected.
69
+
70
+ **Handler:** `base` is normalized to `*.PERP` when the futures suffix is missing.
71
+
72
+ Docs: [Futures Grid API](https://www.pionex.com/docs/api-docs/bot-api/futures-grid)