Home » Learn Crypto Trading » How to Set Up a Crypto Trading Bot: API Guide for Every Exchange (2026) » Bitget API Trading Bot Setup: Step-by-Step Guide (2026)

Bitget API Trading Bot Setup: Step-by-Step Guide (2026)

Bitget API trading bot setup: create an API key, choose read and trade (never withdraw), bind your IP, save the passphrase and connect with Python.

Bitget API Trading Bot Setup: Step-by-Step Guide (2026)

Short answer: To set up a trading bot on Bitget, create an API key under Personal Center > API Key Management > create a new key (system-generated), give it read and trade permission only (never withdraw), bind it to your server IP, and paste the key, secret and a passphrase into your bot. With Python you can connect in a few lines using ccxt (exchange id “bitget”).

Checked on 26 October 2026 against each exchange’s official API documentation (linked in Sources). Exchanges rename menus often; if a label differs, look for “API” in your profile menu.

Open a Bitget account

This guide is part of our hub How to Set Up a Crypto Trading Bot. Before you start, read our Bitget review and compare it on our exchange comparison.

Before you start: prerequisites

How to create a Bitget API key for a trading bot (step by step)

  1. Create and secure your account. Sign up, finish identity verification (KYC) and turn on 2FA. API trading on most exchanges, and futures API permissions on several, require KYC.
  2. Open the API page. Personal Center > API Key Management > create a new key (system-generated).
  3. Name the key. Use a clear label such as “bot-spot-1” so you can revoke it later without guessing.
  4. Set permissions. Choose read and write only for the trading scopes you need (for example spot trade, or futures orders and positions). Leave Withdraw and Transfer unticked.
  5. Bind your IP address. Bitget strongly recommends binding an IP address when you create the key. Withdrawals through the API only work from a whitelisted IP. Third-party guides report that keys without an IP binding expire after 90 days; Bitget does not state this on the docs page we checked, so bind an IP either way.
  6. Confirm and save the credentials. You set a passphrase yourself. It cannot be changed or recovered. If you lose it, delete the key and create a new one. Copy the API key and secret into a password manager. The secret is usually shown only once.
  7. Connect your bot. Store the values as environment variables and load them in your bot (code below). Run a read call first, then one tiny order.
  8. Test, then scale slowly. Use demo or testnet if available, then a small live budget. Watch logs for a few days before adding funds.

Bitget API settings at a glance

Passphrase needed Yes
IP whitelist Bitget strongly recommends binding an IP address when you create the key. Withdrawals through the API only work from a whitelisted IP. Third-party guides report that keys without an IP binding expire after 90 days; Bitget does not state this on the docs page we checked, so bind an IP either way.
Demo or testnet Yes. Switch to Demo mode > Personal Center > API Key Management > Create a Demo API Key. REST calls need the header paptrading: 1. Bitget says KYC is needed for demo trading.
Key limits and rate limits The UTA docs say each UID can create up to 50 API key sets (older classic docs say 10). Limits per endpoint are listed in the docs.
Spot vs futures Bitget has a Unified Trading Account (UTA) and a classic account. Check which one you use, because the API paths differ. In ccxt use defaultType spot or swap.
Python ccxt id bitget

Which permissions to choose

Choose read and write only for the trading scopes you need (for example spot trade, or futures orders and positions). Leave Withdraw and Transfer unticked.

Rule one: a trading bot never needs withdrawal rights. If a bot service asks for withdrawal permission, do not use it.

Use a sub-account for the bot

Sub-accounts can create their own keys once the main account enables the API Key Management permission for them (off by default).

Spot or futures

Bitget has a Unified Trading Account (UTA) and a classic account. Check which one you use, because the API paths differ. In ccxt use defaultType spot or swap.

Start with spot. Futures bots can be liquidated in minutes if a stop fails.

Connect Bitget to a Python bot (ccxt example)

ccxt is an open source library that wraps Bitget and over 100 other exchanges. This minimal script loads keys from environment variables, checks the balance and reads a price.

# 1) store keys as environment variables, never in code or git
export EXCHANGE_API_KEY="..."
export EXCHANGE_API_SECRET="..."
export EXCHANGE_PASSPHRASE="..."

# 2) pip install ccxt
import os, ccxt
ex = ccxt.bitget({
    "apiKey": os.environ["EXCHANGE_API_KEY"],
    "secret": os.environ["EXCHANGE_API_SECRET"],
    "password": os.environ["EXCHANGE_PASSPHRASE"],  # API passphrase
    "enableRateLimit": True,
    "options": {"defaultType": "spot"},  # or "swap" for perpetual futures
})
# demo: create a Demo API Key and add header paptrading: 1
# ex.headers = {"paptrading": "1"}
print(ex.fetch_balance()["total"])          # read test
print(ex.fetch_ticker("BTC/USDT")["last"])   # market data
# ex.create_order("BTC/USDT", "limit", "buy", 0.0001, 50000)  # tiny test order

Build your own AI trading bot

You do not need a paid bot service. AI assistants such as Grok Bot can write and run the code above, add your strategy rules and log every trade. TradeReviewed hosts independent traders who run AI-built bots on real accounts and publish every trade, wins and losses. Treat any bot, AI or not, as experimental until it has months of logged results.

Security checklist

Troubleshooting common API errors

Error Fix
Passphrase error The passphrase is case-sensitive and cannot be reset. Recreate the key if unsure.
Signature or timestamp error Sync your server clock and make sure you are using the right key for live or demo.
Permission error on futures Enable the futures order and position scopes, and confirm whether your account is UTA or classic.
IP not allowed Add your current server IP to the key.
Timestamp or recvWindow errors Sync your server clock with NTP.

Fees and EU availability

Bot strategies trade often, so fees matter. See Bitget fees. Check Bitget’s current EU status on our review before you deposit.

Frequently asked questions

Can I use a trading bot on Bitget?

Yes. Bitget offers an API for automated trading. Create a key with read and trade permission, bind your IP and connect your bot.

Does the Bitget API need a passphrase?

Yes. You set it when creating the key and it cannot be recovered.

Should I enable withdrawal permission on my Bitget API key?

No. A trading bot never needs it. Leave withdraw off.

Does Bitget have a demo or testnet API?

Yes. Switch to Demo mode > Personal Center > API Key Management > Create a Demo API Key. REST calls need the header paptrading: 1. Bitget says KYC is needed for demo trading.

Why did my Bitget API key stop working?

Bitget strongly recommends binding an IP address when you create the key. Withdrawals through the API only work from a whitelisted IP. Third-party guides report that keys without an IP binding expire after 90 days; Bitget does not state this on the docs page we checked, so bind an IP either way.

Is Bitget supported by ccxt?

Yes, as “bitget”.

API bot guides for other exchanges

Sources

Not financial advice. Automated trading can lose money fast, especially with leverage. Past results do not guarantee future returns. Never give any bot or third party withdrawal rights, and check the rules in your country before you trade.

You'll hear it here firstBreaking crypto and market alerts on Telegram, before everyone else.✈ Join our Telegram