CCXT
bit2me

bit2me

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

🔌 Looking for raw exchange endpoints? See the bit2me implicit API — every endpoint in this exchange's API exposed as an implicit method.

bit2me

Kind: global class
Extends: Exchange

fetchMarkets

retrieves data on all markets for bit2me

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

See: https://api.bit2me.com/docs/pro/api-reference/marketdata/v2/trading/market-config/get

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marketEnabledstringNofilter by market state, one of 'enabled', 'enabled_at', 'frozen', 'restricted'
bit2me.fetchMarkets (params?)

fetchCurrencies

fetches all available currencies on an exchange

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

See: https://api.bit2me.com/docs/wallet/rest-overview

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.includeTestnetbooleanNodefault false, when true testnet assets are included
bit2me.fetchCurrencies (params?)

fetchTickers

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

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

See: https://api.bit2me.com/docs/pro/api-reference/marketdata/v2/trading/tickers/get

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
bit2me.fetchTickers (symbols?, 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 bit2me
Returns: object - a ticker structure

See: https://api.bit2me.com/docs/pro/api-reference/marketdata/v2/trading/tickers/get

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

fetchOrderBook

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

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

See: https://api.bit2me.com/docs/pro/api-reference/marketdata/v2/trading/order-book/get

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNonot used by bit2me.fetchOrderBook, the endpoint always returns up to 100 levels per side
paramsobjectNoextra parameters specific to the exchange API endpoint
bit2me.fetchOrderBook (symbol, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

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

See: https://api.bit2me.com/docs/pro/api-reference/marketdata/v1/trading/trade/last/get

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, default 50, max 50
paramsobjectNoextra parameters specific to the exchange API endpoint
bit2me.fetchTrades (symbol, since?, limit?, params?)

fetchOHLCV

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

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

See: https://api.bit2me.com/docs/pro/api-reference/marketdata/v1/trading/candle/get

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, default 1000, max 1000
paramsobjectNoextra parameters specific to the exchange API endpoint
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
bit2me.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchBalance

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

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

See: https://api.bit2me.com/docs/pro/api-reference/funding/v1/trading/wallet/balance/get

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.symbolsstringNocomma-separated currency codes, only those wallets are returned
bit2me.fetchBalance (params?)

createOrder

create a trade order

Kind: instance method of bit2me
Returns: object - an order structure, for an OCO the take profit leg is returned and both legs are available in info, cancelling one leg does not cancel the other

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/post

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, required for limit orders, for market buy orders it is used to compute the cost to spend (amount * price)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerPricefloatNothe price at which a stop-limit order is activated, requires a limit price
params.stopLossPricefloatNothe trigger price of a stop loss, placed as a stop-limit order at the limit price, or as the stop loss leg of an OCO when takeProfitPrice is also set
params.takeProfitPricefloatNothe trigger price of a take profit, placed as a stop-limit order at the limit price, or as the take profit leg of an OCO when stopLossPrice is also set
params.stopLimitPricefloatNoOCO only, the limit price of the stop loss leg, defaults to the price argument and then to stopLossPrice
params.costfloatNofor market orders only, the amount to trade in units of the quote currency, overrides amount
params.timeInForcestringNo'GTC' (default) or 'FOK' (limit orders only), IOC is not available on bit2me
params.postOnlybooleanNotrue to place a post-only limit order
params.clientOrderIdstringNoa unique identifier for the order
bit2me.createOrder (symbol, type, side, amount, price?, params?)

createMarketBuyOrderWithCost

create a market buy order by providing the symbol and cost

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/post

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

createMarketSellOrderWithCost

create a market sell order by providing the symbol and cost

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/post

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

cancelOrder

cancels an open order

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/id/delete

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNonot used by bit2me.cancelOrder
paramsobjectNoextra parameters specific to the exchange API endpoint
bit2me.cancelOrder (id, symbol?, params?)

fetchOrder

fetches information on an order made by the user

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

See

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringNonot used by bit2me.fetchOrder
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNofetch the order by its client order id instead of its id
bit2me.fetchOrder (id, symbol?, params?)

fetchOrders

fetches information on multiple orders made by the user

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/get

ParamTypeRequiredDescription
symbolstringNounified 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, default 100, max 100
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
params.offsetintNothe number of orders to skip, for pagination
params.statusstringNoonly orders in exactly this status, one of 'open', 'inactive', 'filled', 'cancelled'
params.status_instringNocomma-separated statuses to include
params.clientOrderIdstringNocomma-separated client order ids to filter by
bit2me.fetchOrders (symbol?, since?, limit?, params?)

fetchOpenOrders

fetch all unfilled currently open orders, including stop-limit orders waiting for their trigger

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/get

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open order structures to retrieve, default 100, max 100
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
bit2me.fetchOpenOrders (symbol?, since?, limit?, params?)

fetchClosedOrders

fetches information on multiple filled orders made by the user

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/get

ParamTypeRequiredDescription
symbolstringNounified 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, default 100, max 100
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
bit2me.fetchClosedOrders (symbol?, since?, limit?, params?)

fetchCanceledOrders

fetches information on multiple canceled orders made by the user

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/get

ParamTypeRequiredDescription
symbolstringNounified 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, default 100, max 100
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
bit2me.fetchCanceledOrders (symbol?, since?, limit?, params?)

fetchCanceledAndClosedOrders

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

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/get

ParamTypeRequiredDescription
symbolstringNounified 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, default 100, max 100
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
bit2me.fetchCanceledAndClosedOrders (symbol?, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/trade/get

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve, default 50, max 50
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch trades for
params.offsetintNothe number of trades to skip, for pagination
bit2me.fetchMyTrades (symbol?, since?, limit?, params?)

fetchOrderTrades

fetch all the trades made from a single order

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

See: https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/id/trades/get

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified 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
bit2me.fetchOrderTrades (id, symbol?, since?, limit?, params?)

transfer

transfer currency internally between the bit2me wallet and the trading (pro) wallet

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

See

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYes'funding' (the bit2me wallet) or 'spot' (the trading wallet)
toAccountstringYes'funding' (the bit2me wallet) or 'spot' (the trading wallet)
paramsobjectNoextra parameters specific to the exchange API endpoint
bit2me.transfer (code, amount, fromAccount, toAccount, params?)

fetchTransfers

fetch the history of movements between the bit2me wallet and the trading (pro) wallet

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

See: https://api.bit2me.com/docs/pro/api-reference/funding/v1/trading/movement/get

ParamTypeRequiredDescription
codestringNounified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfer structures to retrieve, default 100, max 100
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch transfers for
params.movementTypestringNo'deposit' or 'withdrawal', to fetch only one direction
bit2me.fetchTransfers (code?, since?, limit?, params?)

watchOrderBook

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

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

See: https://api.bit2me.com/docs/pro/websocket-public

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
bit2me.watchOrderBook (symbol, limit?, params?)

watchTrades

get the list of most recent trades for a particular symbol

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

See: https://api.bit2me.com/docs/pro/websocket-public

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
bit2me.watchTrades (symbol, since?, limit?, params?)

watchOrders

watches information on multiple orders made by the user

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

See: https://api.bit2me.com/docs/pro/websocket-private

ParamTypeRequiredDescription
symbolstringNounified 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
bit2me.watchOrders (symbol?, since?, limit?, params?)

watchMyTrades

watches information on multiple trades made by the user

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

See: https://api.bit2me.com/docs/pro/websocket-private

ParamTypeRequiredDescription
symbolstringNounified market symbol of the market trades were made in
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
bit2me.watchMyTrades (symbol?, since?, limit?, params?)

watchBalance

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

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

See: https://api.bit2me.com/docs/pro/websocket-private

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bit2me.watchBalance (params?)

createOrderWs

create a trade order over the websocket

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

See: https://api.bit2me.com/docs/pro/websocket-commands

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, required for limit orders
paramsobjectNoextra parameters specific to the exchange API endpoint, the same as for createOrder
params.triggerPricefloatNothe price at which a stop-limit order is activated, requires a limit price
params.costfloatNofor market orders only, the amount to trade in units of the quote currency, overrides amount
params.clientOrderIdstringNoa unique identifier for the order
bit2me.createOrderWs (symbol, type, side, amount, price?, params?)

cancelOrderWs

cancels an open order over the websocket

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

See: https://api.bit2me.com/docs/pro/websocket-commands

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNonot used by bit2me.cancelOrderWs
paramsobjectNoextra parameters specific to the exchange API endpoint
bit2me.cancelOrderWs (id, symbol?, params?)

cancelOrdersWs

cancels multiple orders over the websocket, up to 20 at a time

Kind: instance method of bit2me
Returns: Array<object> - a list of order structures, orders the exchange refused to cancel keep an undefined status and carry the reason in info

See: https://api.bit2me.com/docs/pro/websocket-commands

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringNonot used by bit2me.cancelOrdersWs
paramsobjectNoextra parameters specific to the exchange API endpoint
bit2me.cancelOrdersWs (ids, symbol?, params?)

cancelAllOrdersWs

cancels all open orders of a market over the websocket

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

See: https://api.bit2me.com/docs/pro/websocket-commands

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market to cancel orders in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.sidestringNo'buy' or 'sell', to cancel only that side
bit2me.cancelAllOrdersWs (symbol, params?)

On this page