CCXT

bitget

bitget cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.

bitget

Kind: global class
Extends: Exchange

setSandboxMode

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

Kind: instance method of bitget

Param
enabled
bitget.setSandboxMode (enabled)

enableDemoTrading

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

Kind: instance method of bitget

Param
enabled
bitget.enableDemoTrading (enabled)

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

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

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchTime (params?)

fetchMarkets

retrieves data on all markets for bitget

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchMarkets (params?)

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance method of bitget
Returns: object - an associative dictionary of currencies

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchCurrencies (params?)

fetchMarketLeverageTiers

retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market

Kind: instance method of bitget
Returns: object - a leverage tiers structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNofor spot margin 'cross' or 'isolated', default is 'isolated'
params.codestringNorequired for cross spot margin
params.productTypestringNocontract and uta only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchMarketLeverageTiers (symbol, params?)

fetchDeposits

fetch all deposits made to an account

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

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

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of deposits structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNoend time in milliseconds
params.idLessThanstringNoreturn records with id less than the provided value
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchDeposits (code, since?, limit?, params?)

withdraw

make a withdrawal

Kind: instance method of bitget
Returns: object - a transaction structure

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

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
params.chainstringNothe blockchain network the withdrawal is taking place on
bitget.withdraw (code, amount, address, tag, params?)

fetchWithdrawals

fetch all withdrawals made from an account

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

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

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of withdrawals structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNoend time in milliseconds
params.idLessThanstringNoreturn records with id less than the provided value
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchWithdrawals (code, since?, limit?, params?)

fetchDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance method of bitget
Returns: object - an address structure

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

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchDepositAddress (code, params?)

fetchOrderBook

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchOrderBook (symbol, limit?, params?)

fetchTicker

fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of bitget
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchTicker (symbol, params?)

fetchMarkPrice

fetches the mark price for a specific market

Kind: instance method of bitget
Returns: object - a ticker structure

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchMarkPrice (symbol, params?)

fetchTickers

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

Kind: instance method of bitget
Returns: object - a dictionary of ticker structures

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.subTypestringNocontract only 'linear', 'inverse'
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
bitget.fetchTickers (symbols, params?)

fetchTrades

get the list of most recent trades for a particular symbol

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.untilintNoonly applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory the latest time in ms to fetch trades for
params.paginatebooleanNoonly applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory default false, when true will automatically paginate by calling this endpoint multiple times
bitget.fetchTrades (symbol, since?, limit?, params?)

fetchTradingFee

fetch the trading fees for a market

Kind: instance method of bitget
Returns: object - a fee structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'isolated' or 'cross', for finding the fee rate of spot margin trading pairs
bitget.fetchTradingFee (symbol, params?)

fetchTradingFees

fetch the trading fees for multiple markets

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.marginbooleanNoset to true for spot margin
bitget.fetchTradingFees (params?)

fetchOHLCV

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.untilintNotimestamp in ms of the latest candle to fetch
params.useHistoryEndpointbooleanNowhether to force to use historical endpoint (it has max limit of 200)
params.useHistoryEndpointForPaginationbooleanNowhether to force to use historical endpoint for pagination (default true)
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.pricestringNoswap only "mark" (to fetch mark price candles) or "index" (to fetch index price candles)
bitget.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchBalance

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

Kind: instance method of bitget
Returns: object - a balance structure

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.utastringNoset to true for the unified trading account (uta), defaults to false
bitget.fetchBalance (params?)

createMarketBuyOrderWithCost

create a market buy order by providing the symbol and cost

Kind: instance method of bitget
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.createMarketBuyOrderWithCost (symbol, cost, params?)

createOrder

create a trade order

Kind: instance method of bitget
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency
pricefloatNothe 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
paramsobjectNoextra parameters specific to the exchange API endpoint
params.costfloatNospot only how much you want to trade in units of the quote currency, for market buy orders only
params.triggerPricefloatNoswap only The price at which a trigger order is triggered at
params.stopLossPricefloatNoswap only The price at which a stop loss order is triggered at
params.takeProfitPricefloatNoswap only The price at which a take profit order is triggered at
params.takeProfitobjectNotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPricefloatNoswap only take profit trigger price
params.stopLossobjectNostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPricefloatNoswap only stop loss trigger price
params.timeInForcestringNo"GTC", "IOC", "FOK", or "PO"
params.marginModestringNo'isolated' or 'cross' for spot margin trading
params.loanTypestringNospot margin only 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal'
params.holdSidestringNocontract stopLossPrice, takeProfitPrice only Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell')
params.stopLoss.pricefloatNoswap only the execution price for a stop loss attached to a trigger order
params.takeProfit.pricefloatNoswap only the execution price for a take profit attached to a trigger order
params.stopLoss.typestringNoswap 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.typestringNoswap only the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
params.trailingPercentstringNoswap and future only the percent to trail away from the current market price, rate can not be greater than 10
params.trailingTriggerPricestringNoswap and future only the price to trigger a trailing stop order, default uses the price argument
params.triggerTypestringNoswap and future only 'fill_price', 'mark_price' or 'index_price'
params.oneWayModebooleanNoswap 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.hedgedboolNoswap and future only true for hedged mode, false for one way mode, default is false
params.reduceOnlyboolNotrue or false whether the order is reduce-only
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.posSidestringNouta only hedged two-way position side, long or short
bitget.createOrder (symbol, type, side, amount, price?, params?)

createOrders

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

Kind: instance method of bitget
Returns: object - an order structure

See

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the api endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.createOrders (orders, params?)

editOrder

edit a trade order

Kind: instance method of bitget
Returns: object - an order structure

See

