gate-exchange-collateralloan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGate Exchange Multi-Collateral Loan Skill
Gate交易所多抵押借贷Skill
Provide multi-collateral loan operations on Gate: create current (flexible) or fixed-term loan orders, repay (partial/full), add collateral (append), and redeem collateral. All write operations require explicit user confirmation before submit.
提供Gate平台上的多抵押借贷操作:创建活期(灵活)或定期借贷订单、还款(部分/全额)、追加抵押品(补充)和赎回抵押品。所有写入操作在提交前均需用户明确确认。
Trigger Conditions
触发条件
This skill activates when the user asks about multi-collateral loan operations. Classify intent via Routing Rules (Cases 1–7). Trigger phrases include: "collateral loan", "current loan", "fixed loan", "repay", "add collateral", "redeem collateral", or equivalent in other languages.
当用户询问多抵押借贷操作时,激活此Skill。通过路由规则(案例1–7)分类意图。触发短语包括:“抵押借贷”、“活期借贷”、“定期借贷”、“还款”、“追加抵押品”、“赎回抵押品”或其他语言的等效表达。
Workflow
工作流
Step 1: Classify intent
步骤1:分类意图
Identify the user intent using Routing Rules (Cases 1–7). If required inputs are missing (order_id, currency, amount, fixed term), ask clarifying questions before proceeding.
使用路由规则(案例1–7)识别用户意图。若缺少必填输入(order_id、币种、金额、定期期限),需先询问澄清问题再继续。
Step 2: Read-only requests (rates, LTV, quota, orders)
步骤2:只读请求(利率、LTV、额度、订单)
Call the corresponding MCP tool when the user asks for rates, LTV, quota, order list, or order detail.
Call with:
cex_mcl_list_user_currency_quota- :
typeorcollateralborrow - : comma-separated (borrow: single currency)
currency
Call with:
cex_mcl_get_multi_collateral_ltv- (no params)
Call with:
cex_mcl_get_multi_collateral_fix_rate- (no params)
Call with:
cex_mcl_get_multi_collateral_current_rate- : comma-separated currency list
currencies
Call with:
cex_mcl_list_multi_collateral_orders- ,
page(optional)limit - (optional):
sort,time_desc,ltv_ascltv_desc - (optional):
order_typeorcurrentfixed
Call with:
cex_mcl_get_multi_collateral_order_detailorder_id
Key data to extract:
- LTV thresholds, fixed/current rates, quota rows, order_id, order status, collateral and borrow details
当用户询问利率、LTV、额度、订单列表或订单详情时,调用对应的MCP工具。
调用,参数:
cex_mcl_list_user_currency_quota- :
type或collateralborrow - : 逗号分隔(借款:单一币种)
currency
调用,参数:
cex_mcl_get_multi_collateral_ltv- 无参数
调用,参数:
cex_mcl_get_multi_collateral_fix_rate- 无参数
调用,参数:
cex_mcl_get_multi_collateral_current_rate- : 逗号分隔的币种列表
currencies
调用,参数:
cex_mcl_list_multi_collateral_orders- ,
page(可选)limit - (可选):
sort,time_desc,ltv_ascltv_desc - (可选):
order_type或currentfixed
调用,参数:
cex_mcl_get_multi_collateral_order_detailorder_id
需提取的关键数据:
- LTV阈值、定期/活期利率、额度信息、order_id、订单状态、抵押品与借款详情
Step 3: Create loan (current or fixed)
步骤3:创建借贷订单(活期或定期)
If current loan:
- Build draft (collateral list + borrow currency/amount).
- Ask for confirmation.
- Call with
cex_mcl_create_multi_collateral: JSON string (borrow_currency, borrow_amount, collateral_currencies, order_type: current).order
If fixed loan:
- Call (returns a list); filter by borrow_currency; take
cex_mcl_get_multi_collateral_fix_rateorrate_7das fixed_rate (hourly rate; pass through unchanged, do not convert or relabel as annual/daily).rate_30d - Build draft with fixed_type and fixed_rate (describe to user as hourly rate if showing).
- Ask for confirmation.
- Call with
cex_mcl_create_multi_collateral: JSON including order_type: fixed, fixed_typeorder/7d, fixed_rate.30d
若为活期借贷:
- 生成草稿(抵押品列表 + 借款币种/金额)。
- 请求用户确认。
- 调用,参数**
cex_mcl_create_multi_collateral**: JSON字符串(包含borrow_currency、borrow_amount、collateral_currencies、order_type: current)。order
若为定期借贷:
- 调用(返回列表);按借款币种过滤;选取
cex_mcl_get_multi_collateral_fix_rate或rate_7d作为fixed_rate(小时利率;直接传递,请勿转换或标记为年化/日利率)。rate_30d - 生成包含fixed_type和fixed_rate的草稿(若展示给用户,需说明为小时利率)。
- 请求用户确认。
- 调用,参数**
cex_mcl_create_multi_collateral**: JSON字符串(包含order_type: fixed、fixed_typeorder/7d、fixed_rate)。30d
Step 4: Repay
步骤4:还款
Build draft, ask confirmation, then call with:
cex_mcl_repay_multi_collateral_loan- : JSON string with
repay_loanandorder_id[{ currency, amount, repaid_all }]repay_items
生成草稿,请求用户确认后,调用,参数:
cex_mcl_repay_multi_collateral_loan- : JSON字符串,包含
repay_loan和order_id[{ currency, amount, repaid_all }]repay_items
Step 5: Add or redeem collateral
步骤5:追加或赎回抵押品
Build draft, ask confirmation, then call with:
cex_mcl_operate_multi_collateral- : JSON string with
collateral_adjust,order_id(type|append),redeem[{ currency, amount }]collaterals
生成草稿,请求用户确认后,调用,参数:
cex_mcl_operate_multi_collateral- : JSON字符串,包含
collateral_adjust、order_id(type|append)、redeem[{ currency, amount }]collaterals
Judgment Logic Summary
判断逻辑总结
- Determine case by keywords and required inputs (loan create / repay / add / redeem / list).
- Fixed loan requires fix_rate lookup; if not available, stop and inform user.
- All write operations must be confirmed before calling MCP.
- Auth failure (401/403) prompts API key configuration.
- 根据关键词和必填输入判断场景(创建借贷/还款/追加/赎回/查询订单)。
- 定期借贷需查询fix_rate;若无法获取,终止操作并告知用户。
- 所有写入操作在调用MCP前必须获得用户确认。
- 认证失败(401/403)时,提示用户配置API密钥。
Report Template
报告模板
When asking for confirmation:
Draft:
- Type: {current|fixed|repay|append|redeem}
- Order ID: {order_id if applicable}
- Borrow: {borrow_amount} {borrow_currency}
- Collateral: {collateral_amounts}
- Fixed term/rate: {fixed_type} / {fixed_rate} (hourly rate)
Please confirm to proceed.
On success:
- Summary of action and key identifiers (order_id, amounts).
On failure:
- Error message and next-step guidance (e.g., check currency/amount/LTV).
请求确认时:
草稿:
- 类型:{current|fixed|repay|append|redeem}
- 订单ID:{order_id(若适用)}
- 借款:{borrow_amount} {borrow_currency}
- 抵押品:{collateral_amounts}
- 定期期限/利率:{fixed_type} / {fixed_rate}(小时利率)
请确认是否继续。
操作成功时:
- 操作摘要及关键标识(order_id、金额等)。
操作失败时:
- 错误信息及下一步指引(如检查币种/金额/LTV)。
Prerequisites
前提条件
- MCP Dependency: Requires gate-mcp to be installed.
- Authentication: Order list, detail, repay, collateral, quota, and records require API key; LTV, fix rate, and current rate are public without key.
- Disclaimer: Loan and LTV information is for reference only and does not constitute investment advice. Understand product terms and liquidation risk before borrowing.
- MCP依赖:需安装gate-mcp。
- 认证:订单列表、详情、还款、抵押品、额度及记录查询需API密钥;LTV、定期利率、活期利率为公开数据,无需密钥。
- 免责声明:借贷及LTV信息仅供参考,不构成投资建议。借款前请充分了解产品条款及清算风险。
Available MCP Tools
可用MCP工具
| Tool | Auth | Description | Reference |
|---|---|---|---|
| No | 7d/30d fixed rates (list) | |
| No | LTV thresholds | |
| No | Current rates | |
| Yes | Borrow/collateral quota | |
| Yes | Create loan ( | |
| Yes | List orders | |
| Yes | Order detail | |
| Yes | Repay ( | |
| Yes | Add/redeem collateral ( | |
| Yes | Repay history | |
| Yes | Collateral history | |
| 工具 | 需认证 | 描述 | 参考 |
|---|---|---|---|
| 否 | 7天/30天定期利率(列表) | |
| 否 | LTV阈值 | |
| 否 | 活期利率 | |
| 是 | 借款/抵押品额度 | |
| 是 | 创建借贷订单( | |
| 是 | 查询订单列表 | |
| 是 | 查询订单详情 | |
| 是 | 还款( | |
| 是 | 追加/赎回抵押品( | |
| 是 | 查询还款记录 | |
| 是 | 查询抵押品操作记录 | |
Routing Rules
路由规则
| Case | User Intent | Signal Keywords | Action |
|---|---|---|---|
| 1 | Create current loan | "current loan", "pledge … borrow … (current)" | See |
| 2 | Create fixed loan | "fixed loan", "borrow … for 7/30 days" | See |
| 3 | Repay | "repay", "repay order …" | See |
| 4 | Add collateral | "add collateral", "add margin" | See |
| 5 | Redeem collateral | "redeem collateral", "reduce margin" | See |
| 6 | List orders / order detail | "loan orders", "order detail", "my orders" | |
| 7 | Auth failure (401/403) | MCP returns 401/403 | Do not expose keys; prompt user to configure Gate CEX API Key (multi-collateral loan). |
| 案例 | 用户意图 | 触发关键词 | 操作 |
|---|---|---|---|
| 1 | 创建活期借贷订单 | "活期借贷"、"质押…借款…(活期)" | 参见 |
| 2 | 创建定期借贷订单 | "定期借贷"、"借款…7/30天" | 参见 |
| 3 | 还款 | "还款"、"还款订单…" | 参见 |
| 4 | 追加抵押品 | "追加抵押品"、"增加保证金" | 参见 |
| 5 | 赎回抵押品 | "赎回抵押品"、"减少保证金" | 参见 |
| 6 | 查询订单列表/详情 | "借贷订单"、"订单详情"、"我的订单" | 调用 |
| 7 | 认证失败(401/403) | MCP返回401/403 | 请勿暴露密钥;提示用户配置Gate CEX API Key(多抵押借贷权限)。 |
Execution
执行流程
- Identify user intent from the Routing Rules table above.
- For Cases 1–5: Read the corresponding scenario in and follow the Workflow (show order draft, then call MCP only after user confirmation).
references/scenarios.md - For Case 6: Call list or detail tool as needed; no confirmation required for read-only. Never show borrow_time, maturity, due date, operate_time, create_time, repay_time, Unix timestamps, or any other time-related fields in the reply—even if the user asks for dates/times; suggest checking the Gate app or web for timing details.
- For Case 7: Do not expose API keys or raw errors; prompt the user to set up Gate CEX API Key with multi-collateral loan permission in MCP.
- If the user's intent is ambiguous (e.g. missing order_id, currency, or amount), ask a clarifying question before routing.
- 根据上述路由规则识别用户意图。
- 对于案例1–5:阅读中的对应场景,遵循工作流(展示订单草稿,仅在用户确认后调用MCP)。
references/scenarios.md - 对于案例6:按需调用列表或详情工具;只读操作无需确认。绝对不要在回复中展示borrow_time、到期日、截止时间、operate_time、create_time、repay_time、Unix时间戳或任何其他时间相关字段——即使用户询问日期/时间;建议用户查看Gate App或网页获取时间详情。
- 对于案例7:请勿暴露API密钥或原始错误;提示用户在MCP中配置具有多抵押借贷权限的Gate CEX API Key。
- 若用户意图模糊(如缺少order_id、币种或金额),需先询问澄清问题再进行路由。
Domain Knowledge
领域知识
Core Concepts
核心概念
- Current loan: Flexible loan. Create via with
cex_mcl_create_multi_collateralJSON:order.order_type: current - Fixed loan: 7-day/30-day. JSON must include
order,order_type: fixed:fixed_typeor7d(lowercase),30d: hourly interest rate fromfixed_rate(usecex_mcl_get_multi_collateral_fix_rateorrate_7dfor that borrow_currency; pass as-is, do not describe as annual or daily rate). Missing fixed fields may yield INVALID_PARAM_VALUE.rate_30d - Repay: with
cex_mcl_repay_multi_collateral_loanJSON.repay_loan - Add collateral: ,
cex_mcl_operate_multi_collateralwithcollateral_adjust.type: append - Redeem collateral: same tool, .
type: redeem - LTV: — init_ltv, alert_ltv, liquidate_ltv.
cex_mcl_get_multi_collateral_ltv
- 活期借贷:灵活借贷。通过创建,
cex_mcl_create_multi_collateralJSON参数:order。order_type: current - 定期借贷:7天/30天期限。JSON必须包含
order、order_type: fixed:fixed_type或7d(小写)、30d: 来自fixed_rate的小时利率(选取对应借款币种的cex_mcl_get_multi_collateral_fix_rate或rate_7d;直接传递,请勿描述为年化或日利率)。缺少定期字段可能返回INVALID_PARAM_VALUE错误。rate_30d - 还款:调用,参数
cex_mcl_repay_multi_collateral_loanJSON。repay_loan - 追加抵押品:调用,
cex_mcl_operate_multi_collateral参数中collateral_adjust。type: append - 赎回抵押品:调用同一工具,。
type: redeem - LTV:调用—— 返回init_ltv、alert_ltv、liquidate_ltv。
cex_mcl_get_multi_collateral_ltv
Create Loan Flow (Case 1 & 2)
创建借贷订单流程(案例1 & 2)
- Parse collateral, borrow currency/amount; fixed: 7 days → 7d, 30 days → 30d.
- Current: Optionally or current rate tools. On confirm:
cex_mcl_list_user_currency_quotawithcex_mcl_create_multi_collateralJSON.order - Fixed: ; filter list by borrow_currency; on empty or no row, stop with user message; else set fixed_rate = rate_7d or rate_30d (hourly rate; pass as-is into order JSON; do not describe as annual or daily). On confirm:
cex_mcl_get_multi_collateral_fix_rateJSON with fixed fields.order
- 解析抵押品、借款币种/金额;定期借贷:7天 → 7d,30天 → 30d。
- 活期借贷:可选调用或活期利率工具。用户确认后:调用
cex_mcl_list_user_currency_quota,参数cex_mcl_create_multi_collateralJSON。order - 定期借贷:调用;按借款币种过滤列表;若为空或无匹配项,终止操作并告知用户;否则设置fixed_rate = rate_7d或rate_30d(小时利率;直接传入order JSON,请勿描述为年化或日利率)。用户确认后:传入包含定期字段的
cex_mcl_get_multi_collateral_fix_rateJSON。order
Repay Flow (Case 3)
还款流程(案例3)
- Parse order_id and repay amount (or full).
- Show draft; on confirm: with
cex_mcl_repay_multi_collateral_loanJSON.repay_loan
- 解析order_id和还款金额(或全额还款)。
- 展示草稿;用户确认后:调用,参数
cex_mcl_repay_multi_collateral_loanJSON。repay_loan
Add / Redeem Collateral Flow (Case 4 & 5)
追加/赎回抵押品流程(案例4 & 5)
- Parse order_id and collateral amount/currency.
- Show draft; on confirm: with
cex_mcl_operate_multi_collateralJSON.collateral_adjust
- 解析order_id和抵押品金额/币种。
- 展示草稿;用户确认后:调用,参数
cex_mcl_operate_multi_collateralJSON。collateral_adjust
Presentation — order list / order detail (Case 6)
展示规则 —— 订单列表/详情(案例6)
When the user asks to view my collateral loan orders or order detail:
- No time fields: Do not output any time or date information—omit every timestamp-style field from MCP (e.g. , maturity, due time,
borrow_time,operate_time,create_time, calendar dates, Unix seconds as dates). Do not paraphrase relative timing (e.g. "expires in 3 days") computed from those fields.repay_time - Allowed in reply: ,
order_id, borrow side (currency, principal/interest left), collateral side (currency, amount), current LTV if present, fixed_typestatus/7das term label only (no calendar dates).30d - If the user asks specifically for dates/maturity: Reply that timing is not shown here and they should open Gate (app/web) for full order schedule—still do not paste API time fields into chat.
当用户请求查看我的抵押借贷订单或订单详情时:
- 禁止时间字段:不得输出任何时间或日期信息——需省略MCP返回的所有时间戳类字段(如、到期日、截止时间、
borrow_time、operate_time、create_time、日历日期、Unix时间戳格式的日期)。不得基于这些字段转述相对时间(如“3天后到期”)。repay_time - 允许展示内容:、
order_id、借款端(币种、剩余本金/利息)、抵押品端(币种、金额)、当前LTV(若存在)、fixed_typestatus/7d(仅作为期限标签,无日历日期)。30d - 若用户明确询问日期/到期日:回复此处不展示时间信息,建议用户打开Gate(App/网页)查看完整订单时间表——仍不得将API返回的时间字段粘贴到对话中。
Safety Rules
安全规则
- Writes (,
cex_mcl_create_multi_collateral,cex_mcl_repay_multi_collateral_loan): Always require explicit confirmation and an order draft before execution.cex_mcl_operate_multi_collateral - No investment advice: Present LTV/rates; user decides.
- Sensitive data: Never expose API keys or raw internal errors.
- Amounts: Reject non-positive amounts; validate order_id for repay/collateral ops.
- Order views: Never surface time columns, dates, or timestamp fields in order list/detail answers to the user.
- 写入操作(、
cex_mcl_create_multi_collateral、cex_mcl_repay_multi_collateral_loan):执行前必须获取用户明确确认并展示订单草稿。cex_mcl_operate_multi_collateral - 禁止投资建议:仅展示LTV/利率;决策由用户自行做出。
- 敏感数据:绝不能暴露API密钥或原始内部错误。
- 金额验证:拒绝非正金额;还款/抵押品操作需验证order_id有效性。
- 订单展示:在订单列表/详情的回复中,绝不能显示时间列、日期或时间戳字段。
Error Handling
错误处理
| Condition | Response |
|---|---|
| 401/403 | "Please configure your Gate CEX API Key in MCP with multi-collateral loan permission." |
| Check |
| Wrong fixed_type | Must be |
| Fix rate empty (fixed) | "Fixed rate temporarily unavailable; try later or use current loan." |
| Repay / operate fails | Check order_id, currency, amount in JSON payloads. |
| Order not found | "Order not found." / "No loan orders." |
| 条件 | 回复内容 |
|---|---|
| 401/403 | "请在MCP中配置具有多抵押借贷权限的Gate CEX API Key。" |
| 检查 |
| fixed_type错误 | 必须为** |
| 定期利率为空 | "定期利率暂时不可用;请稍后重试或选择活期借贷。" |
| 还款/抵押品操作失败 | 检查JSON参数中的order_id、币种、金额。 |
| 订单未找到 | "未找到订单。" / "暂无借贷订单。" |
Prompt Examples & Scenarios
提示示例与场景
See for prompt examples and expected behaviors (create current/fixed, repay, add collateral, redeem collateral).
references/scenarios.md请查看获取提示示例及预期行为(创建活期/定期借贷、还款、追加抵押品、赎回抵押品)。
references/scenarios.md