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
- fetchCurrencies
- fetchTickers
- fetchTicker
- fetchOrderBook
- fetchTrades
- fetchOHLCV
- fetchBalance
- createOrder
- createMarketBuyOrderWithCost
- createMarketSellOrderWithCost
- cancelOrder
- fetchOrder
- fetchOrders
- fetchOpenOrders
- fetchClosedOrders
- fetchCanceledOrders
- fetchCanceledAndClosedOrders
- fetchMyTrades
- fetchOrderTrades
- transfer
- fetchTransfers
- watchOrderBook
- watchTrades
- watchOrders
- watchMyTrades
- watchBalance
- createOrderWs
- cancelOrderWs
- cancelOrdersWs
- cancelAllOrdersWs
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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.marketEnabled | string | No | filter 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.includeTestnet | boolean | No | default 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | 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 |
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
| 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 |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| limit | int | No | not used by bit2me.fetchOrderBook, the endpoint always returns up to 100 levels per side |
| params | object | No | extra 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
| 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, default 50, max 50 |
| params | object | No | extra 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
| 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, default 1000, max 1000 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest candle to fetch |
| params.paginate | boolean | No | default 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.symbols | string | No | comma-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
| 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 you want to trade in units of the base currency |
| price | float | No | the 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) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.triggerPrice | float | No | the price at which a stop-limit order is activated, requires a limit price |
| params.stopLossPrice | float | No | the 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.takeProfitPrice | float | No | the 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.stopLimitPrice | float | No | OCO only, the limit price of the stop loss leg, defaults to the price argument and then to stopLossPrice |
| params.cost | float | No | for market orders only, the amount to trade in units of the quote currency, overrides amount |
| params.timeInForce | string | No | 'GTC' (default) or 'FOK' (limit orders only), IOC is not available on bit2me |
| params.postOnly | boolean | No | true to place a post-only limit order |
| params.clientOrderId | string | No | a 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
| 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 |
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
| 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 |
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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | No | not used by bit2me.cancelOrder |
| params | object | No | extra 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
- https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/id/get
- https://api.bit2me.com/docs/pro/api-reference/trading/v1/trading/order/get
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | the order id |
| symbol | string | No | not used by bit2me.fetchOrder |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string | No | fetch 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | 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, default 100, max 100 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch orders for |
| params.offset | int | No | the number of orders to skip, for pagination |
| params.status | string | No | only orders in exactly this status, one of 'open', 'inactive', 'filled', 'cancelled' |
| params.status_in | string | No | comma-separated statuses to include |
| params.clientOrderId | string | No | comma-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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | 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, default 100, max 100 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | 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, default 100, max 100 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | 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, default 100, max 100 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | 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, default 100, max 100 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trade structures to retrieve, default 50, max 50 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch trades for |
| params.offset | int | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | No | unified market symbol |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trades to retrieve |
| params | object | No | extra 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
- https://api.bit2me.com/docs/pro/api-reference/funding/v1/trading/wallet/deposit/post
- https://api.bit2me.com/docs/pro/api-reference/funding/v1/trading/wallet/withdraw/post
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| amount | float | Yes | amount to transfer |
| fromAccount | string | Yes | 'funding' (the bit2me wallet) or 'spot' (the trading wallet) |
| toAccount | string | Yes | 'funding' (the bit2me wallet) or 'spot' (the trading wallet) |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | 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 transfer structures to retrieve, default 100, max 100 |
| 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.movementType | string | No | '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
| 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 |
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
| 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 |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | 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 |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol of the market trades were made in |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trade structures to retrieve |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| 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 you want to trade in units of the base currency |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, required for limit orders |
| params | object | No | extra parameters specific to the exchange API endpoint, the same as for createOrder |
| params.triggerPrice | float | No | the price at which a stop-limit order is activated, requires a limit price |
| params.cost | float | No | for market orders only, the amount to trade in units of the quote currency, overrides amount |
| params.clientOrderId | string | No | a 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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | No | not used by bit2me.cancelOrderWs |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| ids | Array<string> | Yes | order ids |
| symbol | string | No | not used by bit2me.cancelOrdersWs |
| params | object | No | extra 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
| 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.side | string | No | 'buy' or 'sell', to cancel only that side |
bit2me.cancelAllOrdersWs (symbol, params?)