gate-exchange-collateralloan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gate 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
cex_mcl_list_user_currency_quota
with:
  • type
    :
    collateral
    or
    borrow
  • currency
    : comma-separated (borrow: single currency)
Call
cex_mcl_get_multi_collateral_ltv
with:
  • (no params)
Call
cex_mcl_get_multi_collateral_fix_rate
with:
  • (no params)
Call
cex_mcl_get_multi_collateral_current_rate
with:
  • currencies
    : comma-separated currency list
Call
cex_mcl_list_multi_collateral_orders
with:
  • page
    ,
    limit
    (optional)
  • sort
    (optional):
    time_desc
    ,
    ltv_asc
    ,
    ltv_desc
  • order_type
    (optional):
    current
    or
    fixed
Call
cex_mcl_get_multi_collateral_order_detail
with:
  • order_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
    :
    collateral
    borrow
  • 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_asc
    ,
    ltv_desc
  • order_type
    (可选):
    current
    fixed
调用
cex_mcl_get_multi_collateral_order_detail
,参数:
  • order_id
需提取的关键数据:
  • LTV阈值、定期/活期利率、额度信息、order_id、订单状态、抵押品与借款详情

Step 3: Create loan (current or fixed)

步骤3:创建借贷订单(活期或定期)

If current loan:
  1. Build draft (collateral list + borrow currency/amount).
  2. Ask for confirmation.
  3. Call
    cex_mcl_create_multi_collateral
    with
    order
    : JSON string (borrow_currency, borrow_amount, collateral_currencies, order_type: current).
If fixed loan:
  1. Call
    cex_mcl_get_multi_collateral_fix_rate
    (returns a list); filter by borrow_currency; take
    rate_7d
    or
    rate_30d
    as fixed_rate (hourly rate; pass through unchanged, do not convert or relabel as annual/daily).
  2. Build draft with fixed_type and fixed_rate (describe to user as hourly rate if showing).
  3. Ask for confirmation.
  4. Call
    cex_mcl_create_multi_collateral
    with
    order
    : JSON including order_type: fixed, fixed_type
    7d
    /
    30d
    , fixed_rate.
若为活期借贷:
  1. 生成草稿(抵押品列表 + 借款币种/金额)。
  2. 请求用户确认。
  3. 调用
    cex_mcl_create_multi_collateral
    ,参数**
    order
    **: JSON字符串(包含borrow_currency、borrow_amount、collateral_currencies、order_type: current)。
若为定期借贷:
  1. 调用
    cex_mcl_get_multi_collateral_fix_rate
    (返回列表);按借款币种过滤;选取
    rate_7d
    rate_30d
    作为fixed_rate(小时利率;直接传递,请勿转换或标记为年化/日利率)。
  2. 生成包含fixed_type和fixed_rate的草稿(若展示给用户,需说明为小时利率)。
  3. 请求用户确认。
  4. 调用
    cex_mcl_create_multi_collateral
    ,参数**
    order
    **: JSON字符串(包含order_type: fixed、fixed_type
    7d
    /
    30d
    、fixed_rate)。

Step 4: Repay

步骤4:还款

Build draft, ask confirmation, then call
cex_mcl_repay_multi_collateral_loan
with:
  • repay_loan
    : JSON string with
    order_id
    and
    repay_items
    [{ currency, amount, repaid_all }]
生成草稿,请求用户确认后,调用
cex_mcl_repay_multi_collateral_loan
,参数:
  • repay_loan
    : JSON字符串,包含
    order_id
    repay_items
    [{ currency, amount, repaid_all }]

Step 5: Add or redeem collateral

步骤5:追加或赎回抵押品

Build draft, ask confirmation, then call
cex_mcl_operate_multi_collateral
with:
  • collateral_adjust
    : JSON string with
    order_id
    ,
    type
    (
    append
    |
    redeem
    ),
    collaterals
    [{ currency, amount }]
生成草稿,请求用户确认后,调用
cex_mcl_operate_multi_collateral
,参数:
  • collateral_adjust
    : JSON字符串,包含
    order_id
    type
    append
    |
    redeem
    )、
    collaterals
    [{ currency, amount }]

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工具

