spot
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKuCoin Spot Skill
KuCoin现货交易Skill
Spot trading on KuCoin using authenticated API endpoints. Requires API Key, API Secret, and Passphrase for authenticated endpoints. Return the result in JSON format.
Note: This skill only supports Classic REST API GET endpoints (read-only operations).
通过已认证的API端点进行KuCoin现货交易。已认证端点需要API Key、API Secret和Passphrase。返回JSON格式的结果。
注意: 该Skill仅支持Classic REST API的GET端点(只读操作)。
Quick Reference
快速参考
Classic API - Spot Market Data
Classic API - 现货市场数据
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
| Get announcements | None | currentPage, pageSize, annType, lang, startTime, endTime | No |
| Get currency detail | currency (path) | chain | No |
| Get all currencies | None | None | No |
| Get symbol detail | symbol (path) | None | No |
| Get all symbols | None | market | No |
| Get ticker (best bid/ask) | symbol | None | No |
| Get all tickers | None | None | No |
| Get trade history | symbol | None | No |
| Get klines | symbol, type | startAt, endAt | No |
| Get part orderbook | size (path: 20, 100), symbol | None | No |
| Get full orderbook | symbol | None | Yes |
| Get call auction part orderbook | size (path: 20, 100), symbol | None | No |
| Get call auction info | symbol | None | No |
| Get fiat price | None | base, currencies | No |
| Get 24hr stats | symbol | None | No |
| Get market list | None | None | No |
| 端点 | 描述 | 必填参数 | 可选参数 | 身份验证 |
|---|---|---|---|---|
| 获取公告 | 无 | currentPage, pageSize, annType, lang, startTime, endTime | 不需要 |
| 获取币种详情 | currency(路径参数) | chain | 不需要 |
| 获取所有币种 | 无 | 无 | 不需要 |
| 获取交易对详情 | symbol(路径参数) | 无 | 不需要 |
| 获取所有交易对 | 无 | market | 不需要 |
| 获取行情报价(最优买卖盘) | symbol | 无 | 不需要 |
| 获取所有行情报价 | 无 | 无 | 不需要 |
| 获取交易历史 | symbol | 无 | 不需要 |
| 获取K线数据 | symbol, type | startAt, endAt | 不需要 |
| 获取部分订单簿 | size(路径参数:20, 100), symbol | 无 | 不需要 |
| 获取完整订单簿 | symbol | 无 | 需要 |
| 获取集合竞价部分订单簿 | size(路径参数:20, 100), symbol | 无 | 不需要 |
| 获取集合竞价信息 | symbol | 无 | 不需要 |
| 获取法币价格 | 无 | base, currencies | 不需要 |
| 获取24小时统计数据 | symbol | 无 | 不需要 |
| 获取市场列表 | 无 | 无 | 不需要 |
Classic API - Spot HF Order Queries
Classic API - 现货高频订单查询
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
| Get order by orderId | orderId (path), symbol | None | Yes |
| Get order by clientOid | clientOid (path), symbol | None | Yes |
| Get symbols with open orders | None | None | Yes |
| Get open orders | symbol | None | Yes |
| Get open orders (paginated) | symbol | pageNum, pageSize | Yes |
| Get closed orders | symbol | side, type, lastId, limit, startAt, endAt | Yes |
| Get trade history | symbol | orderId, side, type, lastId, limit, startAt, endAt | Yes |
| Get DCP settings | None | None | Yes |
| 端点 | 描述 | 必填参数 | 可选参数 | 身份验证 |
|---|---|---|---|---|
| 通过orderId获取订单 | orderId(路径参数), symbol | 无 | 需要 |
| 通过clientOid获取订单 | clientOid(路径参数), symbol | 无 | 需要 |
| 获取存在未成交订单的交易对 | 无 | 无 | 需要 |
| 获取未成交订单 | symbol | 无 | 需要 |
| 分页获取未成交订单 | symbol | pageNum, pageSize | 需要 |
| 获取已成交/已取消订单 | symbol | side, type, lastId, limit, startAt, endAt | 需要 |
| 获取成交历史 | symbol | orderId, side, type, lastId, limit, startAt, endAt | 需要 |
| 获取DCP设置 | 无 | 无 | 需要 |
Classic API - Stop Order Queries
Classic API - 止损订单查询
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
| Get stop orders list | None | symbol, side, type, tradeType, startAt, endAt, currentPage, orderIds, pageSize, stop | Yes |
| Get stop order by orderId | orderId (path) | None | Yes |
| Get stop order by clientOid | clientOid | symbol | Yes |
| 端点 | 描述 | 必填参数 | 可选参数 | 身份验证 |
|---|---|---|---|---|
| 获取止损订单列表 | 无 | symbol, side, type, tradeType, startAt, endAt, currentPage, orderIds, pageSize, stop | 需要 |
| 通过orderId获取止损订单 | orderId(路径参数) | 无 | 需要 |
| 通过clientOid获取止损订单 | clientOid | symbol | 需要 |
Classic API - OCO Order Queries
Classic API - OCO订单查询
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
| Get OCO order by orderId | orderId (path) | None | Yes |
| Get OCO order by clientOid | clientOid (path) | None | Yes |
| Get OCO order list | None | symbol, startAt, endAt, orderIds, pageSize, currentPage | Yes |
| Get OCO order detail by orderId | orderId (path) | None | Yes |
| 端点 | 描述 | 必填参数 | 可选参数 | 身份验证 |
|---|---|---|---|---|
| 通过orderId获取OCO订单 | orderId(路径参数) | 无 | 需要 |
| 通过clientOid获取OCO订单 | clientOid(路径参数) | 无 | 需要 |
| 获取OCO订单列表 | 无 | symbol, startAt, endAt, orderIds, pageSize, currentPage | 需要 |
| 通过orderId获取OCO订单详情 | orderId(路径参数) | 无 | 需要 |
Parameters
参数
Common Parameters
通用参数
- symbol: Trading pair (e.g., BTC-USDT)
- currency: Currency code (e.g., BTC, ETH, USDT)
- orderId: The unique order ID generated by the trading system
- clientOid: Client order ID, unique identifier created by the user (max 40 characters)
- side: Trade direction filter: buy | sell
- type: Order type filter: limit | market
- startAt: Start time in milliseconds
- endAt: End time in milliseconds
- pageSize: Number of items per page (e.g., 20, 50, 100)
- currentPage: Current page number for Classic pagination
- lastId: ID of last record from previous batch for cursor-based pagination
- limit: Number of results per page. Default: 20, Max: 100
- stop: Stop order trigger condition filter: loss | entry
- tradeType: Trade type filter for stop orders
- market: Trading market filter for Classic symbols (e.g., USDS, BTC, ALTS)
- chain: Blockchain network for currency query (e.g., ERC20, TRC20)
- base: Base fiat currency for price conversion (e.g., USD, EUR). Default: USD
- currencies: Comma-separated cryptocurrency list for fiat price (e.g., BTC,ETH)
- annType: Announcement type (e.g., latest-announcements, new-listings, activities)
- lang: Announcement language (e.g., en_US, zh_HK, ja_JP)
- symbol: 交易对(例如:BTC-USDT)
- currency: 币种代码(例如:BTC, ETH, USDT)
- orderId: 交易系统生成的唯一订单ID
- clientOid: 用户自定义的唯一客户端订单ID(最多40个字符)
- side: 交易方向筛选:buy | sell
- type: 订单类型筛选:limit | market
- startAt: 起始时间(毫秒级)
- endAt: 结束时间(毫秒级)
- pageSize: 每页显示的条目数(例如:20, 50, 100)
- currentPage: 经典分页的当前页码
- lastId: 基于游标分页的上一批记录的最后一条ID
- limit: 每页结果数量,默认值:20,最大值:100
- stop: 止损订单触发条件筛选:loss | entry
- tradeType: 止损订单的交易类型筛选
- market: 经典交易对的交易市场筛选(例如:USDS, BTC, ALTS)
- chain: 币种查询的区块链网络(例如:ERC20, TRC20)
- base: 法币价格转换的基准法币(例如:USD, EUR),默认值:USD
- currencies: 法币价格查询的加密货币列表(用逗号分隔,例如:BTC,ETH)
- annType: 公告类型(例如:latest-announcements, new-listings, activities)
- lang: 公告语言(例如:en_US, zh_HK, ja_JP)
Enums
枚举值
- side: buy | sell
- type: limit | market
- stop: loss | entry
- kline type: 1min | 3min | 5min | 15min | 30min | 1hour | 2hour | 4hour | 6hour | 8hour | 12hour | 1day | 1week | 1month
- annType: latest-announcements | activities | product-updates | vip | maintenance-updates | delistings | others | api-campaigns | new-listings | futures-announcements
- side: buy | sell
- type: limit | market
- stop: loss | entry
- kline type: 1min | 3min | 5min | 15min | 30min | 1hour | 2hour | 4hour | 6hour | 8hour | 12hour | 1day | 1week | 1month
- annType: latest-announcements | activities | product-updates | vip | maintenance-updates | delistings | others | api-campaigns | new-listings | futures-announcements
Authentication
身份验证
For endpoints that require authentication, you will need to provide KuCoin API credentials.
Required credentials:
- apiKey: Your KuCoin API key
- secretKey: Your KuCoin API secret (for signing)
- passphrase: Your KuCoin API passphrase (also HMAC signed)
Base URL:
- Mainnet: https://api.kucoin.com
对于需要身份验证的端点,您需要提供KuCoin API凭证。所需凭证如下:
- apiKey: 您的KuCoin API密钥
- secretKey: 您的KuCoin API密钥(用于签名)
- passphrase: 您的KuCoin API密码短语(同样需要HMAC签名)
基础URL:
Security
安全说明
Share Credentials
凭证共享
Users can provide KuCoin API credentials by sending a file where the content is in the following format:
bash
abc123...xyz
secret123...key
passphrase123...abc用户可以通过发送文件的方式提供KuCoin API凭证,文件内容格式如下:
bash
abc123...xyz
secret123...key
passphrase123...abcNever Disclose API Key and Secret
切勿泄露API Key和Secret
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 Mainnet.
切勿泄露存储API Key、Secret和Passphrase的文件位置。
切勿将API Key、Secret和Passphrase发送至主网以外的任何网站。
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: Mainnet
向用户展示凭证时:
- 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 (Mainnet)
- trading-bot (Mainnet)
展示账户列表时,仅显示账户名称和环境信息——绝不显示密钥:
KuCoin账户:
- main(主网)
- trading-bot(主网)
Transactions in Mainnet
主网交易操作
When performing transactions in mainnet, always confirm with the user before proceeding by asking them to write "CONFIRM" to proceed.
在主网执行交易操作时,必须先请求用户确认,要求用户输入"CONFIRM"后再继续执行。