ParamTypeRequiredDescription
idstringYescancel order id
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerPricefloatNothe price that a trigger order is triggered at
params.stopLossPricefloatNoswap only The price at which a stop loss order is triggered at
params.takeProfitPricefloatNoswap only The price at which a take profit order is triggered at
params.takeProfitobjectNotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPricefloatNoswap only take profit trigger price
params.stopLossobjectNostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPricefloatNoswap only stop loss trigger price
params.stopLoss.pricefloatNoswap only the execution price for a stop loss attached to a trigger order
params.takeProfit.pricefloatNoswap only the execution price for a take profit attached to a trigger order
params.stopLoss.typestringNoswap 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.typestringNoswap only the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
params.trailingPercentstringNoswap and future only the percent to trail away from the current market price, rate can not be greater than 10
params.trailingTriggerPricestringNoswap and future only the price to trigger a trailing stop order, default uses the price argument
params.newTriggerTypestringNoswap and future only 'fill_price', 'mark_price' or 'index_price'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.editOrder (id, symbol, type, side, amount, price?, params?)

cancelOrder

cancels an open order

Kind: instance method of bitget
Returns: object - An order structure

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'isolated' or 'cross' for spot margin trading
params.triggerbooleanNoset to true for canceling trigger orders
params.planTypestringNoswap only either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
params.trailingbooleanNoset to true if you want to cancel a trailing order
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.clientOrderIdstringNothe clientOrderId of the order, id does not need to be provided if clientOrderId is provided
bitget.cancelOrder (id, symbol, params?)

cancelOrders

cancel multiple orders

Kind: instance method of bitget
Returns: object - an array of order structures

See

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringYesunified market symbol, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'isolated' or 'cross' for spot margin trading
params.triggerbooleanNocontract only set to true for canceling trigger orders
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.cancelOrders (ids, symbol, params?)

cancelAllOrders

cancel all open orders

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'isolated' or 'cross' for spot margin trading
params.triggerbooleanNocontract only set to true for canceling trigger orders
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.cancelAllOrders (symbol, params?)

fetchOrder

fetches information on an order made by the user

Kind: instance method of bitget
Returns: object - An order structure

See

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.clientOrderIdstringNothe clientOrderId of the order, id does not need to be provided if clientOrderId is provided
bitget.fetchOrder (id, symbol, params?)

fetchOpenOrders

fetch all unfilled currently open orders

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.planTypestringNocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.triggerbooleanNoset to true for fetching trigger orders
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlanstringNoswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailingbooleanNoset to true if you want to fetch trailing orders
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchOpenOrders (symbol, since?, limit?, params?)

fetchClosedOrders

fetches information on multiple closed orders made by the user

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the closed orders
sinceintNotimestamp in ms of the earliest order
limitintNothe max number of closed orders to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.planTypestringNocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.triggerbooleanNoset to true for fetching trigger orders
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlanstringNoswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailingbooleanNoset to true if you want to fetch trailing orders
bitget.fetchClosedOrders (symbol, since?, limit?, params?)

fetchCanceledOrders

fetches information on multiple canceled orders made by the user

Kind: instance method of bitget
Returns: object - a list of order structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the canceled orders
sinceintNotimestamp in ms of the earliest order
limitintNothe max number of canceled orders to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.planTypestringNocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.triggerbooleanNoset to true for fetching trigger orders
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlanstringNoswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailingbooleanNoset to true if you want to fetch trailing orders
bitget.fetchCanceledOrders (symbol, since?, limit?, params?)

fetchCanceledAndClosedOrders

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.planTypestringNocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.triggerbooleanNoset to true for fetching trigger orders
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlanstringNoswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailingbooleanNoset to true if you want to fetch trailing orders
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchCanceledAndClosedOrders (symbol, since?, limit?, params?)

fetchLedger

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

Kind: instance method of bitget
Returns: object - a ledger structure

See

