Loading...
Loading...
Compare original and translation side by side
exchange-runtime-rules.mdexchange-runtime-rules.mdsell_amountsell_amountvalid_timestamp12cex_fc_list_fc_currency_pairssell_min_amountsell_max_amountbuy_min_amountbuy_max_amountcurrency_pairsell_currencybuy_currencycex_fc_preview_fc_order_v1sellMinAmountcex_fc_list_fc_orderscex_fc_get_fc_ordersell_currencybuy_currencysell_amountbuy_amountcreate_timeorder_idquote_id| Tool | Type | Description |
|---|---|---|
| Preview | One-to-one swap quote preview |
| Create | One-to-one swap order creation (requires |
| Preview | One-to-many swap quote preview |
| Create | One-to-many swap order creation |
| Preview | Many-to-one swap quote preview |
| Create | Many-to-one swap order creation |
| Query | List supported flash swap pairs and limits |
| Query | Query flash swap order history |
| Query | Query single flash swap order by ID |
sell_amountsell_amountvalid_timestamp12cex_fc_list_fc_currency_pairssell_min_amountsell_max_amountbuy_min_amountbuy_max_amountcurrency_pairsell_currencybuy_currencycex_fc_preview_fc_order_v1sellMinAmountcex_fc_list_fc_orderscex_fc_get_fc_ordersell_currencybuy_currencysell_amountbuy_amountcreate_timeorder_idquote_id| 工具 | 类型 | 描述 |
|---|---|---|
| 预览 | 一对一闪兑报价预览 |
| 创建 | 一对一闪兑订单创建(需要 |
| 预览 | 一对多闪兑报价预览 |
| 创建 | 一对多闪兑订单创建 |
| 预览 | 多对一闪兑报价预览 |
| 创建 | 多对一闪兑订单创建 |
| 查询 | 列出支持的闪兑交易对及限额 |
| 查询 | 查询闪兑订单历史 |
| 查询 | 通过ID查询单个闪兑订单 |
| User Intent | Mode | Preview Tool | Create Tool |
|---|---|---|---|
| Swap one coin for another (e.g. "sell 1 BTC for USDT") | one-to-one | | |
| One-click swap without separate confirmation (e.g. "directly swap 100 USDT to GT") | one-to-one-auto | | — |
| Buy multiple coins with one currency (e.g. "buy 1u BTC, 2u ETH") | one-to-many | | |
| Split one currency into multiple by ratio (e.g. "split 1000 USDT, half BTC half ETH") | one-to-many-split | | |
| Buy specific quantities of multiple coins (e.g. "buy 0.1 BTC and 1 ETH with USDT") | one-to-many-buy | | |
| Sell multiple coins into one currency (e.g. "sell 1 BTC, 2 ETH for USDT") | many-to-one | | |
| Consolidate all holdings of certain coins into one (e.g. "convert all my BTC, ETH, DOGE to USDT") | many-to-one-all | | |
| Preview-only for multi-currency (e.g. "how much GT can I get for my BTC and ETH?") | many-to-one-preview | | — |
| Query supported flash swap pairs | query | | — |
| Query flash swap order list | query | | — |
| Query single flash swap order by ID | query | | — |
| Verify latest order result (e.g. "did my swap succeed?") | verify-order | | — |
intentsell_assetbuy_assetsell_amountbuy_amount| 用户意图 | 模式 | 预览工具 | 创建工具 |
|---|---|---|---|
| 将一种币种兑换为另一种(例如“卖出1 BTC兑换为USDT”) | one-to-one | | |
| 无需单独确认的一键闪兑(例如“直接将100 USDT兑换为GT”) | one-to-one-auto | | — |
| 用一种货币购买多种币种(例如“买入1u BTC、2u ETH”) | one-to-many | | |
| 按比例将一种货币拆分兑换为多种(例如“将1000 USDT拆分,一半BTC一半ETH”) | one-to-many-split | | |
| 购买指定数量的多种币种(例如“用USDT买入0.1 BTC和1 ETH”) | one-to-many-buy | | |
| 将多种币种卖出兑换为一种货币(例如“卖出1 BTC、2 ETH兑换为USDT”) | many-to-one | | |
| 将持有的特定币种全部整合为一种(例如“将我所有的BTC、ETH、DOGE转换为USDT”) | many-to-one-all | | |
| 仅预览多币种兑换结果(例如“我的BTC和ETH能兑换多少GT?”) | many-to-one-preview | | — |
| 查询支持的闪兑交易对 | query | | — |
| 查询闪兑订单列表 | query | | — |
| 通过ID查询单个闪兑订单 | query | | — |
| 验证最新订单结果(例如“我的闪兑成功了吗?”) | verify-order | | — |
intentsell_assetbuy_assetsell_amountbuy_amountcex_fc_list_fc_currency_pairscurrencysell_min_amountsell_max_amountbuy_min_amountbuy_max_amountsell_amountsell_min_amountsell_amountsell_max_amountcex_fc_list_fc_currency_pairscurrencysell_min_amountsell_max_amountbuy_min_amountbuy_max_amountsell_amountsell_min_amountsell_amountsell_max_amountcex_fc_preview_fc_order_v1sell_assetbuy_assetsell_amountsell_amountbuy_amountbuy_amountsell_amountbuy_amountquote_idsell_assetsell_amountbuy_assetbuy_amountpricevalid_timestampcex_fc_preview_fc_order_v1sell_assetbuy_assetsell_amountsell_amountbuy_amountbuy_amountsell_amountbuy_amountquote_idsell_assetsell_amountbuy_assetbuy_amountpricevalid_timestampcode == 0quote_idcode != 0quote_idcex_fc_create_fc_order_v1quote_idsell_assetsell_amountbuy_assetbuy_amountidstatus12sell_assetsell_amountbuy_assetbuy_amountpricecreate_timeerror.codeerror.messagestatusstatus == 1buy_amountstatus == 2error.code != 0code == 0quote_idquote_idcex_fc_create_fc_order_v1quote_idsell_assetsell_amountbuy_assetbuy_amountidstatus12sell_assetsell_amountbuy_assetbuy_amountpricecreate_timeerror.codeerror.messagestatusstatus == 1buy_amountstatus == 2error.code != 0sell_amountbuy_amountbuy_amountsell_amountcex_fc_preview_fc_multi_currency_one_to_many_orderparamssell_assetsell_amountbuy_assetbuy_amountorders[]quote_idsell_amountbuy_amountpriceerrortotal_consume_amounterror.codesell_amountbuy_amountbuy_amountcex_fc_preview_fc_multi_currency_one_to_many_orderparamssell_assetsell_amountbuy_assetbuy_amountsell_amountorders[]quote_idsell_amountbuy_amountpriceerrortotal_consume_amounterror.codeerror.code != 0quote_idcex_fc_create_fc_multi_currency_one_to_many_orderparamssell_assetsell_amountbuy_assetbuy_amountquote_idorders[]idstatuserrortotal_consume_amounterror.codeerror.code != 0quote_idcex_fc_create_fc_multi_currency_one_to_many_orderparamssell_assetsell_amountbuy_assetbuy_amountquote_idorders[]idstatuserrortotal_consume_amounterror.codesell_min_amountcex_fc_list_fc_currency_pairscex_fc_preview_fc_multi_currency_many_to_one_orderparamssell_assetsell_amountbuy_assetbuy_amountorders[]quote_idsell_amountbuy_amountpriceerrortotal_acquire_amounterror.codebuy_amountcex_fc_list_fc_currency_pairssell_min_amountcex_fc_preview_fc_multi_currency_many_to_one_orderparamssell_assetsell_amountbuy_assetbuy_amountsell_amountorders[]quote_idsell_amountbuy_amountpriceerrortotal_acquire_amounterror.codebuy_amountbuy_amount: "0"code: 4cex_fc_create_fc_multi_currency_many_to_one_orderparamssell_assetsell_amountbuy_assetbuy_amountquote_idorders[]idstatuserrortotal_acquire_amountbuy_amount: "0"code: 4cex_fc_create_fc_multi_currency_many_to_one_orderparamssell_assetsell_amountbuy_assetbuy_amountquote_idorders[]idstatuserrortotal_acquire_amountcex_fc_list_fc_currency_pairscurrencylimitpageitems[]currency_pairsell_currencybuy_currencysell_min_amountsell_max_amountbuy_min_amountbuy_max_amountcex_fc_list_fc_currency_pairscurrencylimitpageitems[]currency_pairsell_currencybuy_currencysell_min_amountsell_max_amountbuy_min_amountbuy_max_amountstatus12cex_fc_list_fc_ordersstatus12sell_currencybuy_currencylimitpagereversetrueidsell_currencybuy_currencysell_amountbuy_amountpricestatuscreate_timestatus12cex_fc_list_fc_ordersstatus12sell_currencybuy_currencylimitpagereversetrueidsell_currencybuy_currencysell_amountbuy_amountpricestatuscreate_timecex_fc_get_fc_orderorder_idstatusstatus == 1buy_amountstatus == 2idsell_currencybuy_currencysell_amountbuy_amountpricestatuscreate_timecex_fc_get_fc_orderorder_idstatusstatus == 1buy_amountstatus == 2idsell_currencybuy_currencysell_amountbuy_amountpricestatuscreate_time| Error Scenario | Handling |
|---|---|
| Region/compliance restriction (code -2) | CRITICAL: The API returns |
| Preview failed (any non-zero code) | CRITICAL: If the preview API returns any |
| Amount below minimum (sell_amount < sell_min_amount) | Query |
| Amount above maximum (sell_amount > sell_max_amount) | Inform the user the amount exceeds the maximum allowed, show the limit |
| Quote expired (code 1052) | The |
| Unable to get accurate quote (code 4 / 400001 / 400007) | These are quote-related errors from the server. |
| Multi-currency create: entire request rejected (code 4) | Likely caused by including a preview-failed item with |
| Order status == 2 (failed) | Inform the user the swap failed. Suggest re-previewing with adjusted parameters and trying again |
| Order not found (404) | The |
| MCP service connection failure | Prompt user to check network or VPN, suggest retrying later |
| order_id not provided | Prompt user to provide an order ID, or use the order list query first |
| Empty query results | Inform user no data was found, suggest adjusting filters |
| Currency not supported | Inform user that the specified currency is not available for flash swap |
| Invalid status value | Status only accepts |
| Large result set (thousands of rows) | Summarize total count, show sample of 20, suggest filtering by currency |
| Balance below minimum for many_to_one_all | When consolidating all holdings, skip currencies whose balance < sell_min_amount and inform the user which were excluded |
| 错误场景 | 处理方式 |
|---|---|
| 区域/合规限制(code -2) | 严重: API返回 |
| 预览失败(任何非0 code) | 严重: 如果预览API返回任何 |
| 金额低于最小值(sell_amount < sell_min_amount) | 先调用 |
| 金额超过最大值(sell_amount > sell_max_amount) | 告知用户金额超过允许的最大值,展示限额 |
| 报价过期(code 1052) | |
| 无法获取准确报价(code 4 / 400001 / 400007) | 这些是服务器返回的报价相关错误。 |
| 多币种创建请求被整体拒绝(code 4) | 可能因包含预览失败的项目(例如 |
| 订单状态 == 2(失败) | 告知用户闪兑失败,建议调整参数后重新预览并尝试 |
| 订单未找到(404) | |
| MCP服务连接失败 | 提示用户检查网络或VPN,建议稍后重试 |
| 未提供order_id | 提示用户提供订单ID,或先查询订单列表 |
| 查询结果为空 | 告知用户未找到数据,建议调整过滤条件 |
| 币种不支持 | 告知用户指定币种不支持闪兑 |
| 无效的status值 | status仅接受 |
| 大数据集(数千条结果) | 汇总总数,展示20个示例,建议用户按币种过滤 |
| many_to_one_all模式下余额低于最小值 | 整合所有持仓时,跳过余额 < sell_min_amount的币种,并告知用户哪些币种被排除 |
one_to_one_autoerror.code == 0valid_timestampone_to_one_autoerror.code == 0valid_timestamp| Condition | Action | Tool |
|---|---|---|
| User wants to swap one coin for another | Preview one-to-one, then create after confirmation | |
| User says "directly" or "one-click" swap | Preview + create automatically without separate confirmation | |
| User references a previous quote_id for confirmation | Create order using the referenced quote_id | |
| Swap amount is suspiciously small | Pre-validate against pair min amount before preview | |
| User wants to buy multiple coins with one currency | Preview one-to-many, then create | |
| User wants to split one currency by ratio (e.g. "half and half") | Calculate per-target sell_amount, then preview one-to-many | |
| User specifies buy quantities (e.g. "buy 0.1 BTC and 1 ETH") | Use buy_amount in params, preview one-to-many | |
| User wants to sell multiple coins into one currency | Preview many-to-one, then create | |
| User wants to consolidate "all" of certain holdings | Query balances, filter by min amounts, preview many-to-one, then create | |
| User asks "how much can I get" without wanting to execute | Preview-only many-to-one, sum buy_amounts, do NOT create | |
Preview returns items with | Warn user, exclude failed items before creating | — |
| Preview returns code -2 (region restriction) | STOP immediately. Do NOT create. Inform user flash swap is not available in their region | — |
| Preview returns any non-zero code | STOP. Do NOT create. Do NOT fabricate quote_id. Report exact error to user | — |
| Create returns code 1052 (quote expired) | Re-run preview to get fresh quote | Preview tool |
| Create returns per-item error (400001/400007) | Report which items failed, suggest adjusting amounts | — |
| Multi-currency create rejected with code 4 | Remove failed preview items and retry | Create tool |
| Order status == 2 after create | Inform user swap failed, suggest retrying | — |
| User asks "did my swap succeed?" | Query order by ID, check status field | |
| User asks about supported pairs or limits | Query pair list | |
| User queries order history | Query order list | |
| User queries specific order by ID | Query single order | |
| Order not found (404) | Inform user, suggest checking ID | — |
| User provides invalid status filter | Reject and inform valid values are 1 or 2 | — |
| 条件 | 操作 | 工具 |
|---|---|---|
| 用户想要将一种币种兑换为另一种 | 预览一对一闪兑,用户确认后创建 | |
| 用户要求“直接”或“一键”闪兑 | 预览后自动创建,无需单独确认 | |
| 用户引用之前的quote_id进行确认 | 使用该quote_id创建订单 | |
| 闪兑金额异常小 | 预览前先通过交易对查询验证金额 | |
| 用户想用一种货币购买多种币种 | 预览一对多闪兑,用户确认后创建 | |
| 用户要求按比例拆分兑换(例如“各一半”) | 计算每个目标币种的sell_amount,然后预览一对多闪兑 | |
| 用户指定买入数量(例如“买入0.1 BTC和1 ETH”) | 在参数中使用buy_amount,预览一对多闪兑 | |
| 用户想要将多种币种卖出兑换为一种 | 预览多对一闪兑,用户确认后创建 | |
| 用户想要将特定币种的所有持仓整合为一种 | 查询余额,过滤低于最小值的币种,预览多对一闪兑,用户确认后创建 | |
| 用户询问“能兑换多少”但不想执行 | 仅预览多对一闪兑,汇总buy_amount,不创建 | |
| 预览返回error.code != 0的项目 | 提醒用户,创建时排除失败项目 | — |
| 预览返回code -2(区域限制) | 立即停止。不执行创建。告知用户所在区域不支持闪兑 | — |
| 预览返回任何非0 code | 停止操作。不执行创建。不伪造quote_id。向用户报告确切错误 | — |
| 创建返回code 1052(报价过期) | 重新预览获取新报价 | 预览工具 |
| 创建返回项目级错误(400001/400007) | 报告哪些项目失败,建议调整金额 | — |
| 多币种创建被code 4拒绝 | 移除预览失败的项目后重试 | 创建工具 |
| 创建后订单状态 == 2 | 告知用户闪兑失败,建议重试 | — |
| 用户询问“我的闪兑成功了吗?” | 通过ID查询订单,检查状态字段 | |
| 用户询问支持的交易对或限额 | 查询交易对列表 | |
| 用户查询订单历史 | 查询订单列表 | |
| 用户通过ID查询特定订单 | 查询单个订单 | |
| 订单未找到(404) | 告知用户,建议检查ID | — |
| 用户提供无效的status过滤条件 | 拒绝并告知有效值为1或2 | — |
{timestamp}YYYY-MM-DD HH:mm:ss UTC{timestamp}YYYY-MM-DD HH:mm:ss UTCundefinedundefined| Sell | Amount | Buy | Amount | Rate |
|---|---|---|---|---|
| {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {price} |
undefined| 卖出币种 | 金额 | 买入币种 | 金额 | 汇率 |
|---|---|---|---|---|
| {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {price} |
undefinedundefinedundefined| Sell | Amount | Buy | Amount | Rate |
|---|---|---|---|---|
| {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {price} |
undefined| 卖出币种 | 金额 | 买入币种 | 金额 | 汇率 |
|---|---|---|---|---|
| {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {price} |
undefinedundefinedundefined| # | Sell | Sell Amount | Buy | Buy Amount | Rate | Quote ID | Status |
|---|---|---|---|---|---|---|---|
| {n} | {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {price} | {quote_id} | {status} |
undefined| 序号 | 卖出币种 | 卖出金额 | 买入币种 | 买入金额 | 汇率 | 报价ID | 状态 |
|---|---|---|---|---|---|---|---|
| {n} | {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {price} | {quote_id} | {status} |
undefinedundefinedundefined| # | Order ID | Sell | Sell Amount | Buy | Buy Amount | Status | Error |
|---|---|---|---|---|---|---|---|
| {n} | {id} | {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {status_text} | {error_message} |
undefined| 序号 | 订单ID | 卖出币种 | 卖出金额 | 买入币种 | 买入金额 | 状态 | 错误信息 |
|---|---|---|---|---|---|---|---|
| {n} | {id} | {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {status_text} | {error_message} |
undefinedundefinedundefined| Pair | Sell Currency | Buy Currency | Sell Min | Sell Max |
|---|---|---|---|---|
| {currency_pair} | {sell_currency} | {buy_currency} | {sell_min_amount} | {sell_max_amount} |
undefined| 交易对 | 卖出币种 | 买入币种 | 最小卖出金额 | 最大卖出金额 |
|---|---|---|---|---|
| {currency_pair} | {sell_currency} | {buy_currency} | {sell_min_amount} | {sell_max_amount} |
undefinedundefinedundefined| Order ID | Sell | Sell Amount | Buy | Buy Amount | Status | Created At |
|---|---|---|---|---|---|---|
| {id} | {sell_currency} | {sell_amount} | {buy_currency} | {buy_amount} | {status_text} | {create_time} |
undefined| 订单ID | 卖出币种 | 卖出金额 | 买入币种 | 买入金额 | 状态 | 创建时间 |
|---|---|---|---|---|---|---|
| {id} | {sell_currency} | {sell_amount} | {buy_currency} | {buy_amount} | {status_text} | {create_time} |
undefinedundefinedundefined| Field | Value |
|---|---|
| Order ID | {id} |
| Sell Currency | {sell_currency} |
| Sell Amount | {sell_amount} |
| Buy Currency | {buy_currency} |
| Buy Amount | {buy_amount} |
| Exchange Rate | {price} |
| Status | {status_text} |
| Created At | {create_time} |
undefined| 字段 | 值 |
|---|---|
| 订单ID | {id} |
| 卖出币种 | {sell_currency} |
| 卖出金额 | {sell_amount} |
| 买入币种 | {buy_currency} |
| 买入金额 | {buy_amount} |
| 兑换汇率 | {price} |
| 状态 | {status_text} |
| 创建时间 | {create_time} |
undefined