gate-exchange-collateralloan
Original:🇺🇸 English
Translated
Query and manage Gate multi-collateral loan. Use this skill whenever the user asks about collateral loan, current loan, fixed loan, repay, add collateral, or redeem collateral. Trigger phrases include "collateral loan", "current loan", "fixed loan", "repay", "add collateral", "redeem collateral", or equivalent in other languages.
8installs
Sourcegate/gate-skills
Added on
NPX Install
npx skill4agent add gate/gate-skills gate-exchange-collateralloanTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Gate Exchange Multi-Collateral Loan 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.
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.
Workflow
Step 1: Classify intent
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.
Step 2: Read-only requests (rates, LTV, quota, orders)
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
Step 3: Create loan (current or fixed)
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
Step 4: Repay
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
Step 5: Add or redeem collateral
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
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.
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).
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.
Available MCP Tools
| 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 | |
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). |
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.
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
Create Loan Flow (Case 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
Repay Flow (Case 3)
- Parse order_id and repay amount (or full).
- Show draft; on confirm: with
cex_mcl_repay_multi_collateral_loanJSON.repay_loan
Add / Redeem Collateral Flow (Case 4 & 5)
- Parse order_id and collateral amount/currency.
- Show draft; on confirm: with
cex_mcl_operate_multi_collateralJSON.collateral_adjust
Presentation — order list / order detail (Case 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.
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.
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." |
Prompt Examples & Scenarios
See for prompt examples and expected behaviors (create current/fixed, repay, add collateral, redeem collateral).
references/scenarios.md