CCXT

binance

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

binance

Kind: global class
Extends: Exchange

enableDemoTrading

enables or disables demo trading mode

Kind: instance method of binance

See

ParamTypeRequiredDescription
enablebooleanNotrue if demo trading should be enabled, false otherwise
binance.enableDemoTrading (enable?)

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchTime (params?)

fetchCurrencies

fetches all available currencies on an exchange

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

See

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

fetchMarkets

retrieves data on all markets for binance

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchMarkets (params?)

fetchBalance

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

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'future', 'delivery', 'savings', 'funding', or 'spot' or 'papi'
params.marginModestringNo'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
params.symbolsArray<string>, undefinedNounified market symbols, only used in isolated margin mode
params.portfolioMarginbooleanNoset to true if you would like to fetch the balance for a portfolio margin account
params.subTypestringNo'linear' or 'inverse'
binance.fetchBalance (params?)

fetchOrderBook

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

Kind: instance method of binance
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.rpibooleanNofuture only set to true to use the RPI endpoint
binance.fetchOrderBook (symbol, limit?, params?)

fetchStatus

the latest known information on the availability of the exchange API

Kind: instance method of binance
Returns: object - a status structure

See: https://developers.binance.com/docs/wallet/others/system-status

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchStatus (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 binance
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.rollingbooleanNo(spot only) default false, if true, uses the rolling 24 hour ticker endpoint /api/v3/ticker
binance.fetchTicker (symbol, params?)

fetchBidsAsks

fetches the bid and ask price and volume for multiple markets

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

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchBidsAsks (symbols, params?)

fetchLastPrices

fetches the last price for multiple markets

Kind: instance method of binance
Returns: object - a dictionary of lastprices structures

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified symbols of the markets to fetch the last prices
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchLastPrices (symbols, params?)

fetchTickers

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

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

See

ParamTypeRequiredDescription
symbolsArray<string>Nounified 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.subTypestringNo"linear" or "inverse"
params.typestringNo'spot', 'option', use params["subType"] for swap and future markets
binance.fetchTickers (symbols?, params?)

fetchMarkPrice

fetches mark price for the market

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchMarkPrice (symbol, params?)

fetchMarkPrices

fetches mark prices for multiple markets

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

See

ParamTypeRequiredDescription
symbolsArray<string>Nounified 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.subTypestringNo"linear" or "inverse"
binance.fetchMarkPrices (symbols?, params?)

fetchOHLCV

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

Kind: instance method of binance
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.pricestringNo"mark" or "index" for mark price and index price candles
params.untilintNotimestamp in ms of the latest candle to fetch
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
binance.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol Default fetchTradesMethod

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNoonly used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades'
limitintNodefault 500, max 1000
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNoonly used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades'
params.fetchTradesMethodintNo'publicGetAggTrades' (spot default), 'fapiPublicGetAggTrades' (swap default), 'dapiPublicGetAggTrades' (future default), 'eapiPublicGetTrades' (option default), 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', 'publicGetHistoricalTrades', 'fapiPublicGetHistoricalTrades', 'dapiPublicGetHistoricalTrades', 'eapiPublicGetHistoricalTrades'
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters EXCHANGE SPECIFIC PARAMETERS
params.fromIdintNotrade id to fetch from, default gets most recent trades, not used when fetchTradesMethod is 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', or 'eapiPublicGetTrades'
binance.fetchTrades (symbol, since?, limit?, params?)

editContractOrder

edit a trade order

Kind: instance method of binance
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 of currency you want to trade in units of 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.portfolioMarginbooleanNoset to true if you would like to edit an order in a portfolio margin account
binance.editContractOrder (id, symbol, type, side, amount, price?, params?)

editOrder

edit a trade order

Kind: instance method of binance
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 of currency you want to trade in units of 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
binance.editOrder (id, symbol, type, side, amount, price?, params?)

editOrders

edit a list of trade orders

Kind: instance method of binance
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 exchange API endpoint
binance.editOrders (orders, params?)

createOrders

contract only create a list of trade orders

Kind: instance method of binance
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 exchange API endpoint
binance.createOrders (orders, params?)

createOrder

create a trade order

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of you want to trade in units of the base currency
pricefloatNothe price that 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.reduceOnlystringNofor swap and future reduceOnly is a string 'true' or 'false' that cant be sent with close position set to true or in hedge mode. For spot margin and option reduceOnly is a boolean.
params.marginModestringNo'cross' or 'isolated', for spot margin trading
params.sorbooleanNospot only whether to use SOR (Smart Order Routing) or not, default is false
params.testbooleanNospot only whether to use the test endpoint or not, default is false
params.trailingPercentfloatNothe percent to trail away from the current market price
params.trailingTriggerPricefloatNothe price to trigger a trailing order, default uses the price argument
params.triggerPricefloatNothe price that a trigger order is triggered at
params.stopLossPricefloatNothe price that a stop loss order is triggered at
params.takeProfitPricefloatNothe price that a take profit order is triggered at
params.portfolioMarginbooleanNoset to true if you would like to create an order in a portfolio margin account
params.selfTradePreventionstringNoset unified value for stp, one of NONE, EXPIRE_MAKER, EXPIRE_TAKER or EXPIRE_BOTH
params.icebergAmountfloatNoset iceberg amount for limit orders
params.stopLossOrTakeProfitstringNo'stopLoss' or 'takeProfit', required for spot trailing orders
params.positionSidestringNoswap and portfolio margin only "BOTH" for one-way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
params.hedgedboolNoswap and portfolio margin only true for hedged mode, false for one way mode, default is false
params.clientOrderIdstringNothe clientOrderId of the order
binance.createOrder (symbol, type, side, amount, price?, params?)

createMarketOrderWithCost

create a market order by providing the symbol, side and cost

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

See: https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
sidestringYes'buy' or 'sell'
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.createMarketOrderWithCost (symbol, side, cost, params?)

createMarketBuyOrderWithCost

create a market buy order by providing the symbol and cost

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

See: https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

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
binance.createMarketBuyOrderWithCost (symbol, cost, params?)

createMarketSellOrderWithCost

create a market sell order by providing the symbol and cost

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

See: https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

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
binance.createMarketSellOrderWithCost (symbol, cost, params?)

fetchOrder

fetches information on an order made by the user

Kind: instance method of binance
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.marginModestringNo'cross' or 'isolated', for spot margin trading
params.portfolioMarginbooleanNoset to true if you would like to fetch an order in a portfolio margin account
params.triggerbooleanNoset to true if you would like to fetch a trigger or conditional order
binance.fetchOrder (id, symbol, params?)

fetchOrders

fetches information on multiple orders made by the user

Kind: instance method of binance
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.marginModestringNo'cross' or 'isolated', for spot margin trading
params.untilintNothe latest time in ms to fetch orders for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMarginbooleanNoset to true if you would like to fetch orders in a portfolio margin account
params.triggerbooleanNoset to true if you would like to fetch portfolio margin account trigger or conditional orders
binance.fetchOrders (symbol, since?, limit?, params?)

fetchOpenOrders

fetch all unfilled currently open orders

Kind: instance method of binance
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 orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'cross' or 'isolated', for spot margin trading
params.portfolioMarginbooleanNoset to true if you would like to fetch open orders in the portfolio margin account
params.triggerbooleanNoset to true if you would like to fetch portfolio margin account conditional orders
params.subTypestringNo"linear" or "inverse"
binance.fetchOpenOrders (symbol, since?, limit?, params?)

fetchOpenOrder

fetch an open order by the id

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

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerstringNoset to true if you would like to fetch portfolio margin account stop or conditional orders
params.portfolioMarginbooleanNoset to true if you would like to fetch for a portfolio margin account
binance.fetchOpenOrder (id, symbol, params?)

fetchClosedOrders

fetches information on multiple closed orders made by the user

Kind: instance method of binance
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.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMarginbooleanNoset to true if you would like to fetch orders in a portfolio margin account
params.triggerbooleanNoset to true if you would like to fetch portfolio margin account trigger or conditional orders
binance.fetchClosedOrders (symbol, since?, limit?, params?)

fetchCanceledOrders

fetches information on multiple canceled orders made by the user

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the 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.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMarginbooleanNoset to true if you would like to fetch orders in a portfolio margin account
params.triggerbooleanNoset to true if you would like to fetch portfolio margin account trigger or conditional orders
binance.fetchCanceledOrders (symbol, since?, limit?, params?)

fetchCanceledAndClosedOrders

fetches information on multiple canceled orders made by the user

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the 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.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMarginbooleanNoset to true if you would like to fetch orders in a portfolio margin account
params.triggerbooleanNoset to true if you would like to fetch portfolio margin account trigger or conditional orders
binance.fetchCanceledAndClosedOrders (symbol, since?, limit?, params?)

cancelOrder

cancels an open order

Kind: instance method of binance
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.portfolioMarginbooleanNoset to true if you would like to cancel an order in a portfolio margin account
params.triggerbooleanNoset to true if you would like to cancel a portfolio margin account conditional order
binance.cancelOrder (id, symbol, params?)

cancelAllOrders

cancel all open orders in a market

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market to cancel orders in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'cross' or 'isolated', for spot margin trading
params.portfolioMarginbooleanNoset to true if you would like to cancel orders in a portfolio margin account
params.triggerbooleanNoset to true if you would like to cancel portfolio margin account conditional orders
binance.cancelAllOrders (symbol, params?)

cancelOrders

cancel multiple orders

Kind: instance method of binance
Returns: object - an list of order structures

See

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringNounified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdsArray<string>Noalternative to ids, array of client order ids EXCHANGE SPECIFIC PARAMETERS
params.origClientOrderIdListArray<string>Nomax length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma
params.recvWindowArray<int>No
binance.cancelOrders (ids, symbol?, params?)

fetchOrderTrades

fetch all the trades made from a single order

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

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchOrderTrades (id, symbol, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

Kind: instance method of binance
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.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.untilintNothe latest time in ms to fetch entries for
params.portfolioMarginbooleanNoset to true if you would like to fetch trades for a portfolio margin account
binance.fetchMyTrades (symbol, since?, limit?, params?)

fetchMyDustTrades

fetch all dust trades made by the user

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

See: https://developers.binance.com/docs/wallet/asset/dust-log

ParamTypeRequiredDescription
symbolstringYesnot used by binance fetchMyDustTrades ()
sinceintNothe earliest time in ms to fetch my dust trades for
limitintNothe maximum number of dust trades to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'margin', default spot
binance.fetchMyDustTrades (symbol, since?, limit?, params?)

fetchDeposits

fetch all deposits made to an account

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

See

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.fiatboolNoif true, only fiat deposits will be returned
params.untilintNothe latest time in ms to fetch entries for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
binance.fetchDeposits (code, since?, limit?, params?)

fetchWithdrawals

fetch all withdrawals made from an account

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

See

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.fiatboolNoif true, only fiat withdrawals will be returned
params.untilintNothe latest time in ms to fetch withdrawals for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
binance.fetchWithdrawals (code, since?, limit?, params?)

transfer

transfer currency internally between wallets on the same account

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

See: https://developers.binance.com/docs/wallet/asset/user-universal-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.typestringNoexchange specific transfer type
params.symbolstringNothe unified symbol, required for isolated margin transfers
binance.transfer (code, amount, fromAccount, toAccount, params?)

fetchTransfers

fetch a history of internal transfers made on an account

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

See: https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer

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 transfers for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.internalbooleanNodefault false, when true will fetch pay trade history
binance.fetchTransfers (code, since?, limit?, params?)

fetchDepositAddress

fetch the deposit address for a currency associated with this account

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

See: https://developers.binance.com/docs/wallet/capital/deposite-address

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
params.networkstringNonetwork for fetch deposit address
binance.fetchDepositAddress (code, params?)

fetchTransactionFees

DEPRECATED

please use fetchDepositWithdrawFees instead

Kind: instance method of binance
Returns: Array<object> - a list of fee structures

See: https://developers.binance.com/docs/wallet/capital/all-coins-info

ParamTypeRequiredDescription
codesArray<string>, undefinedYesnot used by binance fetchTransactionFees ()
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchTransactionFees (codes, params?)

fetchDepositWithdrawFees

fetch deposit and withdraw fees

Kind: instance method of binance
Returns: Array<object> - a list of fee structures

See: https://developers.binance.com/docs/wallet/capital/all-coins-info

ParamTypeRequiredDescription
codesArray<string>, undefinedYesnot used by binance fetchDepositWithdrawFees ()
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchDepositWithdrawFees (codes, params?)

withdraw

make a withdrawal

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

See: https://developers.binance.com/docs/wallet/capital/withdraw

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.withdraw (code, amount, address, tag, params?)

fetchTradingFee

fetch the trading fees for a market

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to fetch trading fees in a portfolio margin account
params.subTypestringNo"linear" or "inverse"
binance.fetchTradingFee (symbol, params?)

fetchTradingFees

fetch the trading fees for multiple markets

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchTradingFees (params?)

fetchFundingRate

fetch the current funding rate

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

See

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

fetchFundingRateHistory

fetches historical funding rate prices

Kind: instance method of binance
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.untilintNotimestamp in ms of the latest funding rate
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.subTypestringNo"linear" or "inverse"
binance.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchFundingRates

fetch the funding rate for multiple markets

Kind: instance method of binance
Returns: Array<object> - a list of funding rate structures, indexed by market symbols

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchFundingRates (symbols, params?)

fetchLeverageTiers

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

Kind: instance method of binance
Returns: object - a dictionary of leverage tiers structures, indexed by market symbols

See

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to fetch the leverage tiers for a portfolio margin account
params.subTypestringNo"linear" or "inverse"
binance.fetchLeverageTiers (symbols, params?)

fetchPosition

fetch data on an open position

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

See: https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchPosition (symbol, params?)

fetchOptionPositions

fetch data on open options positions

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

See: https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchOptionPositions (symbols, params?)

fetchPositions

fetch all open positions

Kind: instance method of binance
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.paramsobjectNoextra parameters specific to the exchange API endpoint
params.methodstringNomethod name to call, "positionRisk", "account" or "option", default is "positionRisk"
params.useV2boolNoset to true if you want to use the obsolete endpoint, where some more additional fields were provided
binance.fetchPositions (symbols?, params?)

fetchFundingHistory

fetch the history of funding payments paid and received on this account

Kind: instance method of binance
Returns: object - a funding history structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch funding history for
limitintNothe maximum number of funding history structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest funding history entry
params.portfolioMarginbooleanNoset to true if you would like to fetch the funding history for a portfolio margin account
params.subTypestringNo"linear" or "inverse"
binance.fetchFundingHistory (symbol, since?, limit?, params?)

setLeverage

set the level of leverage for a market

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

See

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to set the leverage for a trading pair in a portfolio margin account
binance.setLeverage (leverage, symbol, params?)

setMarginMode

set margin mode to 'cross' or 'isolated'

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

See

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

setPositionMode

set hedged to true or false for a market

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

See

ParamTypeRequiredDescription
hedgedboolYesset to true to use dualSidePosition
symbolstringYesnot used by binance setPositionMode ()
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to set the position mode for a portfolio margin account
params.subTypestringNo"linear" or "inverse"
binance.setPositionMode (hedged, symbol, params?)

fetchLeverages

fetch the set leverage for all markets

Kind: instance method of binance
Returns: object - a list of leverage structures

See

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchLeverages (symbols?, params?)

fetchSettlementHistory

fetches historical settlement records

Kind: instance method of binance
Returns: Array<object> - a list of settlement history objects

See: https://developers.binance.com/docs/derivatives/option/market-data/Historical-Exercise-Records

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the settlement history
sinceintNotimestamp in ms
limitintNonumber of records, default 100, max 100
paramsobjectNoexchange specific params
binance.fetchSettlementHistory (symbol, since?, limit?, params?)

fetchMySettlementHistory

fetches historical settlement records of the user

Kind: instance method of binance
Returns: Array<object> - a list of [settlement history objects]

See: https://developers.binance.com/docs/derivatives/option/trade/User-Exercise-Record

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the settlement history
sinceintNotimestamp in ms
limitintNonumber of records
paramsobjectNoexchange specific params
binance.fetchMySettlementHistory (symbol, since?, limit?, params?)

fetchLedgerEntry

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

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

See: https://developers.binance.com/docs/derivatives/option/account/Account-Funding-Flow

ParamTypeRequiredDescription
idstringYesthe identification number of the ledger entry
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchLedgerEntry (id, code, 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 binance
Returns: object - a ledger structure

See

ParamTypeRequiredDescription
codestringNounified currency code
sinceintNotimestamp in ms of the earliest ledger entry
limitintNomax number of ledger entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest ledger entry
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMarginbooleanNoset to true if you would like to fetch the ledger for a portfolio margin account
params.subTypestringNo"linear" or "inverse"
binance.fetchLedger (code?, since?, limit?, params?)

reduceMargin

remove margin from a position

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

See

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

addMargin

add margin

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

See

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

fetchCrossBorrowRate

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

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

See: https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History

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

fetchIsolatedBorrowRate

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

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

See: https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS
params.vipLevelobjectNouser's current specific margin data will be returned if viplevel is omitted
binance.fetchIsolatedBorrowRate (symbol, params?)

fetchIsolatedBorrowRates

fetch the borrow interest rates of all currencies

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

See: https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.symbolobjectNounified market symbol EXCHANGE SPECIFIC PARAMETERS
params.vipLevelobjectNouser's current specific margin data will be returned if viplevel is omitted
binance.fetchIsolatedBorrowRates (params?)

fetchBorrowRateHistory

retrieves a history of a currencies borrow interest rate at specific time slots

Kind: instance method of binance
Returns: Array<object> - an array of borrow rate structures

See: https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNotimestamp for the earliest borrow rate
limitintNothe maximum number of borrow rate structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchBorrowRateHistory (code, since?, limit?, params?)

createGiftCode

create gift code

Kind: instance method of binance
Returns: object - The gift code id, code, currency and amount

See: https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card

ParamTypeRequiredDescription
codestringYesgift code
amountfloatYesamount of currency for the gift
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.createGiftCode (code, amount, params?)

redeemGiftCode

redeem gift code

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

See: https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card

ParamTypeRequiredDescription
giftcardCodestringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.redeemGiftCode (giftcardCode, params?)

verifyGiftCode

verify gift code

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

See: https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number

ParamTypeRequiredDescription
idstringYesreference number id
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.verifyGiftCode (id, params?)

fetchBorrowInterest

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

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

See

ParamTypeRequiredDescription
codestringNounified currency code
symbolstringNounified market symbol when fetch interest in isolated markets
sinceintNothe earliest time in ms to fetch borrrow interest for
limitintNothe maximum number of structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to fetch the borrow interest in a portfolio margin account
binance.fetchBorrowInterest (code?, symbol?, since?, limit?, params?)

repayCrossMargin

repay borrowed margin and interest

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

See

ParamTypeRequiredDescription
codestringYesunified currency code of the currency to repay
amountfloatYesthe amount to repay
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to repay margin in a portfolio margin account
params.repayCrossMarginMethodstringNoportfolio margin only 'papiPostRepayLoan' (default), 'papiPostMarginRepayDebt' (alternative)
params.specifyRepayAssetsstringNoportfolio margin papiPostMarginRepayDebt only specific asset list to repay debt
binance.repayCrossMargin (code, amount, params?)

repayIsolatedMargin

repay borrowed margin and interest

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

See: https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay

ParamTypeRequiredDescription
symbolstringYesunified market symbol, required for isolated margin
codestringYesunified currency code of the currency to repay
amountfloatYesthe amount to repay
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.repayIsolatedMargin (symbol, code, amount, params?)

borrowCrossMargin

create a loan to borrow margin

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

See

ParamTypeRequiredDescription
codestringYesunified currency code of the currency to borrow
amountfloatYesthe amount to borrow
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to borrow margin in a portfolio margin account
binance.borrowCrossMargin (code, amount, params?)

borrowIsolatedMargin

create a loan to borrow margin

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

See: https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay

ParamTypeRequiredDescription
symbolstringYesunified market symbol, required for isolated margin
codestringYesunified currency code of the currency to borrow
amountfloatYesthe amount to borrow
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.borrowIsolatedMargin (symbol, code, amount, params?)

fetchOpenInterestHistory

Retrieves the open interest history of a currency

Kind: instance method of binance
Returns: object - an array of open interest structure

See

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
timeframestringYes"5m","15m","30m","1h","2h","4h","6h","12h", or "1d"
sinceintNothe time(ms) of the earliest record to retrieve as a unix timestamp
limitintNodefault 30, max 500
paramsobjectNoexchange specific parameters
params.untilintNothe time(ms) of the latest record to retrieve as a unix timestamp
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
binance.fetchOpenInterestHistory (symbol, timeframe, since?, limit?, params?)

fetchOpenInterest

retrieves the open interest of a contract trading pair

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

See

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
paramsobjectNoexchange specific parameters
binance.fetchOpenInterest (symbol, params?)

fetchMyLiquidations

retrieves the users liquidated positions

Kind: instance method of binance
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 binance api endpoint
params.untilintNotimestamp in ms of the latest liquidation
params.paginatebooleanNospot only default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMarginbooleanNoset to true if you would like to fetch liquidations in a portfolio margin account
params.typestringNo"spot"
params.subTypestringNo"linear" or "inverse"
binance.fetchMyLiquidations (symbol?, since?, limit?, params?)

fetchGreeks

fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract

Kind: instance method of binance
Returns: object - a greeks structure

See: https://developers.binance.com/docs/derivatives/option/market-data/Option-Mark-Price

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch greeks for
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchGreeks (symbol, params?)

fetchAllGreeks

fetches all option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract

Kind: instance method of binance
Returns: object - a greeks structure

See: https://developers.binance.com/docs/derivatives/option/market-data/Option-Mark-Price

ParamTypeRequiredDescription
symbolsArray<string>Nounified symbols of the markets to fetch greeks for, all markets are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchAllGreeks (symbols?, params?)

fetchPositionMode

fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets

Kind: instance method of binance
Returns: object - an object detailing whether the market is in hedged or one-way mode

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchPositionMode (symbol, params?)

fetchMarginModes

fetches margin modes ("isolated" or "cross") that the market for the symbol in in, with symbol=undefined all markets for a subType (linear/inverse) are returned

Kind: instance method of binance
Returns: object - a list of margin mode structures

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchMarginModes (symbols, params?)

fetchMarginMode

fetches the margin mode of a specific symbol

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchMarginMode (symbol, params?)

fetchOption

fetches option data that is commonly found in an option chain

Kind: instance method of binance
Returns: object - an option chain structure

See: https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics

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

fetchMarginAdjustmentHistory

fetches the history of margin added or reduced from contract isolated positions

Kind: instance method of binance
Returns: Array<object> - a list of margin structures

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
typestringNo"add" or "reduce"
sinceintNotimestamp in ms of the earliest change to fetch
limitintNothe maximum amount of changes to fetch
paramsobjectYesextra parameters specific to the exchange api endpoint
params.untilintNotimestamp in ms of the latest change to fetch
binance.fetchMarginAdjustmentHistory (symbol, type?, since?, limit?, params)

fetchConvertCurrencies

fetches all available currencies that can be converted

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

See: https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset

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

fetchConvertQuote

fetch a quote for converting from one currency to another

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

See: https://developers.binance.com/docs/convert/trade/Send-quote-request

ParamTypeRequiredDescription
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.walletTypestringNoeither 'SPOT' or 'FUNDING', the default is 'SPOT'
binance.fetchConvertQuote (fromCode, toCode, amount, params?)

createConvertTrade

convert from one currency to another

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

See: https://developers.binance.com/docs/convert/trade/Accept-Quote

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
amountfloatNohow much you want to trade in units of the from currency
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.createConvertTrade (id, fromCode, toCode, amount?, params?)

fetchConvertTrade

fetch the data for a conversion trade

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

See: https://developers.binance.com/docs/convert/trade/Order-Status

ParamTypeRequiredDescription
idstringYesthe id of the trade that you want to fetch
codestringNothe unified currency code of the conversion trade
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchConvertTrade (id, code?, params?)

fetchConvertTradeHistory

fetch the users history of conversion trades

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

See: https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History

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
params.untilintNotimestamp in ms of the latest conversion to fetch
binance.fetchConvertTradeHistory (code?, since?, limit?, params?)

fetchFundingIntervals

fetch the funding rate interval for multiple markets

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

See

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
binance.fetchFundingIntervals (symbols?, params?)

fetchLongShortRatioHistory

fetches the long short ratio history for a unified market symbol

Kind: instance method of binance
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, default is 24 hours
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
params.untilintNotimestamp in ms of the latest ratio to fetch
binance.fetchLongShortRatioHistory (symbol, timeframe?, since?, limit?, params?)

fetchADLRank

fetches the auto deleveraging rank and risk percentage for a symbol

Kind: instance method of binance
Returns: object - an auto de leverage structure

See: https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the auto deleveraging rank for
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchADLRank (symbol, params?)

fetchPositionsADLRank

fetches the auto deleveraging rank and risk percentage for a list of symbols that have open positions

Kind: instance method of binance
Returns: Array<object> - an array of auto de leverage structure

See

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true for the portfolio margin account
binance.fetchPositionsADLRank (symbols?, params?)

ensureUserDataStreamWsSubscribeSignature

watches best bid & ask for symbols

Kind: instance property of binance
Returns: Promise The subscription ID for the user data stream

See: Binance User Data Stream Documentation

ParamTypeRequiredDescription
marketTypestringNoonly supports 'spot'
binance.ensureUserDataStreamWsSubscribeSignature (marketType?)

ensureUserDataStreamWsSubscribeListenToken

subscribes to user data stream using listenToken (for margin)

Kind: instance property of binance
Returns: Promise

See: Binance User Data Stream Documentation

ParamTypeRequiredDescription
marketTypestringYesthe market type (e.g., 'margin')
paramsobjectYesextra parameters specific to the request
params.symbolstringNorequired for isolated margin
params.isIsolatedbooleanNowhether it is isolated margin
params.validitynumberNovalidity in milliseconds, default 24 hours, max 24 hours
binance.ensureUserDataStreamWsSubscribeListenToken (marketType, params)

watchLiquidations

watch the public liquidations of a trading pair

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

See

ParamTypeRequiredDescription
symbolstringYesunified 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 bitmex api endpoint
binance.watchLiquidations (symbol, since?, limit?, params?)

watchLiquidationsForSymbols

watch the public liquidations of a trading pair

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

See

ParamTypeRequiredDescription
symbolsArray<string>Yeslist of unified market symbols
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitmex api endpoint
binance.watchLiquidationsForSymbols (symbols, since?, limit?, params?)

watchMyLiquidations

watch the private liquidations of a trading pair

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

See

ParamTypeRequiredDescription
symbolstringYesunified 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 bitmex api endpoint
binance.watchMyLiquidations (symbol, since?, limit?, params?)

watchMyLiquidationsForSymbols

watch the private liquidations of a trading pair

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

See

ParamTypeRequiredDescription
symbolsArray<string>Yeslist of unified market symbols
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitmex api endpoint
binance.watchMyLiquidationsForSymbols (symbols, since?, limit?, params?)

watchOrderBook

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

Kind: instance method of binance
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
binance.watchOrderBook (symbol, limit?, params?)

watchOrderBookForSymbols

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

Kind: instance method of binance
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.rpibooleanNofuture only set to true to use the RPI endpoint
binance.watchOrderBookForSymbols (symbols, limit?, params?)

unWatchOrderBookForSymbols

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

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

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified array of symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.unWatchOrderBookForSymbols (symbols, params?)

unWatchOrderBook

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

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

See

ParamTypeRequiredDescription
symbolstringYesunified array of symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.unWatchOrderBook (symbol, params?)

fetchOrderBookWs

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

Kind: instance method of binance
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
binance.fetchOrderBookWs (symbol, limit?, params?)

watchTradesForSymbols

get the list of most recent trades for a list of symbols

Kind: instance method of binance
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.namestringNothe name of the method to call, 'trade' or 'aggTrade', default is 'trade'
binance.watchTradesForSymbols (symbols, since?, limit?, params?)

unWatchTradesForSymbols

unsubscribes from the trades channel

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

See

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.namestringNothe name of the method to call, 'trade' or 'aggTrade', default is 'trade'
binance.unWatchTradesForSymbols (symbols, params?)

unWatchTrades

unsubscribes from the trades channel

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.namestringNothe name of the method to call, 'trade' or 'aggTrade', default is 'trade'
binance.unWatchTrades (symbol, params?)

watchTrades

get the list of most recent trades for a particular symbol

Kind: instance method of binance
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.namestringNothe name of the method to call, 'trade' or 'aggTrade', default is 'trade'
binance.watchTrades (symbol, since?, limit?, params?)

watchOHLCV

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

Kind: instance method of binance
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.timezoneobjectNoif provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
binance.watchOHLCV (symbol, timeframe, since?, limit?, params?)

watchOHLCVForSymbols

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

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

See

ParamTypeRequiredDescription
symbolsAndTimeframesArray<Array<string>>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
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.timezoneobjectNoif provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
binance.watchOHLCVForSymbols (symbolsAndTimeframes, since?, limit?, params?)

unWatchOHLCVForSymbols

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

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

See

ParamTypeRequiredDescription
symbolsAndTimeframesArray<Array<string>>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
paramsobjectNoextra parameters specific to the exchange API endpoint
params.timezoneobjectNoif provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
binance.unWatchOHLCVForSymbols (symbolsAndTimeframes, params?)

unWatchOHLCV

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

Kind: instance method of binance
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
paramsobjectNoextra parameters specific to the exchange API endpoint
params.timezoneobjectNoif provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
binance.unWatchOHLCV (symbol, timeframe, params?)

fetchTickerWs

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

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.methodstringNomethod to use can be ticker.price or ticker.book
params.returnRateLimitsbooleanNoreturn the rate limits for the exchange
binance.fetchTickerWs (symbol, params?)

fetchOHLCVWs

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

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

See: https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines

ParamTypeDescription
symbolstringunified symbol of the market to query OHLCV data for
timeframestringthe length of time each candle represents
sinceinttimestamp in ms of the earliest candle to fetch
limitintthe maximum amount of candles to fetch
paramsobjectextra parameters specific to the exchange API endpoint
params.untilinttimestamp in ms of the earliest candle to fetch EXCHANGE SPECIFIC PARAMETERS
params.timeZonestringdefault=0 (UTC)
binance.fetchOHLCVWs (symbol, timeframe, since, limit, params)

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 binance
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.namestringNostream to use can be ticker or miniTicker
binance.watchTicker (symbol, params?)

watchMarkPrice

watches a mark price for a specific market

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

See: https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.use1sFreqbooleanNodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
binance.watchMarkPrice (symbol, params?)

watchMarkPrices

watches the mark price for all markets

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

See: https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.use1sFreqbooleanNodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
binance.watchMarkPrices (symbols, 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 binance
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
binance.watchTickers (symbols, params?)

unWatchTickers

unWatches 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 binance
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
binance.unWatchTickers (symbols, params?)

unWatchMarkPrices

unWatches 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 binance
Returns: object - a ticker structure

See: https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.unWatchMarkPrices (symbols, params?)

unWatchMarkPrice

unWatches 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 binance
Returns: object - a ticker structure

See: https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream

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

unWatchTicker

unWatches 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 binance
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
binance.unWatchTicker (symbol, params?)

watchBidsAsks

watches best bid & ask for symbols

Kind: instance method of binance
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
binance.watchBidsAsks (symbols, params?)

fetchBalanceWs

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

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestring, undefinedNo'future', 'delivery', 'savings', 'funding', or 'spot'
params.marginModestring, undefinedNo'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
params.symbolsArray<string>, undefinedNounified market symbols, only used in isolated margin mode
params.methodstring, undefinedNomethod to use. Can be account.balance, account.status, v2/account.balance or v2/account.status
binance.fetchBalanceWs (params?)

fetchPositionWs

fetch data on an open position

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

See: https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchPositionWs (symbol, params?)

fetchPositionsWs

fetch all open positions

Kind: instance method of binance
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.returnRateLimitsbooleanNoset to true to return rate limit informations, defaults to false.
params.methodstring, undefinedNomethod to use. Can be account.position or v2/account.position
binance.fetchPositionsWs (symbols?, params?)

watchBalance

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

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to watch the balance of a portfolio margin account
binance.watchBalance (params?)

createOrderWs

create a trade order

Kind: instance method of binance
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 of currency you want to trade in units of base currency
pricefloat, undefinedNothe 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.testbooleanYestest order, default false
params.returnRateLimitsbooleanYesset to true to return rate limit information, default false
binance.createOrderWs (symbol, type, side, amount, price?, params?)

editOrderWs

edit a trade order

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

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of the currency you want to trade in units of the base currency
pricefloat, undefinedNothe 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
binance.editOrderWs (id, symbol, type, side, amount, price?, params?)

cancelOrderWs

cancel multiple orders

Kind: instance method of binance
Returns: object - an list of order structures

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified market symbol, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.cancelRestrictionsstring, undefinedNoSupported values: ONLY_NEW - Cancel will succeed if the order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED.
params.triggerbooleanNoset to true if you would like to cancel a conditional order
binance.cancelOrderWs (id, symbol?, params?)

cancelAllOrdersWs

cancel all open orders in a market

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

See: https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-open-orders-trade

ParamTypeRequiredDescription
symbolstringNounified market symbol of the market to cancel orders in
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.cancelAllOrdersWs (symbol?, params?)

fetchOrderWs

fetches information on an order made by the user

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

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchOrderWs (id, symbol?, params?)

fetchOrdersWs

fetches information on multiple orders made by the user

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

See: https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#order-lists

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceint, undefinedNothe earliest time in ms to fetch orders for
limitint, undefinedNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.orderIdintNoorder id to begin at
params.startTimeintNoearliest time in ms to retrieve orders for
params.endTimeintNolatest time in ms to retrieve orders for
params.limitintNothe maximum number of order structures to retrieve
binance.fetchOrdersWs (symbol, since?, limit?, params?)

fetchClosedOrdersWs

fetch closed orders

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

See: https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#order-lists

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchClosedOrdersWs (symbol, since?, limit?, params?)

fetchOpenOrdersWs

fetch all unfilled currently open orders

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

See: https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#current-open-orders-user_data

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceint, undefinedNothe earliest time in ms to fetch open orders for
limitint, undefinedNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
binance.fetchOpenOrdersWs (symbol, since?, limit?, params?)

watchOrders

watches information on multiple orders made by the user

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

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the 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.marginModestring, undefinedNo'cross' or 'isolated', for spot margin
params.portfolioMarginbooleanNoset to true if you would like to watch portfolio margin account orders
binance.watchOrders (symbol, since?, limit?, params?)

watchPositions

watch all open positions

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

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
sincenumberNosince timestamp
limitnumberNolimit
paramsobjectYesextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to watch positions in a portfolio margin account
binance.watchPositions (symbols, since?, limit?, params)

fetchMyTradesWs

fetch all trades made by the user

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

See: https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-trade-history-user_data

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceint, undefinedNothe earliest time in ms to fetch trades for
limitint, undefinedNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.endTimeintNothe latest time in ms to fetch trades for
params.fromIdintNofirst trade Id to fetch
binance.fetchMyTradesWs (symbol, since?, limit?, params?)

fetchTradesWs

fetch all trades made by the user

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

See: https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve, default=500, max=1000
paramsobjectNoextra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS
params.fromIdintNotrade ID to begin at
binance.fetchTradesWs (symbol, since?, limit?, params?)

watchMyTrades

watches information on multiple trades made by the user

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

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.portfolioMarginbooleanNoset to true if you would like to watch trades in a portfolio margin account
binance.watchMyTrades (symbol, since?, limit?, params?)

En esta página

binanceenableDemoTradingfetchTimefetchCurrenciesfetchMarketsfetchBalancefetchOrderBookfetchStatusfetchTickerfetchBidsAsksfetchLastPricesfetchTickersfetchMarkPricefetchMarkPricesfetchOHLCVfetchTradeseditContractOrdereditOrdereditOrderscreateOrderscreateOrdercreateMarketOrderWithCostcreateMarketBuyOrderWithCostcreateMarketSellOrderWithCostfetchOrderfetchOrdersfetchOpenOrdersfetchOpenOrderfetchClosedOrdersfetchCanceledOrdersfetchCanceledAndClosedOrderscancelOrdercancelAllOrderscancelOrdersfetchOrderTradesfetchMyTradesfetchMyDustTradesfetchDepositsfetchWithdrawalstransferfetchTransfersfetchDepositAddressfetchTransactionFeesfetchDepositWithdrawFeeswithdrawfetchTradingFeefetchTradingFeesfetchFundingRatefetchFundingRateHistoryfetchFundingRatesfetchLeverageTiersfetchPositionfetchOptionPositionsfetchPositionsfetchFundingHistorysetLeveragesetMarginModesetPositionModefetchLeveragesfetchSettlementHistoryfetchMySettlementHistoryfetchLedgerEntryfetchLedgerreduceMarginaddMarginfetchCrossBorrowRatefetchIsolatedBorrowRatefetchIsolatedBorrowRatesfetchBorrowRateHistorycreateGiftCoderedeemGiftCodeverifyGiftCodefetchBorrowInterestrepayCrossMarginrepayIsolatedMarginborrowCrossMarginborrowIsolatedMarginfetchOpenInterestHistoryfetchOpenInterestfetchMyLiquidationsfetchGreeksfetchAllGreeksfetchPositionModefetchMarginModesfetchMarginModefetchOptionfetchMarginAdjustmentHistoryfetchConvertCurrenciesfetchConvertQuotecreateConvertTradefetchConvertTradefetchConvertTradeHistoryfetchFundingIntervalsfetchLongShortRatioHistoryfetchADLRankfetchPositionsADLRankensureUserDataStreamWsSubscribeSignatureensureUserDataStreamWsSubscribeListenTokenwatchLiquidationswatchLiquidationsForSymbolswatchMyLiquidationswatchMyLiquidationsForSymbolswatchOrderBookwatchOrderBookForSymbolsunWatchOrderBookForSymbolsunWatchOrderBookfetchOrderBookWswatchTradesForSymbolsunWatchTradesForSymbolsunWatchTradeswatchTradeswatchOHLCVwatchOHLCVForSymbolsunWatchOHLCVForSymbolsunWatchOHLCVfetchTickerWsfetchOHLCVWswatchTickerwatchMarkPricewatchMarkPriceswatchTickersunWatchTickersunWatchMarkPricesunWatchMarkPriceunWatchTickerwatchBidsAsksfetchBalanceWsfetchPositionWsfetchPositionsWswatchBalancecreateOrderWseditOrderWscancelOrderWscancelAllOrdersWsfetchOrderWsfetchOrdersWsfetchClosedOrdersWsfetchOpenOrdersWswatchOrderswatchPositionsfetchMyTradesWsfetchTradesWswatchMyTrades