$npx -y skills add Kucoin/kucoin-skills-hub --skill brokerKuCoin Broker and Affiliate using the KuCoin API. Affiliate invite management, commission queries, Broker Pro user management, and ND (Exchange) Broker queries. Authentication requires API Key, API Secret, and Passphrase.
| 1 | # KuCoin Broker Skill |
| 2 | |
| 3 | Broker and Affiliate operations on KuCoin using authenticated API endpoints. Covers Affiliate invite/commission management, Broker Pro rebate and user queries, and ND Exchange Broker queries (KYC status, sub-account info, deposits, withdrawals, and rebates). Requires API Key, API Secret, and Passphrase for all endpoints. Return the result in JSON format. |
| 4 | |
| 5 | > **Note:** This skill only supports Classic REST API GET endpoints (read-only operations). |
| 6 | |
| 7 | ## Quick Reference |
| 8 | |
| 9 | ### Affiliate |
| 10 | |
| 11 | | Endpoint | Description | Required | Optional | Authentication | |
| 12 | |----------|-------------|----------|----------|----------------| |
| 13 | | `/api/v2/affiliate/queryInvitees` (GET) | Get Invited (list of invited users with trade stats) | None | userType, referralCode, uid, registrationStartAt, registrationEndAt, page, pageSize | Yes | |
| 14 | | `/api/v2/affiliate/queryMyCommission` (GET) | Get Commission (affiliate commission records) | None | siteType, rebateType, rebateStartAt, rebateEndAt, page, pageSize, userId, dataType | Yes | |
| 15 | | `/api/v2/affiliate/queryTransactionByUid` (GET) | Get Trade History (trade records for a specific invitee) | uid | tradeType, tradeStartAt, tradeEndAt, page, pageSize | Yes | |
| 16 | | `/api/v2/affiliate/queryTransactionByTime` (GET) | Get Transaction (trade records by time range) | tradeStartAt, tradeEndAt | uid, tradeType, lastId, direction, pageSize | Yes | |
| 17 | | `/api/v2/affiliate/queryKumining` (GET) | Get Kumining (KuMining commission records) | None | uid, startAt, endAt, lastId, direction, pageSize | Yes | |
| 18 | |
| 19 | ### Broker Pro |
| 20 | |
| 21 | | Endpoint | Description | Required | Optional | Authentication | |
| 22 | |----------|-------------|----------|----------|----------------| |
| 23 | | `/api/v2/broker/api/rebate/download` (GET) | Get Broker Rebate (download rebate order file) | begin, end, tradeType | None | Yes | |
| 24 | | `/api/v2/broker/queryMyCommission` (GET) | Get Commission (broker commission records) | None | siteType, tradeType, rebateType, startAt, endAt, page, pageSize | Yes | |
| 25 | | `/api/v2/broker/queryUser` (GET) | Get User List (broker sub-users) | None | tradeType, uid, rcode, tag, startAt, endAt, page, pageSize | Yes | |
| 26 | | `/api/v2/broker/queryDetailByUid` (GET) | Get User Transactions (trade records per user UID) | None | tradeType, uid, startAt, endAt, lastId, direction, pageSize | Yes | |
| 27 | |
| 28 | ### ND Exchange Broker |
| 29 | |
| 30 | > **⚠️ Note:** The ND Exchange Broker endpoints below (`/api/v1/broker/nd/*` and `/api/kyc/ndBroker/*`) may have been deprecated or migrated. These endpoints currently return 404 Not Found. They require ND Broker-level API permissions. Please consult the latest KuCoin API documentation for updated paths. |
| 31 | |
| 32 | | Endpoint | Description | Required | Optional | Authentication | |
| 33 | |----------|-------------|----------|----------|----------------| |
| 34 | | `/api/kyc/ndBroker/proxyClient/status/list` (GET) | Get KYC Status (by UID list) | clientUids | None | Yes | |
| 35 | | `/api/kyc/ndBroker/proxyClient/status/page` (GET) | Get KYC Status List (paginated) | None | pageNumber, pageSize | Yes | |
| 36 | | `/api/v1/broker/nd/info` (GET) | Get Broker Info (rebate download by date range) | begin, end, tradeType | None | Yes | |
| 37 | | `/api/v1/broker/nd/account` (GET) | Get Sub-Account (list sub-accounts) | None | uid, currentPage, pageSize | Yes | |
| 38 | | `/api/v1/broker/nd/account/apikey` (GET) | Get Sub-Account API Key | uid | apiKey | Yes | |
| 39 | | `/api/v3/broker/nd/transfer/detail` (GET) | Get Transfer History | orderId | None | Yes | |
| 40 | | `/api/v1/asset/ndbroker/deposit/list` (GET) | Get Deposit List (sub-account deposits) | None | currency, status, hash, startTimestamp, endTimestamp, limit | Yes | |
| 41 | | `/api/v3/broker/nd/deposit/detail` (GET) | Get Deposit Detail | currency, hash | None | Yes | |
| 42 | | `/api/v3/broker/nd/withdraw/detail` (GET) | Get Withdraw Detail | withdrawalId | None | Yes | |
| 43 | | `/api/v1/broker/nd/rebate/download` (GET) | Get Broker Rebate (ND broker rebate download) | begin, end, tradeType | None | Yes | |
| 44 | |
| 45 | --- |
| 46 | |
| 47 | ## Parameters |
| 48 | |
| 49 | ### Affiliate Parameters |
| 50 | |
| 51 | * **userType**: Invited user type: `1` (Regular), `2` (KYC-verified), `3` (First-trade) |
| 52 | * **referralCode**: The referral code (rcode) through which the user registered |
| 53 | * **uid**: Invitee UID (for trade history query) or comma-separated UIDs |
| 54 | * **registrationStartAt / registrationEndAt**: Registration time range (13-digit timestamp) |
| 55 | * **siteType**: Commission source site. Default: `all` |
| 56 | * **rebateType**: Rebate type: `0` (all), `1` (spot), `2` (futures) |
| 57 | * **rebateStartAt / rebateEndAt**: Commission issuance time range (13-digit timestamp); max one-year span |
| 58 | * **tradeStartAt / tradeEndAt**: Trade time range (13-digit timestamp) |
| 59 | * **tradeType**: Trading type: `SPOT` | `FEATURE` |
| 60 | * **dataType**: Data type: `trade |