ParamTypeRequiredDescription
codestringNounified currency code, default is undefined
sinceintNotimestamp in ms of the earliest ledger entry, default is undefined
limitintNomax number of ledger entries to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNoend time in ms
params.symbolstringNocontract only unified market symbol
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchLedger (code?, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch trades for
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchMyTrades (symbol, since?, limit?, params?)

fetchPosition

fetch data on a single open contract trade position

Kind: instance method of bitget
Returns: object - a position structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchPosition (symbol, params?)

fetchPositions

fetch all open positions

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

See

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginCoinstringNothe settle currency of the positions, needs to match the productType
params.productTypestringNo'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.useHistoryEndpointbooleanNodefault false, when true will use the historic endpoint to fetch positions
params.methodstringNoeither (default) 'privateMixGetV2MixPositionAllPosition', 'privateMixGetV2MixPositionHistoryPosition', or 'privateUtaGetV3PositionCurrentPosition'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchPositions (symbols?, params?)

fetchFundingRateHistory

fetches historical funding rate prices

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNotimestamp in ms of the earliest funding rate to fetch
limitintNothe maximum amount of funding rate structures to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
bitget.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchFundingRate

fetch the current funding rate

Kind: instance method of bitget
Returns: object - a funding rate structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.methodstringNoeither (default) 'publicMixGetV2MixMarketCurrentFundRate' or 'publicMixGetV2MixMarketFundingTime'
bitget.fetchFundingRate (symbol, params?)

fetchFundingRates

fetch the current funding rates for all markets

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

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

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNocontract only 'linear', 'inverse'
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.methodstringNoeither (default) 'publicMixGetV2MixMarketTickers' or 'publicMixGetV2MixMarketCurrentFundRate'
bitget.fetchFundingRates (symbols?, params?)

fetchFundingIntervals

fetch the funding rate interval for multiple markets

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

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

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNo'USDT-FUTURES' (default), 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
bitget.fetchFundingIntervals (symbols?, params?)

fetchFundingHistory

fetch the funding history

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

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe starting timestamp in milliseconds
limitintNothe number of entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch funding history for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchFundingHistory (symbol, since?, limit?, params?)

reduceMargin

remove margin from a position

Kind: instance method of bitget
Returns: object - a margin structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesthe amount of margin to remove
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.reduceMargin (symbol, amount, params?)

addMargin

add margin

Kind: instance method of bitget
Returns: object - a margin structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesthe amount of margin to add
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.addMargin (symbol, amount, params?)

fetchLeverage

fetch the set leverage for a market

Kind: instance method of bitget
Returns: object - a leverage structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchLeverage (symbol, params?)

setLeverage

set the level of leverage for a market

Kind: instance method of bitget
Returns: object - response from the exchange

See

ParamTypeRequiredDescription
leverageintYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.holdSidestringNoisolated only position direction, 'long' or 'short'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.posSidebooleanNorequired for uta isolated margin, long or short
bitget.setLeverage (leverage, symbol, params?)

setMarginMode

set margin mode to 'cross' or 'isolated'

Kind: instance method of bitget
Returns: object - response from the exchange

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

ParamTypeRequiredDescription
marginModestringYes'cross' or 'isolated'
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.setMarginMode (marginMode, symbol, params?)

setPositionMode

set hedged to true or false for a market

Kind: instance method of bitget
Returns: object - response from the exchange

See

ParamTypeRequiredDescription
hedgedboolYesset to true to use dualSidePosition
symbolstringYesnot used by bitget setPositionMode ()
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNorequired if not uta and symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.setPositionMode (hedged, symbol, params?)

fetchOpenInterest

retrieves the open interest of a contract trading pair

Kind: instance method of bitget
Returns: object - an open interest structure/docs/manual#open-interest-structure

See

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
paramsobjectNoexchange specific parameters
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchOpenInterest (symbol, params?)

fetchTransfers

fetch a history of internal transfers made on an account

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

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

ParamTypeRequiredDescription
codestringYesunified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfers structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for
bitget.fetchTransfers (code, since?, limit?, params?)

transfer

transfer currency internally between wallets on the same account

Kind: instance method of bitget
Returns: object - a transfer structure

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

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYesaccount to transfer from
toAccountstringYesaccount to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
params.symbolstringNounified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account
params.clientOidstringNocustom id
bitget.transfer (code, amount, fromAccount, toAccount, params?)

fetchDepositWithdrawFees

fetch deposit and withdraw fees

Kind: instance method of bitget
Returns: object - a list of fee structures

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

ParamTypeRequiredDescription
codesArray<string>, undefinedYeslist of unified currency codes
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchDepositWithdrawFees (codes, params?)

borrowCrossMargin

create a loan to borrow margin

Kind: instance method of bitget
Returns: object - a margin loan structure

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

ParamTypeRequiredDescription
codestringYesunified currency code of the currency to borrow
amountstringYesthe amount to borrow
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.borrowCrossMargin (code, amount, params?)

borrowIsolatedMargin

create a loan to borrow margin

Kind: instance method of bitget
Returns: object - a margin loan structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
codestringYesunified currency code of the currency to borrow
amountstringYesthe amount to borrow
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.borrowIsolatedMargin (symbol, code, amount, params?)

repayIsolatedMargin

repay borrowed margin and interest

Kind: instance method of bitget
Returns: object - a margin loan structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
codestringYesunified currency code of the currency to repay
amountstringYesthe amount to repay
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.repayIsolatedMargin (symbol, code, amount, params?)

repayCrossMargin

repay borrowed margin and interest

Kind: instance method of bitget
Returns: object - a margin loan structure

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

ParamTypeRequiredDescription
codestringYesunified currency code of the currency to repay
amountstringYesthe amount to repay
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.repayCrossMargin (code, amount, params?)

fetchMyLiquidations

retrieves the users liquidated positions

Kind: instance method of bitget
Returns: object - an array of liquidation structures

See

ParamTypeRequiredDescription
symbolstringNounified CCXT market symbol
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitget api endpoint
params.untilintNotimestamp in ms of the latest liquidation
params.marginModestringNo'cross' or 'isolated' default value is 'cross'
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchMyLiquidations (symbol?, since?, limit?, params?)

fetchIsolatedBorrowRate

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

Kind: instance method of bitget
Returns: object - an isolated borrow rate structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchIsolatedBorrowRate (symbol, params?)

fetchCrossBorrowRate

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

Kind: instance method of bitget
Returns: object - a borrow rate structure

See

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchCrossBorrowRate (code, params?)

fetchBorrowInterest

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

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

See

ParamTypeRequiredDescription
codestringNounified currency code
symbolstringNounified market symbol when fetching interest in isolated markets
sinceintNothe earliest time in ms to fetch borrow interest for
limitintNothe maximum number of structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchBorrowInterest (code?, symbol?, since?, limit?, params?)

closePosition

closes an open position for a market

Kind: instance method of bitget
Returns: object - An order structure

See

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
sidestringNoone-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.closePosition (symbol, side?, params?)

closeAllPositions

closes all open positions for a market type

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNo'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.closeAllPositions (params?)

fetchMarginMode

fetches the margin mode of a trading pair

Kind: instance method of bitget
Returns: object - a margin mode structure

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the margin mode for
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchMarginMode (symbol, params?)

fetchPositionsHistory

fetches historical positions

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

See

ParamTypeRequiredDescription
symbolsArray<string>Nounified contract symbols
sinceintNotimestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
limitintNothe maximum amount of records to fetch, default=20, max=100
paramsobjectYesextra parameters specific to the exchange api endpoint
params.untilintNotimestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
params.productTypestringNoUSDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchPositionsHistory (symbols?, since?, limit?, params)

fetchConvertQuote

fetch a quote for converting from one currency to another

Kind: instance method of bitget
Returns: object - a conversion structure

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

ParamTypeRequiredDescription
fromCodestringYesthe currency that you want to sell and convert from
toCodestringYesthe currency that you want to buy and convert into
amountfloatNohow much you want to trade in units of the from currency
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchConvertQuote (fromCode, toCode, amount?, params?)

createConvertTrade

convert from one currency to another

Kind: instance method of bitget
Returns: object - a conversion structure

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

ParamTypeRequiredDescription
idstringYesthe id of the trade that you want to make
fromCodestringYesthe currency that you want to sell and convert from
toCodestringYesthe currency that you want to buy and convert into
amountfloatYeshow much you want to trade in units of the from currency
paramsobjectNoextra parameters specific to the exchange API endpoint
params.pricestringYesthe price of the conversion, obtained from fetchConvertQuote()
params.toAmountstringYesthe amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote()
bitget.createConvertTrade (id, fromCode, toCode, amount, params?)

fetchConvertTradeHistory

fetch the users history of conversion trades

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

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

ParamTypeRequiredDescription
codestringNothe unified currency code
sinceintNothe earliest time in ms to fetch conversions for
limitintNothe maximum number of conversion structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchConvertTradeHistory (code?, since?, limit?, params?)

fetchConvertCurrencies

fetches all available currencies that can be converted

Kind: instance method of bitget
Returns: object - an associative dictionary of currencies

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchConvertCurrencies (params?)

fetchFundingInterval

fetch the current funding rate interval

Kind: instance method of bitget
Returns: object - a funding rate structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchFundingInterval (symbol, params?)

fetchLongShortRatioHistory

fetches the long short ratio history for a unified market symbol

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the long short ratio for
timeframestringNothe period for the ratio
sinceintNothe earliest time in ms to fetch ratios for
limitintNothe maximum number of long short ratio structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchLongShortRatioHistory (symbol, timeframe?, since?, limit?, params?)

bitget

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

bitget.bitget ()

watchTicker

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of bitget
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to watch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchTicker (symbol, params?)

unWatchTicker

unsubscribe from the ticker channel

Kind: instance method of bitget
Returns: any - status of the unwatch request

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to unwatch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.unWatchTicker (symbol, params?)

watchTickers

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list

Kind: instance method of bitget
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to watch the tickers for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchTickers (symbols, params?)

watchBidsAsks

watches best bid & ask for symbols

Kind: instance method of bitget
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchBidsAsks (symbols, params?)

watchOHLCV

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchOHLCV (symbol, timeframe, since?, limit?, params?)

unWatchOHLCV

unsubscribe from the ohlcv channel

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to unwatch the ohlcv for
timeframestringNothe period for the ratio, default is 1 minute
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.unWatchOHLCV (symbol, timeframe?, params?)

watchOrderBook

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchOrderBook (symbol, limit?, params?)

unWatchOrderBook

unsubscribe from the orderbook channel

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.limitintNoorderbook limit, default is undefined
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.unWatchOrderBook (symbol, params?)

watchOrderBookForSymbols

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

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

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified array of symbols
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchOrderBookForSymbols (symbols, limit?, params?)

watchTrades

get the list of most recent trades for a particular symbol

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchTrades (symbol, since?, limit?, params?)

watchTradesForSymbols

get the list of most recent trades for a particular symbol

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

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchTradesForSymbols (symbols, since?, limit?, params?)

unWatchTrades

unsubscribe from the trades channel

Kind: instance method of bitget
Returns: any - status of the unwatch request

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to unwatch the trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.unWatchTrades (symbol, params?)

watchPositions

watch all open positions

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

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum number of positions to retrieve
paramsobjectYesextra parameters specific to the exchange API endpoint
params.instTypestringNoone of 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES', default is 'USDT-FUTURES'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchPositions (symbols, since?, limit?, params)

watchOrders

watches information on multiple orders made by the user

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerbooleanNocontract only set to true for watching trigger orders
params.marginModestringNo'isolated' or 'cross' for watching spot margin orders]
params.typestringNo'spot', 'swap'
params.subTypestringNo'linear', 'inverse'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchOrders (symbol, since?, limit?, params?)

