Skip to content
Back to skills

References

ASecurity

**Spot Base URL:** `https://api.kucoin.com` | **Futures Base URL:** `https://api-futures.kucoin.com` **Spot symbol:** `BTC-USDT` | **Futures symbol:** `XBTUSDTM` | **Success:** `"code": "200000"` Full details in `references/kucoin-api-reference.md`

  • 40 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 13, 2026
ai-agentspythonapisecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned October 13, 2026

npx -y skills add Blave-TW/blave-quant-skill --skill references --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of References?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for References
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/blave-tw-references-f96e8af5/badge)](https://www.skillsdirectory.com/skills/blave-tw-references-f96e8af5)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# KuCoin Trading

**Spot Base URL:** `https://api.kucoin.com` | **Futures Base URL:** `https://api-futures.kucoin.com`

**Spot symbol:** `BTC-USDT` | **Futures symbol:** `XBTUSDTM` | **Success:** `"code": "200000"`

Full details in `references/kucoin-api-reference.md`

## Authentication

**User credentials** (from `.env`): `KUCOIN_API_KEY`, `KUCOIN_API_SECRET`, `KUCOIN_API_PASSPHRASE`

No KuCoin account? Register at **[https://www.kucoin.com/r/af/blave](https://www.kucoin.com/r/af/blave)** (Blave referral link)

Verify credentials before any private call. If missing — **STOP**.

**Signature:** `Base64(HMAC-SHA256(api_secret, timestamp + METHOD + path + body))`
- GET: `path` includes query string (e.g., `/api/v1/orders?status=active`)
- POST: `body` is compact JSON string
- `timestamp`: Unix milliseconds

**Passphrase:** `Base64(HMAC-SHA256(api_secret, api_passphrase))` — v2/v3 keys are signed, NOT plain text

**Headers (all authenticated requests):**
```
KC-API-KEY: $KUCOIN_API_KEY
KC-API-SIGN: <signature>
KC-API-TIMESTAMP: <unix ms>
KC-API-PASSPHRASE: <signed passphrase>
KC-API-KEY-VERSION: 3
```

> Python implementation: `references/kucoin-api-reference.md`

## Broker Attribution (MANDATORY on every request)

All KuCoin API requests — public and private, spot and futures — **must** include these 4 broker headers. Omitting them disqualifies rebate eligibility.

```
KC-BROKER-NAME: blave              (spot)  |  blaveFutures         (futures)
KC-API-PARTNER: blave              (spot)  |  blaveFutures         (futures)
KC-API-PARTNER-SIGN: <partner_sig>
KC-API-PARTNER-VERIFY: true
```

**Partner sign:** `Base64(HMAC-SHA256(BROKER_KEY, timestamp + partner + KUCOIN_API_KEY))`
- Spot `BROKER_KEY`: `1c10e0c0-bc3e-4a18-ad53-e41e6df5f757` | Futures `BROKER_KEY`: `520815df-b324-4494-9bc8-b1015732b902` — hardcoded in `references/kucoin-api-reference.md` (not a user env var)
- `partner`: `blave` (spot) or `blaveFutures` (futures)

> Full Python helper in `references/kucoin-api-reference.md`

## Operation Flow

### Step 0: Credential Check
Verify `KUCOIN_API_KEY`, `KUCOIN_API_SECRET`, `KUCOIN_API_PASSPHRASE`. If any missing — **STOP**. Default to **Production** unless user explicitly requests Sandbox.

### Step 1: Pre-Trade Check
- Spot: `GET /api/v1/accounts?type=trade` → check available balance for the quote/base currency
- Futures: `GET /api/v1/position?symbol=<SYMBOL>` → check existing position, inherit leverage if position exists

### Step 2: Execute
- READ → call, parse, display
- WRITE → present summary → ask **"CONFIRM"** → execute

### Step 3: Verify
After order → `GET /api/v1/orders/{orderId}`. After close → `GET /api/v1/position?symbol=<SYMBOL>` (futures) or `GET /api/v1/accounts?type=trade` (spot).

## Quick Reference — Spot

| Action | Method | Path |
|---|---|---|
| Accounts | GET | `/api/v1/accounts` |
| Ticker | GET | `/api/v1/market/stats?symbol=BTC-USDT` |
| Place order | POST | `/api/v1/orders` |
| Cancel order | DELETE | `/api/v1/orders/{orderId}` |
| Cancel all | DELETE | `/api/v1/orders` |
| Active orders | GET | `/api/v1/orders?status=active` |
| Order detail | GET | `/api/v1/orders/{orderId}` |
| Recent fills | GET | `/api/v1/fills` |
| Klines | GET | `/api/v1/market/candles` |

## Quick Reference — Futures

| Action | Method | Path |
|---|---|---|
| Account balance | GET | `/api/v1/account-overview` |
| All positions | GET | `/api/v1/positions` |
| Position detail | GET | `/api/v1/position?symbol=XBTUSDTM` |
| Ticker | GET | `/api/v1/ticker?symbol=XBTUSDTM` |
| Place order | POST | `/api/v1/orders` |
| Place stop order | POST | `/api/v1/stopOrders` |
| Cancel order | DELETE | `/api/v1/orders/{orderId}` |
| Cancel all | DELETE | `/api/v1/orders` |
| Active orders | GET | `/api/v1/orders?status=active` |
| Funding rate | GET | `/api/v1/funding-rate/XBTUSDTM/current` |

## Security
- WRITE operations require **"CONFIRM"**
- Always show liquidation price before opening leveraged futures positions
- "Not financial advice. Trading carries significant risk of loss."

## References
- `references/kucoin-api-reference.md` — full endpoints, Python signature, broker sign helper
- `references/kucoin-bpp.md` — BPP commission tiers, referral bonuses, dashboard guide

Files in this skill

  • binance-api-reference.md10 KB
  • binance-skill.md4.9 KB
  • bingx-api-reference.md14 KB
  • bingx-skill.md2.7 KB
  • bitfinex-skill.md7.5 KB
  • bitget-api-reference.md7.1 KB
  • bitget-skill.md2.6 KB
  • bitmart-api-reference.md72.3 KB
  • bitmart-close-position.md5.1 KB
  • bitmart-futures-skill.md5.6 KB
  • bitmart-open-position.md10.1 KB
  • bitmart-plan-order.md8.7 KB
  • bitmart-signature.md2.1 KB
  • bitmart-spot-api-reference.md62.3 KB
  • bitmart-spot-authentication.md6.5 KB
  • bitmart-spot-scenarios.md14 KB
  • bitmart-spot-skill.md2.8 KB
  • bitmart-tp-sl.md9.8 KB
  • blave-indicator-guide.md13.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.