Back to Ccxt

Bitget

wiki/exchanges/bitget.md

4.5.52205.0 KB
Original Source

<a name="bitget" id="bitget"></a>

bitget{docsify-ignore}

Kind: global class
Extends: <code>Exchange</code>

<a name="setSandboxMode" id="setsandboxmode"></a>

setSandboxMode{docsify-ignore}

enables or disables demo trading mode, if enabled will send PAPTRADING=1 in headers

Kind: instance method of <code>bitget</code>

Param
enabled
javascript
bitget.setSandboxMode (enabled, [undefined])

<a name="enableDemoTrading" id="enabledemotrading"></a>

enableDemoTrading{docsify-ignore}

enables or disables demo trading mode, if enabled will send PAPTRADING=1 in headers

Kind: instance method of <code>bitget</code>

Param
enabled
javascript
bitget.enableDemoTrading (enabled, [undefined])

<a name="fetchTime" id="fetchtime"></a>

fetchTime{docsify-ignore}

fetches the current integer timestamp in milliseconds from the exchange server

Kind: instance method of <code>bitget</code>
Returns: <code>int</code> - the current integer timestamp in milliseconds from the exchange server

See: https://www.bitget.com/api-doc/common/public/Get-Server-Time

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchTime ([params])

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets{docsify-ignore}

retrieves data on all markets for bitget

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - an array of objects representing market data

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchMarkets ([params])

<a name="fetchCurrencies" id="fetchcurrencies"></a>

fetchCurrencies{docsify-ignore}

fetches all available currencies on an exchange

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an associative dictionary of currencies

See: https://www.bitget.com/api-doc/spot/market/Get-Coin-List

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchCurrencies ([params])

<a name="fetchMarketLeverageTiers" id="fetchmarketleveragetiers"></a>

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 <code>bitget</code>
Returns: <code>object</code> - a leverage tiers structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>Nofor spot margin 'cross' or 'isolated', default is 'isolated'
params.code<code>string</code>Norequired for cross spot margin
params.productType<code>string</code>Nocontract and uta only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchMarketLeverageTiers (symbol[, params])

<a name="fetchDeposits" id="fetchdeposits"></a>

fetchDeposits{docsify-ignore}

fetch all deposits made to an account

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of transaction structures

See: https://www.bitget.com/api-doc/spot/account/Get-Deposit-Record

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposits structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noend time in milliseconds
params.idLessThan<code>string</code>Noreturn records with id less than the provided value
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchDeposits (code[, since, limit, params])

<a name="withdraw" id="withdraw"></a>

withdraw{docsify-ignore}

make a withdrawal

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a transaction structure

See: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.chain<code>string</code>Nothe blockchain network the withdrawal is taking place on
javascript
bitget.withdraw (code, amount, address, tag[, params])

<a name="fetchWithdrawals" id="fetchwithdrawals"></a>

fetchWithdrawals{docsify-ignore}

fetch all withdrawals made from an account

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of transaction structures

See: https://www.bitget.com/api-doc/spot/account/Get-Withdraw-Record

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawals structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noend time in milliseconds
params.idLessThan<code>string</code>Noreturn records with id less than the provided value
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchWithdrawals (code[, since, limit, params])

<a name="fetchDepositAddress" id="fetchdepositaddress"></a>

fetchDepositAddress{docsify-ignore}

fetch the deposit address for a currency associated with this account

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an address structure

See: https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchDepositAddress (code[, params])

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook{docsify-ignore}

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchOrderBook (symbol[, limit, params])

<a name="fetchTicker" id="fetchticker"></a>

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 <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchTicker (symbol[, params])

<a name="fetchMarkPrice" id="fetchmarkprice"></a>

fetchMarkPrice{docsify-ignore}

fetches the mark price for a specific market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See: https://www.bitget.com/api-doc/contract/market/Get-Symbol-Price

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchMarkPrice (symbol[, params])

<a name="fetchTickers" id="fetchtickers"></a>

fetchTickers{docsify-ignore}

fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a dictionary of ticker structures

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yesunified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.subType<code>string</code>Nocontract only 'linear', 'inverse'
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
javascript
bitget.fetchTickers (symbols[, params])

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.until<code>int</code>Noonly applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory the latest time in ms to fetch trades for
params.paginate<code>boolean</code>Noonly 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])

<a name="fetchTradingFee" id="fetchtradingfee"></a>

fetchTradingFee{docsify-ignore}

fetch the trading fees for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a fee structure

See: https://www.bitget.com/api-doc/common/public/Get-Trade-Rate

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'isolated' or 'cross', for finding the fee rate of spot margin trading pairs
javascript
bitget.fetchTradingFee (symbol[, params])

<a name="fetchTradingFees" id="fetchtradingfees"></a>

fetchTradingFees{docsify-ignore}

fetch the trading fees for multiple markets

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a dictionary of fee structures indexed by market symbols

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.margin<code>boolean</code>Noset to true for spot margin
javascript
bitget.fetchTradingFees ([params])

<a name="fetchOHLCV" id="fetchohlcv"></a>

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 <code>bitget</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.until<code>int</code>Notimestamp in ms of the latest candle to fetch
params.useHistoryEndpoint<code>boolean</code>Nowhether to force to use historical endpoint (it has max limit of 200)
params.useHistoryEndpointForPagination<code>boolean</code>Nowhether to force to use historical endpoint for pagination (default true)
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.price<code>string</code>Noswap only "mark" (to fetch mark price candles) or "index" (to fetch index price candles)
javascript
bitget.fetchOHLCV (symbol, timeframe[, since, limit, params])

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance{docsify-ignore}

query for balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a balance structure

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.uta<code>string</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchBalance ([params])

<a name="createMarketBuyOrderWithCost" id="createmarketbuyorderwithcost"></a>

createMarketBuyOrderWithCost{docsify-ignore}

create a market buy order by providing the symbol and cost

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.createMarketBuyOrderWithCost (symbol, cost[, params])

<a name="createOrder" id="createorder"></a>

createOrder{docsify-ignore}

create a trade order

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much you want to trade in units of the base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders, and used as the execution price for contract stop-loss / take-profit orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.cost<code>float</code>Nospot only how much you want to trade in units of the quote currency, for market buy orders only
params.triggerPrice<code>float</code>Noswap only The price at which a trigger order is triggered at
params.stopLossPrice<code>float</code>Noswap only The price at which a stop loss order is triggered at
params.takeProfitPrice<code>float</code>Noswap only The price at which a take profit order is triggered at
params.takeProfit<code>object</code>NotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPrice<code>float</code>Noswap only take profit trigger price
params.stopLoss<code>object</code>NostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPrice<code>float</code>Noswap only stop loss trigger price
params.timeInForce<code>string</code>No"GTC", "IOC", "FOK", or "PO"
params.marginMode<code>string</code>No'isolated' or 'cross' for spot margin trading
params.loanType<code>string</code>Nospot margin only 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal'
params.holdSide<code>string</code>Nocontract stopLossPrice, takeProfitPrice only Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell')
params.stopLoss.price<code>float</code>Noswap only the execution price for a stop loss attached to a trigger order
params.takeProfit.price<code>float</code>Noswap only the execution price for a take profit attached to a trigger order
params.stopLoss.type<code>string</code>Noswap 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<code>string</code>Noswap 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<code>string</code>Noswap and future only the percent to trail away from the current market price, rate can not be greater than 10
params.trailingTriggerPrice<code>string</code>Noswap and future only the price to trigger a trailing stop order, default uses the price argument
params.triggerType<code>string</code>Noswap and future only 'fill_price', 'mark_price' or 'index_price'
params.oneWayMode<code>boolean</code>Noswap 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.hedged<code>bool</code>Noswap and future only true for hedged mode, false for one way mode, default is false
params.reduceOnly<code>bool</code>Notrue or false whether the order is reduce-only
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.posSide<code>string</code>Nouta only hedged two-way position side, long or short
javascript
bitget.createOrder (symbol, type, side, amount[, price, params])