watchMyTrades

watches trades made by the user

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

See

ParamTypeRequiredDescription
symbolstrYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchMyTrades (symbol, since?, limit?, params?)

watchBalance

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

Kind: instance method of bitget
Returns: object - a balance structure

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestrNospot or contract if not provided this.options['defaultType'] is used
params.instTypestringNoone of 'SPOT', 'MARGIN', 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.marginModestringNo'isolated' or 'cross' for watching spot margin balances
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchBalance (params?)

bitget

Kind: global class
Extends: Exchange

setSandboxMode

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

Kind: instance method of bitget

Param
enabled
bitget.setSandboxMode (enabled)

enableDemoTrading

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

Kind: instance method of bitget

Param
enabled
bitget.enableDemoTrading (enabled)

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

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

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchTime (params?)

fetchMarkets

retrieves data on all markets for bitget

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchMarkets (params?)

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance method of bitget
Returns: object - an associative dictionary of currencies

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchCurrencies (params?)

fetchMarketLeverageTiers

retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market

Kind: instance method of bitget
Returns: object - a leverage tiers structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNofor spot margin 'cross' or 'isolated', default is 'isolated'
params.codestringNorequired for cross spot margin
params.productTypestringNocontract and uta only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchMarketLeverageTiers (symbol, params?)

fetchDeposits

fetch all deposits made to an account

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

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

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of deposits structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNoend time in milliseconds
params.idLessThanstringNoreturn records with id less than the provided value
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchDeposits (code, since?, limit?, params?)

withdraw

make a withdrawal

Kind: instance method of bitget
Returns: object - a transaction structure

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

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
params.chainstringNothe blockchain network the withdrawal is taking place on
bitget.withdraw (code, amount, address, tag, params?)

fetchWithdrawals

fetch all withdrawals made from an account

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

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

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of withdrawals structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNoend time in milliseconds
params.idLessThanstringNoreturn records with id less than the provided value
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchWithdrawals (code, since?, limit?, params?)

fetchDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance method of bitget
Returns: object - an address structure

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

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchDepositAddress (code, params?)

fetchOrderBook

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchOrderBook (symbol, limit?, params?)

fetchTicker

fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of bitget
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchTicker (symbol, params?)

fetchMarkPrice

fetches the mark price for a specific market

