wiki/exchanges/foxbit.md
<a name="foxbit" id="foxbit"></a>
Kind: global class
Extends: <code>Exchange</code>
<a name="fetchMarkets" id="fetchmarkets"></a>
Retrieves data on all markets for foxbit.
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<object></code> - an array of objects representing market data
See: https://docs.foxbit.com.br/rest/v3/#tag/Market-Data/operation/MarketsController_index
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchMarkets ([params])
<a name="fetchTicker" id="fetchticker"></a>
Get last 24 hours ticker information, in real-time, for given market.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - a ticker structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Market-Data/operation/MarketsController_ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchTicker (symbol[, params])
<a name="fetchTickers" id="fetchtickers"></a>
Retrieve the ticker data of all markets.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - a dictionary of ticker structures
See: https://docs.foxbit.com.br/rest/v3/#tag/Market-Data/operation/MarketsController_tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchTickers (symbols[, params])
<a name="fetchTradingFees" id="fetchtradingfees"></a>
fetch the trading fees for multiple markets
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - a dictionary of fee structures indexed by market symbols
See: https://docs.foxbit.com.br/rest/v3/#tag/Member-Info/operation/MembersController_listTradingFees
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchTradingFees ([params])
<a name="fetchOrderBook" id="fetchorderbook"></a>
Exports a copy of the order book of a specific market.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See: https://docs.foxbit.com.br/rest/v3/#tag/Market-Data/operation/MarketsController_findOrderbook
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| limit | <code>int</code> | No | the maximum amount of order book entries to return, the maximum is 100 |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchOrderBook (symbol[, limit, params])
<a name="fetchTrades" id="fetchtrades"></a>
Retrieve the trades of a specific market.
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<Trade></code> - a list of trade structures
See: https://docs.foxbit.com.br/rest/v3/#tag/Market-Data/operation/MarketsController_publicTrades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
| limit | <code>int</code> | No | the maximum amount of trades to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchTrades (symbol[, since, limit, params])
<a name="fetchOHLCV" id="fetchohlcv"></a>
Fetch historical candlestick data containing the open, high, low, and close price, and the volume of a market.
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://docs.foxbit.com.br/rest/v3/#tag/Market-Data/operation/MarketsController_findCandlesticks
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchOHLCV (symbol, timeframe[, since, limit, params])
<a name="fetchBalance" id="fetchbalance"></a>
Query for balance and get the amount of funds available for trading or funds locked in orders.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - a balance structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Account/operation/AccountsController_all
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchBalance ([params])
<a name="fetchOpenOrders" id="fetchopenorders"></a>
Fetch all unfilled currently open orders.
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<Order></code> - a list of order structures
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_listOrders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch open orders for |
| limit | <code>int</code> | No | the maximum number of open order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchOpenOrders (symbol[, since, limit, params])
<a name="fetchClosedOrders" id="fetchclosedorders"></a>
Fetch all currently closed orders.
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<Order></code> - a list of order structures
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_listOrders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchClosedOrders (symbol[, since, limit, params])
<a name="createOrder" id="createorder"></a>
Create an order with the specified characteristics
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - an order structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_create
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| type | <code>string</code> | Yes | 'market', 'limit', 'stop_market', 'stop_limit', 'instant' |
| side | <code>string</code> | Yes | 'buy' or 'sell' |
| amount | <code>float</code> | Yes | how much you want to trade in units of the base currency |
| price | <code>float</code> | No | the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.timeInForce | <code>string</code> | No | "GTC", "FOK", "IOC", "PO" |
| params.triggerPrice | <code>float</code> | No | The time in force for the order. One of GTC, FOK, IOC, PO. See .features or foxbit's doc to see more details. |
| params.postOnly | <code>bool</code> | No | true or false whether the order is post-only |
| params.clientOrderId | <code>string</code> | No | a unique identifier for the order |
foxbit.createOrder (symbol, type, side, amount[, price, params])
<a name="createOrders" id="createorders"></a>
create a list of trade orders
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - an order structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/createBatch
| Param | Type | Required | Description |
|---|---|---|---|
| orders | <code>Array</code> | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.createOrders (orders[, params])
<a name="cancelOrder" id="cancelorder"></a>
Cancel open orders.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - an order structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_cancel
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.cancelOrder (id, symbol[, params])
<a name="cancelAllOrders" id="cancelallorders"></a>
Cancel all open orders or all open orders for a specific market.
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_cancel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market to cancel orders in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.cancelAllOrders (symbol[, params])
<a name="fetchOrder" id="fetchorder"></a>
Get an order by ID.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - An order structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_findByOrderId
| Param | Type | Required | Description |
|---|---|---|---|
| id | Yes | ||
| symbol | <code>string</code> | Yes | it is not used in the foxbit API |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchOrder (id, symbol[, params])
<a name="fetchOrders" id="fetchorders"></a>
fetches information on multiple orders made by the user
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<Order></code> - a list of order structures
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_listOrders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.state | <code>string</code> | No | Enum: ACTIVE, CANCELED, FILLED, PARTIALLY_CANCELED, PARTIALLY_FILLED |
| params.side | <code>string</code> | No | Enum: BUY, SELL |
foxbit.fetchOrders (symbol[, since, limit, params])
<a name="fetchMyTrades" id="fetchmytrades"></a>
Trade history queries will only have data available for the last 3 months, in descending order (most recents trades first).
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<Trade></code> - a list of trade structures
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/TradesController_all
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
| limit | <code>int</code> | No | the maximum number of trade structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchMyTrades (symbol[, since, limit, params])
<a name="fetchDepositAddress" id="fetchdepositaddress"></a>
Fetch the deposit address for a currency associated with this account.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - an address structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Deposit/operation/DepositsController_depositAddress
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.networkCode | <code>string</code> | No | the blockchain network to create a deposit address on |
foxbit.fetchDepositAddress (code[, params])
<a name="fetchDeposits" id="fetchdeposits"></a>
Fetch all deposits made to an account.
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<object></code> - a list of transaction structures
See: https://docs.foxbit.com.br/rest/v3/#tag/Deposit/operation/DepositsController_listOrders
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | No | unified currency code |
| since | <code>int</code> | No | the earliest time in ms to fetch deposits for |
| limit | <code>int</code> | No | the maximum number of deposit structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchDeposits ([code, since, limit, params])
<a name="fetchWithdrawals" id="fetchwithdrawals"></a>
Fetch all withdrawals made from an account.
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<object></code> - a list of transaction structures
See: https://docs.foxbit.com.br/rest/v3/#tag/Withdrawal/operation/WithdrawalsController_listWithdrawals
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | No | unified currency code |
| since | <code>int</code> | No | the earliest time in ms to fetch withdrawals for |
| limit | <code>int</code> | No | the maximum number of withdrawal structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchWithdrawals ([code, since, limit, params])
<a name="fetchTransactions" id="fetchtransactions"></a>
Fetch all transactions (deposits and withdrawals) made from an account.
Kind: instance method of <code>foxbit</code>
Returns: <code>Array<object></code> - a list of transaction structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | No | unified currency code |
| since | <code>int</code> | No | the earliest time in ms to fetch withdrawals for |
| limit | <code>int</code> | No | the maximum number of withdrawal structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchTransactions ([code, since, limit, params])
<a name="fetchStatus" id="fetchstatus"></a>
The latest known information on the availability of the exchange API.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - a status structure
See: https://status.foxbit.com/
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchStatus ([params])
<a name="editOrder" id="editorder"></a>
Simultaneously cancel an existing order and create a new one.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - an order structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_cancelReplace
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| type | <code>string</code> | Yes | 'market' or 'limit' |
| side | <code>string</code> | Yes | 'buy' or 'sell' |
| amount | <code>float</code> | Yes | how much of the currency you want to trade in units of the base currency |
| price | <code>float</code> | No | the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders, used as stop_price on stop market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.editOrder (id, symbol, type, side, amount[, price, params])
<a name="withdraw" id="withdraw"></a>
Make a withdrawal.
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - a transaction structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Withdrawal/operation/WithdrawalsController_createWithdrawal
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| amount | <code>float</code> | Yes | the amount to withdraw |
| address | <code>string</code> | Yes | the address to withdraw to |
| tag | <code>string</code> | Yes | |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.withdraw (code, amount, address, tag[, params])
<a name="fetchLedger" id="fetchledger"></a>
fetch the history of changes, actions done by the user or operations that altered balance of the user
Kind: instance method of <code>foxbit</code>
Returns: <code>object</code> - a ledger structure
See: https://docs.foxbit.com.br/rest/v3/#tag/Account/operation/AccountsController_getTransactions
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code, default is undefined |
| since | <code>int</code> | No | timestamp in ms of the earliest ledger entry, default is undefined |
| limit | <code>int</code> | No | max number of ledger entrys to return, default is undefined |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
foxbit.fetchLedger (code[, since, limit, params])