<a name="createOrders" id="createorders"></a>

createOrders{docsify-ignore}

create a list of trade orders (all orders should be of the same symbol)

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
params<code>object</code>Noextra parameters specific to the api endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.createOrders (orders[, params])

<a name="editOrder" id="editorder"></a>

editOrder{docsify-ignore}

edit a trade order

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yescancel order id
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much you want to trade in units of the base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.triggerPrice<code>float</code>Nothe price that a trigger order is triggered at
params.stopLossPrice<code>float</code>Noswap only The price at which a stop loss order is triggered at
params.takeProfitPrice<code>float</code>Noswap only The price at which a take profit order is triggered at
params.takeProfit<code>object</code>NotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPrice<code>float</code>Noswap only take profit trigger price
params.stopLoss<code>object</code>NostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPrice<code>float</code>Noswap only stop loss trigger price
params.stopLoss.price<code>float</code>Noswap only the execution price for a stop loss attached to a trigger order
params.takeProfit.price<code>float</code>Noswap only the execution price for a take profit attached to a trigger order
params.stopLoss.type<code>string</code>Noswap 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<code>string</code>Noswap 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<code>string</code>Noswap and future only the percent to trail away from the current market price, rate can not be greater than 10
params.trailingTriggerPrice<code>string</code>Noswap and future only the price to trigger a trailing stop order, default uses the price argument
params.newTriggerType<code>string</code>Noswap and future only 'fill_price', 'mark_price' or 'index_price'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.editOrder (id, symbol, type, side, amount[, price, params])

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder{docsify-ignore}

cancels an open order

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - An order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'isolated' or 'cross' for spot margin trading
params.trigger<code>boolean</code>Noset to true for canceling trigger orders
params.planType<code>string</code>Noswap only either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
params.trailing<code>boolean</code>Noset to true if you want to cancel a trailing order
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.clientOrderId<code>string</code>Nothe clientOrderId of the order, id does not need to be provided if clientOrderId is provided
javascript
bitget.cancelOrder (id, symbol[, params])

<a name="cancelOrders" id="cancelorders"></a>

cancelOrders{docsify-ignore}

cancel multiple orders

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an array of order structures

See

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Yesunified market symbol, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'isolated' or 'cross' for spot margin trading
params.trigger<code>boolean</code>Nocontract only set to true for canceling trigger orders
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.cancelOrders (ids, symbol[, params])

<a name="cancelAllOrders" id="cancelallorders"></a>

cancelAllOrders{docsify-ignore}

cancel all open orders

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'isolated' or 'cross' for spot margin trading
params.trigger<code>boolean</code>Nocontract only set to true for canceling trigger orders
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.cancelAllOrders (symbol[, params])

<a name="fetchOrder" id="fetchorder"></a>

fetchOrder{docsify-ignore}

fetches information on an order made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - An order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesthe order id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.clientOrderId<code>string</code>Nothe clientOrderId of the order, id does not need to be provided if clientOrderId is provided
javascript
bitget.fetchOrder (id, symbol[, params])

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>Nothe maximum number of open order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
params.planType<code>string</code>Nocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlan<code>string</code>Noswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailing<code>boolean</code>Noset to true if you want to fetch trailing orders
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchOpenOrders (symbol[, since, limit, params])

<a name="fetchClosedOrders" id="fetchclosedorders"></a>

fetchClosedOrders{docsify-ignore}

fetches information on multiple closed orders made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the closed orders
since<code>int</code>Notimestamp in ms of the earliest order
limit<code>int</code>Nothe max number of closed orders to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
params.planType<code>string</code>Nocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlan<code>string</code>Noswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailing<code>boolean</code>Noset to true if you want to fetch trailing orders
javascript
bitget.fetchClosedOrders (symbol[, since, limit, params])

<a name="fetchCanceledOrders" id="fetchcanceledorders"></a>

fetchCanceledOrders{docsify-ignore}

fetches information on multiple canceled orders made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the canceled orders
since<code>int</code>Notimestamp in ms of the earliest order
limit<code>int</code>Nothe max number of canceled orders to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
params.planType<code>string</code>Nocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlan<code>string</code>Noswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailing<code>boolean</code>Noset to true if you want to fetch trailing orders
javascript
bitget.fetchCanceledOrders (symbol[, since, limit, params])

<a name="fetchCanceledAndClosedOrders" id="fetchcanceledandclosedorders"></a>

fetchCanceledAndClosedOrders{docsify-ignore}

fetches information on multiple canceled and closed orders made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
params.planType<code>string</code>Nocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlan<code>string</code>Noswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailing<code>boolean</code>Noset to true if you want to fetch trailing orders
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchCanceledAndClosedOrders (symbol[, since, limit, params])

<a name="fetchLedger" id="fetchledger"></a>

fetchLedger{docsify-ignore}

fetch the history of changes, actions done by the user or operations that altered the balance of the user

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a ledger structure

See

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code, default is undefined
since<code>int</code>Notimestamp in ms of the earliest ledger entry, default is undefined
limit<code>int</code>Nomax number of ledger entries to return, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noend time in ms
params.symbol<code>string</code>Nocontract only unified market symbol
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchLedger ([code, since, limit, params])

<a name="fetchMyTrades" id="fetchmytrades"></a>

fetchMyTrades{docsify-ignore}

fetch all trades made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch trades for
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchMyTrades (symbol[, since, limit, params])

<a name="fetchPosition" id="fetchposition"></a>

fetchPosition{docsify-ignore}

fetch data on a single open contract trade position

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a position structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the position is held in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchPosition (symbol[, params])

<a name="fetchPositions" id="fetchpositions"></a>

fetchPositions{docsify-ignore}

fetch all open positions

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of position structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginCoin<code>string</code>Nothe settle currency of the positions, needs to match the productType
params.productType<code>string</code>No'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.useHistoryEndpoint<code>boolean</code>Nodefault false, when true will use the historic endpoint to fetch positions
params.method<code>string</code>Noeither (default) 'privateMixGetV2MixPositionAllPosition', 'privateMixGetV2MixPositionHistoryPosition', or 'privateUtaGetV3PositionCurrentPosition'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchPositions ([symbols, params])

<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>

fetchFundingRateHistory{docsify-ignore}

fetches historical funding rate prices

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of funding rate structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the funding rate history for
since<code>int</code>Notimestamp in ms of the earliest funding rate to fetch
limit<code>int</code>Nothe maximum amount of funding rate structures to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
bitget.fetchFundingRateHistory (symbol[, since, limit, params])

<a name="fetchFundingRate" id="fetchfundingrate"></a>

fetchFundingRate{docsify-ignore}

fetch the current funding rate

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a funding rate structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.method<code>string</code>Noeither (default) 'publicMixGetV2MixMarketCurrentFundRate' or 'publicMixGetV2MixMarketFundingTime'
javascript
bitget.fetchFundingRate (symbol[, params])

<a name="fetchFundingRates" id="fetchfundingrates"></a>

fetchFundingRates{docsify-ignore}

fetch the current funding rates for all markets

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a dictionary of funding rate structures, indexed by market symbols

See: https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.subType<code>string</code>Nocontract only 'linear', 'inverse'
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.method<code>string</code>Noeither (default) 'publicMixGetV2MixMarketTickers' or 'publicMixGetV2MixMarketCurrentFundRate'
javascript
bitget.fetchFundingRates ([symbols, params])

<a name="fetchFundingIntervals" id="fetchfundingintervals"></a>

