## bitfinex{docsify-ignore} **Kind**: global class **Extends**: Exchange * [fetchTransactionFees](#fetchtransactionfees) * [fetchDepositWithdrawFees](#fetchdepositwithdrawfees) * [fetchTradingFees](#fetchtradingfees) * [fetchMarkets](#fetchmarkets) * [fetchBalance](#fetchbalance) * [transfer](#transfer) * [fetchOrderBook](#fetchorderbook) * [fetchTickers](#fetchtickers) * [fetchTicker](#fetchticker) * [fetchTrades](#fetchtrades) * [fetchMyTrades](#fetchmytrades) * [createOrder](#createorder) * [cancelOrder](#cancelorder) * [cancelAllOrders](#cancelallorders) * [fetchOpenOrders](#fetchopenorders) * [fetchClosedOrders](#fetchclosedorders) * [fetchOrder](#fetchorder) * [fetchOHLCV](#fetchohlcv) * [createDepositAddress](#createdepositaddress) * [fetchDepositAddress](#fetchdepositaddress) * [fetchDepositsWithdrawals](#fetchdepositswithdrawals) * [withdraw](#withdraw) * [fetchPositions](#fetchpositions) * [watchTrades](#watchtrades) * [watchTicker](#watchticker) * [watchOrderBook](#watchorderbook) * [watchOrders](#watchorders) ### fetchTransactionFees{docsify-ignore} `DEPRECATED` please use fetchDepositWithdrawFees instead **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<object> - a list of [fees structures](https://docs.ccxt.com/#/?id=fee-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-fees | 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 | ```javascript bitfinex.fetchTransactionFees (codes[, params]) ``` ### fetchDepositWithdrawFees{docsify-ignore} fetch deposit and withdraw fees **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<object> - a list of [fees structures](https://docs.ccxt.com/#/?id=fee-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-fees | 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 | ```javascript bitfinex.fetchDepositWithdrawFees (codes[, params]) ``` ### fetchTradingFees{docsify-ignore} fetch the trading fees for multiple markets **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - a dictionary of [fee structures](https://docs.ccxt.com/#/?id=fee-structure) indexed by market symbols **See**: https://docs.bitfinex.com/v1/reference/rest-auth-summary | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.fetchTradingFees ([params]) ``` ### fetchMarkets{docsify-ignore} retrieves data on all markets for bitfinex **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<object> - an array of objects representing market data **See** - https://docs.bitfinex.com/v1/reference/rest-public-symbols - https://docs.bitfinex.com/v1/reference/rest-public-symbol-details | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.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 [bitfinex](#bitfinex) **Returns**: object - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-wallet-balances | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.fetchBalance ([params]) ``` ### transfer{docsify-ignore} transfer currency internally between wallets on the same account **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - a [transfer structure](https://docs.ccxt.com/#/?id=transfer-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-transfer-between-wallets | 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 | ```javascript bitfinex.transfer (code, amount, fromAccount, toAccount[, params]) ``` ### fetchOrderBook{docsify-ignore} fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols **See**: https://docs.bitfinex.com/v1/reference/rest-public-orderbook | 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 | ```javascript bitfinex.fetchOrderBook (symbol[, limit, 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 [bitfinex](#bitfinex) **Returns**: object - a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure) | 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 | ```javascript bitfinex.fetchTickers ([symbols, 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 [bitfinex](#bitfinex) **Returns**: object - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-public-ticker | 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 | ```javascript bitfinex.fetchTicker (symbol[, params]) ``` ### fetchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades) **See**: https://docs.bitfinex.com/v1/reference/rest-public-trades | 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 | ```javascript bitfinex.fetchTrades (symbol[, since, limit, params]) ``` ### fetchMyTrades{docsify-ignore} fetch all trades made by the user **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-past-trades | 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 | ```javascript bitfinex.fetchMyTrades (symbol[, since, limit, params]) ``` ### createOrder{docsify-ignore} create a trade order **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - an [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-new-order | 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 | ```javascript bitfinex.createOrder (symbol, type, side, amount[, price, params]) ``` ### cancelOrder{docsify-ignore} cancels an open order **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - An [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-cancel-order | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | order id | | symbol | string | Yes | not used by bitfinex cancelOrder () | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.cancelOrder (id, symbol[, params]) ``` ### cancelAllOrders{docsify-ignore} cancel all open orders **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - response from exchange **See**: https://docs.bitfinex.com/v1/reference/rest-auth-cancel-all-orders | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | not used by bitfinex cancelAllOrders | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.cancelAllOrders (symbol[, params]) ``` ### fetchOpenOrders{docsify-ignore} fetch all unfilled currently open orders **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-active-orders | 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 orders structures to retrieve | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.fetchOpenOrders (symbol[, since, limit, params]) ``` ### fetchClosedOrders{docsify-ignore} fetches information on multiple closed orders made by the user **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-orders-history | 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 | ```javascript bitfinex.fetchClosedOrders (symbol[, since, limit, params]) ``` ### fetchOrder{docsify-ignore} fetches information on an order made by the user **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - An [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-order-status | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | the order id | | symbol | string | Yes | not used by bitfinex fetchOrder | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.fetchOrder (id, 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 [bitfinex](#bitfinex) **Returns**: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume **See**: https://docs.bitfinex.com/reference/rest-public-candles#aggregate-funding-currency-candles | 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 | ```javascript bitfinex.fetchOHLCV (symbol, timeframe[, since, limit, params]) ``` ### createDepositAddress{docsify-ignore} create a currency deposit address **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - an [address structure](https://docs.ccxt.com/#/?id=address-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-deposit | Param | Type | Required | Description | | --- | --- | --- | --- | | code | string | Yes | unified currency code of the currency for the deposit address | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.createDepositAddress (code[, params]) ``` ### fetchDepositAddress{docsify-ignore} fetch the deposit address for a currency associated with this account **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - an [address structure](https://docs.ccxt.com/#/?id=address-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-deposit | Param | Type | Required | Description | | --- | --- | --- | --- | | code | string | Yes | unified currency code | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.fetchDepositAddress (code[, params]) ``` ### fetchDepositsWithdrawals{docsify-ignore} fetch history of deposits and withdrawals **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - a list of [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-deposit-withdrawal-history | Param | Type | Required | Description | | --- | --- | --- | --- | | code | string | Yes | unified currency code for the currency of the deposit/withdrawals | | since | int | No | timestamp in ms of the earliest deposit/withdrawal, default is undefined | | limit | int | No | max number of deposit/withdrawals to return, default is undefined | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.fetchDepositsWithdrawals (code[, since, limit, params]) ``` ### withdraw{docsify-ignore} make a withdrawal **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-withdrawal | 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 | ```javascript bitfinex.withdraw (code, amount, address, tag[, params]) ``` ### fetchPositions{docsify-ignore} fetch all open positions **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<object> - a list of [position structure](https://docs.ccxt.com/#/?id=position-structure) **See**: https://docs.bitfinex.com/v1/reference/rest-auth-active-positions | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string>, undefined | Yes | list of unified market symbols | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript bitfinex.fetchPositions (symbols[, params]) ``` ### watchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades) **See**: https://docs.bitfinex.com/v1/reference/ws-public-trades | 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 | ```javascript bitfinex.watchTrades (symbol[, since, limit, params]) ``` ### watchTicker{docsify-ignore} watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://docs.bitfinex.com/v1/reference/ws-public-ticker | 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 | ```javascript bitfinex.watchTicker (symbol[, params]) ``` ### watchOrderBook{docsify-ignore} watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols **See**: https://docs.bitfinex.com/v1/reference/ws-public-order-books | 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 | ```javascript bitfinex.watchOrderBook (symbol[, limit, params]) ``` ### watchOrders{docsify-ignore} watches information on multiple orders made by the user **Kind**: instance method of [bitfinex](#bitfinex) **Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See** - https://docs.bitfinex.com/v1/reference/ws-auth-order-updates - https://docs.bitfinex.com/v1/reference/ws-auth-order-snapshots | 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 | ```javascript bitfinex.watchOrders (symbol[, since, limit, params]) ```