Guide
BrokerMarket dataCrypto API key

Bitget API guide

Bitget grew fast on derivatives and copy trading, and its V2 API unified the product lines.

Last verified · Also known as Bitget API, Bitget V2 API

Quick answer

Bitget’s V2 API serves spot, USDT-M and coin-M futures and copy trading over REST and WebSocket. Requests are signed with HMAC-SHA256 (base64) over timestamp + method + path + body, with the key, passphrase and signature in headers. Demo trading uses separate demo keys with the paptrading: 1 header.

Bitget API at a glance

Pricing
Free API; trading fees apply
Availability
Global; not US residents
Paper trading
Demo trading with demo-coin keys
Integration type
REST + API key
In AlgoGP
Design and backtest in AlgoGP, connect the exported code
Auth
Key + secret + passphrase, HMAC-SHA256 (base64)
Host
https://api.bitget.com
Demo
Demo keys + paptrading: 1 header

Public market data from Bitget

curl -s "https://api.bitget.com/api/v2/spot/market/candles?symbol=BTCUSDT&granularity=1h&limit=200"
Hourly BTCUSDT spot candles (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 Bitget

  • V1 endpoints are deprecated; build on /api/v2/....
  • Futures orders need productType (e.g. USDT-FUTURES) and margin mode.

Build a Bitget strategy with AlgoGP

AlgoGP does not connect to Bitget natively yet. Bitget 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 Bitget

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

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

Bitget API: frequently asked questions

Does Bitget have a testnet?

It has Demo Trading: create demo API keys and send the paptrading: 1 header.

Design and backtest your Bitget strategy first

AlgoGP turns an idea into Python and tests it on years of history before you connect it to Bitget. 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 Bitget

Free plan, no card required.

Bitget alternatives

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

Build a strategy