fetchFundingIntervals{docsify-ignore}

fetch the funding rate interval for multiple markets

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of funding rate structures

See: https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>No'USDT-FUTURES' (default), 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
javascript
bitget.fetchFundingIntervals ([symbols, params])

<a name="fetchFundingHistory" id="fetchfundinghistory"></a>

fetchFundingHistory{docsify-ignore}

fetch the funding history

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of funding history structures

See: https://www.bitget.com/api-doc/contract/account/Get-Account-Bill

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe starting timestamp in milliseconds
limit<code>int</code>Nothe number of entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch funding history for
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchFundingHistory (symbol[, since, limit, params])

<a name="reduceMargin" id="reducemargin"></a>

reduceMargin{docsify-ignore}

remove margin from a position

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin structure

See: https://www.bitget.com/api-doc/contract/account/Change-Margin

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesthe amount of margin to remove
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.reduceMargin (symbol, amount[, params])

<a name="addMargin" id="addmargin"></a>

addMargin{docsify-ignore}

add margin

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin structure

See: https://www.bitget.com/api-doc/contract/account/Change-Margin

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesthe amount of margin to add
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.addMargin (symbol, amount[, params])

<a name="fetchLeverage" id="fetchleverage"></a>

fetchLeverage{docsify-ignore}

fetch the set leverage for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a leverage structure

See: https://www.bitget.com/api-doc/contract/account/Get-Single-Account

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchLeverage (symbol[, params])

<a name="setLeverage" id="setleverage"></a>

setLeverage{docsify-ignore}

set the level of leverage for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - response from the exchange

See

ParamTypeRequiredDescription
leverage<code>int</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.holdSide<code>string</code>Noisolated only position direction, 'long' or 'short'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.posSide<code>boolean</code>Norequired for uta isolated margin, long or short
javascript
bitget.setLeverage (leverage, symbol[, params])

<a name="setMarginMode" id="setmarginmode"></a>

setMarginMode{docsify-ignore}

set margin mode to 'cross' or 'isolated'

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - response from the exchange

See: https://www.bitget.com/api-doc/contract/account/Change-Margin-Mode

ParamTypeRequiredDescription
marginMode<code>string</code>Yes'cross' or 'isolated'
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.setMarginMode (marginMode, symbol[, params])

<a name="setPositionMode" id="setpositionmode"></a>

setPositionMode{docsify-ignore}

set hedged to true or false for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - response from the exchange

See

ParamTypeRequiredDescription
hedged<code>bool</code>Yesset to true to use dualSidePosition
symbol<code>string</code>Yesnot used by bitget setPositionMode ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>Norequired if not uta and symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.setPositionMode (hedged, symbol[, params])

<a name="fetchOpenInterest" id="fetchopeninterest"></a>

fetchOpenInterest{docsify-ignore}

retrieves the open interest of a contract trading pair

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an open interest structurehttps://docs.ccxt.com/?id=open-interest-structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
params<code>object</code>Noexchange specific parameters
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchOpenInterest (symbol[, params])

<a name="fetchTransfers" id="fetchtransfers"></a>

fetchTransfers{docsify-ignore}

fetch a history of internal transfers made on an account

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of transfer structures

See: https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency transferred
since<code>int</code>Nothe earliest time in ms to fetch transfers for
limit<code>int</code>Nothe maximum number of transfers structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch entries for
javascript
bitget.fetchTransfers (code[, since, limit, params])

<a name="transfer" id="transfer"></a>

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a transfer structure

See: https://www.bitget.com/api-doc/spot/account/Wallet-Transfer

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from
toAccount<code>string</code>Yesaccount to transfer to
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.symbol<code>string</code>Nounified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account
params.clientOid<code>string</code>Nocustom id
javascript
bitget.transfer (code, amount, fromAccount, toAccount[, params])

<a name="fetchDepositWithdrawFees" id="fetchdepositwithdrawfees"></a>

fetchDepositWithdrawFees{docsify-ignore}

fetch deposit and withdraw fees

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a list of fee structures

See: https://www.bitget.com/api-doc/spot/market/Get-Coin-List

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yeslist of unified currency codes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchDepositWithdrawFees (codes[, params])

<a name="borrowCrossMargin" id="borrowcrossmargin"></a>

borrowCrossMargin{docsify-ignore}

create a loan to borrow margin

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin loan structure

See: https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency to borrow
amount<code>string</code>Yesthe amount to borrow
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.borrowCrossMargin (code, amount[, params])

<a name="borrowIsolatedMargin" id="borrowisolatedmargin"></a>

borrowIsolatedMargin{docsify-ignore}

create a loan to borrow margin

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin loan structure

See: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
code<code>string</code>Yesunified currency code of the currency to borrow
amount<code>string</code>Yesthe amount to borrow
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.borrowIsolatedMargin (symbol, code, amount[, params])

<a name="repayIsolatedMargin" id="repayisolatedmargin"></a>

repayIsolatedMargin{docsify-ignore}

repay borrowed margin and interest

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin loan structure

See: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Repay

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
code<code>string</code>Yesunified currency code of the currency to repay
amount<code>string</code>Yesthe amount to repay
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.repayIsolatedMargin (symbol, code, amount[, params])

<a name="repayCrossMargin" id="repaycrossmargin"></a>

repayCrossMargin{docsify-ignore}

repay borrowed margin and interest

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin loan structure

See: https://www.bitget.com/api-doc/margin/cross/account/Cross-Repay

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency to repay
amount<code>string</code>Yesthe amount to repay
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.repayCrossMargin (code, amount[, params])

<a name="fetchMyLiquidations" id="fetchmyliquidations"></a>

fetchMyLiquidations{docsify-ignore}

retrieves the users liquidated positions

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an array of liquidation structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Nounified CCXT market symbol
since<code>int</code>Nothe earliest time in ms to fetch liquidations for
limit<code>int</code>Nothe maximum number of liquidation structures to retrieve
params<code>object</code>Noexchange specific parameters for the bitget api endpoint
params.until<code>int</code>Notimestamp in ms of the latest liquidation
params.marginMode<code>string</code>No'cross' or 'isolated' default value is 'cross'
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchMyLiquidations ([symbol, since, limit, params])

<a name="fetchIsolatedBorrowRate" id="fetchisolatedborrowrate"></a>

fetchIsolatedBorrowRate{docsify-ignore}

fetch the rate of interest to borrow a currency for margin trading

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an isolated borrow rate structure

See: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Margin-Interest-Rate-And-Max-Borrowable-Amount

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchIsolatedBorrowRate (symbol[, params])

<a name="fetchCrossBorrowRate" id="fetchcrossborrowrate"></a>

fetchCrossBorrowRate{docsify-ignore}

fetch the rate of interest to borrow a currency for margin trading

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a borrow rate structure

See

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchCrossBorrowRate (code[, params])

<a name="fetchBorrowInterest" id="fetchborrowinterest"></a>

fetchBorrowInterest{docsify-ignore}

fetch the interest owed by the user for borrowing currency for margin trading

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of borrow interest structures

See

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
symbol<code>string</code>Nounified market symbol when fetching interest in isolated markets
since<code>int</code>Nothe earliest time in ms to fetch borrow interest for
limit<code>int</code>Nothe maximum number of structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchBorrowInterest ([code, symbol, since, limit, params])

<a name="closePosition" id="closeposition"></a>

closePosition{docsify-ignore}

closes an open position for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - An order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
side<code>string</code>Noone-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.closePosition (symbol[, side, params])

<a name="closeAllPositions" id="closeallpositions"></a>

closeAllPositions{docsify-ignore}

closes all open positions for a market type

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - A list of position structures

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>No'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.closeAllPositions ([params])

<a name="fetchMarginMode" id="fetchmarginmode"></a>

