Skip to content

Bitget

tradectl supports Bitget USDT-margined and coin-margined perpetual futures.

Supported features

  • Real-time market data WebSocket streams (ticker, trades, optional depth)
  • Market and limit orders
  • TP / SL exits via ExitOrder
  • Leverage configuration
  • Copy-trading-friendly account types

API key setup

Bitget requires three credentials: API key, secret, and passphrase.

  1. Log in to Bitget
  2. API ManagementCreate API
  3. Permissions: Trade for Futures (and Spot if needed)
  4. Set a passphrase — store it
  5. IP whitelist the host

Configuration

json
{
  "api": {
    "provider": "Bitget",
    "key": "...",
    "secret": "...",
    "passphrase": "..."
  },
  "strats": [{
    "name": "btc-perp",
    "type": "shot",
    "marketType": "LINEAR",
    "isEmulator": false,
    "pairs": ["BTCUSDT", "ETHUSDT"],
    "leverage": 10
  }]
}

marketType: LINEAR (USDT-M) or INVERSE (coin-M).

Notes

  • Bitget's API distinguishes between umcbl (USDT-M perpetuals) and dmcbl (coin-M perpetuals) symbol scopes. The adapter routes automatically based on marketType.
  • Test in paper mode (isEmulator: true) before live trading — Bitget's order error codes overlap with rate-limit codes, and the runner classifies them via ApiErrorKind.

tradectl — Automate Crypto Trading