TheDocumentation 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.
RestClientV2 class exposes a comprehensive set of spot trading methods that cover public market data, authenticated account management, and full order lifecycle operations. All methods return typed Promise<APIResponse<T>> values, enabling clean async/await patterns in both TypeScript and JavaScript projects. Public endpoints require no credentials; account and order endpoints require apiKey, apiSecret, and apiPass at client construction time.
Market Data
These endpoints are public and do not require authentication.| Method | Description |
|---|---|
getSpotCoinInfo(params?) | Returns coin metadata; optionally filter by coin |
getSpotSymbolInfo(params?) | Returns trading symbol rules; optionally filter by symbol |
getSpotTicker(params?) | Real-time ticker snapshot; pass { symbol } for a single pair |
getSpotMergeDepth(params) | Merged order book depth at configurable precision |
getSpotOrderBookDepth(params) | Raw order book depth for a symbol and limit |
getSpotCandles(params) | OHLCV candles for a symbol, granularity, and optional time range |
getSpotHistoricCandles(params) | Historical candles extending beyond the rolling window |
getSpotRecentTrades(params) | Latest executed trades for a symbol |
Candle granularity values
Thegranularity field in SpotCandlesRequestV2 accepts:
Account
These endpoints require authentication (apiKey, apiSecret, apiPass).
| Method | Description |
|---|---|
getSpotAccount() | Returns the spot account overview |
getSpotAccountAssets(params?) | Lists asset balances; optionally filter by coin |
getSpotAccountBills(params) | Paginates through account billing records |
getSpotDepositAddress(params) | Retrieves a deposit address for a coin and chain |
getSpotDepositHistory(params?) | Lists deposit history with optional filters |
getSpotWithdrawalHistory(params?) | Lists withdrawal records |
spotWithdraw(params) | Submits a withdrawal request |
spotTransfer(params) | Transfers funds between account types |
getSpotTransferHistory(params?) | Lists transfer records |
getSpotTransferableCoins(params) | Returns coins that can be transferred between two account types |
Orders
All order endpoints require authentication.| Method | Description |
|---|---|
spotSubmitOrder(params) | Places a single spot order |
spotCancelOrder(params) | Cancels an order by orderId or clientOid |
spotBatchSubmitOrders(params) | Places up to 50 orders in a single request |
spotBatchCancelOrders(params) | Cancels multiple orders by ID list |
spotCancelandSubmitOrder(params) | Atomically cancels an existing order and replaces it |
getSpotOpenOrders(params?) | Returns all currently open orders |
getSpotHistoricOrders(params) | Paginates through historical orders |
getSpotOrder(params) | Retrieves a single order by orderId or clientOid |
getSpotFills(params) | Returns fill/trade records |
spotSubmitPlanOrder(params) | Places a trigger (plan) order |
spotCancelPlanOrder(params) | Cancels a trigger order |
getSpotCurrentPlanOrders(params) | Lists active trigger orders |
getSpotHistoricPlanOrders(params) | Lists historical trigger orders |
SpotOrderRequestV2 parameters
Trading pair symbol, e.g.
"BTCUSDT".Order direction.
Order execution type. Use
'market' for immediate fill at best price.Time-in-force policy.
'gtc' (Good Till Cancel) is the standard default.Order quantity in base currency (e.g. BTC amount for BTCUSDT).
Limit price. Required when
orderType is 'limit'.Client-assigned order ID for deduplication and tracking.
Self-Trade Prevention mode. Defaults to
'none'.Preset take-profit trigger price attached to this order.
Preset stop-loss trigger price attached to this order.
Code examples
Batch Order Example
All numeric values (prices, sizes, amounts) are passed as strings to avoid floating-point precision issues. Parse them with
Number() or a decimal library only when performing arithmetic.