ToolAuthDescriptionReference
cex_mcl_get_multi_collateral_fix_rate
No7d/30d fixed rates (list)
references/mcl-mcp-tools.md
cex_mcl_get_multi_collateral_ltv
NoLTV thresholds
references/mcl-mcp-tools.md
cex_mcl_get_multi_collateral_current_rate
NoCurrent rates
references/mcl-mcp-tools.md
cex_mcl_list_user_currency_quota
YesBorrow/collateral quota
references/mcl-mcp-tools.md
cex_mcl_create_multi_collateral
YesCreate loan (
order
JSON)
references/mcl-mcp-tools.md
cex_mcl_list_multi_collateral_orders
YesList orders
references/mcl-mcp-tools.md
cex_mcl_get_multi_collateral_order_detail
YesOrder detail
references/mcl-mcp-tools.md
cex_mcl_repay_multi_collateral_loan
YesRepay (
repay_loan
JSON)
references/mcl-mcp-tools.md
cex_mcl_operate_multi_collateral
YesAdd/redeem collateral (
collateral_adjust
JSON)
references/mcl-mcp-tools.md
cex_mcl_list_multi_repay_records
YesRepay history
references/mcl-mcp-tools.md
cex_mcl_list_multi_collateral_records
YesCollateral history
references/mcl-mcp-tools.md
工具需认证描述参考
cex_mcl_get_multi_collateral_fix_rate
7天/30天定期利率(列表)
references/mcl-mcp-tools.md
cex_mcl_get_multi_collateral_ltv
LTV阈值
references/mcl-mcp-tools.md
cex_mcl_get_multi_collateral_current_rate
活期利率
references/mcl-mcp-tools.md
cex_mcl_list_user_currency_quota
借款/抵押品额度
references/mcl-mcp-tools.md
cex_mcl_create_multi_collateral
创建借贷订单(
order
JSON)
references/mcl-mcp-tools.md
cex_mcl_list_multi_collateral_orders
查询订单列表
references/mcl-mcp-tools.md
cex_mcl_get_multi_collateral_order_detail
查询订单详情
references/mcl-mcp-tools.md
cex_mcl_repay_multi_collateral_loan
还款(
repay_loan
JSON)
references/mcl-mcp-tools.md
cex_mcl_operate_multi_collateral
追加/赎回抵押品(
collateral_adjust
JSON)
references/mcl-mcp-tools.md
cex_mcl_list_multi_repay_records
查询还款记录
references/mcl-mcp-tools.md
cex_mcl_list_multi_collateral_records
查询抵押品操作记录
references/mcl-mcp-tools.md

Routing Rules

路由规则

CaseUser IntentSignal KeywordsAction
1Create current loan"current loan", "pledge … borrow … (current)"See
references/scenarios.md
Scenario 1
2Create fixed loan"fixed loan", "borrow … for 7/30 days"See
references/scenarios.md
Scenario 2
3Repay"repay", "repay order …"See
references/scenarios.md
Scenario 3
4Add collateral"add collateral", "add margin"See
references/scenarios.md
Scenario 4
5Redeem collateral"redeem collateral", "reduce margin"See
references/scenarios.md
Scenario 5
6List orders / order detail"loan orders", "order detail", "my orders"
cex_mcl_list_multi_collateral_orders
/
cex_mcl_get_multi_collateral_order_detail
never include any time/date fields in the user-facing reply (see Presentation below)
7Auth failure (401/403)MCP returns 401/403Do not expose keys; prompt user to configure Gate CEX API Key (multi-collateral loan).
案例用户意图触发关键词操作
1创建活期借贷订单"活期借贷"、"质押…借款…(活期)"参见
references/scenarios.md
场景1
2创建定期借贷订单"定期借贷"、"借款…7/30天"参见
references/scenarios.md
场景2
3还款"还款"、"还款订单…"参见
references/scenarios.md
场景3
4追加抵押品"追加抵押品"、"增加保证金"参见
references/scenarios.md
场景4
5赎回抵押品"赎回抵押品"、"减少保证金"参见
references/scenarios.md
场景5
6查询订单列表/详情"借贷订单"、"订单详情"、"我的订单"调用
cex_mcl_list_multi_collateral_orders
/
cex_mcl_get_multi_collateral_order_detail
—— 用户可见回复中绝不能包含任何时间/日期字段(见下方展示规则)
7认证失败(401/403)MCP返回401/403请勿暴露密钥;提示用户配置Gate CEX API Key(多抵押借贷权限)。