Kind: instance method of bitget
Returns: object - a ticker structure

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchMarkPrice (symbol, params?)

fetchTickers

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

Kind: instance method of bitget
Returns: object - a dictionary of ticker structures

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.subTypestringNocontract only 'linear', 'inverse'
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
bitget.fetchTickers (symbols, params?)

fetchTrades

get the list of most recent trades for a particular symbol

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.untilintNoonly applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory the latest time in ms to fetch trades for
params.paginatebooleanNoonly applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory default false, when true will automatically paginate by calling this endpoint multiple times
bitget.fetchTrades (symbol, since?, limit?, params?)

fetchTradingFee

fetch the trading fees for a market

Kind: instance method of bitget
Returns: object - a fee structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'isolated' or 'cross', for finding the fee rate of spot margin trading pairs
bitget.fetchTradingFee (symbol, params?)

fetchTradingFees

fetch the trading fees for multiple markets

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.marginbooleanNoset to true for spot margin
bitget.fetchTradingFees (params?)

fetchOHLCV

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.untilintNotimestamp in ms of the latest candle to fetch
params.useHistoryEndpointbooleanNowhether to force to use historical endpoint (it has max limit of 200)
params.useHistoryEndpointForPaginationbooleanNowhether to force to use historical endpoint for pagination (default true)
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.pricestringNoswap only "mark" (to fetch mark price candles) or "index" (to fetch index price candles)
bitget.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchBalance

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

Kind: instance method of bitget
Returns: object - a balance structure

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.utastringNoset to true for the unified trading account (uta), defaults to false
bitget.fetchBalance (params?)

createMarketBuyOrderWithCost

create a market buy order by providing the symbol and cost

Kind: instance method of bitget
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.createMarketBuyOrderWithCost (symbol, cost, params?)

createOrder

create a trade order

Kind: instance method of bitget
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency
pricefloatNothe 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
paramsobjectNoextra parameters specific to the exchange API endpoint
params.costfloatNospot only how much you want to trade in units of the quote currency, for market buy orders only
params.triggerPricefloatNoswap only The price at which a trigger order is triggered at
params.stopLossPricefloatNoswap only The price at which a stop loss order is triggered at
params.takeProfitPricefloatNoswap only The price at which a take profit order is triggered at
params.takeProfitobjectNotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPricefloatNoswap only take profit trigger price
params.stopLossobjectNostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPricefloatNoswap only stop loss trigger price
params.timeInForcestringNo"GTC", "IOC", "FOK", or "PO"
params.marginModestringNo'isolated' or 'cross' for spot margin trading
params.loanTypestringNospot margin only 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal'
params.holdSidestringNocontract stopLossPrice, takeProfitPrice only Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell')
params.stopLoss.pricefloatNoswap only the execution price for a stop loss attached to a trigger order
params.takeProfit.pricefloatNoswap only the execution price for a take profit attached to a trigger order
params.stopLoss.typestringNoswap 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.typestringNoswap only the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
params.trailingPercentstringNoswap and future only the percent to trail away from the current market price, rate can not be greater than 10
params.trailingTriggerPricestringNoswap and future only the price to trigger a trailing stop order, default uses the price argument
params.triggerTypestringNoswap and future only 'fill_price', 'mark_price' or 'index_price'
params.oneWayModebooleanNoswap 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.hedgedboolNoswap and future only true for hedged mode, false for one way mode, default is false
params.reduceOnlyboolNotrue or false whether the order is reduce-only
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.posSidestringNouta only hedged two-way position side, long or short
bitget.createOrder (symbol, type, side, amount, price?, params?)

createOrders

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

Kind: instance method of bitget
Returns: object - an order structure

See

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the api endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.createOrders (orders, params?)

editOrder

edit a trade order

Kind: instance method of bitget
Returns: object - an order structure

See

ParamTypeRequiredDescription
idstringYescancel order id
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerPricefloatNothe price that a trigger order is triggered at
params.stopLossPricefloatNoswap only The price at which a stop loss order is triggered at
params.takeProfitPricefloatNoswap only The price at which a take profit order is triggered at
params.takeProfitobjectNotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPricefloatNoswap only take profit trigger price
params.stopLossobjectNostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPricefloatNoswap only stop loss trigger price
params.stopLoss.pricefloatNoswap only the execution price for a stop loss attached to a trigger order
params.takeProfit.pricefloatNoswap only the execution price for a take profit attached to a trigger order
params.stopLoss.typestringNoswap 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.typestringNoswap only the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
params.trailingPercentstringNoswap and future only the percent to trail away from the current market price, rate can not be greater than 10
params.trailingTriggerPricestringNoswap and future only the price to trigger a trailing stop order, default uses the price argument
params.newTriggerTypestringNoswap and future only 'fill_price', 'mark_price' or 'index_price'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.editOrder (id, symbol, type, side, amount, price?, params?)

cancelOrder

cancels an open order

Kind: instance method of bitget
Returns: object - An order structure

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'isolated' or 'cross' for spot margin trading
params.triggerbooleanNoset to true for canceling trigger orders
params.planTypestringNoswap only either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
params.trailingbooleanNoset to true if you want to cancel a trailing order
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.clientOrderIdstringNothe clientOrderId of the order, id does not need to be provided if clientOrderId is provided
bitget.cancelOrder (id, symbol, params?)

cancelOrders

cancel multiple orders

Kind: instance method of bitget
Returns: object - an array of order structures

See

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringYesunified market symbol, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'isolated' or 'cross' for spot margin trading
params.triggerbooleanNocontract only set to true for canceling trigger orders
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.cancelOrders (ids, symbol, params?)

cancelAllOrders

cancel all open orders

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'isolated' or 'cross' for spot margin trading
params.triggerbooleanNocontract only set to true for canceling trigger orders
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.cancelAllOrders (symbol, params?)

fetchOrder

fetches information on an order made by the user

Kind: instance method of bitget
Returns: object - An order structure

