ctrader-mcp-servers
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTop-5 critical quirks (inline teaser)
五大关键特性(内联提要)
The following 5 quirks are the most consequential as of the audit date. Full Detect / Workaround / Verify-fixed / Removal-criteria content lives in ; the rows below are link-only teasers. See also for the named recovery patterns.
references/known-quirks.mdreferences/self-healing-playbook.md| Quirk | Server | One-liner | Link |
|---|---|---|---|
| Q-R10 | remote | | Q-R10 |
| Q-R4 | remote | MARKET REJECTS absolute SL/TP — use | Q-R4 |
| Q-R1 | remote | | Q-R1 |
| Q-L2 | local | SL is absolute price, TP is raw pips (asymmetric | Q-L2 |
| Q-K19 | both | Pipettes vs display foot-gun — silent market fills | Q-K19 |
以下5个特性是截至审计日期影响最重大的。完整的检测/解决方案/验证修复/移除标准内容请查看;下方表格仅为带链接的提要。有关指定恢复模式,另请参阅。
references/known-quirks.mdreferences/self-healing-playbook.md| 特性 | 服务器类型 | 一句话描述 | 链接 |
|---|---|---|---|
| Q-R10 | 远程 | 调用 | Q-R10 |
| Q-R4 | 远程 | 市价单拒绝绝对止损/止盈(SL/TP)——请使用 | Q-R4 |
| Q-R1 | 远程 | | Q-R1 |
| Q-L2 | 本地 | 止损为绝对价格,止盈为原始点数( | Q-L2 |
| Q-K19 | 两者 | 点差小数位与显示风险——无提示的市价成交 | Q-K19 |
Self-healing principle
自愈原则
Both and ship as-is with documented runtime behaviors last re-verified on 2026-05-14 against (Remote) and local build observed-on 2026-05-14 (Local). Six Remote quirks remain ACTIVE on 1.0.18 (Q-R1, Q-R2, Q-R3, Q-R5, Q-R8, Q-R10). Two quirks had their error-message format refined (Q-R4 and Q-R7 now return plain-string error envelopes with actionable hints instead of JSON envelopes — both DETECT signatures cover both formats). One quirk is likely fixed (Q-R11 — propagation lag — passed Verify-fixed on session 1 of 5; not yet removed pending 4 more confirmations). This skill describes SEMANTICS, GOTCHAS, and RECOVERY; the MCP JSON-Schema is the source of truth on SHAPE. Never duplicate schema content in this skill. Every claim about runtime behavior in this skill carries a build-stamp — either an header on a reference file, or an line on a quirk in .
ctrader-remote-mcpctrader-local-mcprest-proxy 1.0.18get_dealsas-of:Observed-on:references/known-quirks.mdEvery quirk in the ledger is self-deprecating: it carries a probe (a session-local check the agent can run) and a condition (the explicit signal that the server has been fixed and the entry should be deleted). When the server is fixed, delete the matching entry from — that is the entire cleanup cost. Optional follow-up: for any stale QUIRK breadcrumbs across the reference files and remove them.
Verify-fixedRemoval criteriareferences/known-quirks.mdgrepOn unexpected server behavior (anything deviating from BOTH the MCP JSON-Schema AND the ledger), do NOT improvise — follow . The playbook names the pre-flight gates (quote sanity, side-direction, SL/TP sidedness, volume-step, schema-fields-only, pipettes-vs-display detection, required-fields), the post-flight verification rules (re-read after every mutation; for Remote , always re-read to confirm BOTH SL and TP legs survived per Q-R10), the error-classification matrix (Zod / INVALID_REQUEST / 502 uProxy / plain-text Local / available:false / truncated / hasMore), the unknown-quirk decision tree (4 steps from STOP to provisional ledger entry), and the named patterns (P-AMEND-SAFE, P-REMOTE-MARKET-RELATIVE (preferred for MARKET+SL/TP), P-REMOTE-MARKET-2STEP (fallback for absolute-price SL/TP on MARKET), P-REMOTE-MARKET-RANGE, P-LOCAL-OLDEST-FIRST, P-REMOTE-HISTORY-CHUNK).
references/self-healing-playbook.mdamend_positionctrader-remote-mcpctrader-local-mcprest-proxy 1.0.18get_dealsas-of:references/known-quirks.mdObserved-on:分类账中的每个特性都具备自弃用机制:带有探测(Agent可运行的会话本地检查)和条件(服务器已修复且条目应删除的明确信号)。当服务器修复后,从中删除对应条目即可完成清理。可选后续操作:在所有参考文件中搜索过时的特性痕迹并移除。
Verify-fixedRemoval criteriareferences/known-quirks.md遇到意外的服务器行为(与MCP JSON-Schema和分类账均不符的情况),请勿自行处理——请遵循。该手册包含飞行前检查项(报价合理性、方向、SL/TP方向性、交易量步长、仅Schema字段、点差小数位与显示检测、必填字段)、飞行后验证规则(每次变更后重新读取;对于远程,务必重新读取以确认SL和TP持仓腿均按Q-R10要求保留)、错误分类矩阵(Zod / INVALID_REQUEST / 502 uProxy / 纯文本本地响应 / available:false / 截断 / hasMore)、未知特性决策树(从停止操作到临时分类账条目的4个步骤)以及指定模式(P-AMEND-SAFE、P-REMOTE-MARKET-RELATIVE(市价单+SL/TP的首选方案)、P-REMOTE-MARKET-2STEP(市价单绝对价格SL/TP的备选方案)、P-REMOTE-MARKET-RANGE、P-LOCAL-OLDEST-FIRST、P-REMOTE-HISTORY-CHUNK)。
references/self-healing-playbook.mdamend_positionPer-broker overlay extension point
经纪商专属覆盖扩展点
The skill's quirks ledger uses the prefix as a reserved slot for future per-broker overrides (lotSize divergences, symbol-naming variants, broker-specific SL/TP behaviors). A future overlay would carry these per-broker values without restructuring this skill. NOT shipped this iteration — added on demand when broker-specific divergences become a blocking class.
Q-B<n>assets/broker_overrides.example.json本技能的特性分类账使用前缀作为未来经纪商专属覆盖的预留位(如手数差异、命名变体、经纪商专属SL/TP行为)。未来的覆盖文件将承载这些经纪商专属值,无需重构本技能。当前版本未发布——仅当经纪商专属差异成为阻塞类问题时按需添加。
Q-B<n>assets/broker_overrides.example.jsonTool-surface routing: Local HTTP (ctrader-local-mcp
) vs Remote HTTP (ctrader-remote-mcp
)
ctrader-local-mcpctrader-remote-mcp工具面路由:本地HTTP(ctrader-local-mcp
)vs 远程HTTP(ctrader-remote-mcp
)
ctrader-local-mcpctrader-remote-mcpThe bound tool surface determines which cTrader MCP server is in front of you. Inspect tool names and response DTO shape to identify the family. Apply the routing rule below at the start of every cTrader-related interaction; cache the result for the session.
| Server family | Fingerprint to detect it | What it does best | Default routing rule |
|---|---|---|---|
Local HTTP ( | | Charts, drawings, indicators, watchlists, alerts, news, cBots, UI notifications, multi-account work. | Route here for any UI / visualization / cBot / chart-bound workflow. |
Remote HTTP ( | | Headless trading, broad symbol scans, trailing stop loss, | Route here when no chart / UI need exists. |
| Both surfaces bound | Both fingerprints visible. | Depends on the action. | Pick by capability: drawings / cBots / charts go to Local; trailing SL / |
绑定的工具面决定了你面对的是哪款cTrader MCP服务器。通过检查工具名称和响应DTO结构来识别服务器类型。在每次cTrader相关交互开始时应用以下路由规则,并在会话中缓存结果。
| 服务器类型 | 检测特征 | 擅长场景 | 默认路由规则 |
|---|---|---|---|
本地HTTP( | 包含 | 图表、绘图、指标、观察列表、警报、新闻、cBots、UI通知、多账户操作。 | 任何涉及UI/可视化/cBot/图表绑定的工作流均路由至此。 |
远程HTTP( | 包含 | 无界面交易、全品种扫描、追踪止损、 | 当不需要图表/UI时,路由至此。 |
| 同时绑定两个工具面 | 可见两种特征。 | 取决于具体操作。 | 根据能力选择:绘图/cBots/图表相关操作选本地;追踪止损/ |
Units conventions across the two servers
两款服务器的单位约定
The two servers encode the same trading concepts in different units and identifier types; passing Local values to Remote (or the reverse) silently produces wrong sizes, wrong prices, or schema rejections.
| Dimension | Local HTTP encoding | Remote HTTP encoding | Conversion script |
|---|---|---|---|
| Volume | Units (integer; for forex typically 1 lot = 100 000 units, but broker-dependent — always read | Cents (integer; 1 lot of forex = 10 000 000 cents). | |
| Price | Display value (e.g., | Pipettes (integer; divide by | |
| Money (balance, commission, swap, P&L) | Display value (e.g., | Integer in | |
| Timestamp | ISO 8601 with mandatory | Epoch milliseconds for | Passed through unchanged for Local; check field type for Remote. |
| Symbol identifier | String name ( | Integer | N/A (look up by ID) |
Stop loss / take profit on | Pip distance integer ( | Absolute price ( | |
两款服务器对相同交易概念的单位和标识符类型编码不同;将本地值传入远程(反之亦然)会无声地导致规模错误、价格错误或Schema拒绝。
| 维度 | 本地HTTP编码 | 远程HTTP编码 | 转换脚本 |
|---|---|---|---|
| 交易量 | 单位(整数;外汇通常1手=100 000单位,但取决于经纪商——务必读取 | 分(整数;1手外汇=10 000 000分)。 | |
| 价格 | 显示值(如 | 点差小数位(整数;除以 | |
| 资金(余额、佣金、隔夜利息、盈亏) | 显示值(如 | | |
| 时间戳 | ISO 8601格式且必须带有 | | 本地直接传递;远程需检查字段类型。 |
| 品种标识符 | 字符串名称( | 整数 | 无(通过ID查询) |
| 点数距离整数( | 绝对价格( | |
Stop loss and take profit: pip distance vs absolute price
止损与止盈:点数距离vs绝对价格
Order-placement tools take SL / TP as pip distance from entry; position-amendment tools take SL / TP as absolute price. The convention depends on which TOOL is called, not which server.
| Tool | Server | SL / TP form |
|---|---|---|
| Local | Pip distance ( |
| Local | Pip distance ( |
| Local | Absolute price ( |
| Remote | Absolute price ( |
| Remote | Absolute price ( |
| Remote | Absolute price ( |
| Both | N/A (no SL / TP parameter). |
When the user says "SL 30 pips below entry", convert to the form the target tool needs by running . Input: . Output: . The script handles both directions.
scripts/pip_math.py--pip-size <float> --digits <int> --reference-price <float> --pips <int>{"absolute_price": <float>, "pip_size_used": <float>}下单工具接受相对于入场价的点数距离作为SL/TP参数;持仓修改工具接受绝对价格作为SL/TP参数。约定取决于调用的工具,而非服务器类型。
| 工具 | 服务器类型 | SL/TP格式 |
|---|---|---|
| 本地 | 点数距离( |
| 本地 | 点数距离( |
| 本地 | 绝对价格( |
| 远程 | 绝对价格( |
| 远程 | 绝对价格( |
| 远程 | 绝对价格( |
| 两者 | 无(无SL/TP参数)。 |
当用户说"SL比入场价低30点"时,请运行转换为目标工具所需格式。输入:。输出:。该脚本支持双向转换。
scripts/pip_math.py--pip-size <float> --digits <int> --reference-price <float> --pips <int>{"absolute_price": <float>, "pip_size_used": <float>}Dynamic-leverage margin calculation
动态杠杆保证金计算
Brokers apply dynamic-leverage tiers: leverage falls as the exposure grows past tier upper bounds. Required margin is computed PER TIER and summed. Tier exposure volumes are stated in USD regardless of the traded symbol; the resulting margin in USD is then converted to the account currency.
Example. Account currency USD. Order: 1 000 000 EURUSD long @ 1.21345. Notional in USD = 1 000 000 × 1.21345 = 1 213 450 USD. Tier curve: 1:500 up to 1 000 000 USD, 1:200 from 1 000 000 to 5 000 000 USD, 1:100 above 5 000 000 USD. Margin = (1 000 000 / 500) + (213 450 / 200) = 2 000 + 1 067.25 = 3 067.25 USD.
Invoke to compute this for arbitrary tier curves. Input: . Output: . Convert the USD margin to the account currency with .
scripts/tiered_margin.py compute--volume-base-units <int> --quote-rate-usd <float> --tiers '[{"upper":1000000,"leverage":500},{"upper":5000000,"leverage":200},{"upper":null,"leverage":100}]'{"margin_usd": <float>, "per_tier_breakdown": [...]}scripts/conversion_rate.py compute-chain经纪商采用动态杠杆 tier:当持仓规模超过tier上限时,杠杆会下降。所需保证金按tier分别计算后求和。Tier持仓规模以美元为单位,无论交易品种为何;最终美元保证金再转换为账户货币。
示例。账户货币为美元。订单:1 000 000手EURUSD多单 @ 1.21345。美元名义价值 = 1 000 000 × 1.21345 = 1 213 450美元。Tier曲线:1:500(上限1 000 000美元)、1:200(1 000 000至5 000 000美元)、1:100(超过5 000 000美元)。保证金 = (1 000 000 / 500) + (213 450 / 200) = 2 000 + 1 067.25 = 3 067.25美元。
调用计算任意tier曲线的保证金。输入:。输出:。使用将美元保证金转换为账户货币。
scripts/tiered_margin.py compute--volume-base-units <int> --quote-rate-usd <float> --tiers '[{"upper":1000000,"leverage":500},{"upper":5000000,"leverage":200},{"upper":null,"leverage":100}]'{"margin_usd": <float>, "per_tier_breakdown": [...]}scripts/conversion_rate.py compute-chainCurrency conversion: quote currency vs account currency
货币转换:报价货币vs账户货币
When a symbol's quote currency differs from the account currency, every money figure returned by the server (commission, swap, realized P&L, pip value, margin) requires conversion through a chain of spot rates. Example chains: P&L on USDJPY for a EUR account requires JPY -> USD -> EUR (using USDJPY and EURUSD); P&L on AUDCAD for an NZD account requires CAD -> USD -> NZD or a direct AUD -> NZD chain. The cTrader backend builds the shortest available chain; replicate that logic locally with .
scripts/conversion_rate.pyInvoke to derive the rate. Input: . Output: . Fetch the quote map up front via for Local (one symbol per call) or for Remote (batched).
scripts/conversion_rate.py compute-chain--from-asset <CCY> --to-asset <CCY> --quotes '{"EURUSD":1.0850,"USDJPY":150.3,...}'{"rate": <float>, "chain": ["EURUSD","USDJPY",...], "warnings": [...]}get_spot_pricesget_spot_prices(symbolId:[...])当品种的报价货币与账户货币不同时,服务器返回的所有资金数据(佣金、隔夜利息、已实现盈亏、点值、保证金)都需要通过即期汇率链进行转换。示例链:EUR账户交易USDJPY的盈亏需要JPY -> USD -> EUR(使用USDJPY和EURUSD汇率);NZD账户交易AUDCAD的盈亏需要CAD -> USD -> NZD或直接AUD -> NZD链。cTrader后端会构建最短可用链;请使用在本地复现该逻辑。
scripts/conversion_rate.py调用获取转换汇率。输入:。输出:。提前通过本地(单次调用一个品种)或远程(批量调用)获取报价映射。
scripts/conversion_rate.py compute-chain--from-asset <CCY> --to-asset <CCY> --quotes '{"EURUSD":1.0850,"USDJPY":150.3,...}'{"rate": <float>, "chain": ["EURUSD","USDJPY",...], "warnings": [...]}get_spot_pricesget_spot_prices(symbolId:[...])Hedging vs netting accounts
对冲账户vs净额账户
Hedging accounts allow simultaneous long AND short positions on the same symbol (each gets its own ). Netting accounts collapse them: opening the opposite side automatically closes (or partially closes) the existing position to the net delta. Before placing the second leg of a hedge, read the existing position and the account's hedging mode (visible in and account-info responses); if the account is netting, "opening a hedge" is impossible — surface this to the user and propose either a stop-loss adjustment or a full close instead.
positionIdget_balance对冲账户允许同一品种同时持有多单和空单(各有独立)。净额账户会将其合并:开立反向仓位会自动平仓(或部分平仓)现有仓位以实现净delta。在开立对冲仓位前,请读取现有持仓和账户对冲模式(和账户信息响应中可见);如果是净额账户,"开立对冲仓位"是不可能的——请告知用户并建议调整止损或全部平仓。
positionIdget_balanceStop-out and margin level
强制平仓与保证金水平
Brokers force-close positions when margin level = (equity / used margin) × 100% falls to or below the stop-out level (commonly 50% or 30%, broker-set). Two policies exist: fair (closes the single position consuming the most margin) and smart (closes the smallest set of positions sufficient to restore margin level above the stop-out). Before sizing additional risk, read current equity and used margin; if drops below 2× the stop-out level, warn the user before proceeding.
(equity − required_new_margin) / used_margin_after_open × 100%当保证金水平 = (权益 / 已用保证金) × 100%降至或低于强制平仓水平(通常为50%或30%,由经纪商设定)时,经纪商会强制平仓。有两种策略:公平策略(平仓占用保证金最多的单个仓位)和智能策略(平仓最少数量的仓位以恢复保证金水平至强制平仓线以上)。在增加风险规模前,请读取当前权益和已用保证金;如果降至强制平仓水平的2倍以下,请先警告用户再继续操作。
(权益 − 新增所需保证金) / 开仓后已用保证金 × 100%Swap accrual timing
隔夜利息计息时间
Swap (overnight financing) accrues at broker server time rollover (commonly 23:59:59 server time). Many brokers triple-charge swap on Wednesday (the Wed -> Thu rollover absorbs the weekend value date for T+2 instruments like forex). When projecting swap over a holding period, multiply by 3 for any Wednesday in the window. Read swap and commission values directly from and responses (they are server-computed); do not re-derive them from rate tables.
get_positionsget_deals隔夜利息(隔夜融资)在经纪商服务器时间轧账时计息(通常为服务器时间23:59:59)。许多经纪商在周三收取三倍隔夜利息(周三至周四的轧账包含T+2工具如外汇的周末交割日价值)。当预测持仓期间的隔夜利息时,窗口内的每个周三都要乘以3。直接从和响应中读取隔夜利息和佣金(由服务器计算);请勿从费率表重新推导。
get_positionsget_dealsComposable trader workflows
可组合交易者工作流
Seven end-to-end trader workflows are described step-by-step in . W0 (session bootstrap) auto-runs once at session start; W1–W6 are dispatched by user-intent triggers. When the user request matches any trigger, read and follow the corresponding recipe — do not improvise from scratch.
references/trader-workflows.mdreferences/trader-workflows.md- W0 — Session bootstrap — auto-runs at session start; identifies server family, probes live build, caches symbol precision baseline from , resolves active account, and sets the idempotency-key prefix. No user trigger needed.
assets/symbol_precision_table.json - Position sizing by risk % — select this recipe when the user asks "how much to buy / sell", "size for N pips SL", "risk X% of my account on this trade", or any sentence combining a risk fraction with a stop-loss distance.
- Pre-trade briefing — select this recipe when the user asks "should I trade X", "give me a snapshot of X before I enter", "what does X look like right now", or combines symbol-details + price + recent history requests into one ask.
- Cost-of-trading comparison — select this recipe when the user asks "which is cheaper to trade, A or B", "compare spreads / commissions / swap across symbols", or ranks tradeable instruments by cost.
- Place + visualize a trade with risk/reward annotation — select this recipe when the user asks "place the trade and show it on the chart", "draw the R:R on EURUSD", and the Local HTTP server is bound (this workflow requires drawings).
- Multi-window historical backfill — select this recipe when the user asks for more bars than a single call returns (1000 cap on Local), e.g., "give me 5000 H1 candles of XAUUSD" or "show me the last year of D1".
get_trendbars - Safe flatten — select this recipe when the user asks "close everything", "cancel all my orders", "flatten my book", or any request to bulk-close pending orders and open positions on one or more symbols.
references/trader-workflows.mdreferences/trader-workflows.md- W0 — 会话引导 — 会话开始时自动运行;识别服务器类型、探测实时构建版本、从缓存品种精度基线、解析活跃账户并设置幂等键前缀。无需用户触发。
assets/symbol_precision_table.json - 按风险百分比计算仓位规模 — 当用户询问"买/卖多少"、"N点SL对应的仓位规模"、"用账户X%的资金做这笔交易"或任何将风险比例与止损距离结合的问题时,选择此流程。
- 交易前简报 — 当用户询问"我应该交易X吗"、"交易X前给我一份快照"、"X现在是什么情况"或同时请求品种详情+价格+近期历史数据时,选择此流程。
- 交易成本比较 — 当用户询问"交易A和B哪个更便宜"、"比较品种的点差/佣金/隔夜利息"或按成本对可交易品种排名时,选择此流程。
- 下单并可视化带风险/回报标注的交易 — 当用户询问"下单并在图表上显示"、"在EURUSD上绘制风险回报比"且已绑定本地HTTP服务器(此工作流需要绘图功能)时,选择此流程。
- 多窗口历史数据回填 — 当用户请求的K线数量超过单次调用上限(本地为1000条)时,选择此流程,例如"给我5000条XAUUSD的H1蜡烛图"或"显示去年的D1数据"。
get_trendbars - 安全平仓 — 当用户询问"平仓所有仓位"、"取消所有订单"、"清空我的持仓"或任何批量平仓挂单和持仓的请求时,选择此流程。
Server-specific reference files
服务器专属参考文件
When the bound tool surface includes Local HTTP tools (, , , , , , ), read for the Local capability map, encoding rules, pagination caps, identifier types, active-chart targeting, drawing-object anchor requirements, and the destructive-operations checklist.
pingget_accounts_listlist_chartslistChartIndicatorslistPluginsshow_notificationget_server_timereferences/local-http-server.mdWhen the bound tool surface includes Remote HTTP tools (, , integer -keyed tools, in responses), read for the Remote capability map, encoding rules, the 9-value enum, server-side validations, semantics, enum, and the cache-discipline rules for .
get_versionget_assetssymbolIdmoneyDigitsreferences/remote-http-server.mdperiodtimeInForcedealStatusget_symbolsWhen both surfaces are bound, read both files.
当绑定的工具面包含本地HTTP工具(、、、、、、)时,请阅读获取本地能力映射、编码规则、分页上限、标识符类型、活跃图表定位、绘图对象锚点要求和破坏性操作检查表。
pingget_accounts_listlist_chartslistChartIndicatorslistPluginsshow_notificationget_server_timereferences/local-http-server.md当绑定的工具面包含远程HTTP工具(、、以整数为键的工具、响应中的)时,请阅读获取远程能力映射、编码规则、9值枚举、服务器端验证、语义、枚举和缓存规则。
get_versionget_assetssymbolIdmoneyDigitsreferences/remote-http-server.mdperiodtimeInForcedealStatusget_symbols当同时绑定两个工具面时,请阅读两个文件。
Bundled scripts
捆绑脚本
Non-trivial computation lives in . Invoke a script whenever the math goes beyond a single multiplication or addition. Every script accepts CLI flags only (non-interactive), prints JSON to stdout, prints diagnostics to stderr, and documents itself via .
scripts/--help| Script | Purpose | Invocation pattern | Output shape |
|---|---|---|---|
| Convert between pip distance and absolute price (display values; operates on both servers' encoding once pipettes are decoded). | | |
| Compute order size from a risk-percent or risk-amount target, accounting for pip value and quote -> account-currency conversion. | | |
| Reproduce cTrader's dynamic-leverage margin formula across a tier curve. | | |
| Build the shortest spot-rate chain to convert between two currencies. | | |
| Convert between display lots and the wire encoding for each server (units / cents); convert between display money and | | |
复杂计算逻辑位于目录下。当计算超出单次乘法或加法时,请调用脚本。每个脚本仅接受CLI参数(非交互式)、向stdout输出JSON、向stderr输出诊断信息并通过提供文档。
scripts/--help| 脚本 | 用途 | 调用模式 | 输出格式 |
|---|---|---|---|
| 在点数距离和绝对价格(显示值;点差小数位解码后可用于两款服务器的编码)之间转换。 | | |
| 根据风险百分比或风险金额目标计算订单规模,考虑点值和报价货币到账户货币的转换。 | | |
| 复现cTrader基于tier曲线的动态杠杆保证金计算公式。 | | |
| 构建最短即期汇率链以实现两种货币之间的转换。 | | |
| 在显示手数与各服务器的编码(单位/分)之间转换;在显示资金与 | | |
Post-order validation loop
下单后验证循环
After any mutating call (, , , , , ), re-fetch the affected entity (, , or ) and verify that volume, side, entry price (for fills), SL, TP, and match the user's stated intent. If any value mismatches, identify the mismatch class:
place_*_ordercreate_orderamend_orderamend_positionclose_positioncancel_orderget_positionsget_pending_ordersget_position_detailsdealStatus- Encoding error -> re-run or
scripts/units_encoding.pyand retry with corrected inputs.scripts/pip_math.py - Broker rejection (/
dealStatus: REJECTED/INTERNALLY_REJECTED) -> surface the rejection reason from the server response to the user and stop.ERROR
Do not assume the order is filled just because the call returned without an exception.
完成任何变更调用(、、、、、)后,请重新获取受影响的实体(、或)并验证交易量、方向、入场价(针对成交单)、SL、TP和是否与用户意图匹配。如果任何值不匹配,请识别不匹配类型:
place_*_ordercreate_orderamend_orderamend_positionclose_positioncancel_orderget_positionsget_pending_ordersget_position_detailsdealStatus- 编码错误 -> 重新运行或
scripts/units_encoding.py并使用修正后的输入重试。scripts/pip_math.py - 经纪商拒绝(/
dealStatus: REJECTED/INTERNALLY_REJECTED) -> 将服务器响应中的拒绝原因告知用户并停止操作。ERROR
请勿仅因调用无异常返回就假设订单已成交。