convert
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKuCoin 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
快速参考
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
| Get Convert Symbol | fromCurrency, toCurrency | orderType | No |
| Get Convert Currencies | None | None | No |
| Get Convert Quote | fromCurrency, toCurrency | fromCurrencySize, toCurrencySize | Yes |
| Get Convert Order Detail | orderId or clientOrderId (at least one) | None | Yes |
| Get Convert Order History | None | status, startAt, endAt, page, pageSize | Yes |
| Get Convert Limit Quote | fromCurrency, toCurrency | fromCurrencySize, toCurrencySize | Yes |
| Get Convert Limit Order Detail | None | orderId, clientOrderId | Yes |
| Get Convert Limit Orders | None | status, startAt, endAt, page, pageSize | Yes |
| 端点 | 描述 | 必填参数 | 可选参数 | 认证要求 |
|---|---|---|---|---|
| 获取可兑换币种对 | fromCurrency, toCurrency | orderType | 无需 |
| 获取所有可兑换币种 | 无 | 无 | 无需 |
| 获取兑换报价 | fromCurrency, toCurrency | fromCurrencySize, toCurrencySize | 需要 |
| 获取兑换订单详情 | orderId或clientOrderId(至少提供一个) | 无 | 需要 |
| 获取兑换订单历史 | 无 | status, startAt, endAt, page, pageSize | 需要 |
| 获取限价兑换报价 | fromCurrency, toCurrency | fromCurrencySize, toCurrencySize | 需要 |
| 获取限价兑换订单详情 | 无 | orderId, clientOrderId | 需要 |
| 获取限价兑换订单列表 | 无 | 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 (): Your KuCoin API key (sent as header)
KC-API-KEY - API Secret: Your KuCoin API secret (used for HMAC-SHA256 signing)
- Passphrase (): Your KuCoin API passphrase (sent as header, encrypted with HMAC-SHA256 using the API Secret)
KC-API-PASSPHRASE
Base URL:
- Production: https://api.kucoin.com
对于需要认证的端点,您需要提供KuCoin API凭证。所需凭证:
- API Key (): 您的KuCoin API密钥(作为请求头发送)
KC-API-KEY - API Secret: 您的KuCoin API密钥秘钥(用于HMAC-SHA256签名)
- Passphrase (): 您的KuCoin API密码短语(作为请求头发送,使用API Secret通过HMAC-SHA256加密)
KC-API-PASSPHRASE
基础URL:
- 生产环境: https://api.kucoin.com
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
passphrase123Never 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