See

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.clientOrderIdstringNothe clientOrderId of the order, id does not need to be provided if clientOrderId is provided
bitget.fetchOrder (id, symbol, params?)

fetchOpenOrders

fetch all unfilled currently open orders

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.planTypestringNocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.triggerbooleanNoset to true for fetching trigger orders
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlanstringNoswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailingbooleanNoset to true if you want to fetch trailing orders
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchOpenOrders (symbol, since?, limit?, params?)

fetchClosedOrders

fetches information on multiple closed orders made by the user

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the closed orders
sinceintNotimestamp in ms of the earliest order
limitintNothe max number of closed orders to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.planTypestringNocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.triggerbooleanNoset to true for fetching trigger orders
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlanstringNoswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailingbooleanNoset to true if you want to fetch trailing orders
bitget.fetchClosedOrders (symbol, since?, limit?, params?)

fetchCanceledOrders

fetches information on multiple canceled orders made by the user

Kind: instance method of bitget
Returns: object - a list of order structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the canceled orders
sinceintNotimestamp in ms of the earliest order
limitintNothe max number of canceled orders to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.planTypestringNocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.triggerbooleanNoset to true for fetching trigger orders
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlanstringNoswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailingbooleanNoset to true if you want to fetch trailing orders
bitget.fetchCanceledOrders (symbol, since?, limit?, params?)

fetchCanceledAndClosedOrders

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.planTypestringNocontract stop only 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
params.triggerbooleanNoset to true for fetching trigger orders
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.isPlanstringNoswap only 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
params.trailingbooleanNoset to true if you want to fetch trailing orders
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchCanceledAndClosedOrders (symbol, since?, limit?, params?)

fetchLedger

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

Kind: instance method of bitget
Returns: object - a ledger structure

See

