Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/bitget-api/llms.txt
Use this file to discover all available pages before exploring further.
RestClientV3 is the primary REST client for Bitget’s Unified Trading Account (UTA) platform. It targets Bitget’s /api/v3/ endpoints, which consolidate spot, futures, and margin into a single account model. If your Bitget account has been upgraded to UTA, this is the client you should use for all REST API calls — from public market data all the way through to order management, copy trading, and earn products.
Installation
V3/UTA requires an account upgrade. The
/api/v3/ endpoints are only available to accounts that have been upgraded to Bitget’s Unified Trading Account. If your account is still on the classic structure, use RestClientV2 instead. You can check upgrade status via getUnifiedAccountSwitchStatus().Constructor Options
TheRestClientV3 constructor accepts an optional RestClientOptions object.
Your Bitget API key. Required for all authenticated (private) endpoints.
Your Bitget API secret. Used to sign request payloads.
The passphrase you set when creating the API key — not your account login password.
Set to
true to connect to Bitget’s demo trading environment. All requests will be routed to the paper-trading sandbox.Override the default REST base URL. Defaults to
https://api.bitget.com. Useful for proxies or regional endpoints.Override the maximum request window size in milliseconds. Controls the timestamp tolerance for signed requests.
Provide a custom HMAC signing function. Useful for improving performance by substituting Node’s built-in
crypto.createHmac instead of the default Web Crypto implementation. See the examples/auth/ folder for a reference implementation.Method Reference
Market Data
These endpoints are public — no API credentials are required.| Method | Description |
|---|---|
getServerTime() | Returns the current Bitget server time in milliseconds. |
getInstruments(params) | Lists all tradable instruments for a given category (e.g. SPOT, USDT-FUTURES). |
getMarketFeeGroup(params) | Returns the fee group configuration for market instruments. |
getTickers(params) | Returns the latest ticker snapshot for one or all symbols in a category. |
getOrderBook(params) | Returns the current order book (bids and asks) for a symbol. |
getFills(params) | Returns the most recent public trades for a symbol. |
getCandles(params) | Returns OHLCV candlestick data for a symbol and interval. |
getHistoryCandles(params) | Returns older historical candles beyond the live window. |
getCurrentFundingRate(params) | Returns the current funding rate for a perpetual futures symbol. |
getHistoryFundingRate(params) | Returns historical funding rate records for a futures symbol. |
getOpenInterest(params) | Returns the open interest for a futures symbol. |
getPositionTier(params) | Returns position tier / leverage bracket configuration for a symbol. |
Account
These endpoints are private — API credentials are required.| Method | Description |
|---|---|
getBalances() | Returns all asset balances for the unified account. |
getFundingAssets(params) | Returns funding wallet balances, optionally filtered by coin. |
getAccountInfo() | Returns account-level details (UID, account type, status). |
getAccountSettings() | Returns current account settings such as hold mode. |
adjustAccountMode(params) | Switches the account mode (e.g. single vs. hedge position mode). |
setLeverage(params) | Sets the leverage for a symbol and position side. |
getFinancialRecords(params) | Returns paginated financial transaction history. |
submitTransfer(params) | Transfers funds between wallets within the unified account. |
submitWithdraw(params) | Initiates an on-chain or internal withdrawal. |
getDepositAddress(params) | Returns the deposit address for a given coin and chain. |
getDepositRecords(params) | Returns deposit history with filtering options. |
getWithdrawRecords(params) | Returns withdrawal history with filtering options. |
Trading
These endpoints are private.| Method | Description |
|---|---|
submitNewOrder(params) | Places a new spot or futures order. |
cancelOrder(params) | Cancels a single open order by order ID or client order ID. |
cancelAllOrders(params) | Cancels all open orders for a symbol. |
batchModifyOrders(params) | Modifies multiple existing orders in a single request. |
cancelBatchOrders(params) | Cancels a batch of orders by their IDs. |
countdownCancelAll(params) | Sets a countdown timer after which all orders are auto-cancelled. |
closeAllPositions(params) | Sends market orders to close all open positions in a category. |
Copy Trading
These endpoints are private and apply to copy-trading lead accounts.| Method | Description |
|---|---|
getCopyFuturesTradingPairs() | Returns the futures trading pairs available to the copy-trading lead account. |
copyFuturesTransfer(params) | Transfers funds to or from the copy-trading lead account wallet. |
Sub-accounts / Broker
These endpoints are private and require broker or sub-account permissions.| Method | Description |
|---|---|
createSubAccount(params) | Creates a new sub-account under the master account. |
getSubAccountList(params) | Returns the list of sub-accounts with optional pagination. |
Earn
These endpoints are private.| Method | Description |
|---|---|
getEarnEliteProducts() | Returns available Elite earn products. |
subscribeEarnElite(params) | Subscribes the account to an Elite earn product. |
Code Examples
Public Market Data — getInstruments()
No credentials are needed for public endpoints. You can create the client without any options.
Authenticated Account Data — getBalances()
Place a Spot Order — submitNewOrder()
The PlaceOrderRequestV3 type covers both spot and futures orders via the unified category field.
Place a Futures Order — submitNewOrder() with USDT-FUTURES
The same submitNewOrder() method handles futures orders. Set category to USDT-FUTURES (or COIN-FUTURES, USDC-FUTURES, etc.) as appropriate.