convert

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

KuCoin Convert Skill

KuCoin Convert Skill

Query convert currencies, quotes, and order details on KuCoin. Return results in JSON format.
Note: This skill only supports Classic REST API GET endpoints (read-only operations).
在KuCoin上查询可兑换币种、报价及订单详情,返回JSON格式结果。
注意: 本Skill仅支持Classic REST API的GET端点(只读操作)。

Quick Reference

快速参考

EndpointDescriptionRequiredOptionalAuthentication
/api/v1/convert/symbol
(GET)
Get Convert SymbolfromCurrency, toCurrencyorderTypeNo
/api/v1/convert/currencies
(GET)
Get Convert CurrenciesNoneNoneNo
/api/v1/convert/quote
(GET)
Get Convert QuotefromCurrency, toCurrencyfromCurrencySize, toCurrencySizeYes
/api/v1/convert/order/detail
(GET)
Get Convert Order DetailorderId or clientOrderId (at least one)NoneYes
/api/v1/convert/order/history
(GET)
Get Convert Order HistoryNonestatus, startAt, endAt, page, pageSizeYes
/api/v1/convert/limit/quote
(GET)
Get Convert Limit QuotefromCurrency, toCurrencyfromCurrencySize, toCurrencySizeYes
/api/v1/convert/limit/order/detail
(GET)
Get Convert Limit Order DetailNoneorderId, clientOrderIdYes
/api/v1/convert/limit/orders
(GET)
Get Convert Limit OrdersNonestatus, startAt, endAt, page, pageSizeYes

端点描述必填参数可选参数认证要求
/api/v1/convert/symbol
(GET)
获取可兑换币种对fromCurrency, toCurrencyorderType无需
/api/v1/convert/currencies
(GET)
获取所有可兑换币种无需
/api/v1/convert/quote
(GET)
获取兑换报价fromCurrency, toCurrencyfromCurrencySize, toCurrencySize需要
/api/v1/convert/order/detail
(GET)
获取兑换订单详情orderId或clientOrderId(至少提供一个)需要
/api/v1/convert/order/history
(GET)
获取兑换订单历史status, startAt, endAt, page, pageSize需要
/api/v1/convert/limit/quote
(GET)
获取限价兑换报价fromCurrency, toCurrencyfromCurrencySize, toCurrencySize需要
/api/v1/convert/limit/order/detail
(GET)
获取限价兑换订单详情orderId, clientOrderId需要
/api/v1/convert/limit/orders
(GET)
获取限价兑换订单列表status, startAt, endAt, page, pageSize需要

Parameters

参数

Common Parameters

通用参数

  • fromCurrency: The source currency for the trading pair (e.g., BTC)
  • toCurrency: The target currency for the trading pair (e.g., USDT)
  • fromCurrencySize: The amount of the source currency to convert. Either fromCurrencySize or toCurrencySize must be provided, but not both simultaneously.
  • toCurrencySize: The amount of the target currency to convert. Either fromCurrencySize or toCurrencySize must be provided, but not both simultaneously.
  • orderType: Order type filter when querying convert symbols (e.g., MARKET)
  • orderId: Convert order ID. Either orderId or clientOrderId must be provided for detail endpoints.
  • clientOrderId: A unique order identifier defined by the user. Maximum 40 characters.
  • status: Order status filter for history queries.
  • startAt: Order start time filter, in Unix milliseconds.
  • endAt: Order end time filter, in Unix milliseconds.
  • page: Current page number for paginated results.
  • pageSize: The number of results per page (20-100).
  • fromCurrency: 交易对中的源币种(例如:BTC)
  • toCurrency: 交易对中的目标币种(例如:USDT)
  • fromCurrencySize: 要兑换的源币种数量。必须提供fromCurrencySize或toCurrencySize中的一个,不可同时提供。
  • toCurrencySize: 要兑换的目标币种数量。必须提供fromCurrencySize或toCurrencySize中的一个,不可同时提供。
  • orderType: 查询可兑换币种对时的订单类型筛选(例如:MARKET)
  • orderId: 兑换订单ID。查询详情的端点必须提供orderId或clientOrderId中的一个。
  • clientOrderId: 用户自定义的唯一订单标识符,最长40个字符。
  • status: 历史查询中的订单状态筛选。
  • startAt: 订单开始时间筛选,单位为Unix毫秒。
  • endAt: 订单结束时间筛选,单位为Unix毫秒。
  • page: 分页结果的当前页码。
  • pageSize: 每页结果数量(20-100)。