Execution

执行流程

  1. Identify user intent from the Routing Rules table above.
  2. For Cases 1–5: Read the corresponding scenario in
    references/scenarios.md
    and follow the Workflow (show order draft, then call MCP only after user confirmation).
  3. 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.
  4. 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.
  5. If the user's intent is ambiguous (e.g. missing order_id, currency, or amount), ask a clarifying question before routing.
  1. 根据上述路由规则识别用户意图。
  2. 对于案例1–5:阅读
    references/scenarios.md
    中的对应场景,遵循工作流(展示订单草稿,仅在用户确认后调用MCP)。
  3. 对于案例6:按需调用列表或详情工具;只读操作无需确认。绝对不要在回复中展示borrow_time、到期日、截止时间、operate_time、create_time、repay_time、Unix时间戳或任何其他时间相关字段——即使用户询问日期/时间;建议用户查看Gate App或网页获取时间详情。
  4. 对于案例7:请勿暴露API密钥或原始错误;提示用户在MCP中配置具有多抵押借贷权限的Gate CEX API Key。
  5. 若用户意图模糊(如缺少order_id、币种或金额),需先询问澄清问题再进行路由。

Domain Knowledge

领域知识

Core Concepts

核心概念

  • Current loan: Flexible loan. Create via
    cex_mcl_create_multi_collateral
    with
    order
    JSON:
    order_type: current
    .
  • Fixed loan: 7-day/30-day.
    order
    JSON must include
    order_type: fixed
    ,
    fixed_type
    :
    7d
    or
    30d
    (lowercase),
    fixed_rate
    : hourly interest rate from
    cex_mcl_get_multi_collateral_fix_rate
    (use
    rate_7d
    or
    rate_30d
    for that borrow_currency; pass as-is, do not describe as annual or daily rate). Missing fixed fields may yield INVALID_PARAM_VALUE.
  • Repay:
    cex_mcl_repay_multi_collateral_loan
    with
    repay_loan
    JSON.
  • Add collateral:
    cex_mcl_operate_multi_collateral
    ,
    collateral_adjust
    with
    type: append
    .
  • Redeem collateral: same tool,
    type: redeem
    .
  • LTV:
    cex_mcl_get_multi_collateral_ltv
    — init_ltv, alert_ltv, liquidate_ltv.
  • 活期借贷:灵活借贷。通过
    cex_mcl_create_multi_collateral
    创建,
    order
    JSON参数:
    order_type: current
  • 定期借贷:7天/30天期限。
    order
    JSON必须包含
    order_type: fixed
    fixed_type
    :
    7d
    30d
    (小写)、
    fixed_rate
    : 来自
    cex_mcl_get_multi_collateral_fix_rate
    小时利率(选取对应借款币种的
    rate_7d
    rate_30d
    ;直接传递,请勿描述为年化或日利率)。缺少定期字段可能返回INVALID_PARAM_VALUE错误。
  • 还款:调用
    cex_mcl_repay_multi_collateral_loan
    ,参数
    repay_loan
    JSON。
  • 追加抵押品:调用
    cex_mcl_operate_multi_collateral
    collateral_adjust
    参数中
    type: append
  • 赎回抵押品:调用同一工具,
    type: redeem
  • LTV:调用
    cex_mcl_get_multi_collateral_ltv
    —— 返回init_ltv、alert_ltv、liquidate_ltv。

Create Loan Flow (Case 1 & 2)

创建借贷订单流程(案例1 & 2)

  1. Parse collateral, borrow currency/amount; fixed: 7 days → 7d, 30 days → 30d.
  2. Current: Optionally
    cex_mcl_list_user_currency_quota
    or current rate tools. On confirm:
    cex_mcl_create_multi_collateral
    with
    order
    JSON.
  3. Fixed:
    cex_mcl_get_multi_collateral_fix_rate
    ; 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:
    order
    JSON with fixed fields.
  1. 解析抵押品、借款币种/金额;定期借贷:7天 → 7d,30天 → 30d
  2. 活期借贷:可选调用
    cex_mcl_list_user_currency_quota
    或活期利率工具。用户确认后:调用
    cex_mcl_create_multi_collateral
    ,参数
    order
    JSON。
  3. 定期借贷:调用
    cex_mcl_get_multi_collateral_fix_rate
    ;按借款币种过滤列表;若为空或无匹配项,终止操作并告知用户;否则设置fixed_rate = rate_7d或rate_30d(小时利率;直接传入order JSON,请勿描述为年化或日利率)。用户确认后:传入包含定期字段的
    order
    JSON。