ParamTypeRequiredDescription
codestringNounified currency code, default is undefined
sinceintNotimestamp in ms of the earliest ledger entry, default is undefined
limitintNomax number of ledger entries to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNoend time in ms
params.symbolstringNocontract only unified market symbol
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchLedger (code?, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch trades for
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchMyTrades (symbol, since?, limit?, params?)

fetchPosition

fetch data on a single open contract trade position

Kind: instance method of bitget
Returns: object - a position structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchPosition (symbol, params?)

fetchPositions

fetch all open positions

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

See

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginCoinstringNothe settle currency of the positions, needs to match the productType
params.productTypestringNo'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.useHistoryEndpointbooleanNodefault false, when true will use the historic endpoint to fetch positions
params.methodstringNoeither (default) 'privateMixGetV2MixPositionAllPosition', 'privateMixGetV2MixPositionHistoryPosition', or 'privateUtaGetV3PositionCurrentPosition'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchPositions (symbols?, params?)

fetchFundingRateHistory

fetches historical funding rate prices

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNotimestamp in ms of the earliest funding rate to fetch
limitintNothe maximum amount of funding rate structures to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
bitget.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchFundingRate

fetch the current funding rate

Kind: instance method of bitget
Returns: object - a funding rate structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.methodstringNoeither (default) 'publicMixGetV2MixMarketCurrentFundRate' or 'publicMixGetV2MixMarketFundingTime'
bitget.fetchFundingRate (symbol, params?)

fetchFundingRates

fetch the current funding rates for all markets

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

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

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNocontract only 'linear', 'inverse'
params.productTypestringNocontract only 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.methodstringNoeither (default) 'publicMixGetV2MixMarketTickers' or 'publicMixGetV2MixMarketCurrentFundRate'
bitget.fetchFundingRates (symbols?, params?)

fetchFundingIntervals

fetch the funding rate interval for multiple markets

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

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

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNo'USDT-FUTURES' (default), 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
bitget.fetchFundingIntervals (symbols?, params?)

fetchFundingHistory

fetch the funding history

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

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe starting timestamp in milliseconds
limitintNothe number of entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch funding history for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchFundingHistory (symbol, since?, limit?, params?)

reduceMargin

remove margin from a position

Kind: instance method of bitget
Returns: object - a margin structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesthe amount of margin to remove
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.reduceMargin (symbol, amount, params?)

addMargin

add margin

Kind: instance method of bitget
Returns: object - a margin structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesthe amount of margin to add
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.addMargin (symbol, amount, params?)

fetchLeverage

fetch the set leverage for a market

Kind: instance method of bitget
Returns: object - a leverage structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchLeverage (symbol, params?)

setLeverage

set the level of leverage for a market

Kind: instance method of bitget
Returns: object - response from the exchange

See

ParamTypeRequiredDescription
leverageintYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.holdSidestringNoisolated only position direction, 'long' or 'short'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
params.posSidebooleanNorequired for uta isolated margin, long or short
bitget.setLeverage (leverage, symbol, params?)

setMarginMode

set margin mode to 'cross' or 'isolated'

Kind: instance method of bitget
Returns: object - response from the exchange

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

ParamTypeRequiredDescription
marginModestringYes'cross' or 'isolated'
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.setMarginMode (marginMode, symbol, params?)

setPositionMode

set hedged to true or false for a market

Kind: instance method of bitget
Returns: object - response from the exchange

See

ParamTypeRequiredDescription
hedgedboolYesset to true to use dualSidePosition
symbolstringYesnot used by bitget setPositionMode ()
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNorequired if not uta and symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.setPositionMode (hedged, symbol, params?)

fetchOpenInterest

retrieves the open interest of a contract trading pair

Kind: instance method of bitget
Returns: object - an open interest structure/docs/manual#open-interest-structure

See

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
paramsobjectNoexchange specific parameters
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchOpenInterest (symbol, params?)

fetchTransfers

fetch a history of internal transfers made on an account

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

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

ParamTypeRequiredDescription
codestringYesunified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfers structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for
bitget.fetchTransfers (code, since?, limit?, params?)

transfer

transfer currency internally between wallets on the same account

Kind: instance method of bitget
Returns: object - a transfer structure

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

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYesaccount to transfer from
toAccountstringYesaccount to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
params.symbolstringNounified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account
params.clientOidstringNocustom id
bitget.transfer (code, amount, fromAccount, toAccount, params?)

fetchDepositWithdrawFees

fetch deposit and withdraw fees

Kind: instance method of bitget
Returns: object - a list of fee structures

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

ParamTypeRequiredDescription
codesArray<string>, undefinedYeslist of unified currency codes
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchDepositWithdrawFees (codes, params?)

borrowCrossMargin

create a loan to borrow margin

Kind: instance method of bitget
Returns: object - a margin loan structure

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

ParamTypeRequiredDescription
codestringYesunified currency code of the currency to borrow
amountstringYesthe amount to borrow
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.borrowCrossMargin (code, amount, params?)

borrowIsolatedMargin

create a loan to borrow margin

Kind: instance method of bitget
Returns: object - a margin loan structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
codestringYesunified currency code of the currency to borrow
amountstringYesthe amount to borrow
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.borrowIsolatedMargin (symbol, code, amount, params?)

repayIsolatedMargin

repay borrowed margin and interest

Kind: instance method of bitget
Returns: object - a margin loan structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
codestringYesunified currency code of the currency to repay
amountstringYesthe amount to repay
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.repayIsolatedMargin (symbol, code, amount, params?)

repayCrossMargin

repay borrowed margin and interest

Kind: instance method of bitget
Returns: object - a margin loan structure

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

ParamTypeRequiredDescription
codestringYesunified currency code of the currency to repay
amountstringYesthe amount to repay
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.repayCrossMargin (code, amount, params?)

fetchMyLiquidations

retrieves the users liquidated positions

Kind: instance method of bitget
Returns: object - an array of liquidation structures

See

ParamTypeRequiredDescription
symbolstringNounified CCXT market symbol
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitget api endpoint
params.untilintNotimestamp in ms of the latest liquidation
params.marginModestringNo'cross' or 'isolated' default value is 'cross'
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchMyLiquidations (symbol?, since?, limit?, params?)

fetchIsolatedBorrowRate

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

Kind: instance method of bitget
Returns: object - an isolated borrow rate structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchIsolatedBorrowRate (symbol, params?)

fetchCrossBorrowRate

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

Kind: instance method of bitget
Returns: object - a borrow rate structure

See

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchCrossBorrowRate (code, params?)

fetchBorrowInterest

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

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

See

ParamTypeRequiredDescription
codestringNounified currency code
symbolstringNounified market symbol when fetching interest in isolated markets
sinceintNothe earliest time in ms to fetch borrow interest for
limitintNothe maximum number of structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
bitget.fetchBorrowInterest (code?, symbol?, since?, limit?, params?)

closePosition

closes an open position for a market

Kind: instance method of bitget
Returns: object - An order structure

See

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
sidestringNoone-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.closePosition (symbol, side?, params?)

closeAllPositions

closes all open positions for a market type

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNo'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.closeAllPositions (params?)

fetchMarginMode

fetches the margin mode of a trading pair

Kind: instance method of bitget
Returns: object - a margin mode structure

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the margin mode for
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchMarginMode (symbol, params?)

fetchPositionsHistory

fetches historical positions

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

See

ParamTypeRequiredDescription
symbolsArray<string>Nounified contract symbols
sinceintNotimestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
limitintNothe maximum amount of records to fetch, default=20, max=100
paramsobjectYesextra parameters specific to the exchange api endpoint
params.untilintNotimestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
params.productTypestringNoUSDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchPositionsHistory (symbols?, since?, limit?, params)

fetchConvertQuote

fetch a quote for converting from one currency to another

Kind: instance method of bitget
Returns: object - a conversion structure

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

ParamTypeRequiredDescription
fromCodestringYesthe currency that you want to sell and convert from
toCodestringYesthe currency that you want to buy and convert into
amountfloatNohow much you want to trade in units of the from currency
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchConvertQuote (fromCode, toCode, amount?, params?)

createConvertTrade

convert from one currency to another

Kind: instance method of bitget
Returns: object - a conversion structure

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

ParamTypeRequiredDescription
idstringYesthe id of the trade that you want to make
fromCodestringYesthe currency that you want to sell and convert from
toCodestringYesthe currency that you want to buy and convert into
amountfloatYeshow much you want to trade in units of the from currency
paramsobjectNoextra parameters specific to the exchange API endpoint
params.pricestringYesthe price of the conversion, obtained from fetchConvertQuote()
params.toAmountstringYesthe amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote()
bitget.createConvertTrade (id, fromCode, toCode, amount, params?)

fetchConvertTradeHistory

fetch the users history of conversion trades

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

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

ParamTypeRequiredDescription
codestringNothe unified currency code
sinceintNothe earliest time in ms to fetch conversions for
limitintNothe maximum number of conversion structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchConvertTradeHistory (code?, since?, limit?, params?)

fetchConvertCurrencies

fetches all available currencies that can be converted

Kind: instance method of bitget
Returns: object - an associative dictionary of currencies

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchConvertCurrencies (params?)

fetchFundingInterval

fetch the current funding rate interval

Kind: instance method of bitget
Returns: object - a funding rate structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.fetchFundingInterval (symbol, params?)

fetchLongShortRatioHistory

fetches the long short ratio history for a unified market symbol

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the long short ratio for
timeframestringNothe period for the ratio
sinceintNothe earliest time in ms to fetch ratios for
limitintNothe maximum number of long short ratio structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.fetchLongShortRatioHistory (symbol, timeframe?, since?, limit?, params?)

bitget

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

bitget.bitget ()

watchTicker

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of bitget
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to watch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchTicker (symbol, params?)

unWatchTicker

unsubscribe from the ticker channel

Kind: instance method of bitget
Returns: any - status of the unwatch request

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to unwatch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
bitget.unWatchTicker (symbol, params?)

watchTickers

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list

Kind: instance method of bitget
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to watch the tickers for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchTickers (symbols, params?)

watchBidsAsks

watches best bid & ask for symbols

Kind: instance method of bitget
Returns: object - a ticker structure

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchBidsAsks (symbols, params?)

watchOHLCV

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchOHLCV (symbol, timeframe, since?, limit?, params?)

unWatchOHLCV

unsubscribe from the ohlcv channel

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to unwatch the ohlcv for
timeframestringNothe period for the ratio, default is 1 minute
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.unWatchOHLCV (symbol, timeframe?, params?)

watchOrderBook

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchOrderBook (symbol, limit?, params?)

unWatchOrderBook

unsubscribe from the orderbook channel

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.limitintNoorderbook limit, default is undefined
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.unWatchOrderBook (symbol, params?)

watchOrderBookForSymbols

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

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

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified array of symbols
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchOrderBookForSymbols (symbols, limit?, params?)

watchTrades

get the list of most recent trades for a particular symbol

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchTrades (symbol, since?, limit?, params?)

watchTradesForSymbols

get the list of most recent trades for a particular symbol

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

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchTradesForSymbols (symbols, since?, limit?, params?)

unWatchTrades

unsubscribe from the trades channel

Kind: instance method of bitget
Returns: any - status of the unwatch request

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to unwatch the trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.unWatchTrades (symbol, params?)

watchPositions

watch all open positions

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

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum number of positions to retrieve
paramsobjectYesextra parameters specific to the exchange API endpoint
params.instTypestringNoone of 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES', default is 'USDT-FUTURES'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchPositions (symbols, since?, limit?, params)

watchOrders

watches information on multiple orders made by the user

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerbooleanNocontract only set to true for watching trigger orders
params.marginModestringNo'isolated' or 'cross' for watching spot margin orders]
params.typestringNo'spot', 'swap'
params.subTypestringNo'linear', 'inverse'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchOrders (symbol, since?, limit?, params?)

