gate-exchange-flashswap
Resolving gate-cli (binary path)
Resolve gate-cli in order: (1) command -v gate-cli and gate-cli --version succeeds; (2) ${HOME}/.local/bin/gate-cli if executable; (3) ${HOME}/.openclaw/skills/bin/gate-cli if executable. Canonical rules: exchange-runtime-rules.md §4 (or gate-runtime-rules.md §4).
Gate Flash Swap
General Rules
⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. Do NOT select or call any tool until all rules are read. These rules have the highest priority. → Read gate-runtime-rules.md
- Only use the
gate-clicommands explicitly listed in this skill. Commands not documented here must NOT be run for these workflows, even if other interfaces expose them.
Skill Dependencies
gate-cli commands used
Query Operations (Read-only)
gate-cli cex flash-swap ordergate-cli cex flash-swap pairsgate-cli cex flash-swap ordersgate-cli cex flash-swap preview-many-to-onegate-cli cex flash-swap preview-one-to-manygate-cli cex flash-swap preview-v1
Execution Operations (Write)
gate-cli cex flash-swap create-many-to-onegate-cli cex flash-swap create-one-to-manygate-cli cex flash-swap create-v1
Authentication
- Interactive file setup: when
GATE_API_KEYandGATE_API_SECRETare not both set on the host, rungate-cli config initto complete the wizard for API key, secret, profiles, and defaults (see gate-cli). - Env / flags:
gate-cli config initis not required when credentials are already supplied — e.g. bothGATE_API_KEYandGATE_API_SECRETset on the host, or--api-key/--api-secretwhere supported — never ask the user to paste secrets into chat. - Permissions: Fc:Write
- Portal: create or rotate keys outside the chat: https://www.gate.com/myaccount/profile/api-key/manage
Installation Check
- Required:
gate-cli(runsh ./setup.shfrom this skill directory if missing; optionalGATE_CLI_SETUP_MODE=release). - Add
$HOME/.openclaw/skills/bintoPATHif you invokegate-cliby name (or the directory wheresetup.shinstalls it). - Credentials: When
GATE_API_KEYandGATE_API_SECRETare both set (non-empty) for the host, do not requiregate-cli config init— that is equivalent valid config forgate-cli. When both are unset or empty, remind the operator to rungate-cli config initor to configureGATE_API_KEY/GATE_API_SECRETin the matching skill from the skill library (never ask the user to paste secrets into chat). - Sanity check: Do not proceed with authenticated calls until the CLI behaves as expected (e.g.
gate-cli --versionor a read-onlygate-cli cex ...command from this skill); confirm credentials resolve before mutating operations.
Execution mode
Read and strictly follow references/gate-cli.md, then execute this skill's flashswap workflow.
SKILL.mdkeeps routing and scenario boundaries.references/gate-cli.mdis the authoritativegate-cliexecution contract for preview/create sequencing, confirmation gates, and degraded handling.
Trigger Conditions
This Skill is activated when the user's request matches any of the following:
- Wants to swap/convert/exchange one cryptocurrency for another
- Wants to buy multiple cryptocurrencies at once using one currency (e.g. "buy 1u BTC, 2u ETH")
- Wants to sell multiple cryptocurrencies into one target currency (e.g. "sell 1 BTC, 2 ETH for USDT")
- Asks which currencies support flash swap
- Asks about minimum/maximum swap amounts or limits
- Requests flash swap order history or specific order details
- Uses keywords: "flash swap", "convert", "quick exchange", "swap", "instant swap"
Quick Start
Common usage examples:
- One-to-one swap: "Sell 1 BTC for USDT"
- Buy multiple coins: "Buy 1u BTC, 2u ETH, 3u SOL"
- Sell multiple coins: "Sell 1 BTC, 2 ETH, 3 SOL for USDT"
- Check pairs: "Show me flash swap supported pairs"
- Order history: "Show me my flash swap orders"
Domain Knowledge
Flash Swap is a quick crypto exchange service provided by Gate. Users can instantly convert one cryptocurrency to another at the real-time exchange rate without placing orders and waiting for matching.
Swap Modes:
- One-to-One: Swap a single currency for another single currency (e.g. BTC → USDT)
- One-to-Many: Swap one currency into multiple target currencies (e.g. USDT → BTC + ETH + SOL)
- Many-to-One: Swap multiple currencies into one target currency (e.g. BTC + ETH + SOL → USDT)
Key Concepts:
- sell_asset / buy_asset: The currency symbols for the sell side and buy side
- sell_amount / buy_amount: Specify one of them; the API calculates the other. For one-to-many, use
sell_amountper target; for many-to-one, usesell_amountper source - quote_id: A unique identifier returned by the preview API, required for order creation. The exact validity period is indicated by
valid_timestampin the response. Always check this field — do not assume a fixed duration - Order Status:
1= success,2= failed
API Field Naming:
gate-cli cex flash-swap pairsreturns snake_case fields:sell_min_amount,sell_max_amount,buy_min_amount,buy_max_amount,currency_pair,sell_currency,buy_currencygate-cli cex flash-swap preview-v1and multi-currency preview APIs return camelCase fields in some environments (e.g.sellMinAmount). Always read the actual field names from the response — do not assume a fixed naming conventiongate-cli cex flash-swap ordersandgate-cli cex flash-swap orderreturn snake_case:sell_currency,buy_currency,sell_amount,buy_amount,create_time
Data type note: order_id is returned as a string in API responses. quote_id is also a string.
MCP Tool Inventory:
| Tool | Type | Description |
|---|---|---|
gate-cli cex flash-swap preview-v1 |
Preview | One-to-one swap quote preview |
gate-cli cex flash-swap create-v1 |
Create | One-to-one swap order creation (requires quote_id) |
gate-cli cex flash-swap preview-one-to-many |
Preview | One-to-many swap quote preview |
gate-cli cex flash-swap create-one-to-many |
Create | One-to-many swap order creation |
gate-cli cex flash-swap preview-many-to-one |
Preview | Many-to-one swap quote preview |
gate-cli cex flash-swap create-many-to-one |
Create | Many-to-one swap order creation |
gate-cli cex flash-swap pairs |
Query | List supported flash swap pairs and limits |
gate-cli cex flash-swap orders |
Query | Query flash swap order history |
gate-cli cex flash-swap order |
Query | Query single flash swap order by ID |
Workflow
Step 1: Identify User Intent
Analyze the user's request to determine which flash swap operation to perform.
Intent classification:
| User Intent | Mode | Preview Tool | Create Tool |
|---|---|---|---|
| Swap one coin for another (e.g. "sell 1 BTC for USDT") | one-to-one | gate-cli cex flash-swap preview-v1 |
gate-cli cex flash-swap create-v1 |
| One-click swap without separate confirmation (e.g. "directly swap 100 USDT to GT") | one-to-one-auto | gate-cli cex flash-swap preview-v1 → gate-cli cex flash-swap create-v1 |
— |
| Buy multiple coins with one currency (e.g. "buy 1u BTC, 2u ETH") | one-to-many | gate-cli cex flash-swap preview-one-to-many |
gate-cli cex flash-swap create-one-to-many |
| Split one currency into multiple by ratio (e.g. "split 1000 USDT, half BTC half ETH") | one-to-many-split | gate-cli cex flash-swap preview-one-to-many |
gate-cli cex flash-swap create-one-to-many |
| Buy specific quantities of multiple coins (e.g. "buy 0.1 BTC and 1 ETH with USDT") | one-to-many-buy | gate-cli cex flash-swap preview-one-to-many |
gate-cli cex flash-swap create-one-to-many |
| Sell multiple coins into one currency (e.g. "sell 1 BTC, 2 ETH for USDT") | many-to-one | gate-cli cex flash-swap preview-many-to-one |
gate-cli cex flash-swap create-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 | gate-cli cex flash-swap preview-many-to-one |
gate-cli cex flash-swap create-many-to-one |
| Preview-only for multi-currency (e.g. "how much GT can I get for my BTC and ETH?") | many-to-one-preview | gate-cli cex flash-swap preview-many-to-one |
— |
| Query supported flash swap pairs | query | gate-cli cex flash-swap pairs |
— |
| Query flash swap order list | query | gate-cli cex flash-swap orders |
— |
| Query single flash swap order by ID | query | gate-cli cex flash-swap order |
— |
| Verify latest order result (e.g. "did my swap succeed?") | verify-order | gate-cli cex flash-swap order |
— |
Key data to extract:
intent: "one_to_one" / "one_to_one_auto" / "one_to_many" / "one_to_many_split" / "one_to_many_buy" / "many_to_one" / "many_to_one_all" / "many_to_one_preview" / "list_pairs" / "list_orders" / "get_order" / "verify_order"sell_asset/buy_asset: currencies involvedsell_amount/buy_amount: amounts specified by the user
Step 2: Pre-validate Swap Amount (before any preview)
Before calling the preview API, validate the user's amount against the pair's min/max limits to avoid unnecessary API calls.
Call gate-cli cex flash-swap pairs with:
currency: the sell_asset or buy_asset from the user's request
Key data to extract:
sell_min_amount/sell_max_amount: allowed range for the sell sidebuy_min_amount/buy_max_amount: allowed range for the buy side
Validation logic:
- If the user's
sell_amount<sell_min_amount, inform them the amount is below the minimum and do NOT proceed to preview - If the user's
sell_amount>sell_max_amount, inform them the amount exceeds the maximum - If the pair is not found, the currency is not supported for flash swap
Skip this step if the user explicitly requests "one-click" or "direct" swap to minimize latency.
Step 3: Preview — One-to-One Swap (if intent = one_to_one or one_to_one_auto)
Call gate-cli cex flash-swap preview-v1 with:
sell_asset(required, string): asset to sell, e.g. "BTC"buy_asset(required, string): asset to buy, e.g. "USDT"sell_amount(string): amount to sell. Choose one betweensell_amountandbuy_amountbuy_amount(string): amount to buy. Choose one betweensell_amountandbuy_amount
Key data to extract:
quote_id: required for creating the ordersell_asset/sell_amount: confirmed sell sidebuy_asset/buy_amount: calculated buy sideprice: exchange ratevalid_timestamp: quote expiry time
For one_to_one intent: Present the preview to the user and ask for confirmation before proceeding to create.
For one_to_one_auto intent: The user has pre-authorized the swap by explicitly requesting "direct" or "one-click" execution. Skip the separate confirmation prompt and immediately proceed to Step 4. This is compliant with the Safety Rules as the user's direct request serves as confirmation. However: if the preview returns any error (code != 0), do NOT proceed to Step 4 — report the error to the user immediately.
Step 4: Create — One-to-One Swap (after user confirms Step 3, or auto for one_to_one_auto)
Pre-condition: Step 3 must have returned code == 0 with a valid quote_id. If Step 3 failed (any code != 0), do NOT execute this step. Never fabricate a quote_id.
Call gate-cli cex flash-swap create-v1 with body JSON string:
quote_id(required, string): from preview response — must be the actual value returned by the APIsell_asset(required, string): asset to sellsell_amount(required, string): amount to sellbuy_asset(required, string): asset to buybuy_amount(required, string): amount to buy
Key data to extract:
id: created order IDstatus:1= success,2= failedsell_asset/sell_amount/buy_asset/buy_amount: confirmed amountsprice: executed ratecreate_time: order creation timestamperror.code/error.message: check for errors even when HTTP status is 200
Order result verification: After creating, check the status field:
- If
status == 1: Inform the user the swap succeeded, show the finalbuy_amountreceived - If
status == 2: Inform the user the swap failed, suggest re-previewing and trying again - If
error.code != 0: Report the specific error message to the user
Step 5: Preview — One-to-Many Swap (if intent = one_to_many, one_to_many_split, or one_to_many_buy)
For one_to_many_split: The user specifies a total amount and a distribution ratio (e.g. "split 1000 USDT, half BTC half ETH"). Calculate the per-target sell_amount before calling the API.
For one_to_many_buy: The user specifies target buy_amount per currency (e.g. "buy 0.1 BTC and 1 ETH"). Use the buy_amount field instead of sell_amount in the params array to let the API calculate the required sell amount.
Call gate-cli cex flash-swap preview-one-to-many with body JSON string:
params(required, array): each element contains:sell_asset(required, string): source currency (same for all, e.g. "USDT")sell_amount(string): amount of source currency to spend on this targetbuy_asset(required, string): target currency (e.g. "BTC", "ETH")buy_amount(string): alternative to sell_amount
Key data to extract:
orders[]: array of preview results, each containingquote_id,sell_amount,buy_amount,price, anderrortotal_consume_amount: total amount of source currency consumed- Check each order's
error.code— if non-zero, that item failed to get a quote
Present the full preview table and highlight any failed items. Ask for confirmation.
Step 6: Create — One-to-Many Swap (after user confirms Step 5)
Important: Exclude any items that failed in preview (where error.code != 0 or quote_id is missing).
Call gate-cli cex flash-swap create-one-to-many with body JSON string:
params(required, array): each element contains:sell_asset(required, string): source currencysell_amount(required, string): amount to sellbuy_asset(required, string): target currencybuy_amount(required, string): amount to buy (from preview)quote_id(string): from preview response
Key data to extract:
orders[]: array of created orders, each withid,status,errortotal_consume_amount: actual total consumed- Check each order's
error.codefor per-item failures
Step 7: Preview — Many-to-One Swap (if intent = many_to_one, many_to_one_all, or many_to_one_preview)
For many_to_one_all: The user wants to consolidate all holdings of specified currencies. Before previewing, query the user's spot account balances to determine the actual amount for each currency. Filter out currencies whose balance is below the flash swap minimum amount (sell_min_amount from gate-cli cex flash-swap pairs).
Call gate-cli cex flash-swap preview-many-to-one with body JSON string:
params(required, array): each element contains:sell_asset(required, string): source currency (e.g. "BTC", "ETH")sell_amount(string): amount to sellbuy_asset(required, string): target currency (same for all, e.g. "USDT")buy_amount(string): alternative to sell_amount
Key data to extract:
orders[]: array of preview results withquote_id,sell_amount,buy_amount,price,errortotal_acquire_amount: total amount of target currency to receive- Check each order's
error.code— non-zero means that item failed
Present the full preview table and highlight any failed items.
For many_to_one_preview: Present the total expected buy_amount (sum of all successful items) and do NOT proceed to create. Inform the user this is a preview only.
For many_to_one and many_to_one_all: Ask for user confirmation before proceeding to create.
Step 8: Create — Many-to-One Swap (after user confirms Step 7)
Important: Exclude any items that failed in preview. Including a failed item (e.g. buy_amount: "0") will cause the entire request to be rejected with code: 4.
Call gate-cli cex flash-swap create-many-to-one with body JSON string:
params(required, array): each element contains:sell_asset(required, string): source currencysell_amount(required, string): amount to sellbuy_asset(required, string): target currencybuy_amount(required, string): amount to buy (from preview)quote_id(string): from preview response
Key data to extract:
orders[]: array of created orders withid,status,errortotal_acquire_amount: actual total received
Step 9: Query Flash Swap Pairs (if intent = list_pairs)
Call gate-cli cex flash-swap pairs with:
currency(optional, string): filter by currency symbollimit(optional, number): max items returned (default 1000)page(optional, number): page number
Large result set warning: Without a currency filter, this may return thousands of rows. Summarize the total count, show a sample of 20 pairs, and suggest filtering by currency.
Key data to extract:
items[]: list of currency pairs withcurrency_pair,sell_currency,buy_currency,sell_min_amount,sell_max_amount,buy_min_amount,buy_max_amount
Step 10: Query Flash Swap Order History (if intent = list_orders)
Before calling, validate the status parameter if provided. Only 1 (success) and 2 (failed) are valid.
Call gate-cli cex flash-swap orders with:
status(optional, number):1= success,2= failedsell_currency(optional, string): filter by sell currencybuy_currency(optional, string): filter by buy currencylimit(optional, number): max recordspage(optional, number): page numberreverse(optional, boolean):truefor newest first (default)
Key data to extract:
- Order list with
id,sell_currency,buy_currency,sell_amount,buy_amount,price,status,create_time
Step 11: Query Single Order (if intent = get_order or verify_order)
Call gate-cli cex flash-swap order with:
order_id(required, number): the order ID to query
If the API returns 404, inform the user the order was not found.
For verify_order: After retrieving the order, check status:
- If
status == 1: Confirm the swap succeeded, show the finalbuy_amountactually received - If
status == 2: Inform the user the swap failed, suggest re-previewing and placing a new order
Key data to extract:
- Full order details:
id,sell_currency,buy_currency,sell_amount,buy_amount,price,status,create_time
Step 12: Format and Present Results
Format results using the appropriate Report Template. For swap operations, always show:
- Preview summary table with quote details
- After creation, show order IDs, status, and any per-item errors
Error Handling
| Error Scenario | Handling |
|---|---|
| Region/compliance restriction (code -2) | CRITICAL: The API returns {"code":-2,"message":"This service is not supported in your region"}. This means flash swap is not available for this user's region. Immediately stop all operations, do NOT proceed to create, and inform the user: "Flash swap is not available in your region due to compliance restrictions." Do NOT fabricate any results |
| Preview failed (any non-zero code) | CRITICAL: If the preview API returns any code != 0, the operation has FAILED. Do NOT proceed to the create step. Do NOT fabricate a quote_id. Report the exact error code and message to the user. Never show "success" when the API returned an error |
| Amount below minimum (sell_amount < sell_min_amount) | Query gate-cli cex flash-swap pairs first. If below minimum, inform the user with the exact minimum and do NOT call preview |
| 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 quote_id has expired. Re-run the preview to get a fresh quote, then immediately create the order |
| Unable to get accurate quote (code 4 / 400001 / 400007) | These are quote-related errors from the server. code 4 is a top-level rejection (often caused by including a failed item). 400001 and 400007 are per-item errors meaning the server cannot price this pair/amount. Suggest adjusting the amount, trying a different pair, or removing the failed item |
| Multi-currency create: entire request rejected (code 4) | Likely caused by including a preview-failed item with buy_amount: "0". Remove all items where preview error.code != 0 and retry |
| Order status == 2 (failed) | Inform the user the swap failed. Suggest re-previewing with adjusted parameters and trying again |
| Order not found (404) | The order_id does not exist. Suggest verifying the ID or querying the order list first |
| 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 1 (success) or 2 (failed). Reject other values before calling the API |
| 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 |
Safety Rules
- NEVER fabricate results: If any API call returns an error (code != 0), you MUST report the actual error to the user. NEVER fabricate a successful response, fake order ID, fake quote_id, or fake transaction result. This is the most critical safety rule
- NEVER proceed after preview failure: If the preview API returns any error (code != 0, including code -2 for region restriction), you MUST stop immediately. Do NOT call the create API. Do NOT invent a quote_id (e.g. "AUTO-GT-001"). Report the error honestly
- Always preview before creating: Every swap must go through the preview step first. For standard flows, show the quote to the user and wait for explicit confirmation before calling the create API. For
one_to_one_automode only: the user has explicitly requested a direct swap (e.g. "directly swap", "one-click"), which counts as pre-authorized confirmation — proceed to create immediately after preview without a separate confirmation prompt - No write operations without confirmation: Never call any create/order API unless (a) the user has explicitly confirmed the preview result, or (b) the user explicitly requested a one-click/direct swap. Query operations (list pairs, list orders, get order) do not require confirmation
- Exclude failed preview items: When creating multi-currency orders, only include items that succeeded in preview (
error.code == 0) - Do not expose sensitive info: Never output API Key, Secret, or authentication tokens
- Display amounts as-is: Do not round or modify amounts from API responses
- Warn on large amounts: If the total swap amount exceeds 10,000 USDT equivalent, remind the user to double-check
- Stale confirmation handling: If the user confirms a previous preview, check whether the current time has exceeded the
valid_timestampfrom that preview response. If expired, automatically re-preview to get a fresh quote before creating
Judgment Logic Summary
| Condition | Action | Tool |
|---|---|---|
| User wants to swap one coin for another | Preview one-to-one, then create after confirmation | gate-cli cex flash-swap preview-v1 → gate-cli cex flash-swap create-v1 |
| User says "directly" or "one-click" swap | Preview + create automatically without separate confirmation | gate-cli cex flash-swap preview-v1 → gate-cli cex flash-swap create-v1 |
| User references a previous quote_id for confirmation | Create order using the referenced quote_id | gate-cli cex flash-swap create-v1 |
| Swap amount is suspiciously small | Pre-validate against pair min amount before preview | gate-cli cex flash-swap pairs |
| User wants to buy multiple coins with one currency | Preview one-to-many, then create | gate-cli cex flash-swap preview-one-to-many → gate-cli cex flash-swap create-one-to-many |
| User wants to split one currency by ratio (e.g. "half and half") | Calculate per-target sell_amount, then preview one-to-many | gate-cli cex flash-swap preview-one-to-many → gate-cli cex flash-swap create-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 | gate-cli cex flash-swap preview-one-to-many → gate-cli cex flash-swap create-one-to-many |
| User wants to sell multiple coins into one currency | Preview many-to-one, then create | gate-cli cex flash-swap preview-many-to-one → gate-cli cex flash-swap create-many-to-one |
| User wants to consolidate "all" of certain holdings | Query balances, filter by min amounts, preview many-to-one, then create | gate-cli cex flash-swap pairs → gate-cli cex flash-swap preview-many-to-one → gate-cli cex flash-swap create-many-to-one |
| User asks "how much can I get" without wanting to execute | Preview-only many-to-one, sum buy_amounts, do NOT create | gate-cli cex flash-swap preview-many-to-one |
Preview returns items with error.code != 0 |
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 | gate-cli cex flash-swap order |
| User asks about supported pairs or limits | Query pair list | gate-cli cex flash-swap pairs |
| User queries order history | Query order list | gate-cli cex flash-swap orders |
| User queries specific order by ID | Query single order | gate-cli cex flash-swap order |
| Order not found (404) | Inform user, suggest checking ID | — |
| User provides invalid status filter | Reject and inform valid values are 1 or 2 | — |
Report Template
Timestamp format: All {timestamp} placeholders use ISO 8601 format: YYYY-MM-DD HH:mm:ss UTC.
One-to-One Preview Report
## Flash Swap Preview (One-to-One)
**Quote ID**: {quote_id}
**Valid Until**: {valid_timestamp}
| Sell | Amount | Buy | Amount | Rate |
|------|--------|-----|--------|------|
| {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {price} |
Proceed with this swap? (Yes/No)
One-to-One Order Report
## Flash Swap Order Created
**Order ID**: {id}
**Status**: {status_text}
**Created At**: {create_time}
| Sell | Amount | Buy | Amount | Rate |
|------|--------|-----|--------|------|
| {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {price} |
Multi-Currency Preview Report (One-to-Many / Many-to-One)
## Flash Swap Preview ({mode})
**Total {direction}**: {total_amount} {currency}
| # | Sell | Sell Amount | Buy | Buy Amount | Rate | Quote ID | Status |
|---|------|-------------|-----|------------|------|----------|--------|
| {n} | {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {price} | {quote_id} | {status} |
{failed_count} item(s) failed to get a quote and will be excluded from the order.
Proceed with {success_count} successful item(s)? (Yes/No)
Multi-Currency Order Report
## Flash Swap Orders Created ({mode})
**Total {direction}**: {total_amount} {currency}
| # | Order ID | Sell | Sell Amount | Buy | Buy Amount | Status | Error |
|---|----------|------|-------------|-----|------------|--------|-------|
| {n} | {id} | {sell_asset} | {sell_amount} | {buy_asset} | {buy_amount} | {status_text} | {error_message} |
{success_count}/{total_count} orders succeeded.
Pair List Report
## Gate Flash Swap Supported Pairs
**Query Time**: {timestamp}
**Filter**: {currency filter or "None"}
| Pair | Sell Currency | Buy Currency | Sell Min | Sell Max |
|------|---------------|--------------|----------|----------|
| {currency_pair} | {sell_currency} | {buy_currency} | {sell_min_amount} | {sell_max_amount} |
Total: {total} pairs.
Order List Report
## Gate Flash Swap Order History
**Query Time**: {timestamp}
**Filters**: Status={status}, Sell={sell_currency}, Buy={buy_currency}
| Order ID | Sell | Sell Amount | Buy | Buy Amount | Status | Created At |
|----------|------|-------------|-----|------------|--------|------------|
| {id} | {sell_currency} | {sell_amount} | {buy_currency} | {buy_amount} | {status_text} | {create_time} |
Total: {total} records.
Order Detail Report
## Gate Flash Swap Order Details
| 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} |
More from gate/gate-skills
gate-exchange-futures
Gate Exchange USDT perpetual futures trading skill. Use when the user wants to trade contracts, open/close perpetual positions, or manage futures leverage. Triggers on 'open long', 'close short', 'USDT perpetual', 'futures TP/SL'.
125gate-exchange-spot
Gate spot trading and account operations skill. Use when the user asks to buy/sell crypto on spot, check account value, list spot balances, or place conditional/trigger orders. Triggers on 'buy coin', 'sell spot', 'take profit', 'stop loss', 'cancel order', 'my spot balance', '查看我的现货账户余额', or '现货账户余额'.
113gate-exchange-marketanalysis
Gate Exchange market analysis tool. Use when the user asks for deep market metrics like liquidity, slippage, funding arbitrage, or manipulation risk. Triggers on 'liquidity', 'depth', 'slippage', 'momentum', 'buy/sell pressure', 'squeeze', 'funding rate', 'arbitrage', 'basis', 'premium'.
102gate-news-briefing
News briefing. Use this skill ONLY when the user's query is exclusively about recent news or headlines with no other analysis dimensions. Trigger phrases: what happened recently, today's highlights, crypto news, any new updates. If the query ALSO mentions coin analysis, risk check, technicals, or any other analysis dimension, use gate-info-research instead — it handles multi-dimension queries in a single unified report.
95gate-info-trendanalysis
Trend and technical analysis. Use this skill ONLY when the user's query is exclusively about technical indicators or trend analysis for one coin with no other analysis dimensions. Trigger phrases: technical analysis, K-line, RSI, MACD, trend, support, resistance. If the query ALSO mentions fundamentals, risk, news, sentiment, or any other analysis dimension, use gate-info-research instead — it handles multi-dimension queries in a single unified report.
84gate-dex-market
On-chain DEX market data queries via Gate: token prices/价格, K-line/OHLC candlestick charts, token rankings, security risk audits, new token discovery, holder analysis, and trading volume stats. Read-only — no transactions. Use when the user asks for 'token price', 'price of ETH', 'check SOL price', '查价格', 'K线', 'candlestick', 'OHLC', 'top gainers', 'trending tokens', 'is this token safe', 'honeypot check', 'new tokens', 'trading volume', or 'liquidity events'. Do NOT use for swap/trade execution (use gate-dex-trade) or wallet balance/account queries (use gate-dex-wallet).
76