Enums

枚举值

  • orderType: MARKET | LIMIT
  • status (market orders): OPEN | SUCCESS | FAIL
  • status (limit orders): OPEN | SUCCESS | FAIL | CANCELLED
  • orderType: MARKET | LIMIT
  • status(市价订单): OPEN | SUCCESS | FAIL
  • status(限价订单): OPEN | SUCCESS | FAIL | CANCELLED

Authentication

认证

For endpoints that require authentication, you will need to provide KuCoin API credentials. Required credentials:
  • API Key (
    KC-API-KEY
    ): Your KuCoin API key (sent as header)
  • API Secret: Your KuCoin API secret (used for HMAC-SHA256 signing)
  • Passphrase (
    KC-API-PASSPHRASE
    ): Your KuCoin API passphrase (sent as header, encrypted with HMAC-SHA256 using the API Secret)
Base URL:
对于需要认证的端点,您需要提供KuCoin API凭证。所需凭证:
  • API Key (
    KC-API-KEY
    ): 您的KuCoin API密钥(作为请求头发送)
  • API Secret: 您的KuCoin API密钥秘钥(用于HMAC-SHA256签名)
  • Passphrase (
    KC-API-PASSPHRASE
    ): 您的KuCoin API密码短语(作为请求头发送,使用API Secret通过HMAC-SHA256加密)
基础URL:

Security

安全注意事项

Share Credentials

凭证共享

Users can provide KuCoin API credentials by sending a file where the content is in the following format:
bash
abc123...apikey
secret123...key
passphrase123
用户可通过发送文件提供KuCoin API凭证,文件内容格式如下:
bash
abc123...apikey
secret123...key
passphrase123

Never Disclose API Key, Secret, and Passphrase

切勿泄露API Key、Secret和Passphrase

Never disclose the location of the API key, secret, and passphrase file.
Never send the API key, secret, and passphrase to any website other than the KuCoin production API.
切勿泄露存储API Key、Secret和Passphrase的文件位置。 切勿将API Key、Secret和Passphrase发送至KuCoin生产API以外的任何网站。

Never Display Full Secrets

切勿显示完整秘钥

When showing credentials to users:
  • API Key: Show first 5 + last 4 characters:
    su1Qc...8akf
  • Secret Key: Always mask, show only last 5:
    ***...aws1
  • Passphrase: Always mask entirely:
    ***...
Example response when asked for credentials: Account: main API Key: su1Qc...8akf Secret: ***...aws1 Passphrase: ***... Environment: Production
向用户展示凭证时:
  • API Key: 显示前5位+后4个字符:
    su1Qc...8akf
  • Secret Key: 始终掩码,仅显示最后5位:
    ***...aws1
  • Passphrase: 始终完全掩码:
    ***...
示例回复当询问凭证时: 账户: main API Key: su1Qc...8akf Secret: ***...aws1 Passphrase: ***... 环境: 生产环境

Listing Accounts

账户列表

When listing accounts, show names and environment only -- never keys: KuCoin Accounts:
  • main (Production)
  • trading-bot (Production)
列出账户时,仅显示名称和环境——绝不显示密钥: KuCoin账户:
  • main(生产环境)
  • trading-bot(生产环境)

Transactions

交易操作

When performing convert transactions, always confirm with the user before proceeding by asking them to write "CONFIRM" to proceed.

执行兑换交易时,必须先请求用户确认,要求用户输入"CONFIRM"后再继续。

KuCoin Accounts

KuCoin账户

main

main

  • API Key: your_api_key
  • Secret: your_api_secret
  • API Key: your_api_key
  • Secret: your_api_secret