## bitget{docsify-ignore}
**Kind**: global class
**Extends**: Exchange
* [fetchTime](#fetchtime)
* [fetchMarkets](#fetchmarkets)
* [fetchCurrencies](#fetchcurrencies)
* [fetchMarketLeverageTiers](#fetchmarketleveragetiers)
* [fetchDeposits](#fetchdeposits)
* [withdraw](#withdraw)
* [fetchWithdrawals](#fetchwithdrawals)
* [fetchDepositAddress](#fetchdepositaddress)
* [fetchOrderBook](#fetchorderbook)
* [fetchTicker](#fetchticker)
* [fetchTickers](#fetchtickers)
* [fetchTrades](#fetchtrades)
* [fetchTradingFee](#fetchtradingfee)
* [fetchTradingFees](#fetchtradingfees)
* [fetchOHLCV](#fetchohlcv)
* [fetchBalance](#fetchbalance)
* [createMarketBuyOrderWithCost](#createmarketbuyorderwithcost)
* [createOrder](#createorder)
* [createOrders](#createorders)
* [editOrder](#editorder)
* [cancelOrder](#cancelorder)
* [cancelOrders](#cancelorders)
* [cancelAllOrders](#cancelallorders)
* [fetchOrder](#fetchorder)
* [fetchOpenOrders](#fetchopenorders)
* [fetchClosedOrders](#fetchclosedorders)
* [fetchCanceledOrders](#fetchcanceledorders)
* [fetchCanceledAndClosedOrders](#fetchcanceledandclosedorders)
* [fetchLedger](#fetchledger)
* [fetchMyTrades](#fetchmytrades)
* [fetchPosition](#fetchposition)
* [fetchPositions](#fetchpositions)
* [fetchFundingRateHistory](#fetchfundingratehistory)
* [fetchFundingRate](#fetchfundingrate)
* [fetchFundingHistory](#fetchfundinghistory)
* [reduceMargin](#reducemargin)
* [addMargin](#addmargin)
* [fetchLeverage](#fetchleverage)
* [setLeverage](#setleverage)
* [setMarginMode](#setmarginmode)
* [setPositionMode](#setpositionmode)
* [fetchOpenInterest](#fetchopeninterest)
* [fetchTransfers](#fetchtransfers)
* [transfer](#transfer)
* [fetchDepositWithdrawFees](#fetchdepositwithdrawfees)
* [borrowCrossMargin](#borrowcrossmargin)
* [borrowIsolatedMargin](#borrowisolatedmargin)
* [repayIsolatedMargin](#repayisolatedmargin)
* [repayCrossMargin](#repaycrossmargin)
* [fetchMyLiquidations](#fetchmyliquidations)
* [fetchIsolatedBorrowRate](#fetchisolatedborrowrate)
* [fetchCrossBorrowRate](#fetchcrossborrowrate)
* [fetchBorrowInterest](#fetchborrowinterest)
* [closePosition](#closeposition)
* [closeAllPositions](#closeallpositions)
* [fetchMarginMode](#fetchmarginmode)
* [fetchPositionsHistory](#fetchpositionshistory)
* [fetchConvertQuote](#fetchconvertquote)
* [createConvertTrade](#createconverttrade)
* [fetchConvertTradeHistory](#fetchconverttradehistory)
* [fetchConvertCurrencies](#fetchconvertcurrencies)
* [watchTicker](#watchticker)
* [unWatchTicker](#unwatchticker)
* [watchTickers](#watchtickers)
* [watchOHLCV](#watchohlcv)
* [unWatchOHLCV](#unwatchohlcv)
* [watchOrderBook](#watchorderbook)
* [unWatchOrderBook](#unwatchorderbook)
* [watchOrderBookForSymbols](#watchorderbookforsymbols)
* [watchTrades](#watchtrades)
* [watchTradesForSymbols](#watchtradesforsymbols)
* [unWatchTrades](#unwatchtrades)
* [watchPositions](#watchpositions)
* [watchOrders](#watchorders)
* [watchMyTrades](#watchmytrades)
* [watchBalance](#watchbalance)
### fetchTime{docsify-ignore}
fetches the current integer timestamp in milliseconds from the exchange server
**Kind**: instance method of [bitget
](#bitget)
**Returns**: int
- the current integer timestamp in milliseconds from the exchange server
**See**: https://www.bitget.com/api-doc/common/public/Get-Server-Time
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchTime ([params])
```
### fetchMarkets{docsify-ignore}
retrieves data on all markets for bitget
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- an array of objects representing market data
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Symbols
- https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchMarkets ([params])
```
### fetchCurrencies{docsify-ignore}
fetches all available currencies on an exchange
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an associative dictionary of currencies
**See**: https://www.bitget.com/api-doc/spot/market/Get-Coin-List
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchCurrencies ([params])
```
### fetchMarketLeverageTiers{docsify-ignore}
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [leverage tiers structure](https://docs.ccxt.com/#/?id=leverage-tiers-structure)
**See**
- https://www.bitget.com/api-doc/contract/position/Get-Query-Position-Lever
- https://www.bitget.com/api-doc/margin/cross/account/Cross-Tier-Data
- https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Tier-Data
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | for spot margin 'cross' or 'isolated', default is 'isolated' |
| params.code | string
| No | required for cross spot margin |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.fetchMarketLeverageTiers (symbol[, params])
```
### fetchDeposits{docsify-ignore}
fetch all deposits made to an account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Get-Deposit-Record
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| since | int
| No | the earliest time in ms to fetch deposits for |
| limit | int
| No | the maximum number of deposits structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | end time in milliseconds |
| params.idLessThan | string
| No | return records with id less than the provided value |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchDeposits (code[, since, limit, params])
```
### withdraw{docsify-ignore}
make a withdrawal
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| amount | float
| Yes | the amount to withdraw |
| address | string
| Yes | the address to withdraw to |
| tag | string
| Yes | |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.chain | string
| No | the blockchain network the withdrawal is taking place on |
```javascript
bitget.withdraw (code, amount, address, tag[, params])
```
### fetchWithdrawals{docsify-ignore}
fetch all withdrawals made from an account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Get-Withdraw-Record
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| since | int
| No | the earliest time in ms to fetch withdrawals for |
| limit | int
| No | the maximum number of withdrawals structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | end time in milliseconds |
| params.idLessThan | string
| No | return records with id less than the provided value |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchWithdrawals (code[, since, limit, params])
```
### fetchDepositAddress{docsify-ignore}
fetch the deposit address for a currency associated with this account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [address structure](https://docs.ccxt.com/#/?id=address-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchDepositAddress (code[, params])
```
### fetchOrderBook{docsify-ignore}
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Orderbook
- https://www.bitget.com/api-doc/contract/market/Get-Merge-Depth
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the order book for |
| limit | int
| No | the maximum amount of order book entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchOrderBook (symbol[, limit, params])
```
### fetchTicker{docsify-ignore}
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Tickers
- https://www.bitget.com/api-doc/contract/market/Get-Ticker
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the ticker for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchTicker (symbol[, params])
```
### fetchTickers{docsify-ignore}
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Tickers
- https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
, undefined
| Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.subType | string
| No | *contract only* 'linear', 'inverse' |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.fetchTickers (symbols[, params])
```
### fetchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Trade>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Recent-Trades
- https://www.bitget.com/api-doc/spot/market/Get-Market-Trades
- https://www.bitget.com/api-doc/contract/market/Get-Recent-Fills
- https://www.bitget.com/api-doc/contract/market/Get-Fills-History
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum amount of trades to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* the latest time in ms to fetch trades for |
| params.paginate | boolean
| No | *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* default false, when true will automatically paginate by calling this endpoint multiple times |
```javascript
bitget.fetchTrades (symbol[, since, limit, params])
```
### fetchTradingFee{docsify-ignore}
fetch the trading fees for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [fee structure](https://docs.ccxt.com/#/?id=fee-structure)
**See**: https://www.bitget.com/api-doc/common/public/Get-Trade-Rate
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'isolated' or 'cross', for finding the fee rate of spot margin trading pairs |
```javascript
bitget.fetchTradingFee (symbol[, params])
```
### fetchTradingFees{docsify-ignore}
fetch the trading fees for multiple markets
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a dictionary of [fee structures](https://docs.ccxt.com/#/?id=fee-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Symbols
- https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
- https://www.bitget.com/api-doc/margin/common/support-currencies
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.margin | boolean
| No | set to true for spot margin |
```javascript
bitget.fetchTradingFees ([params])
```
### fetchOHLCV{docsify-ignore}
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Array<int>>
- A list of candles ordered as timestamp, open, high, low, close, volume
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Candle-Data
- https://www.bitget.com/api-doc/spot/market/Get-History-Candle-Data
- https://www.bitget.com/api-doc/contract/market/Get-Candle-Data
- https://www.bitget.com/api-doc/contract/market/Get-History-Candle-Data
- https://www.bitget.com/api-doc/contract/market/Get-History-Index-Candle-Data
- https://www.bitget.com/api-doc/contract/market/Get-History-Mark-Candle-Data
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string
| Yes | the length of time each candle represents |
| since | int
| No | timestamp in ms of the earliest candle to fetch |
| limit | int
| No | the maximum amount of candles to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | timestamp in ms of the latest candle to fetch |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.price | string
| No | *swap only* "mark" (to fetch mark price candles) or "index" (to fetch index price candles) |
```javascript
bitget.fetchOHLCV (symbol, timeframe[, since, limit, params])
```
### fetchBalance{docsify-ignore}
query for balance and get the amount of funds available for trading or funds locked in orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
**See**
- https://www.bitget.com/api-doc/spot/account/Get-Account-Assets
- https://www.bitget.com/api-doc/contract/account/Get-Account-List
- https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Assets
- https://www.bitget.com/api-doc/margin/isolated/account/Get-Isolated-Assets
- https://bitgetlimited.github.io/apidoc/en/margin/#get-cross-assets
- https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-assets
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.fetchBalance ([params])
```
### createMarketBuyOrderWithCost{docsify-ignore}
create a market buy order by providing the symbol and cost
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Place-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to create an order in |
| cost | float
| Yes | how much you want to trade in units of the quote currency |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.createMarketBuyOrderWithCost (symbol, cost[, params])
```
### createOrder{docsify-ignore}
create a trade order
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Place-Order
- https://www.bitget.com/api-doc/spot/plan/Place-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Place-Order
- https://www.bitget.com/api-doc/contract/plan/Place-Tpsl-Order
- https://www.bitget.com/api-doc/contract/plan/Place-Plan-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to create an order in |
| type | string
| Yes | 'market' or 'limit' |
| side | string
| Yes | 'buy' or 'sell' |
| amount | float
| Yes | how much you want to trade in units of the base currency |
| price | float
| No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.cost | float
| No | *spot only* how much you want to trade in units of the quote currency, for market buy orders only |
| params.triggerPrice | float
| No | *swap only* The price at which a trigger order is triggered at |
| params.stopLossPrice | float
| No | *swap only* The price at which a stop loss order is triggered at |
| params.takeProfitPrice | float
| No | *swap only* The price at which a take profit order is triggered at |
| params.takeProfit | object
| No | *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only) |
| params.takeProfit.triggerPrice | float
| No | *swap only* take profit trigger price |
| params.stopLoss | object
| No | *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only) |
| params.stopLoss.triggerPrice | float
| No | *swap only* stop loss trigger price |
| params.timeInForce | string
| No | "GTC", "IOC", "FOK", or "PO" |
| params.marginMode | string
| No | 'isolated' or 'cross' for spot margin trading |
| params.loanType | string
| No | *spot margin only* 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal' |
| params.holdSide | string
| No | *contract stopLossPrice, takeProfitPrice only* Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell') |
| params.stopLoss.price | float
| No | *swap only* the execution price for a stop loss attached to a trigger order |
| params.takeProfit.price | float
| No | *swap only* the execution price for a take profit attached to a trigger order |
| params.stopLoss.type | string
| No | *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price' |
| params.takeProfit.type | string
| No | *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price' |
| params.trailingPercent | string
| No | *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10 |
| params.trailingTriggerPrice | string
| No | *swap and future only* the price to trigger a trailing stop order, default uses the price argument |
| params.triggerType | string
| No | *swap and future only* 'fill_price', 'mark_price' or 'index_price' |
| params.oneWayMode | boolean
| No | *swap and future only* required to set this to true in one_way_mode and you can leave this as undefined in hedge_mode, can adjust the mode using the setPositionMode() method |
| params.reduceOnly | bool
| No | true or false whether the order is reduce-only |
```javascript
bitget.createOrder (symbol, type, side, amount[, price, params])
```
### createOrders{docsify-ignore}
create a list of trade orders (all orders should be of the same symbol)
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Batch-Place-Orders
- https://www.bitget.com/api-doc/contract/trade/Batch-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| orders | Array
| Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object
| No | extra parameters specific to the api endpoint |
```javascript
bitget.createOrders (orders[, params])
```
### editOrder{docsify-ignore}
edit a trade order
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/plan/Modify-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Modify-Order
- https://www.bitget.com/api-doc/contract/plan/Modify-Tpsl-Order
- https://www.bitget.com/api-doc/contract/plan/Modify-Plan-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | cancel order id |
| symbol | string
| Yes | unified symbol of the market to create an order in |
| type | string
| Yes | 'market' or 'limit' |
| side | string
| Yes | 'buy' or 'sell' |
| amount | float
| Yes | how much you want to trade in units of the base currency |
| price | float
| No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.triggerPrice | float
| No | the price that a trigger order is triggered at |
| params.stopLossPrice | float
| No | *swap only* The price at which a stop loss order is triggered at |
| params.takeProfitPrice | float
| No | *swap only* The price at which a take profit order is triggered at |
| params.takeProfit | object
| No | *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only) |
| params.takeProfit.triggerPrice | float
| No | *swap only* take profit trigger price |
| params.stopLoss | object
| No | *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only) |
| params.stopLoss.triggerPrice | float
| No | *swap only* stop loss trigger price |
| params.stopLoss.price | float
| No | *swap only* the execution price for a stop loss attached to a trigger order |
| params.takeProfit.price | float
| No | *swap only* the execution price for a take profit attached to a trigger order |
| params.stopLoss.type | string
| No | *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price' |
| params.takeProfit.type | string
| No | *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price' |
| params.trailingPercent | string
| No | *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10 |
| params.trailingTriggerPrice | string
| No | *swap and future only* the price to trigger a trailing stop order, default uses the price argument |
| params.newTriggerType | string
| No | *swap and future only* 'fill_price', 'mark_price' or 'index_price' |
```javascript
bitget.editOrder (id, symbol, type, side, amount[, price, params])
```
### cancelOrder{docsify-ignore}
cancels an open order
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Cancel-Order
- https://www.bitget.com/api-doc/spot/plan/Cancel-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Cancel-Order
- https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Cancel-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Cancel-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | order id |
| symbol | string
| Yes | unified symbol of the market the order was made in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'isolated' or 'cross' for spot margin trading |
| params.stop | boolean
| No | set to true for canceling trigger orders |
| params.planType | string
| No | *swap only* either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan |
| params.trailing | boolean
| No | set to true if you want to cancel a trailing order |
```javascript
bitget.cancelOrder (id, symbol[, params])
```
### cancelOrders{docsify-ignore}
cancel multiple orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an array of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Batch-Cancel-Orders
- https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
- https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Cancel-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Cancel-Orders
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| ids | Array<string>
| Yes | order ids |
| symbol | string
| Yes | unified market symbol, default is undefined |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'isolated' or 'cross' for spot margin trading |
| params.stop | boolean
| No | *contract only* set to true for canceling trigger orders |
```javascript
bitget.cancelOrders (ids, symbol[, params])
```
### cancelAllOrders{docsify-ignore}
cancel all open orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Cancel-Symbol-Orders
- https://www.bitget.com/api-doc/spot/plan/Batch-Cancel-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
- https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
- https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'isolated' or 'cross' for spot margin trading |
| params.stop | boolean
| No | *contract only* set to true for canceling trigger orders |
```javascript
bitget.cancelAllOrders (symbol[, params])
```
### fetchOrder{docsify-ignore}
fetches information on an order made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
- https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | the order id |
| symbol | string
| Yes | unified symbol of the market the order was made in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchOrder (id, symbol[, params])
```
### fetchOpenOrders{docsify-ignore}
fetch all unfilled currently open orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-Unfilled-Orders
- https://www.bitget.com/api-doc/spot/plan/Get-Current-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Get-Orders-Pending
- https://www.bitget.com/api-doc/contract/plan/get-orders-plan-pending
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Open-Orders
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Open-Orders
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch open orders for |
| limit | int
| No | the maximum number of open order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch orders for |
| params.planType | string
| No | *contract stop only* 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan' |
| params.stop | boolean
| No | set to true for fetching trigger orders |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.isPlan | string
| No | *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan' |
| params.trailing | boolean
| No | set to true if you want to fetch trailing orders |
```javascript
bitget.fetchOpenOrders (symbol[, since, limit, params])
```
### fetchClosedOrders{docsify-ignore}
fetches information on multiple closed orders made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
- https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
- https://www.bitget.com/api-doc/contract/plan/orders-plan-history
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
- https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the closed orders |
| since | int
| No | timestamp in ms of the earliest order |
| limit | int
| No | the max number of closed orders to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch entries for |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.isPlan | string
| No | *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan' |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.trailing | boolean
| No | set to true if you want to fetch trailing orders |
```javascript
bitget.fetchClosedOrders (symbol[, since, limit, params])
```
### fetchCanceledOrders{docsify-ignore}
fetches information on multiple canceled orders made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
- https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
- https://www.bitget.com/api-doc/contract/plan/orders-plan-history
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
- https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the canceled orders |
| since | int
| No | timestamp in ms of the earliest order |
| limit | int
| No | the max number of canceled orders to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch entries for |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.isPlan | string
| No | *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan' |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.trailing | boolean
| No | set to true if you want to fetch trailing orders |
```javascript
bitget.fetchCanceledOrders (symbol[, since, limit, params])
```
### fetchCanceledAndClosedOrders{docsify-ignore}
fetches information on multiple canceled and closed orders made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
- https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
- https://www.bitget.com/api-doc/contract/plan/orders-plan-history
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
- https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market orders were made in |
| since | int
| No | the earliest time in ms to fetch orders for |
| limit | int
| No | the maximum number of order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchCanceledAndClosedOrders (symbol[, since, limit, params])
```
### fetchLedger{docsify-ignore}
fetch the history of changes, actions done by the user or operations that altered balance of the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [ledger structure](https://docs.ccxt.com/#/?id=ledger-structure)
**See**
- https://www.bitget.com/api-doc/spot/account/Get-Account-Bills
- https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code, default is undefined |
| since | int
| No | timestamp in ms of the earliest ledger entry, default is undefined |
| limit | int
| No | max number of ledger entrys to return, default is undefined |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | end time in ms |
| params.symbol | string
| No | *contract only* unified market symbol |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchLedger (code[, since, limit, params])
```
### fetchMyTrades{docsify-ignore}
fetch all trades made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Trade>
- a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-Fills
- https://www.bitget.com/api-doc/contract/trade/Get-Order-Fills
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-Fills
- https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Transaction-Details
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch trades for |
| limit | int
| No | the maximum number of trades structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch trades for |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchMyTrades (symbol[, since, limit, params])
```
### fetchPosition{docsify-ignore}
fetch data on a single open contract trade position
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [position structure](https://docs.ccxt.com/#/?id=position-structure)
**See**: https://www.bitget.com/api-doc/contract/position/get-single-position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market the position is held in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchPosition (symbol[, params])
```
### fetchPositions{docsify-ignore}
fetch all open positions
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [position structure](https://docs.ccxt.com/#/?id=position-structure)
**See**
- https://www.bitget.com/api-doc/contract/position/get-all-position
- https://www.bitget.com/api-doc/contract/position/Get-History-Position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| No | list of unified market symbols |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginCoin | string
| No | the settle currency of the positions, needs to match the productType |
| params.productType | string
| No | 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.useHistoryEndpoint | boolean
| No | default false, when true will use the historic endpoint to fetch positions |
| params.method | string
| No | either (default) 'privateMixGetV2MixPositionAllPosition' or 'privateMixGetV2MixPositionHistoryPosition' |
```javascript
bitget.fetchPositions ([symbols, params])
```
### fetchFundingRateHistory{docsify-ignore}
fetches historical funding rate prices
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [funding rate structures](https://docs.ccxt.com/#/?id=funding-rate-history-structure)
**See**: https://www.bitget.com/api-doc/contract/market/Get-History-Funding-Rate
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the funding rate history for |
| since | int
| No | timestamp in ms of the earliest funding rate to fetch |
| limit | int
| No | the maximum amount of funding rate structures to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchFundingRateHistory (symbol[, since, limit, params])
```
### fetchFundingRate{docsify-ignore}
fetch the current funding rate
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure)
**See**: https://www.bitget.com/api-doc/contract/market/Get-Current-Funding-Rate
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchFundingRate (symbol[, params])
```
### fetchFundingHistory{docsify-ignore}
fetch the funding history
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [funding history structures](https://docs.ccxt.com/#/?id=funding-history-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the starting timestamp in milliseconds |
| limit | int
| No | the number of entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch funding history for |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchFundingHistory (symbol[, since, limit, params])
```
### reduceMargin{docsify-ignore}
remove margin from a position
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin structure](https://docs.ccxt.com/#/?id=reduce-margin-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Change-Margin
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| amount | float
| Yes | the amount of margin to remove |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.reduceMargin (symbol, amount[, params])
```
### addMargin{docsify-ignore}
add margin
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin structure](https://docs.ccxt.com/#/?id=add-margin-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Change-Margin
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| amount | float
| Yes | the amount of margin to add |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.addMargin (symbol, amount[, params])
```
### fetchLeverage{docsify-ignore}
fetch the set leverage for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [leverage structure](https://docs.ccxt.com/#/?id=leverage-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Get-Single-Account
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchLeverage (symbol[, params])
```
### setLeverage{docsify-ignore}
set the level of leverage for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- response from the exchange
**See**: https://www.bitget.com/api-doc/contract/account/Change-Leverage
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| leverage | int
| Yes | the rate of leverage |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.holdSide | string
| No | *isolated only* position direction, 'long' or 'short' |
```javascript
bitget.setLeverage (leverage, symbol[, params])
```
### setMarginMode{docsify-ignore}
set margin mode to 'cross' or 'isolated'
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- response from the exchange
**See**: https://www.bitget.com/api-doc/contract/account/Change-Margin-Mode
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| marginMode | string
| Yes | 'cross' or 'isolated' |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.setMarginMode (marginMode, symbol[, params])
```
### setPositionMode{docsify-ignore}
set hedged to true or false for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- response from the exchange
**See**: https://www.bitget.com/api-doc/contract/account/Change-Hold-Mode
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| hedged | bool
| Yes | set to true to use dualSidePosition |
| symbol | string
| Yes | not used by bitget setPositionMode () |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.productType | string
| No | required if symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.setPositionMode (hedged, symbol[, params])
```
### fetchOpenInterest{docsify-ignore}
retrieves the open interest of a contract trading pair
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an open interest structure[https://docs.ccxt.com/#/?id=open-interest-structure](https://docs.ccxt.com/#/?id=open-interest-structure)
**See**: https://www.bitget.com/api-doc/contract/market/Get-Open-Interest
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified CCXT market symbol |
| params | object
| No | exchange specific parameters |
```javascript
bitget.fetchOpenInterest (symbol[, params])
```
### fetchTransfers{docsify-ignore}
fetch a history of internal transfers made on an account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [transfer structures](https://docs.ccxt.com/#/?id=transfer-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code of the currency transferred |
| since | int
| No | the earliest time in ms to fetch transfers for |
| limit | int
| No | the maximum number of transfers structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch entries for |
```javascript
bitget.fetchTransfers (code[, since, limit, params])
```
### transfer{docsify-ignore}
transfer currency internally between wallets on the same account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [transfer structure](https://docs.ccxt.com/#/?id=transfer-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Wallet-Transfer
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| amount | float
| Yes | amount to transfer |
| fromAccount | string
| Yes | account to transfer from |
| toAccount | string
| Yes | account to transfer to |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.symbol | string
| No | unified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account |
| params.clientOid | string
| No | custom id |
```javascript
bitget.transfer (code, amount, fromAccount, toAccount[, params])
```
### fetchDepositWithdrawFees{docsify-ignore}
fetch deposit and withdraw fees
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a list of [fee structures](https://docs.ccxt.com/#/?id=fee-structure)
**See**: https://www.bitget.com/api-doc/spot/market/Get-Coin-List
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| codes | Array<string>
, undefined
| Yes | list of unified currency codes |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchDepositWithdrawFees (codes[, params])
```
### borrowCrossMargin{docsify-ignore}
create a loan to borrow margin
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code of the currency to borrow |
| amount | string
| Yes | the amount to borrow |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.borrowCrossMargin (code, amount[, params])
```
### borrowIsolatedMargin{docsify-ignore}
create a loan to borrow margin
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| code | string
| Yes | unified currency code of the currency to borrow |
| amount | string
| Yes | the amount to borrow |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.borrowIsolatedMargin (symbol, code, amount[, params])
```
### repayIsolatedMargin{docsify-ignore}
repay borrowed margin and interest
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Repay
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| code | string
| Yes | unified currency code of the currency to repay |
| amount | string
| Yes | the amount to repay |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.repayIsolatedMargin (symbol, code, amount[, params])
```
### repayCrossMargin{docsify-ignore}
repay borrowed margin and interest
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://www.bitget.com/api-doc/margin/cross/account/Cross-Repay
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code of the currency to repay |
| amount | string
| Yes | the amount to repay |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.repayCrossMargin (code, amount[, params])
```
### fetchMyLiquidations{docsify-ignore}
retrieves the users liquidated positions
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an array of [liquidation structures](https://docs.ccxt.com/#/?id=liquidation-structure)
**See**
- https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Liquidation-Records
- https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Liquidation-Records
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| No | unified CCXT market symbol |
| since | int
| No | the earliest time in ms to fetch liquidations for |
| limit | int
| No | the maximum number of liquidation structures to retrieve |
| params | object
| No | exchange specific parameters for the bitget api endpoint |
| params.until | int
| No | timestamp in ms of the latest liquidation |
| params.marginMode | string
| No | 'cross' or 'isolated' default value is 'cross' |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchMyLiquidations ([symbol, since, limit, params])
```
### fetchIsolatedBorrowRate{docsify-ignore}
fetch the rate of interest to borrow a currency for margin trading
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [isolated borrow rate structure](https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure)
**See**: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Margin-Interest-Rate-And-Max-Borrowable-Amount
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchIsolatedBorrowRate (symbol[, params])
```
### fetchCrossBorrowRate{docsify-ignore}
fetch the rate of interest to borrow a currency for margin trading
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [borrow rate structure](https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure)
**See**: https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Margin-Interest-Rate-And-Borrowable
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.symbol | string
| No | required for isolated margin |
```javascript
bitget.fetchCrossBorrowRate (code[, params])
```
### fetchBorrowInterest{docsify-ignore}
fetch the interest owed by the user for borrowing currency for margin trading
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [borrow interest structures](https://docs.ccxt.com/#/?id=borrow-interest-structure)
**See**
- https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Interest-Records
- https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Interest-Records
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| No | unified currency code |
| symbol | string
| No | unified market symbol when fetching interest in isolated markets |
| since | int
| No | the earliest time in ms to fetch borrow interest for |
| limit | int
| No | the maximum number of structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchBorrowInterest ([code, symbol, since, limit, params])
```
### closePosition{docsify-ignore}
closes an open position for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified CCXT market symbol |
| side | string
| No | one-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short' |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.closePosition (symbol[, side, params])
```
### closeAllPositions{docsify-ignore}
closes all open positions for a market type
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- A list of [position structures](https://docs.ccxt.com/#/?id=position-structure)
**See**: https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.productType | string
| No | 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.closeAllPositions ([params])
```
### fetchMarginMode{docsify-ignore}
fetches the margin mode of a trading pair
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin mode structure](https://docs.ccxt.com/#/?id=margin-mode-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Get-Single-Account
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the margin mode for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchMarginMode (symbol[, params])
```
### fetchPositionsHistory{docsify-ignore}
fetches historical positions
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [position structures](https://docs.ccxt.com/#/?id=position-structure)
**See**: https://www.bitget.com/api-doc/contract/position/Get-History-Position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| No | unified contract symbols |
| since | int
| No | timestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months |
| limit | int
| No | the maximum amount of records to fetch, default=20, max=100 |
| params | object
| Yes | extra parameters specific to the exchange api endpoint |
| params.until | int
| No | timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months EXCHANGE SPECIFIC PARAMETERS |
| params.productType | string
| No | USDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES |
```javascript
bitget.fetchPositionsHistory ([symbols, since, limit, params])
```
### fetchConvertQuote{docsify-ignore}
fetch a quote for converting from one currency to another
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [conversion structure](https://docs.ccxt.com/#/?id=conversion-structure)
**See**: https://www.bitget.com/api-doc/common/convert/Get-Quoted-Price
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| fromCode | string
| Yes | the currency that you want to sell and convert from |
| toCode | string
| Yes | the currency that you want to buy and convert into |
| amount | float
| No | how much you want to trade in units of the from currency |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchConvertQuote (fromCode, toCode[, amount, params])
```
### createConvertTrade{docsify-ignore}
convert from one currency to another
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [conversion structure](https://docs.ccxt.com/#/?id=conversion-structure)
**See**: https://www.bitget.com/api-doc/common/convert/Trade
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | the id of the trade that you want to make |
| fromCode | string
| Yes | the currency that you want to sell and convert from |
| toCode | string
| Yes | the currency that you want to buy and convert into |
| amount | float
| Yes | how much you want to trade in units of the from currency |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.price | string
| Yes | the price of the conversion, obtained from fetchConvertQuote() |
| params.toAmount | string
| Yes | the amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote() |
```javascript
bitget.createConvertTrade (id, fromCode, toCode, amount[, params])
```
### fetchConvertTradeHistory{docsify-ignore}
fetch the users history of conversion trades
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [conversion structures](https://docs.ccxt.com/#/?id=conversion-structure)
**See**: https://www.bitget.com/api-doc/common/convert/Get-Convert-Record
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| No | the unified currency code |
| since | int
| No | the earliest time in ms to fetch conversions for |
| limit | int
| No | the maximum number of conversion structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchConvertTradeHistory ([code, since, limit, params])
```
### fetchConvertCurrencies{docsify-ignore}
fetches all available currencies that can be converted
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an associative dictionary of currencies
**See**: https://www.bitget.com/api-doc/common/convert/Get-Convert-Currencies
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchConvertCurrencies ([params])
```
### bitget{docsify-ignore}
watching delivery future markets is not yet implemented (perpertual future / swap is implemented)
```javascript
bitget.bitget ()
```
### watchTicker{docsify-ignore}
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Tickers-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Tickers-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to watch the ticker for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchTicker (symbol[, params])
```
### unWatchTicker{docsify-ignore}
unsubscribe from the ticker channel
**Kind**: instance method of [bitget
](#bitget)
**Returns**: any
- status of the unwatch request
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Tickers-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Tickers-Channel
| Param | Type | Description |
| --- | --- | --- |
| symbol | string
| unified symbol of the market to unwatch the ticker for |
```javascript
bitget.unWatchTicker (symbol, [undefined])
```
### watchTickers{docsify-ignore}
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Tickers-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Tickers-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| Yes | unified symbol of the market to watch the tickers for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchTickers (symbols[, params])
```
### watchOHLCV{docsify-ignore}
watches historical candlestick data containing the open, high, low, close price, and the volume of a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Array<int>>
- A list of candles ordered as timestamp, open, high, low, close, volume
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Candlesticks-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Candlesticks-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string
| Yes | the length of time each candle represents |
| since | int
| No | timestamp in ms of the earliest candle to fetch |
| limit | int
| No | the maximum amount of candles to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchOHLCV (symbol, timeframe[, since, limit, params])
```
### unWatchOHLCV{docsify-ignore}
unsubscribe from the ohlcv channel
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Candlesticks-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Candlesticks-Channel
| Param | Type | Description |
| --- | --- | --- |
| symbol | string
| unified symbol of the market to unwatch the ohlcv for |
```javascript
bitget.unWatchOHLCV (symbol, [undefined])
```
### watchOrderBook{docsify-ignore}
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Depth-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Order-Book-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the order book for |
| limit | int
| No | the maximum amount of order book entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchOrderBook (symbol[, limit, params])
```
### unWatchOrderBook{docsify-ignore}
unsubscribe from the orderbook channel
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Depth-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Order-Book-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the order book for |
| params.limit | int
| No | orderbook limit, default is undefined |
```javascript
bitget.unWatchOrderBook (symbol, [undefined])
```
### watchOrderBookForSymbols{docsify-ignore}
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Depth-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Order-Book-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| Yes | unified array of symbols |
| limit | int
| No | the maximum amount of order book entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchOrderBookForSymbols (symbols[, limit, params])
```
### watchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Trades-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/New-Trades-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum amount of trades to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchTrades (symbol[, since, limit, params])
```
### watchTradesForSymbols{docsify-ignore}
get the list of most recent trades for a particular symbol
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Trades-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/New-Trades-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum amount of trades to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchTradesForSymbols (symbol[, since, limit, params])
```
### unWatchTrades{docsify-ignore}
unsubscribe from the trades channel
**Kind**: instance method of [bitget
](#bitget)
**Returns**: any
- status of the unwatch request
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Trades-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/New-Trades-Channel
| Param | Type | Description |
| --- | --- | --- |
| symbol | string
| unified symbol of the market to unwatch the trades for |
```javascript
bitget.unWatchTrades (symbol, [undefined])
```
### watchPositions{docsify-ignore}
watch all open positions
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [position structure](https://docs.ccxt.com/en/latest/manual.html#position-structure)
**See**: https://www.bitget.com/api-doc/contract/websocket/private/Positions-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
, undefined
| Yes | list of unified market symbols |
| params | object
| Yes | extra parameters specific to the exchange API endpoint |
| params.instType | string
| No | one of 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES', default is 'USDT-FUTURES' |
```javascript
bitget.watchPositions (symbols, params[])
```
### watchOrders{docsify-ignore}
watches information on multiple orders made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/websocket/private/Order-Channel
- https://www.bitget.com/api-doc/contract/websocket/private/Order-Channel
- https://www.bitget.com/api-doc/contract/websocket/private/Plan-Order-Channel
- https://www.bitget.com/api-doc/margin/cross/websocket/private/Cross-Orders
- https://www.bitget.com/api-doc/margin/isolated/websocket/private/Isolate-Orders
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market orders were made in |
| since | int
| No | the earliest time in ms to fetch orders for |
| limit | int
| No | the maximum number of order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.stop | boolean
| No | *contract only* set to true for watching trigger orders |
| params.marginMode | string
| No | 'isolated' or 'cross' for watching spot margin orders] |
| params.type | string
| No | 'spot', 'swap' |
| params.subType | string
| No | 'linear', 'inverse' |
```javascript
bitget.watchOrders (symbol[, since, limit, params])
```
### watchMyTrades{docsify-ignore}
watches trades made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
**See**: https://www.bitget.com/api-doc/contract/websocket/private/Order-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | str
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch trades for |
| limit | int
| No | the maximum number of trades structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchMyTrades (symbol[, since, limit, params])
```
### watchBalance{docsify-ignore}
watch balance and get the amount of funds available for trading or funds locked in orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
**See**
- https://www.bitget.com/api-doc/spot/websocket/private/Account-Channel
- https://www.bitget.com/api-doc/contract/websocket/private/Account-Channel
- https://www.bitget.com/api-doc/margin/cross/websocket/private/Margin-Cross-Account-Assets
- https://www.bitget.com/api-doc/margin/isolated/websocket/private/Margin-isolated-account-assets
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.type | str
| No | spot or contract if not provided this.options['defaultType'] is used |
| params.instType | string
| No | one of 'SPOT', 'MARGIN', 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.marginMode | string
| No | 'isolated' or 'cross' for watching spot margin balances |
```javascript
bitget.watchBalance ([params])
```
## bitget{docsify-ignore}
**Kind**: global class
**Extends**: Exchange
* [fetchTime](#fetchtime)
* [fetchMarkets](#fetchmarkets)
* [fetchCurrencies](#fetchcurrencies)
* [fetchMarketLeverageTiers](#fetchmarketleveragetiers)
* [fetchDeposits](#fetchdeposits)
* [withdraw](#withdraw)
* [fetchWithdrawals](#fetchwithdrawals)
* [fetchDepositAddress](#fetchdepositaddress)
* [fetchOrderBook](#fetchorderbook)
* [fetchTicker](#fetchticker)
* [fetchTickers](#fetchtickers)
* [fetchTrades](#fetchtrades)
* [fetchTradingFee](#fetchtradingfee)
* [fetchTradingFees](#fetchtradingfees)
* [fetchOHLCV](#fetchohlcv)
* [fetchBalance](#fetchbalance)
* [createMarketBuyOrderWithCost](#createmarketbuyorderwithcost)
* [createOrder](#createorder)
* [createOrders](#createorders)
* [editOrder](#editorder)
* [cancelOrder](#cancelorder)
* [cancelOrders](#cancelorders)
* [cancelAllOrders](#cancelallorders)
* [fetchOrder](#fetchorder)
* [fetchOpenOrders](#fetchopenorders)
* [fetchClosedOrders](#fetchclosedorders)
* [fetchCanceledOrders](#fetchcanceledorders)
* [fetchCanceledAndClosedOrders](#fetchcanceledandclosedorders)
* [fetchLedger](#fetchledger)
* [fetchMyTrades](#fetchmytrades)
* [fetchPosition](#fetchposition)
* [fetchPositions](#fetchpositions)
* [fetchFundingRateHistory](#fetchfundingratehistory)
* [fetchFundingRate](#fetchfundingrate)
* [fetchFundingHistory](#fetchfundinghistory)
* [reduceMargin](#reducemargin)
* [addMargin](#addmargin)
* [fetchLeverage](#fetchleverage)
* [setLeverage](#setleverage)
* [setMarginMode](#setmarginmode)
* [setPositionMode](#setpositionmode)
* [fetchOpenInterest](#fetchopeninterest)
* [fetchTransfers](#fetchtransfers)
* [transfer](#transfer)
* [fetchDepositWithdrawFees](#fetchdepositwithdrawfees)
* [borrowCrossMargin](#borrowcrossmargin)
* [borrowIsolatedMargin](#borrowisolatedmargin)
* [repayIsolatedMargin](#repayisolatedmargin)
* [repayCrossMargin](#repaycrossmargin)
* [fetchMyLiquidations](#fetchmyliquidations)
* [fetchIsolatedBorrowRate](#fetchisolatedborrowrate)
* [fetchCrossBorrowRate](#fetchcrossborrowrate)
* [fetchBorrowInterest](#fetchborrowinterest)
* [closePosition](#closeposition)
* [closeAllPositions](#closeallpositions)
* [fetchMarginMode](#fetchmarginmode)
* [fetchPositionsHistory](#fetchpositionshistory)
* [fetchConvertQuote](#fetchconvertquote)
* [createConvertTrade](#createconverttrade)
* [fetchConvertTradeHistory](#fetchconverttradehistory)
* [fetchConvertCurrencies](#fetchconvertcurrencies)
* [watchTicker](#watchticker)
* [unWatchTicker](#unwatchticker)
* [watchTickers](#watchtickers)
* [watchOHLCV](#watchohlcv)
* [unWatchOHLCV](#unwatchohlcv)
* [watchOrderBook](#watchorderbook)
* [unWatchOrderBook](#unwatchorderbook)
* [watchOrderBookForSymbols](#watchorderbookforsymbols)
* [watchTrades](#watchtrades)
* [watchTradesForSymbols](#watchtradesforsymbols)
* [unWatchTrades](#unwatchtrades)
* [watchPositions](#watchpositions)
* [watchOrders](#watchorders)
* [watchMyTrades](#watchmytrades)
* [watchBalance](#watchbalance)
### fetchTime{docsify-ignore}
fetches the current integer timestamp in milliseconds from the exchange server
**Kind**: instance method of [bitget
](#bitget)
**Returns**: int
- the current integer timestamp in milliseconds from the exchange server
**See**: https://www.bitget.com/api-doc/common/public/Get-Server-Time
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchTime ([params])
```
### fetchMarkets{docsify-ignore}
retrieves data on all markets for bitget
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- an array of objects representing market data
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Symbols
- https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchMarkets ([params])
```
### fetchCurrencies{docsify-ignore}
fetches all available currencies on an exchange
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an associative dictionary of currencies
**See**: https://www.bitget.com/api-doc/spot/market/Get-Coin-List
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchCurrencies ([params])
```
### fetchMarketLeverageTiers{docsify-ignore}
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [leverage tiers structure](https://docs.ccxt.com/#/?id=leverage-tiers-structure)
**See**
- https://www.bitget.com/api-doc/contract/position/Get-Query-Position-Lever
- https://www.bitget.com/api-doc/margin/cross/account/Cross-Tier-Data
- https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Tier-Data
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | for spot margin 'cross' or 'isolated', default is 'isolated' |
| params.code | string
| No | required for cross spot margin |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.fetchMarketLeverageTiers (symbol[, params])
```
### fetchDeposits{docsify-ignore}
fetch all deposits made to an account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Get-Deposit-Record
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| since | int
| No | the earliest time in ms to fetch deposits for |
| limit | int
| No | the maximum number of deposits structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | end time in milliseconds |
| params.idLessThan | string
| No | return records with id less than the provided value |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchDeposits (code[, since, limit, params])
```
### withdraw{docsify-ignore}
make a withdrawal
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| amount | float
| Yes | the amount to withdraw |
| address | string
| Yes | the address to withdraw to |
| tag | string
| Yes | |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.chain | string
| No | the blockchain network the withdrawal is taking place on |
```javascript
bitget.withdraw (code, amount, address, tag[, params])
```
### fetchWithdrawals{docsify-ignore}
fetch all withdrawals made from an account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Get-Withdraw-Record
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| since | int
| No | the earliest time in ms to fetch withdrawals for |
| limit | int
| No | the maximum number of withdrawals structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | end time in milliseconds |
| params.idLessThan | string
| No | return records with id less than the provided value |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchWithdrawals (code[, since, limit, params])
```
### fetchDepositAddress{docsify-ignore}
fetch the deposit address for a currency associated with this account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [address structure](https://docs.ccxt.com/#/?id=address-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchDepositAddress (code[, params])
```
### fetchOrderBook{docsify-ignore}
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Orderbook
- https://www.bitget.com/api-doc/contract/market/Get-Merge-Depth
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the order book for |
| limit | int
| No | the maximum amount of order book entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchOrderBook (symbol[, limit, params])
```
### fetchTicker{docsify-ignore}
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Tickers
- https://www.bitget.com/api-doc/contract/market/Get-Ticker
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the ticker for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchTicker (symbol[, params])
```
### fetchTickers{docsify-ignore}
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Tickers
- https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
, undefined
| Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.subType | string
| No | *contract only* 'linear', 'inverse' |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.fetchTickers (symbols[, params])
```
### fetchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Trade>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Recent-Trades
- https://www.bitget.com/api-doc/spot/market/Get-Market-Trades
- https://www.bitget.com/api-doc/contract/market/Get-Recent-Fills
- https://www.bitget.com/api-doc/contract/market/Get-Fills-History
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum amount of trades to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* the latest time in ms to fetch trades for |
| params.paginate | boolean
| No | *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* default false, when true will automatically paginate by calling this endpoint multiple times |
```javascript
bitget.fetchTrades (symbol[, since, limit, params])
```
### fetchTradingFee{docsify-ignore}
fetch the trading fees for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [fee structure](https://docs.ccxt.com/#/?id=fee-structure)
**See**: https://www.bitget.com/api-doc/common/public/Get-Trade-Rate
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'isolated' or 'cross', for finding the fee rate of spot margin trading pairs |
```javascript
bitget.fetchTradingFee (symbol[, params])
```
### fetchTradingFees{docsify-ignore}
fetch the trading fees for multiple markets
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a dictionary of [fee structures](https://docs.ccxt.com/#/?id=fee-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Symbols
- https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
- https://www.bitget.com/api-doc/margin/common/support-currencies
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.margin | boolean
| No | set to true for spot margin |
```javascript
bitget.fetchTradingFees ([params])
```
### fetchOHLCV{docsify-ignore}
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Array<int>>
- A list of candles ordered as timestamp, open, high, low, close, volume
**See**
- https://www.bitget.com/api-doc/spot/market/Get-Candle-Data
- https://www.bitget.com/api-doc/spot/market/Get-History-Candle-Data
- https://www.bitget.com/api-doc/contract/market/Get-Candle-Data
- https://www.bitget.com/api-doc/contract/market/Get-History-Candle-Data
- https://www.bitget.com/api-doc/contract/market/Get-History-Index-Candle-Data
- https://www.bitget.com/api-doc/contract/market/Get-History-Mark-Candle-Data
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string
| Yes | the length of time each candle represents |
| since | int
| No | timestamp in ms of the earliest candle to fetch |
| limit | int
| No | the maximum amount of candles to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | timestamp in ms of the latest candle to fetch |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.price | string
| No | *swap only* "mark" (to fetch mark price candles) or "index" (to fetch index price candles) |
```javascript
bitget.fetchOHLCV (symbol, timeframe[, since, limit, params])
```
### fetchBalance{docsify-ignore}
query for balance and get the amount of funds available for trading or funds locked in orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
**See**
- https://www.bitget.com/api-doc/spot/account/Get-Account-Assets
- https://www.bitget.com/api-doc/contract/account/Get-Account-List
- https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Assets
- https://www.bitget.com/api-doc/margin/isolated/account/Get-Isolated-Assets
- https://bitgetlimited.github.io/apidoc/en/margin/#get-cross-assets
- https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-assets
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.fetchBalance ([params])
```
### createMarketBuyOrderWithCost{docsify-ignore}
create a market buy order by providing the symbol and cost
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Place-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to create an order in |
| cost | float
| Yes | how much you want to trade in units of the quote currency |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.createMarketBuyOrderWithCost (symbol, cost[, params])
```
### createOrder{docsify-ignore}
create a trade order
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Place-Order
- https://www.bitget.com/api-doc/spot/plan/Place-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Place-Order
- https://www.bitget.com/api-doc/contract/plan/Place-Tpsl-Order
- https://www.bitget.com/api-doc/contract/plan/Place-Plan-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to create an order in |
| type | string
| Yes | 'market' or 'limit' |
| side | string
| Yes | 'buy' or 'sell' |
| amount | float
| Yes | how much you want to trade in units of the base currency |
| price | float
| No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.cost | float
| No | *spot only* how much you want to trade in units of the quote currency, for market buy orders only |
| params.triggerPrice | float
| No | *swap only* The price at which a trigger order is triggered at |
| params.stopLossPrice | float
| No | *swap only* The price at which a stop loss order is triggered at |
| params.takeProfitPrice | float
| No | *swap only* The price at which a take profit order is triggered at |
| params.takeProfit | object
| No | *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only) |
| params.takeProfit.triggerPrice | float
| No | *swap only* take profit trigger price |
| params.stopLoss | object
| No | *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only) |
| params.stopLoss.triggerPrice | float
| No | *swap only* stop loss trigger price |
| params.timeInForce | string
| No | "GTC", "IOC", "FOK", or "PO" |
| params.marginMode | string
| No | 'isolated' or 'cross' for spot margin trading |
| params.loanType | string
| No | *spot margin only* 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal' |
| params.holdSide | string
| No | *contract stopLossPrice, takeProfitPrice only* Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell') |
| params.stopLoss.price | float
| No | *swap only* the execution price for a stop loss attached to a trigger order |
| params.takeProfit.price | float
| No | *swap only* the execution price for a take profit attached to a trigger order |
| params.stopLoss.type | string
| No | *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price' |
| params.takeProfit.type | string
| No | *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price' |
| params.trailingPercent | string
| No | *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10 |
| params.trailingTriggerPrice | string
| No | *swap and future only* the price to trigger a trailing stop order, default uses the price argument |
| params.triggerType | string
| No | *swap and future only* 'fill_price', 'mark_price' or 'index_price' |
| params.oneWayMode | boolean
| No | *swap and future only* required to set this to true in one_way_mode and you can leave this as undefined in hedge_mode, can adjust the mode using the setPositionMode() method |
| params.reduceOnly | bool
| No | true or false whether the order is reduce-only |
```javascript
bitget.createOrder (symbol, type, side, amount[, price, params])
```
### createOrders{docsify-ignore}
create a list of trade orders (all orders should be of the same symbol)
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Batch-Place-Orders
- https://www.bitget.com/api-doc/contract/trade/Batch-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| orders | Array
| Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object
| No | extra parameters specific to the api endpoint |
```javascript
bitget.createOrders (orders[, params])
```
### editOrder{docsify-ignore}
edit a trade order
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/plan/Modify-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Modify-Order
- https://www.bitget.com/api-doc/contract/plan/Modify-Tpsl-Order
- https://www.bitget.com/api-doc/contract/plan/Modify-Plan-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | cancel order id |
| symbol | string
| Yes | unified symbol of the market to create an order in |
| type | string
| Yes | 'market' or 'limit' |
| side | string
| Yes | 'buy' or 'sell' |
| amount | float
| Yes | how much you want to trade in units of the base currency |
| price | float
| No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.triggerPrice | float
| No | the price that a trigger order is triggered at |
| params.stopLossPrice | float
| No | *swap only* The price at which a stop loss order is triggered at |
| params.takeProfitPrice | float
| No | *swap only* The price at which a take profit order is triggered at |
| params.takeProfit | object
| No | *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only) |
| params.takeProfit.triggerPrice | float
| No | *swap only* take profit trigger price |
| params.stopLoss | object
| No | *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only) |
| params.stopLoss.triggerPrice | float
| No | *swap only* stop loss trigger price |
| params.stopLoss.price | float
| No | *swap only* the execution price for a stop loss attached to a trigger order |
| params.takeProfit.price | float
| No | *swap only* the execution price for a take profit attached to a trigger order |
| params.stopLoss.type | string
| No | *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price' |
| params.takeProfit.type | string
| No | *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price' |
| params.trailingPercent | string
| No | *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10 |
| params.trailingTriggerPrice | string
| No | *swap and future only* the price to trigger a trailing stop order, default uses the price argument |
| params.newTriggerType | string
| No | *swap and future only* 'fill_price', 'mark_price' or 'index_price' |
```javascript
bitget.editOrder (id, symbol, type, side, amount[, price, params])
```
### cancelOrder{docsify-ignore}
cancels an open order
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Cancel-Order
- https://www.bitget.com/api-doc/spot/plan/Cancel-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Cancel-Order
- https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Cancel-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Cancel-Order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | order id |
| symbol | string
| Yes | unified symbol of the market the order was made in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'isolated' or 'cross' for spot margin trading |
| params.stop | boolean
| No | set to true for canceling trigger orders |
| params.planType | string
| No | *swap only* either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan |
| params.trailing | boolean
| No | set to true if you want to cancel a trailing order |
```javascript
bitget.cancelOrder (id, symbol[, params])
```
### cancelOrders{docsify-ignore}
cancel multiple orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an array of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Batch-Cancel-Orders
- https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
- https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
- https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Cancel-Order
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Cancel-Orders
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| ids | Array<string>
| Yes | order ids |
| symbol | string
| Yes | unified market symbol, default is undefined |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'isolated' or 'cross' for spot margin trading |
| params.stop | boolean
| No | *contract only* set to true for canceling trigger orders |
```javascript
bitget.cancelOrders (ids, symbol[, params])
```
### cancelAllOrders{docsify-ignore}
cancel all open orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Cancel-Symbol-Orders
- https://www.bitget.com/api-doc/spot/plan/Batch-Cancel-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
- https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
- https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string
| No | 'isolated' or 'cross' for spot margin trading |
| params.stop | boolean
| No | *contract only* set to true for canceling trigger orders |
```javascript
bitget.cancelAllOrders (symbol[, params])
```
### fetchOrder{docsify-ignore}
fetches information on an order made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
- https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | the order id |
| symbol | string
| Yes | unified symbol of the market the order was made in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchOrder (id, symbol[, params])
```
### fetchOpenOrders{docsify-ignore}
fetch all unfilled currently open orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-Unfilled-Orders
- https://www.bitget.com/api-doc/spot/plan/Get-Current-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Get-Orders-Pending
- https://www.bitget.com/api-doc/contract/plan/get-orders-plan-pending
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Open-Orders
- https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Open-Orders
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch open orders for |
| limit | int
| No | the maximum number of open order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch orders for |
| params.planType | string
| No | *contract stop only* 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan' |
| params.stop | boolean
| No | set to true for fetching trigger orders |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.isPlan | string
| No | *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan' |
| params.trailing | boolean
| No | set to true if you want to fetch trailing orders |
```javascript
bitget.fetchOpenOrders (symbol[, since, limit, params])
```
### fetchClosedOrders{docsify-ignore}
fetches information on multiple closed orders made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
- https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
- https://www.bitget.com/api-doc/contract/plan/orders-plan-history
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
- https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the closed orders |
| since | int
| No | timestamp in ms of the earliest order |
| limit | int
| No | the max number of closed orders to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch entries for |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.isPlan | string
| No | *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan' |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.trailing | boolean
| No | set to true if you want to fetch trailing orders |
```javascript
bitget.fetchClosedOrders (symbol[, since, limit, params])
```
### fetchCanceledOrders{docsify-ignore}
fetches information on multiple canceled orders made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
- https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
- https://www.bitget.com/api-doc/contract/plan/orders-plan-history
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
- https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the canceled orders |
| since | int
| No | timestamp in ms of the earliest order |
| limit | int
| No | the max number of canceled orders to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch entries for |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.isPlan | string
| No | *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan' |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.trailing | boolean
| No | set to true if you want to fetch trailing orders |
```javascript
bitget.fetchCanceledOrders (symbol[, since, limit, params])
```
### fetchCanceledAndClosedOrders{docsify-ignore}
fetches information on multiple canceled and closed orders made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
- https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
- https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
- https://www.bitget.com/api-doc/contract/plan/orders-plan-history
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
- https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market orders were made in |
| since | int
| No | the earliest time in ms to fetch orders for |
| limit | int
| No | the maximum number of order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchCanceledAndClosedOrders (symbol[, since, limit, params])
```
### fetchLedger{docsify-ignore}
fetch the history of changes, actions done by the user or operations that altered balance of the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [ledger structure](https://docs.ccxt.com/#/?id=ledger-structure)
**See**
- https://www.bitget.com/api-doc/spot/account/Get-Account-Bills
- https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code, default is undefined |
| since | int
| No | timestamp in ms of the earliest ledger entry, default is undefined |
| limit | int
| No | max number of ledger entrys to return, default is undefined |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | end time in ms |
| params.symbol | string
| No | *contract only* unified market symbol |
| params.productType | string
| No | *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchLedger (code[, since, limit, params])
```
### fetchMyTrades{docsify-ignore}
fetch all trades made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Trade>
- a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
**See**
- https://www.bitget.com/api-doc/spot/trade/Get-Fills
- https://www.bitget.com/api-doc/contract/trade/Get-Order-Fills
- https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-Fills
- https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Transaction-Details
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch trades for |
| limit | int
| No | the maximum number of trades structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch trades for |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchMyTrades (symbol[, since, limit, params])
```
### fetchPosition{docsify-ignore}
fetch data on a single open contract trade position
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [position structure](https://docs.ccxt.com/#/?id=position-structure)
**See**: https://www.bitget.com/api-doc/contract/position/get-single-position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market the position is held in |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchPosition (symbol[, params])
```
### fetchPositions{docsify-ignore}
fetch all open positions
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [position structure](https://docs.ccxt.com/#/?id=position-structure)
**See**
- https://www.bitget.com/api-doc/contract/position/get-all-position
- https://www.bitget.com/api-doc/contract/position/Get-History-Position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| No | list of unified market symbols |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.marginCoin | string
| No | the settle currency of the positions, needs to match the productType |
| params.productType | string
| No | 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| params.useHistoryEndpoint | boolean
| No | default false, when true will use the historic endpoint to fetch positions |
| params.method | string
| No | either (default) 'privateMixGetV2MixPositionAllPosition' or 'privateMixGetV2MixPositionHistoryPosition' |
```javascript
bitget.fetchPositions ([symbols, params])
```
### fetchFundingRateHistory{docsify-ignore}
fetches historical funding rate prices
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [funding rate structures](https://docs.ccxt.com/#/?id=funding-rate-history-structure)
**See**: https://www.bitget.com/api-doc/contract/market/Get-History-Funding-Rate
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the funding rate history for |
| since | int
| No | timestamp in ms of the earliest funding rate to fetch |
| limit | int
| No | the maximum amount of funding rate structures to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchFundingRateHistory (symbol[, since, limit, params])
```
### fetchFundingRate{docsify-ignore}
fetch the current funding rate
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure)
**See**: https://www.bitget.com/api-doc/contract/market/Get-Current-Funding-Rate
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchFundingRate (symbol[, params])
```
### fetchFundingHistory{docsify-ignore}
fetch the funding history
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [funding history structures](https://docs.ccxt.com/#/?id=funding-history-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the starting timestamp in milliseconds |
| limit | int
| No | the number of entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch funding history for |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchFundingHistory (symbol[, since, limit, params])
```
### reduceMargin{docsify-ignore}
remove margin from a position
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin structure](https://docs.ccxt.com/#/?id=reduce-margin-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Change-Margin
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| amount | float
| Yes | the amount of margin to remove |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.reduceMargin (symbol, amount[, params])
```
### addMargin{docsify-ignore}
add margin
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin structure](https://docs.ccxt.com/#/?id=add-margin-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Change-Margin
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| amount | float
| Yes | the amount of margin to add |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.addMargin (symbol, amount[, params])
```
### fetchLeverage{docsify-ignore}
fetch the set leverage for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [leverage structure](https://docs.ccxt.com/#/?id=leverage-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Get-Single-Account
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchLeverage (symbol[, params])
```
### setLeverage{docsify-ignore}
set the level of leverage for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- response from the exchange
**See**: https://www.bitget.com/api-doc/contract/account/Change-Leverage
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| leverage | int
| Yes | the rate of leverage |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.holdSide | string
| No | *isolated only* position direction, 'long' or 'short' |
```javascript
bitget.setLeverage (leverage, symbol[, params])
```
### setMarginMode{docsify-ignore}
set margin mode to 'cross' or 'isolated'
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- response from the exchange
**See**: https://www.bitget.com/api-doc/contract/account/Change-Margin-Mode
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| marginMode | string
| Yes | 'cross' or 'isolated' |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.setMarginMode (marginMode, symbol[, params])
```
### setPositionMode{docsify-ignore}
set hedged to true or false for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- response from the exchange
**See**: https://www.bitget.com/api-doc/contract/account/Change-Hold-Mode
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| hedged | bool
| Yes | set to true to use dualSidePosition |
| symbol | string
| Yes | not used by bitget setPositionMode () |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.productType | string
| No | required if symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.setPositionMode (hedged, symbol[, params])
```
### fetchOpenInterest{docsify-ignore}
retrieves the open interest of a contract trading pair
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an open interest structure[https://docs.ccxt.com/#/?id=open-interest-structure](https://docs.ccxt.com/#/?id=open-interest-structure)
**See**: https://www.bitget.com/api-doc/contract/market/Get-Open-Interest
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified CCXT market symbol |
| params | object
| No | exchange specific parameters |
```javascript
bitget.fetchOpenInterest (symbol[, params])
```
### fetchTransfers{docsify-ignore}
fetch a history of internal transfers made on an account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [transfer structures](https://docs.ccxt.com/#/?id=transfer-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code of the currency transferred |
| since | int
| No | the earliest time in ms to fetch transfers for |
| limit | int
| No | the maximum number of transfers structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch entries for |
```javascript
bitget.fetchTransfers (code[, since, limit, params])
```
### transfer{docsify-ignore}
transfer currency internally between wallets on the same account
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [transfer structure](https://docs.ccxt.com/#/?id=transfer-structure)
**See**: https://www.bitget.com/api-doc/spot/account/Wallet-Transfer
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| amount | float
| Yes | amount to transfer |
| fromAccount | string
| Yes | account to transfer from |
| toAccount | string
| Yes | account to transfer to |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.symbol | string
| No | unified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account |
| params.clientOid | string
| No | custom id |
```javascript
bitget.transfer (code, amount, fromAccount, toAccount[, params])
```
### fetchDepositWithdrawFees{docsify-ignore}
fetch deposit and withdraw fees
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a list of [fee structures](https://docs.ccxt.com/#/?id=fee-structure)
**See**: https://www.bitget.com/api-doc/spot/market/Get-Coin-List
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| codes | Array<string>
, undefined
| Yes | list of unified currency codes |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchDepositWithdrawFees (codes[, params])
```
### borrowCrossMargin{docsify-ignore}
create a loan to borrow margin
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code of the currency to borrow |
| amount | string
| Yes | the amount to borrow |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.borrowCrossMargin (code, amount[, params])
```
### borrowIsolatedMargin{docsify-ignore}
create a loan to borrow margin
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| code | string
| Yes | unified currency code of the currency to borrow |
| amount | string
| Yes | the amount to borrow |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.borrowIsolatedMargin (symbol, code, amount[, params])
```
### repayIsolatedMargin{docsify-ignore}
repay borrowed margin and interest
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Repay
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| code | string
| Yes | unified currency code of the currency to repay |
| amount | string
| Yes | the amount to repay |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.repayIsolatedMargin (symbol, code, amount[, params])
```
### repayCrossMargin{docsify-ignore}
repay borrowed margin and interest
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://www.bitget.com/api-doc/margin/cross/account/Cross-Repay
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code of the currency to repay |
| amount | string
| Yes | the amount to repay |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.repayCrossMargin (code, amount[, params])
```
### fetchMyLiquidations{docsify-ignore}
retrieves the users liquidated positions
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an array of [liquidation structures](https://docs.ccxt.com/#/?id=liquidation-structure)
**See**
- https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Liquidation-Records
- https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Liquidation-Records
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| No | unified CCXT market symbol |
| since | int
| No | the earliest time in ms to fetch liquidations for |
| limit | int
| No | the maximum number of liquidation structures to retrieve |
| params | object
| No | exchange specific parameters for the bitget api endpoint |
| params.until | int
| No | timestamp in ms of the latest liquidation |
| params.marginMode | string
| No | 'cross' or 'isolated' default value is 'cross' |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchMyLiquidations ([symbol, since, limit, params])
```
### fetchIsolatedBorrowRate{docsify-ignore}
fetch the rate of interest to borrow a currency for margin trading
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an [isolated borrow rate structure](https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure)
**See**: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Margin-Interest-Rate-And-Max-Borrowable-Amount
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchIsolatedBorrowRate (symbol[, params])
```
### fetchCrossBorrowRate{docsify-ignore}
fetch the rate of interest to borrow a currency for margin trading
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [borrow rate structure](https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure)
**See**: https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Margin-Interest-Rate-And-Borrowable
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.symbol | string
| No | required for isolated margin |
```javascript
bitget.fetchCrossBorrowRate (code[, params])
```
### fetchBorrowInterest{docsify-ignore}
fetch the interest owed by the user for borrowing currency for margin trading
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [borrow interest structures](https://docs.ccxt.com/#/?id=borrow-interest-structure)
**See**
- https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Interest-Records
- https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Interest-Records
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| No | unified currency code |
| symbol | string
| No | unified market symbol when fetching interest in isolated markets |
| since | int
| No | the earliest time in ms to fetch borrow interest for |
| limit | int
| No | the maximum number of structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.paginate | boolean
| No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
```javascript
bitget.fetchBorrowInterest ([code, symbol, since, limit, params])
```
### closePosition{docsify-ignore}
closes an open position for a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified CCXT market symbol |
| side | string
| No | one-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short' |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.closePosition (symbol[, side, params])
```
### closeAllPositions{docsify-ignore}
closes all open positions for a market type
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- A list of [position structures](https://docs.ccxt.com/#/?id=position-structure)
**See**: https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.productType | string
| No | 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
```javascript
bitget.closeAllPositions ([params])
```
### fetchMarginMode{docsify-ignore}
fetches the margin mode of a trading pair
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [margin mode structure](https://docs.ccxt.com/#/?id=margin-mode-structure)
**See**: https://www.bitget.com/api-doc/contract/account/Get-Single-Account
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the margin mode for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchMarginMode (symbol[, params])
```
### fetchPositionsHistory{docsify-ignore}
fetches historical positions
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [position structures](https://docs.ccxt.com/#/?id=position-structure)
**See**: https://www.bitget.com/api-doc/contract/position/Get-History-Position
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| No | unified contract symbols |
| since | int
| No | timestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months |
| limit | int
| No | the maximum amount of records to fetch, default=20, max=100 |
| params | object
| Yes | extra parameters specific to the exchange api endpoint |
| params.until | int
| No | timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months EXCHANGE SPECIFIC PARAMETERS |
| params.productType | string
| No | USDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES |
```javascript
bitget.fetchPositionsHistory ([symbols, since, limit, params])
```
### fetchConvertQuote{docsify-ignore}
fetch a quote for converting from one currency to another
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [conversion structure](https://docs.ccxt.com/#/?id=conversion-structure)
**See**: https://www.bitget.com/api-doc/common/convert/Get-Quoted-Price
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| fromCode | string
| Yes | the currency that you want to sell and convert from |
| toCode | string
| Yes | the currency that you want to buy and convert into |
| amount | float
| No | how much you want to trade in units of the from currency |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchConvertQuote (fromCode, toCode[, amount, params])
```
### createConvertTrade{docsify-ignore}
convert from one currency to another
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [conversion structure](https://docs.ccxt.com/#/?id=conversion-structure)
**See**: https://www.bitget.com/api-doc/common/convert/Trade
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | the id of the trade that you want to make |
| fromCode | string
| Yes | the currency that you want to sell and convert from |
| toCode | string
| Yes | the currency that you want to buy and convert into |
| amount | float
| Yes | how much you want to trade in units of the from currency |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.price | string
| Yes | the price of the conversion, obtained from fetchConvertQuote() |
| params.toAmount | string
| Yes | the amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote() |
```javascript
bitget.createConvertTrade (id, fromCode, toCode, amount[, params])
```
### fetchConvertTradeHistory{docsify-ignore}
fetch the users history of conversion trades
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [conversion structures](https://docs.ccxt.com/#/?id=conversion-structure)
**See**: https://www.bitget.com/api-doc/common/convert/Get-Convert-Record
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| No | the unified currency code |
| since | int
| No | the earliest time in ms to fetch conversions for |
| limit | int
| No | the maximum number of conversion structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchConvertTradeHistory ([code, since, limit, params])
```
### fetchConvertCurrencies{docsify-ignore}
fetches all available currencies that can be converted
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- an associative dictionary of currencies
**See**: https://www.bitget.com/api-doc/common/convert/Get-Convert-Currencies
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.fetchConvertCurrencies ([params])
```
### bitget{docsify-ignore}
watching delivery future markets is not yet implemented (perpertual future / swap is implemented)
```javascript
bitget.bitget ()
```
### watchTicker{docsify-ignore}
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Tickers-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Tickers-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to watch the ticker for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchTicker (symbol[, params])
```
### unWatchTicker{docsify-ignore}
unsubscribe from the ticker channel
**Kind**: instance method of [bitget
](#bitget)
**Returns**: any
- status of the unwatch request
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Tickers-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Tickers-Channel
| Param | Type | Description |
| --- | --- | --- |
| symbol | string
| unified symbol of the market to unwatch the ticker for |
```javascript
bitget.unWatchTicker (symbol, [undefined])
```
### watchTickers{docsify-ignore}
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Tickers-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Tickers-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| Yes | unified symbol of the market to watch the tickers for |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchTickers (symbols[, params])
```
### watchOHLCV{docsify-ignore}
watches historical candlestick data containing the open, high, low, close price, and the volume of a market
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<Array<int>>
- A list of candles ordered as timestamp, open, high, low, close, volume
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Candlesticks-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Candlesticks-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string
| Yes | the length of time each candle represents |
| since | int
| No | timestamp in ms of the earliest candle to fetch |
| limit | int
| No | the maximum amount of candles to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchOHLCV (symbol, timeframe[, since, limit, params])
```
### unWatchOHLCV{docsify-ignore}
unsubscribe from the ohlcv channel
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Candlesticks-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Candlesticks-Channel
| Param | Type | Description |
| --- | --- | --- |
| symbol | string
| unified symbol of the market to unwatch the ohlcv for |
```javascript
bitget.unWatchOHLCV (symbol, [undefined])
```
### watchOrderBook{docsify-ignore}
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Depth-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Order-Book-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the order book for |
| limit | int
| No | the maximum amount of order book entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchOrderBook (symbol[, limit, params])
```
### unWatchOrderBook{docsify-ignore}
unsubscribe from the orderbook channel
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Depth-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Order-Book-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the order book for |
| params.limit | int
| No | orderbook limit, default is undefined |
```javascript
bitget.unWatchOrderBook (symbol, [undefined])
```
### watchOrderBookForSymbols{docsify-ignore}
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Depth-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/Order-Book-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| Yes | unified array of symbols |
| limit | int
| No | the maximum amount of order book entries to return |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchOrderBookForSymbols (symbols[, limit, params])
```
### watchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Trades-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/New-Trades-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum amount of trades to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchTrades (symbol[, since, limit, params])
```
### watchTradesForSymbols{docsify-ignore}
get the list of most recent trades for a particular symbol
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Trades-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/New-Trades-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum amount of trades to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchTradesForSymbols (symbol[, since, limit, params])
```
### unWatchTrades{docsify-ignore}
unsubscribe from the trades channel
**Kind**: instance method of [bitget
](#bitget)
**Returns**: any
- status of the unwatch request
**See**
- https://www.bitget.com/api-doc/spot/websocket/public/Trades-Channel
- https://www.bitget.com/api-doc/contract/websocket/public/New-Trades-Channel
| Param | Type | Description |
| --- | --- | --- |
| symbol | string
| unified symbol of the market to unwatch the trades for |
```javascript
bitget.unWatchTrades (symbol, [undefined])
```
### watchPositions{docsify-ignore}
watch all open positions
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [position structure](https://docs.ccxt.com/en/latest/manual.html#position-structure)
**See**: https://www.bitget.com/api-doc/contract/websocket/private/Positions-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
, undefined
| Yes | list of unified market symbols |
| params | object
| Yes | extra parameters specific to the exchange API endpoint |
| params.instType | string
| No | one of 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES', default is 'USDT-FUTURES' |
```javascript
bitget.watchPositions (symbols, params[])
```
### watchOrders{docsify-ignore}
watches information on multiple orders made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://www.bitget.com/api-doc/spot/websocket/private/Order-Channel
- https://www.bitget.com/api-doc/contract/websocket/private/Order-Channel
- https://www.bitget.com/api-doc/contract/websocket/private/Plan-Order-Channel
- https://www.bitget.com/api-doc/margin/cross/websocket/private/Cross-Orders
- https://www.bitget.com/api-doc/margin/isolated/websocket/private/Isolate-Orders
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market orders were made in |
| since | int
| No | the earliest time in ms to fetch orders for |
| limit | int
| No | the maximum number of order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.stop | boolean
| No | *contract only* set to true for watching trigger orders |
| params.marginMode | string
| No | 'isolated' or 'cross' for watching spot margin orders] |
| params.type | string
| No | 'spot', 'swap' |
| params.subType | string
| No | 'linear', 'inverse' |
```javascript
bitget.watchOrders (symbol[, since, limit, params])
```
### watchMyTrades{docsify-ignore}
watches trades made by the user
**Kind**: instance method of [bitget
](#bitget)
**Returns**: Array<object>
- a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
**See**: https://www.bitget.com/api-doc/contract/websocket/private/Order-Channel
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | str
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch trades for |
| limit | int
| No | the maximum number of trades structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
bitget.watchMyTrades (symbol[, since, limit, params])
```
### watchBalance{docsify-ignore}
watch balance and get the amount of funds available for trading or funds locked in orders
**Kind**: instance method of [bitget
](#bitget)
**Returns**: object
- a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
**See**
- https://www.bitget.com/api-doc/spot/websocket/private/Account-Channel
- https://www.bitget.com/api-doc/contract/websocket/private/Account-Channel
- https://www.bitget.com/api-doc/margin/cross/websocket/private/Margin-Cross-Account-Assets
- https://www.bitget.com/api-doc/margin/isolated/websocket/private/Margin-isolated-account-assets
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.type | str
| No | spot or contract if not provided this.options['defaultType'] is used |
| params.instType | string
| No | one of 'SPOT', 'MARGIN', 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES' |
| params.marginMode | string
| No | 'isolated' or 'cross' for watching spot margin balances |
```javascript
bitget.watchBalance ([params])
```