Skip to content
github-actions[bot] edited this page Jun 15, 2026 · 4 revisions

bitrue{docsify-ignore}

Kind: global class
Extends: Exchange

fetchStatus{docsify-ignore}

the latest known information on the availability of the exchange API

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

See: https://github.com/Bitrue-exchange/Spot-official-api-docs#test-connectivity

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchStatus (params?)

fetchTime{docsify-ignore}

fetches the current integer timestamp in milliseconds from the exchange server

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

See: https://github.com/Bitrue-exchange/Spot-official-api-docs#check-server-time

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchTime (params?)

fetchCurrencies{docsify-ignore}

fetches all available currencies on an exchange

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

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchCurrencies (params?)

fetchMarkets{docsify-ignore}

retrieves data on all markets for bitrue

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

See

Param Type Required Description
params object No extra parameters specific to the exchange api endpoint
bitrue.fetchMarkets (params?)

fetchBalance{docsify-ignore}

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

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

See

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
params.type string No 'future', 'delivery', 'spot', 'swap'
params.subType string No 'linear', 'inverse'
bitrue.fetchBalance (params?)

fetchOrderBook{docsify-ignore}

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

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

See

Param Type Required Description
symbol string Yes unified symbol of the market to fetch the order book for
limit int No the maximum amount of order book entries to return
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchOrderBook (symbol, limit?, params?)

fetchTicker{docsify-ignore}

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

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

See

Param Type Required Description
symbol string Yes unified symbol of the market to fetch the ticker for
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchTicker (symbol, params?)

fetchOHLCV{docsify-ignore}

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

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

See

Param Type Required Description
symbol string Yes unified symbol of the market to fetch OHLCV data for
timeframe string Yes the length of time each candle represents
since int No timestamp in ms of the earliest candle to fetch
limit int No the maximum amount of candles to fetch
params object No extra parameters specific to the exchange API endpoint
params.until int No the latest time in ms to fetch transfers for
bitrue.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchBidsAsks{docsify-ignore}

fetches the bid and ask price and volume for multiple markets

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

See

Param Type Required Description
symbols Array<string>, undefined Yes unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchBidsAsks (symbols, params?)

fetchTickers{docsify-ignore}

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

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

See

Param Type Required Description
symbols Array<string>, undefined Yes unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchTickers (symbols, params?)

fetchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

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

See: https://github.com/Bitrue-exchange/Spot-official-api-docs#recent-trades-list

Param Type Required Description
symbol string Yes unified symbol of the market to fetch trades for
since int No timestamp in ms of the earliest trade to fetch
limit int No the maximum amount of trades to fetch
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchTrades (symbol, since?, limit?, params?)

createMarketBuyOrderWithCost{docsify-ignore}

create a market buy order by providing the symbol and cost

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

See

Param Type Required Description
symbol string Yes unified symbol of the market to create an order in
cost float Yes how much you want to trade in units of the quote currency
params object No extra parameters specific to the exchange API endpoint
bitrue.createMarketBuyOrderWithCost (symbol, cost, params?)

createOrder{docsify-ignore}

create a trade order

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

See

Param Type Required Description
symbol string Yes unified symbol of the market to create an order in
type string Yes 'market' or 'limit'
side string Yes 'buy' or 'sell'
amount float Yes how much of currency you want to trade in units of base currency
price float No the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params object No extra parameters specific to the exchange API endpoint
params.triggerPrice float No spot only the price at which a trigger order is triggered at
params.clientOrderId string No a unique id for the order, automatically generated if not sent
params.leverage decimal No in future order, the leverage value of the order should consistent with the user contract configuration, default is 1
params.timeInForce string No 'fok', 'ioc' or 'po'
params.postOnly bool No default false
params.reduceOnly bool No default false EXCHANGE SPECIFIC PARAMETERS
params.icebergQty decimal No
params.recvWindow long No
params.cost float No swap market buy only the quote quantity that can be used as an alternative for the amount
bitrue.createOrder (symbol, type, side, amount, price?, params?)

fetchOrder{docsify-ignore}

fetches information on an order made by the user

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

See

Param Type Required Description
id string Yes the order id
symbol string Yes unified symbol of the market the order was made in
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchOrder (id, symbol, params?)

fetchClosedOrders{docsify-ignore}

fetches information on multiple closed orders made by the user

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

See: https://www.bitrue.com/api_docs_includes_file/spot/index.html#all-orders-user_data

Param Type Required Description
symbol string Yes unified market symbol of the market orders were made in
since int No the earliest time in ms to fetch orders for
limit int No the maximum number of order structures to retrieve
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchClosedOrders (symbol, since?, limit?, params?)

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

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

See

Param Type Required Description
symbol string Yes unified market symbol
since int No the earliest time in ms to fetch open orders for
limit int No the maximum number of open order structures to retrieve
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchOpenOrders (symbol, since?, limit?, params?)

cancelOrder{docsify-ignore}

cancels an open order

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

See

Param Type Required Description
id string Yes order id
symbol string Yes unified symbol of the market the order was made in
params object No extra parameters specific to the exchange API endpoint
bitrue.cancelOrder (id, symbol, params?)

cancelAllOrders{docsify-ignore}

cancel all open orders in a market

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

See

Param Type Required Description
symbol string Yes unified market symbol of the market to cancel orders in
params object No extra parameters specific to the exchange API endpoint
params.marginMode string No 'cross' or 'isolated', for spot margin trading
bitrue.cancelAllOrders (symbol, params?)

