KuCoin Spot 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).
Quick Reference
Classic API - Spot Market Data
| Endpoint |
Description |
Required |
Optional |
Authentication |
/api/v3/announcements (GET) |
Get announcements |
None |
currentPage, pageSize, annType, lang, startTime, endTime |
No |
/api/v3/currencies/{currency} (GET) |
Get currency detail |
currency (path) |
chain |
No |
/api/v3/currencies (GET) |
Get all currencies |
None |
None |
No |
/api/v2/symbols/{symbol} (GET) |
Get symbol detail |
symbol (path) |
None |
No |
/api/v2/symbols (GET) |
Get all symbols |
None |
market |
No |
/api/v1/market/orderbook/level1 (GET) |
Get ticker (best bid/ask) |
symbol |
None |
No |
/api/v1/market/allTickers (GET) |
Get all tickers |
None |
None |
No |
/api/v1/market/histories (GET) |
Get trade history |
symbol |
None |
No |
/api/v1/market/candles (GET) |
Get klines |
symbol, type |
startAt (sec), endAt (sec) |
No |
/api/v1/market/orderbook/level2_{size} (GET) |
Get part orderbook |
size (path: 20, 100), symbol |
None |
No |
/api/v3/market/orderbook/level2 (GET) |
Get full orderbook |
symbol |
None |
Yes |
/api/v1/market/orderbook/callauction/level2_{size} (GET) |
Get call auction part orderbook |
size (path: 20, 100), symbol |
None |
No |
/api/v1/market/callauctionData (GET) |
Get call auction info |
symbol |
None |
No |
/api/v1/prices (GET) |
Get fiat price |
None |
base, currencies |
No |
/api/v1/market/stats (GET) |
Get 24hr stats |
symbol |
None |
No |
/api/v1/markets (GET) |
Get market list |
None |
None |
No |
Classic API - Spot HF Order Queries
| Endpoint |
Description |
Required |
Optional |
Authentication |
/api/v1/hf/orders/{orderId} (GET) |
Get order by orderId |
orderId (path), symbol |
None |
Yes |
/api/v1/hf/orders/client-order/{clientOid} (GET) |
Get order by clientOid |
clientOid (path), symbol |
None |
Yes |
/api/v1/hf/orders/active/symbols (GET) |
Get symbols with open orders |
None |
None |
Yes |
/api/v1/hf/orders/active (GET) |
Get open orders |
symbol |
None |
Yes |
/api/v1/hf/orders/active/page (GET) |
Get open orders (paginated) |
symbol |
pageNum, pageSize |
Yes |
/api/v1/hf/orders/done (GET) |
Get closed orders |
symbol |
side, type, lastId, limit, startAt, endAt |
Yes |
/api/v1/hf/fills (GET) |
Get trade history |
symbol |
orderId, side, type, lastId, limit, startAt, endAt |
Yes |
/api/v1/hf/orders/dead-cancel-all/query (GET) |
Get DCP settings |
None |
None |
Yes |
Classic API - Stop Order Queries
| Endpoint |
Description |
Required |
Optional |
Authentication |
/api/v1/stop-order (GET) |
Get stop orders list |
None |
symbol, side, type, tradeType, startAt, endAt, currentPage, orderIds, pageSize, stop |
Yes |
/api/v1/stop-order/{orderId} (GET) |
Get stop order by orderId |
orderId (path) |
None |
Yes |
/api/v1/stop-order/queryOrderByClientOid (GET) |
Get stop order by clientOid |
clientOid |
symbol |
Yes |
Classic API - OCO Order Queries
| Endpoint |
Description |
Required |
Optional |
Authentication |
/api/v3/oco/order/{orderId} (GET) |
Get OCO order by orderId |
orderId (path) |
None |
Yes |
/api/v3/oco/client-order/{clientOid} (GET) |
Get OCO order by clientOid |
clientOid (path) |
None |
Yes |
/api/v3/oco/orders (GET) |
Get OCO order list |
None |
symbol, startAt, endAt, orderIds, pageSize, currentPage |
Yes |
/api/v3/oco/order/details/{orderId} (GET) |
Get OCO order detail by orderId |
orderId (path) |
None |
Yes |
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. Note: For
/api/v1/market/candles, use seconds (10-digit Unix timestamp). For other endpoints, use milliseconds (13-digit timestamp).
- endAt: End time. Note: For
/api/v1/market/candles, use seconds (10-digit Unix timestamp). For other endpoints, use milliseconds (13-digit timestamp).
- 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)
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
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:
Security
Share Credentials
Users can provide KuCoin API credentials by sending a file where the content is in the following format:
abc123...xyz
secret123...key
passphrase123...abc
Never Disclose API Key and 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.
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
Listing Accounts
When listing accounts, show names and environment only -- never keys:
KuCoin Accounts:
- main (Mainnet)
- trading-bot (Mainnet)
Transactions in Mainnet
When performing transactions in mainnet, always confirm with the user before proceeding by asking them to write "CONFIRM" to proceed.
1---2name: spot3description: KuCoin Spot trading using the KuCoin API. Authentication requires API Key, API Secret, and Passphrase.4license: MIT5---67# KuCoin Spot Skill89Spot trading on KuCoin using authenticated API endpoints. Requires API Key, API Secret, and Passphrase for authenticated endpoints. Return the result in JSON format.1011> **Note:** This skill only supports Classic REST API GET endpoints (read-only operations).1213## Quick Reference1415### Classic API - Spot Market Data1617| Endpoint | Description | Required | Optional | Authentication |18|----------|-------------|----------|----------|----------------|19| `/api/v3/announcements` (GET) | Get announcements | None | currentPage, pageSize, annType, lang, startTime, endTime | No |20| `/api/v3/currencies/{currency}` (GET) | Get currency detail | currency (path) | chain | No |21| `/api/v3/currencies` (GET) | Get all currencies | None | None | No |22| `/api/v2/symbols/{symbol}` (GET) | Get symbol detail | symbol (path) | None | No |23| `/api/v2/symbols` (GET) | Get all symbols | None | market | No |24| `/api/v1/market/orderbook/level1` (GET) | Get ticker (best bid/ask) | symbol | None | No |25| `/api/v1/market/allTickers` (GET) | Get all tickers | None | None | No |26| `/api/v1/market/histories` (GET) | Get trade history | symbol | None | No |27| `/api/v1/market/candles` (GET) | Get klines | symbol, type | startAt (sec), endAt (sec) | No |28| `/api/v1/market/orderbook/level2_{size}` (GET) | Get part orderbook | size (path: 20, 100), symbol | None | No |29| `/api/v3/market/orderbook/level2` (GET) | Get full orderbook | symbol | None | Yes |30| `/api/v1/market/orderbook/callauction/level2_{size}` (GET) | Get call auction part orderbook | size (path: 20, 100), symbol | None | No |31| `/api/v1/market/callauctionData` (GET) | Get call auction info | symbol | None | No |32| `/api/v1/prices` (GET) | Get fiat price | None | base, currencies | No |33| `/api/v1/market/stats` (GET) | Get 24hr stats | symbol | None | No |34| `/api/v1/markets` (GET) | Get market list | None | None | No |3536### Classic API - Spot HF Order Queries3738| Endpoint | Description | Required | Optional | Authentication |39|----------|-------------|----------|----------|----------------|40| `/api/v1/hf/orders/{orderId}` (GET) | Get order by orderId | orderId (path), symbol | None | Yes |41| `/api/v1/hf/orders/client-order/{clientOid}` (GET) | Get order by clientOid | clientOid (path), symbol | None | Yes |42| `/api/v1/hf/orders/active/symbols` (GET) | Get symbols with open orders | None | None | Yes |43| `/api/v1/hf/orders/active` (GET) | Get open orders | symbol | None | Yes |44| `/api/v1/hf/orders/active/page` (GET) | Get open orders (paginated) | symbol | pageNum, pageSize | Yes |45| `/api/v1/hf/orders/done` (GET) | Get closed orders | symbol | side, type, lastId, limit, startAt, endAt | Yes |46| `/api/v1/hf/fills` (GET) | Get trade history | symbol | orderId, side, type, lastId, limit, startAt, endAt | Yes |47| `/api/v1/hf/orders/dead-cancel-all/query` (GET) | Get DCP settings | None | None | Yes |4849### Classic API - Stop Order Queries5051| Endpoint | Description | Required | Optional | Authentication |52|----------|-------------|----------|----------|----------------|53| `/api/v1/stop-order` (GET) | Get stop orders list | None | symbol, side, type, tradeType, startAt, endAt, currentPage, orderIds, pageSize, stop | Yes |54| `/api/v1/stop-order/{orderId}` (GET) | Get stop order by orderId | orderId (path) | None | Yes |55| `/api/v1/stop-order/queryOrderByClientOid` (GET) | Get stop order by clientOid | clientOid | symbol | Yes |5657### Classic API - OCO Order Queries5859| Endpoint | Description | Required | Optional | Authentication |60|----------|-------------|----------|----------|----------------|61| `/api/v3/oco/order/{orderId}` (GET) | Get OCO order by orderId | orderId (path) | None | Yes |62| `/api/v3/oco/client-order/{clientOid}` (GET) | Get OCO order by clientOid | clientOid (path) | None | Yes |63| `/api/v3/oco/orders` (GET) | Get OCO order list | None | symbol, startAt, endAt, orderIds, pageSize, currentPage | Yes |64| `/api/v3/oco/order/details/{orderId}` (GET) | Get OCO order detail by orderId | orderId (path) | None | Yes |6566---6768## Parameters6970### Common Parameters7172* **symbol**: Trading pair (e.g., BTC-USDT)73* **currency**: Currency code (e.g., BTC, ETH, USDT)74* **orderId**: The unique order ID generated by the trading system75* **clientOid**: Client order ID, unique identifier created by the user (max 40 characters)76* **side**: Trade direction filter: buy | sell77* **type**: Order type filter: limit | market78* **startAt**: Start time. **Note:** For `/api/v1/market/candles`, use **seconds** (10-digit Unix timestamp). For other endpoints, use **milliseconds** (13-digit timestamp).79* **endAt**: End time. **Note:** For `/api/v1/market/candles`, use **seconds** (10-digit Unix timestamp). For other endpoints, use **milliseconds** (13-digit timestamp).80* **pageSize**: Number of items per page (e.g., 20, 50, 100)81* **currentPage**: Current page number for Classic pagination82* **lastId**: ID of last record from previous batch for cursor-based pagination83* **limit**: Number of results per page. Default: 20, Max: 10084* **stop**: Stop order trigger condition filter: loss | entry85* **tradeType**: Trade type filter for stop orders86* **market**: Trading market filter for Classic symbols (e.g., USDS, BTC, ALTS)87* **chain**: Blockchain network for currency query (e.g., ERC20, TRC20)88* **base**: Base fiat currency for price conversion (e.g., USD, EUR). Default: USD89* **currencies**: Comma-separated cryptocurrency list for fiat price (e.g., BTC,ETH)90* **annType**: Announcement type (e.g., latest-announcements, new-listings, activities)91* **lang**: Announcement language (e.g., en_US, zh_HK, ja_JP)9293### Enums9495* **side**: buy | sell96* **type**: limit | market97* **stop**: loss | entry98* **kline type**: 1min | 3min | 5min | 15min | 30min | 1hour | 2hour | 4hour | 6hour | 8hour | 12hour | 1day | 1week | 1month99* **annType**: latest-announcements | activities | product-updates | vip | maintenance-updates | delistings | others | api-campaigns | new-listings | futures-announcements100101## Authentication102103For endpoints that require authentication, you will need to provide KuCoin API credentials.104Required credentials:105106* apiKey: Your KuCoin API key107* secretKey: Your KuCoin API secret (for signing)108* passphrase: Your KuCoin API passphrase (also HMAC signed)109110Base URL:111* Mainnet: https://api.kucoin.com112113## Security114115### Share Credentials116117Users can provide KuCoin API credentials by sending a file where the content is in the following format:118119```bash120abc123...xyz121secret123...key122passphrase123...abc123```124125### Never Disclose API Key and Secret126127Never disclose the location of the API key, secret, and passphrase file.128129Never send the API key, secret, and passphrase to any website other than Mainnet.130131### Never Display Full Secrets132133When showing credentials to users:134- **API Key:** Show first 5 + last 4 characters: `su1Qc...8akf`135- **Secret Key:** Always mask, show only last 5: `***...aws1`136- **Passphrase:** Always mask entirely: `***...`137138Example response when asked for credentials:139Account: main140API Key: su1Qc...8akf141Secret: ***...aws1142Passphrase: ***...143Environment: Mainnet144145### Listing Accounts146147When listing accounts, show names and environment only -- never keys:148KuCoin Accounts:149* main (Mainnet)150* trading-bot (Mainnet)151152### Transactions in Mainnet153154When performing transactions in mainnet, always confirm with the user before proceeding by asking them to write "CONFIRM" to proceed.