fetchMarginMode{docsify-ignore}

fetches the margin mode of a trading pair

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin mode structure

See: https://www.bitget.com/api-doc/contract/account/Get-Single-Account

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the margin mode for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchMarginMode (symbol[, params])

<a name="fetchPositionsHistory" id="fetchpositionshistory"></a>

fetchPositionsHistory{docsify-ignore}

fetches historical positions

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of position structures

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified contract symbols
since<code>int</code>Notimestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
limit<code>int</code>Nothe maximum amount of records to fetch, default=20, max=100
params<code>object</code>Yesextra parameters specific to the exchange api endpoint
params.until<code>int</code>Notimestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
params.productType<code>string</code>NoUSDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchPositionsHistory ([symbols, since, limit, params])

<a name="fetchConvertQuote" id="fetchconvertquote"></a>

fetchConvertQuote{docsify-ignore}

fetch a quote for converting from one currency to another

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a conversion structure

See: https://www.bitget.com/api-doc/common/convert/Get-Quoted-Price

ParamTypeRequiredDescription
fromCode<code>string</code>Yesthe currency that you want to sell and convert from
toCode<code>string</code>Yesthe currency that you want to buy and convert into
amount<code>float</code>Nohow much you want to trade in units of the from currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchConvertQuote (fromCode, toCode[, amount, params])

<a name="createConvertTrade" id="createconverttrade"></a>

createConvertTrade{docsify-ignore}

convert from one currency to another

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a conversion structure

See: https://www.bitget.com/api-doc/common/convert/Trade

ParamTypeRequiredDescription
id<code>string</code>Yesthe id of the trade that you want to make
fromCode<code>string</code>Yesthe currency that you want to sell and convert from
toCode<code>string</code>Yesthe currency that you want to buy and convert into
amount<code>float</code>Yeshow much you want to trade in units of the from currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.price<code>string</code>Yesthe price of the conversion, obtained from fetchConvertQuote()
params.toAmount<code>string</code>Yesthe amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote()
javascript
bitget.createConvertTrade (id, fromCode, toCode, amount[, params])

<a name="fetchConvertTradeHistory" id="fetchconverttradehistory"></a>

fetchConvertTradeHistory{docsify-ignore}

fetch the users history of conversion trades

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of conversion structures

See: https://www.bitget.com/api-doc/common/convert/Get-Convert-Record

ParamTypeRequiredDescription
code<code>string</code>Nothe unified currency code
since<code>int</code>Nothe earliest time in ms to fetch conversions for
limit<code>int</code>Nothe maximum number of conversion structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchConvertTradeHistory ([code, since, limit, params])

<a name="fetchConvertCurrencies" id="fetchconvertcurrencies"></a>

fetchConvertCurrencies{docsify-ignore}

fetches all available currencies that can be converted

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an associative dictionary of currencies

See: https://www.bitget.com/api-doc/common/convert/Get-Convert-Currencies

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchConvertCurrencies ([params])

<a name="fetchFundingInterval" id="fetchfundinginterval"></a>

fetchFundingInterval{docsify-ignore}

fetch the current funding rate interval

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a funding rate structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchFundingInterval (symbol[, params])

<a name="fetchLongShortRatioHistory" id="fetchlongshortratiohistory"></a>

fetchLongShortRatioHistory{docsify-ignore}

fetches the long short ratio history for a unified market symbol

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - an array of long short ratio structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the long short ratio for
timeframe<code>string</code>Nothe period for the ratio
since<code>int</code>Nothe earliest time in ms to fetch ratios for
limit<code>int</code>Nothe maximum number of long short ratio structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchLongShortRatioHistory (symbol[, timeframe, since, limit, params])

<a name="bitget" id="bitget"></a>

bitget{docsify-ignore}

watching delivery future markets is not yet implemented (perpertual future & swap is implemented)

javascript
bitget.bitget ()

<a name="watchTicker" id="watchticker"></a>

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 <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to watch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchTicker (symbol[, params])

<a name="unWatchTicker" id="unwatchticker"></a>

unWatchTicker{docsify-ignore}

unsubscribe from the ticker channel

Kind: instance method of <code>bitget</code>
Returns: <code>any</code> - status of the unwatch request

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to unwatch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.unWatchTicker (symbol[, params])

<a name="watchTickers" id="watchtickers"></a>

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 <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to watch the tickers for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchTickers (symbols[, params])

<a name="watchBidsAsks" id="watchbidsasks"></a>

watchBidsAsks{docsify-ignore}

watches best bid & ask for symbols

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchBidsAsks (symbols[, params])

<a name="watchOHLCV" id="watchohlcv"></a>

watchOHLCV{docsify-ignore}

watches historical candlestick data containing the open, high, low, close price, and the volume of a market

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchOHLCV (symbol, timeframe[, since, limit, params])

<a name="unWatchOHLCV" id="unwatchohlcv"></a>

unWatchOHLCV{docsify-ignore}

unsubscribe from the ohlcv channel

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to unwatch the ohlcv for
timeframe<code>string</code>Nothe period for the ratio, default is 1 minute
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.unWatchOHLCV (symbol[, timeframe, params])

<a name="watchOrderBook" id="watchorderbook"></a>

