Skip to main content
Glama
okx-wallet-H

hvip MCP Server

by okx-wallet-H

okx_preflight_check

Pre-validates order parameters including max open quantity, price limits, and contract size conversion before placing trades on OKX to prevent order rejections.

Instructions

[L:READ] CAT:[系统] | ## 功能:下单前一次性检查:最大可开数量、限价范围、合约张数换算、当前价格,避免下单后报错

场景:用于Agent下单前必调、验证用户输入的数量和价格是否合法、避免因参数错误被拒

关键词:下单预检, preflight, 下单前检查, 数量换算, 限价检查, 可开检查

参数:

- instId: 产品ID,如 BTC-USDT-SWAP。必填

- tdMode: 交易模式。cash=现货, cross=全仓, isolated=逐仓。必填

- sz: 用户想下单的数量。必填(币数,会自动换算为张数)

- px: 用户想下单的价格(选填,填了会检查是否在限价范围内)

- side: 买卖方向。buy=买入, sell=卖出。填了会查对应方向的最大可开

- ordType: 订单类型。填了会检查是否在限价范围内(限价单才需要)

鉴权:⚠️ 需要 API Key(只读)- 只查询不产生订单

风险:READ — 只读查询,Agent 可自动调用

返回量:微小 ~1KB

关联:本工具预检通过 → okx_place_order 下单 → okx_get_order 确认成交

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pxNo用户想下单的价格(选填)
szYes用户想下单的数量(币数,会自动换算)
sideNo买卖方向
instIdYes产品ID,如 BTC-USDT-SWAP。必填
tdModeYes交易模式。cash=现货, cross=全仓, isolated=逐仓
ordTypeNo订单类型
Behavior4/5

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

No annotations provided, but the description discloses read-only behavior ('只读查询'), authentication requirements (API Key with read-only), and that no orders are created. It also mentions return size (~1KB). Lacks explicit error conditions or rate limits, but given the read-only nature, this is sufficient.

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-structured with sections (功能, 场景, 参数, etc.) and uses front-loading with the [L:READ] tag. However, it is somewhat verbose with repeated '必填' and a keyword list that may not be necessary. Could be tightened without losing clarity.

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

Completeness3/5

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

Covers purpose, usage, params, auth, risk, and returns size. However, no output schema is provided, and the description does not specify the return format (e.g., success/failure indicators, error messages). For a preflight check tool, this is a notable gap as the agent needs to interpret the response to proceed.

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

Parameters5/5

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

Schema coverage is 100%, baseline 3. The description adds significant meaning beyond the schema: it gives examples (instId: BTC-USDT-SWAP), explains auto-conversion (sz), conditional checks (px limit, side max open, ordType limit range), and enum meanings (tdMode: cash/cross/isolated). This enrichment fully compensates for any schema brevity.

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?

The description clearly states it is a preflight check before placing an order, checking max open quantity, price limits, contract conversion, and current price. It provides keywords and explicitly names the workflow step (precheck -> place order -> confirm). This distinguishes it from other tools like okx_place_order and okx_order_precheck.

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

Usage Guidelines4/5

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

Explicitly states 'Agent下单前必调' (must call before placing order) and lists scenarios. It explains when parameters are checked (e.g., side for max open, px/ordType for limit price). However, it does not differentiate from the sibling tool okx_order_precheck, which appears to serve a similar purpose.

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

Install Server

Other Tools

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/okx-wallet-H/hvip-mcp'

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