AI-native runtime for KuCoin trading strategies
Author in Cursor, Claude Code or any AI IDE. Deploy from GitHub into a managed cloud runtime with first-class MCP control, logs and region selection.
Section 01 · At a glance
At a glance
- Venue
- KuCoin
- Venue type
- Crypto exchange (spot, margin, futures, options)
- Asset class
- Crypto
- Supported products
- Spot, cross/isolated margin (up to 10x), USDT/USDC-margined and coin-margined (inverse) perpetual contracts on futures.kucoin.com, BTC/ETH European-style options (USDT-settled, buyer-side only, app-only).
- Runtime model
- Containerised strategy runtime
- Deployment source
- GitHub
- Languages
- Any language that runs in a container
- Common integrations
- Native KuCoin REST + WebSocket, CCXT (kucoin, kucoinfutures), Freqtrade (community-confirmed spot), Hummingbot (kucoin, kucoin_perpetual), custom
- AI workflow integration
- MCP control surface
- TradingHost role
- Runtime, deployment, logs, health checks, region selection, MCP control
- KuCoin role
- Exchange account, API access, market access, execution venue
- Affiliation
- TradingHost is independent and is not affiliated with KuCoin. KuCoin is permanently barred from US persons per a CFTC consent order (March 2026) following Peken Global’s $297M DOJ plea in January 2025.
Section 02 · What KuCoin offers
What KuCoin offers
KuCoin offers spot, cross and isolated margin (up to 10x), USDT/USDC-margined and coin-margined (inverse) perpetuals on futures.kucoin.com, and BTC/ETH European-style options via REST and WebSocket APIs. Strategies authenticate with a 3-part credential (key, secret and passphrase) signed with HMAC-SHA256. Spot and futures are separate API stacks with separate keys. Endpoint specifics change over time. The shape is durable; the precise rate-limit weights, fee tiers and symbol lists live in KuCoin’s docs.
Markets and strategy patterns
- Spot market making across deep altcoin pairs
- USDT-margined perpetual on futures.kucoin.com
- Coin-margined (inverse) perpetual on futures.kucoin.com
- Cross and isolated margin trading up to 10x
- Sub-account hierarchy for strategy isolation
- Copy strategies via KuCoin’s lead trader program
- Demo trading via sandbox (spot only)
- KCS-staking fee discount tier strategies
API surface
- Product surfaces
- Spot at api.kucoin.com, futures at api-futures.kucoin.com, sandbox at openapi-sandbox.kucoin.com (spot only).
- Connection methods
- REST plus WebSocket. WebSocket requires a two-step pattern: POST to /api/v1/bullet-public or /api/v1/bullet-private to fetch a token and the actual wss:// endpoint from instanceServers. Reconnect logic must re-fetch the token (it expires). Honor returned pingInterval (~18000ms) and pingTimeout (~10000ms).
- Authentication
- 3-part credential (API key + API secret + passphrase), HMAC-SHA256 signing. Required headers: KC-API-KEY, KC-API-SIGN (base64 of HMAC-SHA256 over timestamp + method + endpoint + body), KC-API-TIMESTAMP (ms since epoch), KC-API-PASSPHRASE (for v2 keys, this is base64 of HMAC-SHA256 of the raw passphrase, not the raw value), KC-API-KEY-VERSION ("2" for current v2 keys). Spot and Futures use separate API keys created on separate dashboards.
For specifics, refer to KuCoin
Specific endpoints, rate-limit weights, symbol lists, fee tiers and version history live in KuCoin’s documentation. Treat these as the source of truth.
Section 03 · Build with AI
Build your KuCoin strategy with AI
Pick an integration method, fork a TradingHost framework starter, and author your strategy in an AI IDE. Cursor, Claude Code, GitHub Copilot and CLI-based AI agents all work with the same GitHub-native deployment loop.
Native KuCoin REST + WebSocket
Direct control over KuCoin-specific behaviour, account data, sub-account routing and order execution logic.
CCXT
Common interface across KuCoin and other crypto exchanges. Spot and futures are modelled as two exchange classes: kucoin and kucoinfutures.
Freqtrade or Hummingbot
Framework-based deployments using their strategy structure and configuration model.
Custom connector
Your own internal trading engine or proprietary KuCoin integration.
Framework support for KuCoin products
Coverage varies by framework. Native API and CCXT span the broadest KuCoin surface; Hummingbot covers spot and perpetual futures; Freqtrade covers spot only (community-confirmed, passphrase field required in config).
✓ confirmed support per official framework docs. "no" indicates not officially documented as supported.
TradingHost does not force a framework. It runs your project.
Author with AI
The framework starters above pair naturally with AI IDEs. The TradingHost MCP control surface closes the loop: AI tools can inspect deployments, review logs and manage the runtime alongside you, never the trade execution path.
Section 04 · Run on TradingHost
Run your code on TradingHost
KuCoin provides the exchange and API access. TradingHost provides the production environment where your KuCoin-connected strategy runs.
Instead of running strategy code on a laptop, desktop machine, generic VPS or manually configured server, you deploy from GitHub into a TradingHost-managed container runtime.
You
- Your repo contains your code.
- Your deployment defines how it runs.
- Your strategy connects to KuCoin.
TradingHost
- Keeps the runtime online.
- Surfaces logs and health checks.
- Region selection.
- Controlled deployment surface.
Deployment flow
- STEP 01
Connect GitHub
Authorise TradingHost to access your GitHub account.
- STEP 02
Link a repo or start from a framework
Point TradingHost at your existing strategy repo, or fork a TradingHost framework runtime (CCXT, Freqtrade or Hummingbot) for a working baseline.
- STEP 03
Deploy into a TradingHost container
Pick a region (EU or US-East), supply the environment values your strategy needs (KuCoin’s 3-part credential, key, secret and passphrase, plus the KC-API-KEY-VERSION: 2 requirement for current v2 keys), and deploy. TradingHost builds your container from the repo and runs your strategy on managed Kubernetes infrastructure. No local Docker install required.
- STEP 04
Monitor logs and health
Watch live logs, health and runtime state from the TradingHost dashboard. The same surface is reachable through MCP from any AI IDE, so Cursor, Claude Code or a CLI agent can read deployment state and manage the runtime alongside you.
- STEP 05
Update and redeploy
Push changes to your GitHub main branch and TradingHost redeploys automatically.
Section 05 · Operational notes
Operational notes for KuCoin
Things that bite you when you actually run a KuCoin strategy in a containerised cloud runtime, not in KuCoin’s docs, not in framework READMEs. Every claim below is quoted or paraphrased from KuCoin’s own documentation (or the CFTC filing for the US-access note); the deployment-side guidance is from running these strategies on TradingHost.
01 · 3-part credential
Key, secret and passphrase, plus version header
Spot and futures both require key + secret + passphrase. For v2 keys the passphrase header must be base64 of HMAC-SHA256 of the raw passphrase, not the raw value. The KC-API-KEY-VERSION header must be set to "2" for current keys; omitting it on a v2 key produces a signature error.
02 · Common errors
400003 and 400004 are passphrase failures
Missing or wrongly formatted passphrase produces 400003 KC-API-KEY not exists or 400004 KC-API-PASSPHRASE error. CCXT has a documented history of KC-API-KEY-VERSION mismatches that reproduce these errors.
03 · Separate stacks
Spot and Futures are different APIs with different keys
Spot keys do not authenticate against api-futures.kucoin.com. Strategies that trade both surfaces need two key pairs and two configured clients. CCXT models this as two separate exchange classes (kucoin and kucoinfutures).
04 · WebSocket
Bullet-token handshake, not a static URL
KuCoin doesn’t expose a static wss:// URL. POST to /api/v1/bullet-public (public feeds) or /api/v1/bullet-private (account/order feeds) to receive a one-shot token and the actual wss:// endpoint from instanceServers. Tokens expire, so reconnect logic must re-fetch. Honor the returned pingInterval (~18s) and pingTimeout (~10s).
05 · Sandbox
Spot only, fully separate state
openapi-sandbox.kucoin.com covers spot endpoints and uses a fully separate login, API key set and fake balance. Futures, margin and options are not represented in the sandbox, so strategies touching api-futures.kucoin.com need to dry-run another way (mock execution layer, very small live size, or framework-native dry-run).
06 · Rate limits
Weighted resource pools per VIP level
Weighted resource pools per VIP level reset on a 30-second sliding window. HTTP 429 with body code 429000 on exhaustion. Each response carries pool quota, remaining quota and reset-countdown headers. Several v1 endpoints (DELETE /api/v1/orders, GET /api/v1/hf/orders/active) are deprecated in favor of v2/v3 with higher limits.
07 · US availability
Permanently barred per CFTC consent order March 2026
Per the SDNY consent order of March 30, 2026 against Peken Global Limited (KuCoin’s operator), KuCoin is permanently barred from accepting US customers unless Peken Global registers as a Foreign Board of Trade with the CFTC. The bar applies to the KuCoin account, not to where strategy code runs; TradingHost runtime regions and connectivity do not change this restriction.
Section 06 · Built for
Built for
TradingHost KuCoin runtimes are best suited to:
- Algo developers running spot strategies across KuCoin’s deep altcoin pair list
- Perpetual traders running USDT-margined or inverse perpetuals on futures.kucoin.com
- Quant teams using sub-accounts to isolate strategies or run capital pods
- CCXT, Freqtrade and Hummingbot users
- AI / Cursor / Claude developers driving deployments through MCP and GitHub
Connecting GitHub and creating your first strategy is free.
Section 08 · FAQ
FAQ
No. TradingHost is independent and is not affiliated with KuCoin.
No. Your strategy code connects to KuCoin and sends instructions according to your own logic, account permissions and integration method. TradingHost provides the runtime where that code runs.
No. KuCoin API access is provided by KuCoin. You are responsible for your KuCoin account, API permissions, credentials and compliance with KuCoin’s terms.
No. TradingHost is the cloud runtime where your strategy code runs. We do not provide signals, AI prediction models or pre-built strategies. With TradingHost you write or generate the strategy yourself (often with Cursor or Claude Code), keep it in GitHub as your code, and use TradingHost to run it in production. 3Commas, Cryptohopper and similar products own the strategy logic; TradingHost runs your strategy.
AWS and DigitalOcean give you raw compute. You handle OS updates, container orchestration, log shipping, secret rotation, region failover and uptime monitoring yourself. TradingHost gives you a managed runtime purpose-built for trading strategies: GitHub-native deployment, MCP-driven control from AI IDEs, log and health surfaces out of the box. If you want to operate the infrastructure yourself, AWS works. If you want the runtime as a managed service, TradingHost is the shorter path.
Yes. TradingHost runs Python strategies; pick the framework runtime that matches your stack or deploy your own repo.
Yes. TradingHost supports any language that can run inside a container.
KuCoin’s spot and futures venues are separate APIs (api.kucoin.com vs api-futures.kucoin.com) with separate API keys. In CCXT this is two exchange classes: kucoin for spot and margin, and kucoinfutures for futures.kucoin.com. Instantiate both with their own key + secret + passphrase, route orders to the correct client per symbol, and store the two credential sets as separate TradingHost secrets.
Yes, if your project is designed that way. You can run multiple strategy processes or services inside one runtime, or separate them into different runtimes for isolation and operational clarity. See the TradingHost runtime page for the multi-strategy model.
The fastest path is to fork a TradingHost framework runtime: CCXT, Freqtrade or Hummingbot for a ready-to-deploy project. Or connect your own GitHub strategy repo. Linking a GitHub repo and creating a strategy is free; runtime plans are listed on the pricing page.
In your GitHub-controlled secrets workflow. TradingHost reads them at runtime through GitHub repository secrets, environment secrets or your own approved secret-management process. TradingHost does not need custody of your API key, secret or passphrase. See platform secrets for the full handling model.
No. Strategies should never need withdrawal permissions. Use scoped permissions (read, trade) and IP whitelisting where appropriate.
Yes. TradingHost supports MCP-based control for AI IDEs including Cursor, Claude Code, GitHub Copilot and CLI-based AI agents. AI tools can inspect deployments, review logs, restart strategies and manage runtime workflows. MCP is a control and observability surface, not the trade execution path. See the MCP control surface for the full picture.
Both. The MCP control surface works equally well from CLI-based agents (Claude Code CLI, custom MCP clients, scripted MCP calls) and from inside an IDE. The GitHub-native deployment loop also works without any AI tooling: a regular git push to your main branch triggers a redeploy.
The runtime detects the crash and exposes the relevant logs and health information. Where supported, the affected strategy can be restarted without disrupting other strategies running in the same container. Your strategy code is still responsible for safe error handling, duplicate-order protection and risk controls. See observability for the logs and health surface.
Almost always one of three things. (1) The passphrase header for a v2 key must be base64 of HMAC-SHA256 of the raw passphrase, not the raw passphrase. (2) The KC-API-KEY-VERSION header must be set to "2" for v2 keys. (3) The signature payload is timestamp + UPPERCASE_METHOD + endpoint_with_query + body, with body as empty string on GET/DELETE. Missing any of these reproduces the same error class.
KuCoin doesn’t expose a static wss:// URL. Before connecting, POST to /api/v1/bullet-public (public feeds) or /api/v1/bullet-private (account/order feeds). The response gives you a one-shot token plus instanceServers[0].endpoint, the pingInterval and the pingTimeout. Connect to that endpoint with ?token=...&connectId=..., then ping on the interval returned. Tokens expire, so reconnect logic has to re-fetch.
No. Following a CFTC consent order entered March 30, 2026 against Peken Global Limited (KuCoin’s operator), KuCoin is permanently barred from accepting US persons unless it registers as a Foreign Board of Trade. The restriction applies to the KuCoin account, not to where strategy code is hosted, so deploying on TradingHost does not change eligibility.
Spot only. openapi-sandbox.kucoin.com covers spot endpoints and uses a fully separate login, API key set and fake balance. Futures, margin and options are not represented in the sandbox, so any strategy that touches api-futures.kucoin.com needs to be paper-traded another way (mock execution layer, very small live size, or framework-native dry-run) before scale-up.
TradingHost runs in the EU and US-East regions. Pick the region closest to the matching engine your strategy depends on. See the regions page for routing and proximity details.
No. TradingHost is focused on production runtime and deployment. Backtesting belongs in your research stack, framework or AlgoBuilder.