- Primary: https://api.bitget.com
- Secondary: https://capi.bitget.com
ACCESS-KEY: The API KeyACCESS-SIGN: The signature (see below)ACCESS-TIMESTAMP: Request timestampACCESS-PASSPHRASE: The passphrase you specified when creating the API key
The signature is a Base64 encoded HMAC SHA256 hash:
signature = base64(hmac_sha256(secret_key, message))
message = timestamp + method + request_path + query_string + body
Where:
timestamp: Same as ACCESS-TIMESTAMP headermethod: HTTP method in uppercase (GET, POST, etc.)request_path: Path without domain (e.g.,/api/spot/v1/account/assets)query_string: Query parameters (without ?)body: Request body (empty string for GET requests)
GET /api/spot/v1/account/assets
Optional Parameters:
coin: Filter by specific coin (e.g., "BTC")
Response includes:
available: Available balancefrozen: Frozen balancelocked: Locked balance
GET /api/spot/v1/account/assets-lite
Similar to assets endpoint but defaults to showing only non-zero balances.
GET /api/mix/v1/account/account
GET /api/mix/v1/account/accounts
Parameters:
symbol: Trading pair (e.g., "BTCUSDT_UMCBL")marginCoin: Margin coin (e.g., "USDT")
GET /api/mix/v1/position/allPosition
GET /api/mix/v1/position/allPosition-v2
Parameters:
productType: Product type (umcbl, dmcbl, cmcbl, sumcbl)marginCoin: Optional filter
Response includes:
symbol: Trading pairmarginCoin: Margin currencyholdSide: Position side (long/short)openDelegateCount: Number of open ordersmargin: Position marginavailable: Available quantitylocked: Locked quantitytotal: Total positionleverage: Leverage ratioachievedProfits: Realized PnLunrealizedPL: Unrealized PnLunrealizedPLR: Unrealized PnL ratioliquidationPrice: Liquidation pricekeepMarginRate: Maintenance margin ratemarkPrice: Mark priceaverageOpenPrice: Average entry price
umcbl: USDT perpetualdmcbl: Universal margincmcbl: USDC perpetualsumcbl: USDT perpetual demo
- Most endpoints: 10-20 requests/second
- HTTP 429 status code when limit exceeded
- Limits are per UID or IP
Standard JSON response with:
code: Error code (0 for success)msg: Error messagedata: Response data
- 0: Success
- 429: Rate limit exceeded
- Various other codes for authentication failures, invalid parameters, etc.
- Read: Query market data and account info
- Trade: Place and cancel orders
- Transfer: Transfer between accounts
- Withdraw: Withdraw assets (requires whitelisted IP)