Back to Ccxt

Foxbit

wiki/exchanges/foxbit.md

4.5.5222.3 KB
Original Source

<a name="foxbit" id="foxbit"></a>

foxbit{docsify-ignore}

Kind: global class
Extends: <code>Exchange</code>

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchMarkets ([params])

<a name="fetchTicker" id="fetchticker"></a>

fetchTicker{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchTicker (symbol[, params])

<a name="fetchTickers" id="fetchtickers"></a>

fetchTickers{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yesunified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchTickers (symbols[, params])

<a name="fetchTradingFees" id="fetchtradingfees"></a>

fetchTradingFees{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchTradingFees ([params])

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return, the maximum is 100
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchOrderBook (symbol[, limit, params])

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchTrades (symbol[, since, limit, params])

<a name="fetchOHLCV" id="fetchohlcv"></a>

fetchOHLCV{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchOHLCV (symbol, timeframe[, since, limit, params])

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchBalance ([params])

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>Nothe maximum number of open order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchOpenOrders (symbol[, since, limit, params])

<a name="fetchClosedOrders" id="fetchclosedorders"></a>

fetchClosedOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchClosedOrders (symbol[, since, limit, params])

<a name="createOrder" id="createorder"></a>

createOrder{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified 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>Yeshow much you want to trade in units of the base currency
price<code>float</code>Nothe price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.timeInForce<code>string</code>No"GTC", "FOK", "IOC", "PO"
params.triggerPrice<code>float</code>NoThe 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>Notrue or false whether the order is post-only
params.clientOrderId<code>string</code>Noa unique identifier for the order
javascript
foxbit.createOrder (symbol, type, side, amount[, price, params])

<a name="createOrders" id="createorders"></a>

createOrders{docsify-ignore}

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

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist 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>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.createOrders (orders[, params])

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder{docsify-ignore}

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

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.cancelOrder (id, symbol[, params])

<a name="cancelAllOrders" id="cancelallorders"></a>

cancelAllOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market to cancel orders in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.cancelAllOrders (symbol[, params])

<a name="fetchOrder" id="fetchorder"></a>

fetchOrder{docsify-ignore}

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

ParamTypeRequiredDescription
idYes
symbol<code>string</code>Yesit is not used in the foxbit API
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchOrder (id, symbol[, params])

<a name="fetchOrders" id="fetchorders"></a>

fetchOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.state<code>string</code>NoEnum: ACTIVE, CANCELED, FILLED, PARTIALLY_CANCELED, PARTIALLY_FILLED
params.side<code>string</code>NoEnum: BUY, SELL
javascript
foxbit.fetchOrders (symbol[, since, limit, params])

<a name="fetchMyTrades" id="fetchmytrades"></a>

fetchMyTrades{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trade structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchMyTrades (symbol[, since, limit, params])

<a name="fetchDepositAddress" id="fetchdepositaddress"></a>

fetchDepositAddress{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.networkCode<code>string</code>Nothe blockchain network to create a deposit address on
javascript
foxbit.fetchDepositAddress (code[, params])

<a name="fetchDeposits" id="fetchdeposits"></a>

fetchDeposits{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposit structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchDeposits ([code, since, limit, params])

<a name="fetchWithdrawals" id="fetchwithdrawals"></a>

fetchWithdrawals{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawal structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchWithdrawals ([code, since, limit, params])

<a name="fetchTransactions" id="fetchtransactions"></a>

fetchTransactions{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawal structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchTransactions ([code, since, limit, params])

<a name="fetchStatus" id="fetchstatus"></a>

fetchStatus{docsify-ignore}

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/

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchStatus ([params])

<a name="editOrder" id="editorder"></a>

editOrder{docsify-ignore}

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

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified 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>Yeshow much of the currency you want to trade in units of the base currency
price<code>float</code>Nothe 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>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.editOrder (id, symbol, type, side, amount[, price, params])

<a name="withdraw" id="withdraw"></a>

withdraw{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.withdraw (code, amount, address, tag[, params])

<a name="fetchLedger" id="fetchledger"></a>

fetchLedger{docsify-ignore}

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code, default is undefined
since<code>int</code>Notimestamp in ms of the earliest ledger entry, default is undefined
limit<code>int</code>Nomax number of ledger entrys to return, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
foxbit.fetchLedger (code[, since, limit, params])