Repay Flow (Case 3)

还款流程(案例3)

  1. Parse order_id and repay amount (or full).
  2. Show draft; on confirm:
    cex_mcl_repay_multi_collateral_loan
    with
    repay_loan
    JSON.
  1. 解析order_id和还款金额(或全额还款)。
  2. 展示草稿;用户确认后:调用
    cex_mcl_repay_multi_collateral_loan
    ,参数
    repay_loan
    JSON。

Add / Redeem Collateral Flow (Case 4 & 5)

追加/赎回抵押品流程(案例4 & 5)

  1. Parse order_id and collateral amount/currency.
  2. Show draft; on confirm:
    cex_mcl_operate_multi_collateral
    with
    collateral_adjust
    JSON.
  1. 解析order_id和抵押品金额/币种。
  2. 展示草稿;用户确认后:调用
    cex_mcl_operate_multi_collateral
    ,参数
    collateral_adjust
    JSON。

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.
    borrow_time
    , maturity, due time,
    operate_time
    ,
    create_time
    ,
    repay_time
    , calendar dates, Unix seconds as dates). Do not paraphrase relative timing (e.g. "expires in 3 days") computed from those fields.
  • Allowed in reply:
    order_id
    ,
    status
    , borrow side (currency, principal/interest left), collateral side (currency, amount), current LTV if present, fixed_type
    7d
    /
    30d
    as term label only (no calendar dates).
  • 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
    repay_time
    、日历日期、Unix时间戳格式的日期)。不得基于这些字段转述相对时间(如“3天后到期”)。
  • 允许展示内容
    order_id
    status
    、借款端(币种、剩余本金/利息)、抵押品端(币种、金额)、当前LTV(若存在)、fixed_type
    7d
    /
    30d
    (仅作为期限标签,无日历日期)。
  • 若用户明确询问日期/到期日:回复此处不展示时间信息,建议用户打开Gate(App/网页)查看完整订单时间表——仍不得将API返回的时间字段粘贴到对话中。

Safety Rules

安全规则

  • Writes (
    cex_mcl_create_multi_collateral
    ,
    cex_mcl_repay_multi_collateral_loan
    ,
    cex_mcl_operate_multi_collateral
    ): Always require explicit confirmation and an order draft before execution.
  • 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

错误处理

ConditionResponse
401/403"Please configure your Gate CEX API Key in MCP with multi-collateral loan permission."
cex_mcl_create_multi_collateral
fails
Check
order
JSON: borrow fields; for fixed include fixed_type
7d
/
30d
and fixed_rate from fix_rate tool.
Wrong fixed_typeMust be
7d
or
30d
, lowercase.
Fix rate empty (fixed)"Fixed rate temporarily unavailable; try later or use current loan."
Repay / operate failsCheck order_id, currency, amount in JSON payloads.
Order not found"Order not found." / "No loan orders."
条件回复内容
401/403"请在MCP中配置具有多抵押借贷权限的Gate CEX API Key。"
cex_mcl_create_multi_collateral
调用失败
检查
order
JSON:借款字段;定期借贷需包含fixed_type
7d
/
30d
及来自fix_rate工具的fixed_rate。
fixed_type错误必须为**
7d
30d
**,小写。
定期利率为空"定期利率暂时不可用;请稍后重试或选择活期借贷。"
还款/抵押品操作失败检查JSON参数中的order_id、币种、金额。
订单未找到"未找到订单。" / "暂无借贷订单。"

Prompt Examples & Scenarios

提示示例与场景

See
references/scenarios.md
for prompt examples and expected behaviors (create current/fixed, repay, add collateral, redeem collateral).
请查看
references/scenarios.md
获取提示示例及预期行为(创建活期/定期借贷、还款、追加抵押品、赎回抵押品)。