watchOrderBook{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchOrderBook (symbol[, limit, params])

<a name="unWatchOrderBook" id="unwatchorderbook"></a>

unWatchOrderBook{docsify-ignore}

unsubscribe from the orderbook channel

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.limit<code>int</code>Noorderbook limit, default is undefined
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.unWatchOrderBook (symbol[, params])

<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>

watchOrderBookForSymbols{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified array of symbols
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchOrderBookForSymbols (symbols[, limit, params])

<a name="watchTrades" id="watchtrades"></a>

watchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchTrades (symbol[, since, limit, params])

<a name="watchTradesForSymbols" id="watchtradesforsymbols"></a>

watchTradesForSymbols{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchTradesForSymbols (symbols[, since, limit, params])

<a name="unWatchTrades" id="unwatchtrades"></a>

unWatchTrades{docsify-ignore}

unsubscribe from the trades channel

Kind: instance method of <code>bitget</code>
Returns: <code>any</code> - status of the unwatch request

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to unwatch the trades for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.unWatchTrades (symbol[, params])

<a name="watchPositions" id="watchpositions"></a>

watchPositions{docsify-ignore}

watch all open positions

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of position structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
since<code>int</code>Nothe earliest time in ms to fetch positions for
limit<code>int</code>Nothe maximum number of positions to retrieve
params<code>object</code>Yesextra parameters specific to the exchange API endpoint
params.instType<code>string</code>Noone of 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES', default is 'USDT-FUTURES'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchPositions (symbols[, since, limit, params])

<a name="watchOrders" id="watchorders"></a>

watchOrders{docsify-ignore}

watches information on multiple orders made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>boolean</code>Nocontract only set to true for watching trigger orders
params.marginMode<code>string</code>No'isolated' or 'cross' for watching spot margin orders]
params.type<code>string</code>No'spot', 'swap'
params.subType<code>string</code>No'linear', 'inverse'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchOrders (symbol[, since, limit, params])

<a name="watchMyTrades" id="watchmytrades"></a>

watchMyTrades{docsify-ignore}

watches trades made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>str</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchMyTrades (symbol[, since, limit, params])

<a name="watchBalance" id="watchbalance"></a>

watchBalance{docsify-ignore}

watch balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a balance structure

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>str</code>Nospot or contract if not provided this.options['defaultType'] is used
params.instType<code>string</code>Noone of 'SPOT', 'MARGIN', 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.marginMode<code>string</code>No'isolated' or 'cross' for watching spot margin balances
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchBalance ([params])

<a name="bitget" id="bitget"></a>

bitget{docsify-ignore}

Kind: global class
Extends: <code>Exchange</code>

<a name="setSandboxMode" id="setsandboxmode"></a>

setSandboxMode{docsify-ignore}

enables or disables demo trading mode, if enabled will send PAPTRADING=1 in headers

Kind: instance method of <code>bitget</code>

Param
enabled
javascript
bitget.setSandboxMode (enabled, [undefined])

<a name="enableDemoTrading" id="enabledemotrading"></a>

enableDemoTrading{docsify-ignore}

enables or disables demo trading mode, if enabled will send PAPTRADING=1 in headers

Kind: instance method of <code>bitget</code>

Param
enabled
javascript
bitget.enableDemoTrading (enabled, [undefined])

<a name="fetchTime" id="fetchtime"></a>

fetchTime{docsify-ignore}

fetches the current integer timestamp in milliseconds from the exchange server

Kind: instance method of <code>bitget</code>
Returns: <code>int</code> - the current integer timestamp in milliseconds from the exchange server

See: https://www.bitget.com/api-doc/common/public/Get-Server-Time

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchTime ([params])

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets{docsify-ignore}

retrieves data on all markets for bitget

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - an array of objects representing market data

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchMarkets ([params])

<a name="fetchCurrencies" id="fetchcurrencies"></a>

fetchCurrencies{docsify-ignore}

fetches all available currencies on an exchange

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an associative dictionary of currencies

See: https://www.bitget.com/api-doc/spot/market/Get-Coin-List

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchCurrencies ([params])

<a name="fetchMarketLeverageTiers" id="fetchmarketleveragetiers"></a>

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 <code>bitget</code>
Returns: <code>object</code> - a leverage tiers structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>Nofor spot margin 'cross' or 'isolated', default is 'isolated'
params.code<code>string</code>Norequired for cross spot margin
params.productType<code>string</code>Nocontract and uta only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchMarketLeverageTiers (symbol[, params])

<a name="fetchDeposits" id="fetchdeposits"></a>

fetchDeposits{docsify-ignore}

fetch all deposits made to an account

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of transaction structures

See: https://www.bitget.com/api-doc/spot/account/Get-Deposit-Record

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposits structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noend time in milliseconds
params.idLessThan<code>string</code>Noreturn records with id less than the provided value
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchDeposits (code[, since, limit, params])

<a name="withdraw" id="withdraw"></a>

withdraw{docsify-ignore}

make a withdrawal

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a transaction structure

See: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.chain<code>string</code>Nothe blockchain network the withdrawal is taking place on
javascript
bitget.withdraw (code, amount, address, tag[, params])

<a name="fetchWithdrawals" id="fetchwithdrawals"></a>

fetchWithdrawals{docsify-ignore}

fetch all withdrawals made from an account

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of transaction structures

See: https://www.bitget.com/api-doc/spot/account/Get-Withdraw-Record

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawals structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noend time in milliseconds
params.idLessThan<code>string</code>Noreturn records with id less than the provided value
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchWithdrawals (code[, since, limit, params])

<a name="fetchDepositAddress" id="fetchdepositaddress"></a>

fetchDepositAddress{docsify-ignore}

fetch the deposit address for a currency associated with this account

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an address structure

See: https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchDepositAddress (code[, params])

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook{docsify-ignore}

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchOrderBook (symbol[, limit, params])

<a name="fetchTicker" id="fetchticker"></a>

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 <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchTicker (symbol[, params])

<a name="fetchMarkPrice" id="fetchmarkprice"></a>

fetchMarkPrice{docsify-ignore}

fetches the mark price for a specific market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See: https://www.bitget.com/api-doc/contract/market/Get-Symbol-Price

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchMarkPrice (symbol[, params])

<a name="fetchTickers" id="fetchtickers"></a>

fetchTickers{docsify-ignore}

fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a dictionary of ticker structures

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yesunified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.subType<code>string</code>Nocontract only 'linear', 'inverse'
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
javascript
bitget.fetchTickers (symbols[, params])

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.until<code>int</code>Noonly applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory the latest time in ms to fetch trades for
params.paginate<code>boolean</code>Noonly 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])

<a name="fetchTradingFee" id="fetchtradingfee"></a>

fetchTradingFee{docsify-ignore}

fetch the trading fees for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a fee structure

See: https://www.bitget.com/api-doc/common/public/Get-Trade-Rate

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'isolated' or 'cross', for finding the fee rate of spot margin trading pairs
javascript
bitget.fetchTradingFee (symbol[, params])

<a name="fetchTradingFees" id="fetchtradingfees"></a>

fetchTradingFees{docsify-ignore}

fetch the trading fees for multiple markets

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a dictionary of fee structures indexed by market symbols

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.margin<code>boolean</code>Noset to true for spot margin
javascript
bitget.fetchTradingFees ([params])

<a name="fetchOHLCV" id="fetchohlcv"></a>

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 <code>bitget</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.until<code>int</code>Notimestamp in ms of the latest candle to fetch
params.useHistoryEndpoint<code>boolean</code>Nowhether to force to use historical endpoint (it has max limit of 200)
params.useHistoryEndpointForPagination<code>boolean</code>Nowhether to force to use historical endpoint for pagination (default true)
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.price<code>string</code>Noswap only "mark" (to fetch mark price candles) or "index" (to fetch index price candles)
javascript
bitget.fetchOHLCV (symbol, timeframe[, since, limit, params])

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance{docsify-ignore}

query for balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a balance structure

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.uta<code>string</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchBalance ([params])

<a name="createMarketBuyOrderWithCost" id="createmarketbuyorderwithcost"></a>

createMarketBuyOrderWithCost{docsify-ignore}

create a market buy order by providing the symbol and cost

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.createMarketBuyOrderWithCost (symbol, cost[, params])

<a name="createOrder" id="createorder"></a>

createOrder{docsify-ignore}

create a trade order

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much you want to trade in units of the base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders, and used as the execution price for contract stop-loss / take-profit orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.cost<code>float</code>Nospot only how much you want to trade in units of the quote currency, for market buy orders only
params.triggerPrice<code>float</code>Noswap only The price at which a trigger order is triggered at
params.stopLossPrice<code>float</code>Noswap only The price at which a stop loss order is triggered at
params.takeProfitPrice<code>float</code>Noswap only The price at which a take profit order is triggered at
params.takeProfit<code>object</code>NotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPrice<code>float</code>Noswap only take profit trigger price
params.stopLoss<code>object</code>NostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPrice<code>float</code>Noswap only stop loss trigger price
params.timeInForce<code>string</code>No"GTC", "IOC", "FOK", or "PO"
params.marginMode<code>string</code>No'isolated' or 'cross' for spot margin trading
params.loanType<code>string</code>Nospot margin only 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal'
params.holdSide<code>string</code>Nocontract stopLossPrice, takeProfitPrice only Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell')
params.stopLoss.price<code>float</code>Noswap only the execution price for a stop loss attached to a trigger order
params.takeProfit.price<code>float</code>Noswap only the execution price for a take profit attached to a trigger order
params.stopLoss.type<code>string</code>Noswap 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<code>string</code>Noswap 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<code>string</code>Noswap and future only the percent to trail away from the current market price, rate can not be greater than 10
params.trailingTriggerPrice<code>string</code>Noswap and future only the price to trigger a trailing stop order, default uses the price argument
params.triggerType<code>string</code>Noswap and future only 'fill_price', 'mark_price' or 'index_price'
params.oneWayMode<code>boolean</code>Noswap 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.hedged<code>bool</code>Noswap and future only true for hedged mode, false for one way mode, default is false
params.reduceOnly<code>bool</code>Notrue or false whether the order is reduce-only
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.posSide<code>string</code>Nouta only hedged two-way position side, long or short
javascript
bitget.createOrder (symbol, type, side, amount[, price, params])