fetchMyTrades{docsify-ignore}

fetch all trades made by the user

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

See

Param Type Required Description
symbol string Yes unified market symbol
since int No the earliest time in ms to fetch trades for
limit int No the maximum number of trades structures to retrieve
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchMyTrades (symbol, since?, limit?, params?)

fetchDeposits{docsify-ignore}

fetch all deposits made to an account

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

See: https://github.com/Bitrue-exchange/Spot-official-api-docs#deposit-history--withdraw_data

Param Type Required Description
code string Yes unified currency code
since int No the earliest time in ms to fetch deposits for
limit int No the maximum number of deposits structures to retrieve
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchDeposits (code, since?, limit?, params?)

fetchWithdrawals{docsify-ignore}

fetch all withdrawals made from an account

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

See: https://github.com/Bitrue-exchange/Spot-official-api-docs#withdraw-history--withdraw_data

Param Type Required Description
code string Yes unified currency code
since int No the earliest time in ms to fetch withdrawals for
limit int No the maximum number of withdrawals structures to retrieve
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchWithdrawals (code, since?, limit?, params?)

withdraw{docsify-ignore}

make a withdrawal

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

See: https://github.com/Bitrue-exchange/Spot-official-api-docs#withdraw-commit--withdraw_data

Param Type Required Description
code string Yes unified currency code
amount float Yes the amount to withdraw
address string Yes the address to withdraw to
tag string Yes
params object No extra parameters specific to the exchange API endpoint
bitrue.withdraw (code, amount, address, tag, params?)

fetchDepositWithdrawFees{docsify-ignore}

fetch deposit and withdraw fees

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

See: https://github.com/Bitrue-exchange/Spot-official-api-docs#exchangeInfo_endpoint

Param Type Required Description
codes Array<string>, undefined Yes list of unified currency codes
params object No extra parameters specific to the exchange API endpoint
bitrue.fetchDepositWithdrawFees (codes, params?)

fetchTransfers{docsify-ignore}

fetch a history of internal transfers made on an account

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

See

Param Type Required Description
code string Yes unified currency code of the currency transferred
since int No the earliest time in ms to fetch transfers for
limit int No the maximum number of transfers structures to retrieve
params object No extra parameters specific to the exchange API endpoint
params.until int No the latest time in ms to fetch transfers for
params.type string No transfer type wallet_to_contract or contract_to_wallet
bitrue.fetchTransfers (code, since?, limit?, params?)

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

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

See

Param Type Required Description
code string Yes unified currency code
amount float Yes amount to transfer
fromAccount string Yes account to transfer from
toAccount string Yes account to transfer to
params object No extra parameters specific to the exchange API endpoint
bitrue.transfer (code, amount, fromAccount, toAccount, params?)

setLeverage{docsify-ignore}

set the level of leverage for a market

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

See

Param Type Required Description
leverage float Yes the rate of leverage
symbol string Yes unified market symbol
params object No extra parameters specific to the exchange API endpoint
bitrue.setLeverage (leverage, symbol, params?)

setMargin{docsify-ignore}

Either adds or reduces margin in an isolated position in order to set the margin to a specific value

Kind: instance method of bitrue
Returns: object - A margin structure

See

Param Type Required Description
symbol string Yes unified market symbol of the market to set margin in
amount float Yes the amount to set the margin to
params object No parameters specific to the exchange API endpoint
bitrue.setMargin (symbol, amount, params?)

watchBalance{docsify-ignore}

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

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

See: https://github.com/Bitrue-exchange/Spot-official-api-docs#balance-update

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
bitrue.watchBalance (params?)

watchOrders{docsify-ignore}

watches information on user orders

Kind: instance method of bitrue
Returns: object - A dictionary of order structure indexed by market symbols

See: https://github.com/Bitrue-exchange/Spot-official-api-docs#order-update

Param Type Required Description
symbol string Yes
since int No timestamp in ms of the earliest order
limit int No the maximum amount of orders to return
params object No extra parameters specific to the exchange API endpoint
bitrue.watchOrders (symbol, since?, limit?, params?)

watchTrades{docsify-ignore}

watches public trades for a swap (futures) market

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

See: https://www.bitrue.com/api_docs_includes_file/futures/index.html#websocket-market-data

Param Type Required Description
symbol string Yes unified symbol of the market to fetch trades for
since int No timestamp in ms of the earliest trade to fetch
limit int No the maximum amount of trades to fetch
params object No extra parameters specific to the exchange API endpoint
bitrue.watchTrades (symbol, since?, limit?, params?)

watchOHLCV{docsify-ignore}

watches OHLCV candles for a swap (futures) market

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

See: https://www.bitrue.com/api_docs_includes_file/futures/index.html#websocket-market-data

Param Type Required Description
symbol string Yes unified symbol of the market to fetch OHLCV data for
timeframe string Yes the length of time each candle represents
since int No timestamp in ms of the earliest candle to fetch
limit int No the maximum amount of candles to fetch
params object No extra parameters specific to the exchange API endpoint
bitrue.watchOHLCV (symbol, timeframe, since?, limit?, params?)

watchTicker{docsify-ignore}

watches a 24h ticker for a swap (futures) market

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

See: https://www.bitrue.com/api_docs_includes_file/futures/index.html#websocket-market-data

Param Type Required Description
symbol string Yes unified symbol of the market to fetch the ticker for
params object No extra parameters specific to the exchange API endpoint
bitrue.watchTicker (symbol, params?)

Clone this wiki locally