Guide
BrokerMarket dataCrypto API key

KuCoin API guide

KuCoin lists thousands of pairs and is a common venue for altcoin strategies.

Last verified · Also known as KuCoin API, KuCoin Futures API

Quick answer

KuCoin’s API covers spot, margin and futures over REST and WebSocket. Private calls are signed with HMAC-SHA256 over timestamp + method + path + body, and also send the passphrase you chose (itself HMAC-signed for v2+ keys). Public candles are keyless at /api/v1/market/candles. KuCoin is not licensed for US residents.

KuCoin API at a glance

Pricing
Free API; trading fees apply
Availability
Global; not licensed for US residents
Paper trading
No sandbox
Integration type
REST + API key
In AlgoGP
Design and backtest in AlgoGP, connect the exported code
Auth
Key + secret + passphrase, HMAC-SHA256
Spot host
https://api.kucoin.com
Futures host
https://api-futures.kucoin.com
Streaming
WebSocket via a token from /api/v1/bullet-public

Public market data from KuCoin

curl -s "https://api.kucoin.com/api/v1/market/candles?type=1hour&symbol=BTC-USDT"
Hourly BTC-USDT candles, newest first (keyless).

Save the bars as CSV and replay them with the exported python backtest.py --csv bars.csv, or use CCXT to read the same candles in one line of Python.

What to know before automating KuCoin

  • Candle rows are [time, open, close, high, low, volume, turnover]: note close comes before high.
  • Rate limits are weight-based per user and per IP; back off on HTTP 429.
  • Futures use a different host and contract symbols such as XBTUSDTM.

Build a KuCoin strategy with AlgoGP

AlgoGP does not connect to KuCoin natively yet. KuCoin uses plain HTTPS with an API key, so it is a good candidate for a native adapter; it is not built in yet.

  1. 1

    Design and backtest in AlgoGP

    Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.

  2. 2

    Export the Python project

    Every project exports strategy.py, market_data.py, brokers.py and live.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format.

  3. 3

    Plug in KuCoin

    Implement the four adapter methods (account, positions, submit_market_order and a candle fetcher) with KuCoin’s SDK, or keep a built-in platform for paper trading and add KuCoin when you go live.

Built-in brokers for the same markets: Alpaca, Binance, Kraken, Bybit.

KuCoin API: frequently asked questions

Can US residents use the KuCoin API?

KuCoin is not licensed in the US; use Coinbase, Kraken or Gemini instead.

Why is my KuCoin signature invalid?

Check that the passphrase is also HMAC-signed (key version 2+) and the timestamp is in milliseconds.

Design and backtest your KuCoin strategy first

AlgoGP turns an idea into Python and tests it on years of history before you connect it to KuCoin. The exported code keeps the broker behind four small adapter methods.

  • AI copilot writes and revises the rules
  • Backtests with realistic costs
  • Exported Python ready to wire to KuCoin

Free plan, no card required.

KuCoin alternatives

Independent guide. AlgoGP is not affiliated with KuCoin. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.

Build a strategy