<a name="createOrders" id="createorders"></a>

createOrders{docsify-ignore}

create a list of trade orders (all orders should be of the same symbol)

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
params<code>object</code>Noextra parameters specific to the api endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.createOrders (orders[, params])

<a name="editOrder" id="editorder"></a>

editOrder{docsify-ignore}

edit a trade order

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yescancel order id
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much you want to trade in units of the base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.triggerPrice<code>float</code>Nothe price that a trigger order is triggered at
params.stopLossPrice<code>float</code>Noswap only The price at which a stop loss order is triggered at
params.takeProfitPrice<code>float</code>Noswap only The price at which a take profit order is triggered at
params.takeProfit<code>object</code>NotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPrice<code>float</code>Noswap only take profit trigger price
params.stopLoss<code>object</code>NostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPrice<code>float</code>Noswap only stop loss trigger price
params.stopLoss.price<code>float</code>Noswap only the execution price for a stop loss attached to a trigger order
params.takeProfit.price<code>float</code>Noswap only the execution price for a take profit attached to a trigger order
params.stopLoss.type<code>string</code>Noswap 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<code>string</code>Noswap 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<code>string</code>Noswap and future only the percent to trail away from the current market price, rate can not be greater than 10
params.trailingTriggerPrice<code>string</code>Noswap and future only the price to trigger a trailing stop order, default uses the price argument
params.newTriggerType<code>string</code>Noswap and future only 'fill_price', 'mark_price' or 'index_price'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.editOrder (id, symbol, type, side, amount[, price, params])

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder{docsify-ignore}

cancels an open order

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - An order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'isolated' or 'cross' for spot margin trading
params.trigger<code>boolean</code>Noset to true for canceling trigger orders
params.planType<code>string</code>Noswap only either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
params.trailing<code>boolean</code>Noset to true if you want to cancel a trailing order
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.clientOrderId<code>string</code>Nothe clientOrderId of the order, id does not need to be provided if clientOrderId is provided
javascript
bitget.cancelOrder (id, symbol[, params])

<a name="cancelOrders" id="cancelorders"></a>

cancelOrders{docsify-ignore}

cancel multiple orders

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an array of order structures

See

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Yesunified market symbol, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'isolated' or 'cross' for spot margin trading
params.trigger<code>boolean</code>Nocontract only set to true for canceling trigger orders
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.cancelOrders (ids, symbol[, params])

<a name="cancelAllOrders" id="cancelallorders"></a>

cancelAllOrders{docsify-ignore}

cancel all open orders

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'isolated' or 'cross' for spot margin trading
params.trigger<code>boolean</code>Nocontract only set to true for canceling trigger orders
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.cancelAllOrders (symbol[, params])

<a name="fetchOrder" id="fetchorder"></a>

fetchOrder{docsify-ignore}

fetches information on an order made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - An order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesthe order id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.clientOrderId<code>string</code>Nothe clientOrderId of the order, id does not need to be provided if clientOrderId is provided
javascript
bitget.fetchOrder (id, symbol[, params])

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>Nothe maximum number of open order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
params.planType<code>string</code>Nocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlan<code>string</code>Noswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailing<code>boolean</code>Noset to true if you want to fetch trailing orders
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchOpenOrders (symbol[, since, limit, params])

<a name="fetchClosedOrders" id="fetchclosedorders"></a>

fetchClosedOrders{docsify-ignore}

fetches information on multiple closed orders made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the closed orders
since<code>int</code>Notimestamp in ms of the earliest order
limit<code>int</code>Nothe max number of closed orders to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
params.planType<code>string</code>Nocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlan<code>string</code>Noswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailing<code>boolean</code>Noset to true if you want to fetch trailing orders
javascript
bitget.fetchClosedOrders (symbol[, since, limit, params])

<a name="fetchCanceledOrders" id="fetchcanceledorders"></a>

fetchCanceledOrders{docsify-ignore}

fetches information on multiple canceled orders made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the canceled orders
since<code>int</code>Notimestamp in ms of the earliest order
limit<code>int</code>Nothe max number of canceled orders to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
params.planType<code>string</code>Nocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlan<code>string</code>Noswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailing<code>boolean</code>Noset to true if you want to fetch trailing orders
javascript
bitget.fetchCanceledOrders (symbol[, since, limit, params])

<a name="fetchCanceledAndClosedOrders" id="fetchcanceledandclosedorders"></a>

fetchCanceledAndClosedOrders{docsify-ignore}

fetches information on multiple canceled and closed orders made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
params.planType<code>string</code>Nocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlan<code>string</code>Noswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailing<code>boolean</code>Noset to true if you want to fetch trailing orders
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchCanceledAndClosedOrders (symbol[, since, limit, params])

<a name="fetchLedger" id="fetchledger"></a>

fetchLedger{docsify-ignore}

fetch the history of changes, actions done by the user or operations that altered the balance of the user

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a ledger structure

See

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code, default is undefined
since<code>int</code>Notimestamp in ms of the earliest ledger entry, default is undefined
limit<code>int</code>Nomax number of ledger entries to return, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noend time in ms
params.symbol<code>string</code>Nocontract only unified market symbol
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchLedger ([code, since, limit, params])

<a name="fetchMyTrades" id="fetchmytrades"></a>

fetchMyTrades{docsify-ignore}

fetch all trades made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch trades for
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchMyTrades (symbol[, since, limit, params])

<a name="fetchPosition" id="fetchposition"></a>

fetchPosition{docsify-ignore}

fetch data on a single open contract trade position

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a position structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the position is held in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchPosition (symbol[, params])

<a name="fetchPositions" id="fetchpositions"></a>

fetchPositions{docsify-ignore}

fetch all open positions

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of position structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginCoin<code>string</code>Nothe settle currency of the positions, needs to match the productType
params.productType<code>string</code>No'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.useHistoryEndpoint<code>boolean</code>Nodefault false, when true will use the historic endpoint to fetch positions
params.method<code>string</code>Noeither (default) 'privateMixGetV2MixPositionAllPosition', 'privateMixGetV2MixPositionHistoryPosition', or 'privateUtaGetV3PositionCurrentPosition'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchPositions ([symbols, params])

<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>

fetchFundingRateHistory{docsify-ignore}

fetches historical funding rate prices

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of funding rate structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the funding rate history for
since<code>int</code>Notimestamp in ms of the earliest funding rate to fetch
limit<code>int</code>Nothe maximum amount of funding rate structures to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
bitget.fetchFundingRateHistory (symbol[, since, limit, params])

<a name="fetchFundingRate" id="fetchfundingrate"></a>

fetchFundingRate{docsify-ignore}

fetch the current funding rate

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a funding rate structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.method<code>string</code>Noeither (default) 'publicMixGetV2MixMarketCurrentFundRate' or 'publicMixGetV2MixMarketFundingTime'
javascript
bitget.fetchFundingRate (symbol[, params])

<a name="fetchFundingRates" id="fetchfundingrates"></a>

fetchFundingRates{docsify-ignore}

fetch the current funding rates for all markets

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a dictionary of funding rate structures, indexed by market symbols

See: https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.subType<code>string</code>Nocontract only 'linear', 'inverse'
params.productType<code>string</code>Nocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.method<code>string</code>Noeither (default) 'publicMixGetV2MixMarketTickers' or 'publicMixGetV2MixMarketCurrentFundRate'
javascript
bitget.fetchFundingRates ([symbols, params])

<a name="fetchFundingIntervals" id="fetchfundingintervals"></a>

fetchFundingIntervals{docsify-ignore}

fetch the funding rate interval for multiple markets

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of funding rate structures

See: https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>No'USDT-FUTURES' (default), 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
javascript
bitget.fetchFundingIntervals ([symbols, params])