watchMyTrades

watches trades made by the user

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

See

ParamTypeRequiredDescription
symbolstrYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchMyTrades (symbol, since?, limit?, params?)

watchBalance

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

Kind: instance method of bitget
Returns: object - a balance structure

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestrNospot or contract if not provided this.options['defaultType'] is used
params.instTypestringNoone of 'SPOT', 'MARGIN', 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.marginModestringNo'isolated' or 'cross' for watching spot margin balances
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
bitget.watchBalance (params?)

On this page

bitgetsetSandboxModeenableDemoTradingfetchTimefetchMarketsfetchCurrenciesfetchMarketLeverageTiersfetchDepositswithdrawfetchWithdrawalsfetchDepositAddressfetchOrderBookfetchTickerfetchMarkPricefetchTickersfetchTradesfetchTradingFeefetchTradingFeesfetchOHLCVfetchBalancecreateMarketBuyOrderWithCostcreateOrdercreateOrderseditOrdercancelOrdercancelOrderscancelAllOrdersfetchOrderfetchOpenOrdersfetchClosedOrdersfetchCanceledOrdersfetchCanceledAndClosedOrdersfetchLedgerfetchMyTradesfetchPositionfetchPositionsfetchFundingRateHistoryfetchFundingRatefetchFundingRatesfetchFundingIntervalsfetchFundingHistoryreduceMarginaddMarginfetchLeveragesetLeveragesetMarginModesetPositionModefetchOpenInterestfetchTransferstransferfetchDepositWithdrawFeesborrowCrossMarginborrowIsolatedMarginrepayIsolatedMarginrepayCrossMarginfetchMyLiquidationsfetchIsolatedBorrowRatefetchCrossBorrowRatefetchBorrowInterestclosePositioncloseAllPositionsfetchMarginModefetchPositionsHistoryfetchConvertQuotecreateConvertTradefetchConvertTradeHistoryfetchConvertCurrenciesfetchFundingIntervalfetchLongShortRatioHistorybitgetwatchTickerunWatchTickerwatchTickerswatchBidsAskswatchOHLCVunWatchOHLCVwatchOrderBookunWatchOrderBookwatchOrderBookForSymbolswatchTradeswatchTradesForSymbolsunWatchTradeswatchPositionswatchOrderswatchMyTradeswatchBalancebitgetsetSandboxModeenableDemoTradingfetchTimefetchMarketsfetchCurrenciesfetchMarketLeverageTiersfetchDepositswithdrawfetchWithdrawalsfetchDepositAddressfetchOrderBookfetchTickerfetchMarkPricefetchTickersfetchTradesfetchTradingFeefetchTradingFeesfetchOHLCVfetchBalancecreateMarketBuyOrderWithCostcreateOrdercreateOrderseditOrdercancelOrdercancelOrderscancelAllOrdersfetchOrderfetchOpenOrdersfetchClosedOrdersfetchCanceledOrdersfetchCanceledAndClosedOrdersfetchLedgerfetchMyTradesfetchPositionfetchPositionsfetchFundingRateHistoryfetchFundingRatefetchFundingRatesfetchFundingIntervalsfetchFundingHistoryreduceMarginaddMarginfetchLeveragesetLeveragesetMarginModesetPositionModefetchOpenInterestfetchTransferstransferfetchDepositWithdrawFeesborrowCrossMarginborrowIsolatedMarginrepayIsolatedMarginrepayCrossMarginfetchMyLiquidationsfetchIsolatedBorrowRatefetchCrossBorrowRatefetchBorrowInterestclosePositioncloseAllPositionsfetchMarginModefetchPositionsHistoryfetchConvertQuotecreateConvertTradefetchConvertTradeHistoryfetchConvertCurrenciesfetchFundingIntervalfetchLongShortRatioHistorybitgetwatchTickerunWatchTickerwatchTickerswatchBidsAskswatchOHLCVunWatchOHLCVwatchOrderBookunWatchOrderBookwatchOrderBookForSymbolswatchTradeswatchTradesForSymbolsunWatchTradeswatchPositionswatchOrderswatchMyTradeswatchBalance