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: 1header
Public market data from Bitget
curl -s "https://api.bitget.com/api/v2/spot/market/candles?symbol=BTCUSDT&granularity=1h&limit=200"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
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
Export the Python project
Every project exports
strategy.py,market_data.py,brokers.pyandlive.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format. - 3
Plug in Bitget
Implement the four adapter methods (
account,positions,submit_market_orderand 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
- Bybit API Built into AlgoGPGlobal crypto exchange with a unified V5 API for spot, derivatives and options, and a Demo Trading environment.
- OKX API Built into AlgoGPMajor crypto exchange with a V5 REST and WebSocket API for spot, perpetuals, futures and options, plus demo trading.
- Binance API Built into AlgoGPThe largest crypto exchange by volume, with a deep public market-data API and a free spot testnet.
- KuCoin API GuideGlobal crypto exchange with spot, margin and futures APIs, signed with a key, secret and passphrase; public market data is keyless.
Frameworks that connect to Bitget
Independent guide. AlgoGP is not affiliated with Bitget. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.