<a name="fetchFundingHistory" id="fetchfundinghistory"></a>

fetchFundingHistory{docsify-ignore}

fetch the funding history

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of funding history structures

See: https://www.bitget.com/api-doc/contract/account/Get-Account-Bill

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe starting timestamp in milliseconds
limit<code>int</code>Nothe number of entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch funding history for
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchFundingHistory (symbol[, since, limit, params])

<a name="reduceMargin" id="reducemargin"></a>

reduceMargin{docsify-ignore}

remove margin from a position

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin structure

See: https://www.bitget.com/api-doc/contract/account/Change-Margin

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesthe amount of margin to remove
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.reduceMargin (symbol, amount[, params])

<a name="addMargin" id="addmargin"></a>

addMargin{docsify-ignore}

add margin

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin structure

See: https://www.bitget.com/api-doc/contract/account/Change-Margin

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesthe amount of margin to add
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.addMargin (symbol, amount[, params])

<a name="fetchLeverage" id="fetchleverage"></a>

fetchLeverage{docsify-ignore}

fetch the set leverage for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a leverage structure

See: https://www.bitget.com/api-doc/contract/account/Get-Single-Account

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchLeverage (symbol[, params])

<a name="setLeverage" id="setleverage"></a>

setLeverage{docsify-ignore}

set the level of leverage for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - response from the exchange

See

ParamTypeRequiredDescription
leverage<code>int</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.holdSide<code>string</code>Noisolated only position direction, 'long' or 'short'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
params.posSide<code>boolean</code>Norequired for uta isolated margin, long or short
javascript
bitget.setLeverage (leverage, symbol[, params])

<a name="setMarginMode" id="setmarginmode"></a>

setMarginMode{docsify-ignore}

set margin mode to 'cross' or 'isolated'

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - response from the exchange

See: https://www.bitget.com/api-doc/contract/account/Change-Margin-Mode

ParamTypeRequiredDescription
marginMode<code>string</code>Yes'cross' or 'isolated'
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.setMarginMode (marginMode, symbol[, params])

<a name="setPositionMode" id="setpositionmode"></a>

setPositionMode{docsify-ignore}

set hedged to true or false for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - response from the exchange

See

ParamTypeRequiredDescription
hedged<code>bool</code>Yesset to true to use dualSidePosition
symbol<code>string</code>Yesnot used by bitget setPositionMode ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>Norequired if not uta and symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.setPositionMode (hedged, symbol[, params])

<a name="fetchOpenInterest" id="fetchopeninterest"></a>

fetchOpenInterest{docsify-ignore}

retrieves the open interest of a contract trading pair

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an open interest structurehttps://docs.ccxt.com/?id=open-interest-structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
params<code>object</code>Noexchange specific parameters
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchOpenInterest (symbol[, params])

<a name="fetchTransfers" id="fetchtransfers"></a>

fetchTransfers{docsify-ignore}

fetch a history of internal transfers made on an account

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of transfer structures

See: https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency transferred
since<code>int</code>Nothe earliest time in ms to fetch transfers for
limit<code>int</code>Nothe maximum number of transfers structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch entries for
javascript
bitget.fetchTransfers (code[, since, limit, params])

<a name="transfer" id="transfer"></a>

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a transfer structure

See: https://www.bitget.com/api-doc/spot/account/Wallet-Transfer

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from
toAccount<code>string</code>Yesaccount to transfer to
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.symbol<code>string</code>Nounified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account
params.clientOid<code>string</code>Nocustom id
javascript
bitget.transfer (code, amount, fromAccount, toAccount[, params])

<a name="fetchDepositWithdrawFees" id="fetchdepositwithdrawfees"></a>

fetchDepositWithdrawFees{docsify-ignore}

fetch deposit and withdraw fees

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a list of fee structures

See: https://www.bitget.com/api-doc/spot/market/Get-Coin-List

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yeslist of unified currency codes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchDepositWithdrawFees (codes[, params])

<a name="borrowCrossMargin" id="borrowcrossmargin"></a>

borrowCrossMargin{docsify-ignore}

create a loan to borrow margin

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin loan structure

See: https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency to borrow
amount<code>string</code>Yesthe amount to borrow
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.borrowCrossMargin (code, amount[, params])

<a name="borrowIsolatedMargin" id="borrowisolatedmargin"></a>

borrowIsolatedMargin{docsify-ignore}

create a loan to borrow margin

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin loan structure

See: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
code<code>string</code>Yesunified currency code of the currency to borrow
amount<code>string</code>Yesthe amount to borrow
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.borrowIsolatedMargin (symbol, code, amount[, params])

<a name="repayIsolatedMargin" id="repayisolatedmargin"></a>

repayIsolatedMargin{docsify-ignore}

repay borrowed margin and interest

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin loan structure

See: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Repay

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
code<code>string</code>Yesunified currency code of the currency to repay
amount<code>string</code>Yesthe amount to repay
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.repayIsolatedMargin (symbol, code, amount[, params])

<a name="repayCrossMargin" id="repaycrossmargin"></a>

repayCrossMargin{docsify-ignore}

repay borrowed margin and interest

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin loan structure

See: https://www.bitget.com/api-doc/margin/cross/account/Cross-Repay

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency to repay
amount<code>string</code>Yesthe amount to repay
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.repayCrossMargin (code, amount[, params])

<a name="fetchMyLiquidations" id="fetchmyliquidations"></a>

fetchMyLiquidations{docsify-ignore}

retrieves the users liquidated positions

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an array of liquidation structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Nounified CCXT market symbol
since<code>int</code>Nothe earliest time in ms to fetch liquidations for
limit<code>int</code>Nothe maximum number of liquidation structures to retrieve
params<code>object</code>Noexchange specific parameters for the bitget api endpoint
params.until<code>int</code>Notimestamp in ms of the latest liquidation
params.marginMode<code>string</code>No'cross' or 'isolated' default value is 'cross'
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchMyLiquidations ([symbol, since, limit, params])

<a name="fetchIsolatedBorrowRate" id="fetchisolatedborrowrate"></a>

fetchIsolatedBorrowRate{docsify-ignore}

fetch the rate of interest to borrow a currency for margin trading

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an isolated borrow rate structure

See: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Margin-Interest-Rate-And-Max-Borrowable-Amount

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchIsolatedBorrowRate (symbol[, params])

<a name="fetchCrossBorrowRate" id="fetchcrossborrowrate"></a>

fetchCrossBorrowRate{docsify-ignore}

fetch the rate of interest to borrow a currency for margin trading

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a borrow rate structure

See

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchCrossBorrowRate (code[, params])

<a name="fetchBorrowInterest" id="fetchborrowinterest"></a>

fetchBorrowInterest{docsify-ignore}

fetch the interest owed by the user for borrowing currency for margin trading

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of borrow interest structures

See

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
symbol<code>string</code>Nounified market symbol when fetching interest in isolated markets
since<code>int</code>Nothe earliest time in ms to fetch borrow interest for
limit<code>int</code>Nothe maximum number of structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
javascript
bitget.fetchBorrowInterest ([code, symbol, since, limit, params])

<a name="closePosition" id="closeposition"></a>

closePosition{docsify-ignore}

closes an open position for a market

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - An order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
side<code>string</code>Noone-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.closePosition (symbol[, side, params])

<a name="closeAllPositions" id="closeallpositions"></a>

closeAllPositions{docsify-ignore}

closes all open positions for a market type

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - A list of position structures

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>No'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.closeAllPositions ([params])

<a name="fetchMarginMode" id="fetchmarginmode"></a>

fetchMarginMode{docsify-ignore}

fetches the margin mode of a trading pair

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a margin mode structure

See: https://www.bitget.com/api-doc/contract/account/Get-Single-Account

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the margin mode for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchMarginMode (symbol[, params])

<a name="fetchPositionsHistory" id="fetchpositionshistory"></a>

fetchPositionsHistory{docsify-ignore}

fetches historical positions

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of position structures

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified contract symbols
since<code>int</code>Notimestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
limit<code>int</code>Nothe maximum amount of records to fetch, default=20, max=100
params<code>object</code>Yesextra parameters specific to the exchange api endpoint
params.until<code>int</code>Notimestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
params.productType<code>string</code>NoUSDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchPositionsHistory ([symbols, since, limit, params])

<a name="fetchConvertQuote" id="fetchconvertquote"></a>

fetchConvertQuote{docsify-ignore}

fetch a quote for converting from one currency to another

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a conversion structure

See: https://www.bitget.com/api-doc/common/convert/Get-Quoted-Price

ParamTypeRequiredDescription
fromCode<code>string</code>Yesthe currency that you want to sell and convert from
toCode<code>string</code>Yesthe currency that you want to buy and convert into
amount<code>float</code>Nohow much you want to trade in units of the from currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchConvertQuote (fromCode, toCode[, amount, params])

<a name="createConvertTrade" id="createconverttrade"></a>

createConvertTrade{docsify-ignore}

convert from one currency to another

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a conversion structure

See: https://www.bitget.com/api-doc/common/convert/Trade

ParamTypeRequiredDescription
id<code>string</code>Yesthe id of the trade that you want to make
fromCode<code>string</code>Yesthe currency that you want to sell and convert from
toCode<code>string</code>Yesthe currency that you want to buy and convert into
amount<code>float</code>Yeshow much you want to trade in units of the from currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.price<code>string</code>Yesthe price of the conversion, obtained from fetchConvertQuote()
params.toAmount<code>string</code>Yesthe amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote()
javascript
bitget.createConvertTrade (id, fromCode, toCode, amount[, params])

<a name="fetchConvertTradeHistory" id="fetchconverttradehistory"></a>

fetchConvertTradeHistory{docsify-ignore}

fetch the users history of conversion trades

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of conversion structures

See: https://www.bitget.com/api-doc/common/convert/Get-Convert-Record

ParamTypeRequiredDescription
code<code>string</code>Nothe unified currency code
since<code>int</code>Nothe earliest time in ms to fetch conversions for
limit<code>int</code>Nothe maximum number of conversion structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchConvertTradeHistory ([code, since, limit, params])

<a name="fetchConvertCurrencies" id="fetchconvertcurrencies"></a>

fetchConvertCurrencies{docsify-ignore}

fetches all available currencies that can be converted

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - an associative dictionary of currencies

See: https://www.bitget.com/api-doc/common/convert/Get-Convert-Currencies

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchConvertCurrencies ([params])

<a name="fetchFundingInterval" id="fetchfundinginterval"></a>

fetchFundingInterval{docsify-ignore}

fetch the current funding rate interval

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a funding rate structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.fetchFundingInterval (symbol[, params])

<a name="fetchLongShortRatioHistory" id="fetchlongshortratiohistory"></a>

fetchLongShortRatioHistory{docsify-ignore}

fetches the long short ratio history for a unified market symbol

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - an array of long short ratio structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the long short ratio for
timeframe<code>string</code>Nothe period for the ratio
since<code>int</code>Nothe earliest time in ms to fetch ratios for
limit<code>int</code>Nothe maximum number of long short ratio structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.fetchLongShortRatioHistory (symbol[, timeframe, since, limit, params])

<a name="bitget" id="bitget"></a>

bitget{docsify-ignore}

watching delivery future markets is not yet implemented (perpertual future & swap is implemented)

javascript
bitget.bitget ()

<a name="watchTicker" id="watchticker"></a>

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 <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to watch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchTicker (symbol[, params])

<a name="unWatchTicker" id="unwatchticker"></a>

unWatchTicker{docsify-ignore}

unsubscribe from the ticker channel

Kind: instance method of <code>bitget</code>
Returns: <code>any</code> - status of the unwatch request

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to unwatch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
bitget.unWatchTicker (symbol[, params])

<a name="watchTickers" id="watchtickers"></a>

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 <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to watch the tickers for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchTickers (symbols[, params])

<a name="watchBidsAsks" id="watchbidsasks"></a>

watchBidsAsks{docsify-ignore}

watches best bid & ask for symbols

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchBidsAsks (symbols[, params])

<a name="watchOHLCV" id="watchohlcv"></a>

watchOHLCV{docsify-ignore}

watches historical candlestick data containing the open, high, low, close price, and the volume of a market

Kind: instance method of <code>bitget</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchOHLCV (symbol, timeframe[, since, limit, params])

<a name="unWatchOHLCV" id="unwatchohlcv"></a>

unWatchOHLCV{docsify-ignore}

unsubscribe from the ohlcv channel

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to unwatch the ohlcv for
timeframe<code>string</code>Nothe period for the ratio, default is 1 minute
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.unWatchOHLCV (symbol[, timeframe, params])

<a name="watchOrderBook" id="watchorderbook"></a>

watchOrderBook{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchOrderBook (symbol[, limit, params])

<a name="unWatchOrderBook" id="unwatchorderbook"></a>

unWatchOrderBook{docsify-ignore}

unsubscribe from the orderbook channel

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.limit<code>int</code>Noorderbook limit, default is undefined
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.unWatchOrderBook (symbol[, params])

<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>

watchOrderBookForSymbols{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified array of symbols
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchOrderBookForSymbols (symbols[, limit, params])

<a name="watchTrades" id="watchtrades"></a>

watchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchTrades (symbol[, since, limit, params])

<a name="watchTradesForSymbols" id="watchtradesforsymbols"></a>

watchTradesForSymbols{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchTradesForSymbols (symbols[, since, limit, params])

<a name="unWatchTrades" id="unwatchtrades"></a>

unWatchTrades{docsify-ignore}

unsubscribe from the trades channel

Kind: instance method of <code>bitget</code>
Returns: <code>any</code> - status of the unwatch request

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to unwatch the trades for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.unWatchTrades (symbol[, params])

<a name="watchPositions" id="watchpositions"></a>

watchPositions{docsify-ignore}

watch all open positions

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of position structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
since<code>int</code>Nothe earliest time in ms to fetch positions for
limit<code>int</code>Nothe maximum number of positions to retrieve
params<code>object</code>Yesextra parameters specific to the exchange API endpoint
params.instType<code>string</code>Noone of 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES', default is 'USDT-FUTURES'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchPositions (symbols[, since, limit, params])

<a name="watchOrders" id="watchorders"></a>

watchOrders{docsify-ignore}

watches information on multiple orders made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>boolean</code>Nocontract only set to true for watching trigger orders
params.marginMode<code>string</code>No'isolated' or 'cross' for watching spot margin orders]
params.type<code>string</code>No'spot', 'swap'
params.subType<code>string</code>No'linear', 'inverse'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchOrders (symbol[, since, limit, params])

<a name="watchMyTrades" id="watchmytrades"></a>

watchMyTrades{docsify-ignore}

watches trades made by the user

Kind: instance method of <code>bitget</code>
Returns: <code>Array<object></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>str</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchMyTrades (symbol[, since, limit, params])

<a name="watchBalance" id="watchbalance"></a>

watchBalance{docsify-ignore}

watch balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>bitget</code>
Returns: <code>object</code> - a balance structure

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>str</code>Nospot or contract if not provided this.options['defaultType'] is used
params.instType<code>string</code>Noone of 'SPOT', 'MARGIN', 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.marginMode<code>string</code>No'isolated' or 'cross' for watching spot margin balances
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
javascript
bitget.watchBalance ([params])