mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 16:28:06 +00:00
1143 lines
43 KiB
Markdown
1143 lines
43 KiB
Markdown
|
|
<a name="bitfinex" id="bitfinex"></a>
|
|
|
|
## bitfinex{docsify-ignore}
|
|
**Kind**: global class
|
|
**Extends**: <code>Exchange</code>
|
|
|
|
* [fetchStatus](#fetchstatus)
|
|
* [fetchMarkets](#fetchmarkets)
|
|
* [fetchCurrencies](#fetchcurrencies)
|
|
* [fetchBalance](#fetchbalance)
|
|
* [transfer](#transfer)
|
|
* [fetchOrderBook](#fetchorderbook)
|
|
* [fetchTickers](#fetchtickers)
|
|
* [fetchTicker](#fetchticker)
|
|
* [fetchTrades](#fetchtrades)
|
|
* [fetchOHLCV](#fetchohlcv)
|
|
* [createOrder](#createorder)
|
|
* [createOrders](#createorders)
|
|
* [cancelAllOrders](#cancelallorders)
|
|
* [cancelOrder](#cancelorder)
|
|
* [cancelOrders](#cancelorders)
|
|
* [fetchOpenOrder](#fetchopenorder)
|
|
* [fetchClosedOrder](#fetchclosedorder)
|
|
* [fetchOpenOrders](#fetchopenorders)
|
|
* [fetchClosedOrders](#fetchclosedorders)
|
|
* [fetchOrderTrades](#fetchordertrades)
|
|
* [fetchMyTrades](#fetchmytrades)
|
|
* [createDepositAddress](#createdepositaddress)
|
|
* [fetchDepositAddress](#fetchdepositaddress)
|
|
* [fetchTradingFees](#fetchtradingfees)
|
|
* [fetchDepositsWithdrawals](#fetchdepositswithdrawals)
|
|
* [withdraw](#withdraw)
|
|
* [fetchPositions](#fetchpositions)
|
|
* [fetchLedger](#fetchledger)
|
|
* [fetchFundingRates](#fetchfundingrates)
|
|
* [fetchFundingRateHistory](#fetchfundingratehistory)
|
|
* [fetchOpenInterests](#fetchopeninterests)
|
|
* [fetchOpenInterest](#fetchopeninterest)
|
|
* [fetchOpenInterestHistory](#fetchopeninteresthistory)
|
|
* [fetchLiquidations](#fetchliquidations)
|
|
* [setMargin](#setmargin)
|
|
* [fetchOrder](#fetchorder)
|
|
* [editOrder](#editorder)
|
|
* [watchOHLCV](#watchohlcv)
|
|
* [unWatchOHLCV](#unwatchohlcv)
|
|
* [watchTrades](#watchtrades)
|
|
* [unWatchTrades](#unwatchtrades)
|
|
* [watchMyTrades](#watchmytrades)
|
|
* [watchTicker](#watchticker)
|
|
* [unWatchTicker](#unwatchticker)
|
|
* [watchOrderBook](#watchorderbook)
|
|
* [watchBalance](#watchbalance)
|
|
* [watchOrders](#watchorders)
|
|
|
|
<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>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [status structure](https://docs.ccxt.com/#/?id=exchange-status-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-platform-status
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchStatus ([params])
|
|
```
|
|
|
|
|
|
<a name="fetchMarkets" id="fetchmarkets"></a>
|
|
|
|
### fetchMarkets{docsify-ignore}
|
|
retrieves data on all markets for bitfinex
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - an array of objects representing market data
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-conf
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchMarkets ([params])
|
|
```
|
|
|
|
|
|
<a name="fetchCurrencies" id="fetchcurrencies"></a>
|
|
|
|
### fetchCurrencies{docsify-ignore}
|
|
fetches all available currencies on an exchange
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an associative dictionary of currencies
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-conf
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchCurrencies ([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>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-wallets
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchBalance ([params])
|
|
```
|
|
|
|
|
|
<a name="transfer" id="transfer"></a>
|
|
|
|
### transfer{docsify-ignore}
|
|
transfer currency internally between wallets on the same account
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [transfer structure](https://docs.ccxt.com/#/?id=transfer-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-transfer
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| code | <code>string</code> | Yes | unified currency code |
|
|
| amount | <code>float</code> | Yes | amount to transfer |
|
|
| fromAccount | <code>string</code> | Yes | account to transfer from |
|
|
| toAccount | <code>string</code> | Yes | account to transfer to |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.transfer (code, amount, fromAccount, toAccount[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOrderBook" id="fetchorderbook"></a>
|
|
|
|
### fetchOrderBook{docsify-ignore}
|
|
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-book
|
|
|
|
| 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, bitfinex only allows 1, 25, or 100 |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchOrderBook (symbol[, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchTickers" id="fetchtickers"></a>
|
|
|
|
### fetchTickers{docsify-ignore}
|
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchTickers (symbols[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchTicker" id="fetchticker"></a>
|
|
|
|
### 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 [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchTicker (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchTrades" id="fetchtrades"></a>
|
|
|
|
### fetchTrades{docsify-ignore}
|
|
get the list of most recent trades for a particular symbol
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<Trade></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-trades
|
|
|
|
| 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, default 120, max 10000 |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
|
|
| params.until | <code>int</code> | No | the latest time in ms to fetch entries for |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchTrades (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOHLCV" id="fetchohlcv"></a>
|
|
|
|
### 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 [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-candles
|
|
|
|
| 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, default 100 max 10000 |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.until | <code>int</code> | No | timestamp in ms of the latest candle to fetch |
|
|
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchOHLCV (symbol, timeframe[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="createOrder" id="createorder"></a>
|
|
|
|
### createOrder{docsify-ignore}
|
|
create an order on the exchange
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-submit-order
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified CCXT market symbol |
|
|
| type | <code>string</code> | Yes | 'limit' or 'market' |
|
|
| side | <code>string</code> | Yes | 'buy' or 'sell' |
|
|
| amount | <code>float</code> | Yes | the amount of currency to trade |
|
|
| price | <code>float</code> | No | price of the order |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.triggerPrice | <code>float</code> | No | the price that triggers a trigger order |
|
|
| params.timeInForce | <code>string</code> | No | "GTC", "IOC", "FOK", or "PO" |
|
|
| params.postOnly | <code>boolean</code> | No | set to true if you want to make a post only order |
|
|
| params.reduceOnly | <code>boolean</code> | No | indicates that the order is to reduce the size of a position |
|
|
| params.flags | <code>int</code> | No | additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates) |
|
|
| params.lev | <code>int</code> | No | leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive. |
|
|
| params.price_aux_limit | <code>string</code> | No | order price for stop limit orders |
|
|
| params.price_oco_stop | <code>string</code> | No | OCO stop price |
|
|
| params.trailingAmount | <code>string</code> | No | *swap only* the quote amount to trail away from the current market price |
|
|
|
|
|
|
```javascript
|
|
bitfinex.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>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-order-multi
|
|
|
|
| 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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.createOrders (orders[, params])
|
|
```
|
|
|
|
|
|
<a name="cancelAllOrders" id="cancelallorders"></a>
|
|
|
|
### cancelAllOrders{docsify-ignore}
|
|
cancel all open orders
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.cancelAllOrders (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="cancelOrder" id="cancelorder"></a>
|
|
|
|
### cancelOrder{docsify-ignore}
|
|
cancels an open order
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - An [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-cancel-order
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| id | <code>string</code> | Yes | order id |
|
|
| symbol | <code>string</code> | Yes | Not used by bitfinex cancelOrder () |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.cancelOrder (id, symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="cancelOrders" id="cancelorders"></a>
|
|
|
|
### cancelOrders{docsify-ignore}
|
|
cancel multiple orders at the same time
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an array of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| ids | <code>Array<string></code> | Yes | order ids |
|
|
| symbol | <code>string</code> | Yes | unified market symbol, default is undefined |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.cancelOrders (ids, symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOpenOrder" id="fetchopenorder"></a>
|
|
|
|
### fetchOpenOrder{docsify-ignore}
|
|
fetch an open order by it's id
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**
|
|
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| id | <code>string</code> | Yes | order id |
|
|
| symbol | <code>string</code> | Yes | unified market symbol, default is undefined |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchOpenOrder (id, symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchClosedOrder" id="fetchclosedorder"></a>
|
|
|
|
### fetchClosedOrder{docsify-ignore}
|
|
fetch an open order by it's id
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**
|
|
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| id | <code>string</code> | Yes | order id |
|
|
| symbol | <code>string</code> | Yes | unified market symbol, default is undefined |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchClosedOrder (id, symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOpenOrders" id="fetchopenorders"></a>
|
|
|
|
### fetchOpenOrders{docsify-ignore}
|
|
fetch all unfilled currently open orders
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<Order></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**
|
|
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
|
|
|
|
| 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 orders structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchOpenOrders (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchClosedOrders" id="fetchclosedorders"></a>
|
|
|
|
### fetchClosedOrders{docsify-ignore}
|
|
fetches information on multiple closed orders made by the user
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<Order></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**
|
|
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
|
|
|
|
| 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.until | <code>int</code> | No | the latest time in ms to fetch entries for |
|
|
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchClosedOrders (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOrderTrades" id="fetchordertrades"></a>
|
|
|
|
### fetchOrderTrades{docsify-ignore}
|
|
fetch all the trades made from a single order
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-order-trades
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| id | <code>string</code> | Yes | order id |
|
|
| 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 trades to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchOrderTrades (id, symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchMyTrades" id="fetchmytrades"></a>
|
|
|
|
### fetchMyTrades{docsify-ignore}
|
|
fetch all trades made by the user
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<Trade></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
|
|
|
|
**See**
|
|
|
|
- https://docs.bitfinex.com/reference/rest-auth-trades
|
|
- https://docs.bitfinex.com/reference/rest-auth-trades-by-symbol
|
|
|
|
|
|
| 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 trades structures to retrieve |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchMyTrades (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="createDepositAddress" id="createdepositaddress"></a>
|
|
|
|
### createDepositAddress{docsify-ignore}
|
|
create a currency deposit address
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an [address structure](https://docs.ccxt.com/#/?id=address-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-deposit-address
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| code | <code>string</code> | Yes | unified currency code of the currency for the deposit address |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.createDepositAddress (code[, 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>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an [address structure](https://docs.ccxt.com/#/?id=address-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-deposit-address
|
|
|
|
| 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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchDepositAddress (code[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchTradingFees" id="fetchtradingfees"></a>
|
|
|
|
### fetchTradingFees{docsify-ignore}
|
|
fetch the trading fees for multiple markets
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a dictionary of [fee structures](https://docs.ccxt.com/#/?id=fee-structure) indexed by market symbols
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-summary
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchTradingFees ([params])
|
|
```
|
|
|
|
|
|
<a name="fetchDepositsWithdrawals" id="fetchdepositswithdrawals"></a>
|
|
|
|
### fetchDepositsWithdrawals{docsify-ignore}
|
|
fetch history of deposits and withdrawals
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a list of [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure)
|
|
|
|
**See**
|
|
|
|
- https://docs.bitfinex.com/reference/movement-info
|
|
- https://docs.bitfinex.com/reference/rest-auth-movements
|
|
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| code | <code>string</code> | No | unified currency code for the currency of the deposit/withdrawals, default is undefined |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest deposit/withdrawal, default is undefined |
|
|
| limit | <code>int</code> | No | max number of deposit/withdrawals to return, default is undefined |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchDepositsWithdrawals ([code, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="withdraw" id="withdraw"></a>
|
|
|
|
### withdraw{docsify-ignore}
|
|
make a withdrawal
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-withdraw
|
|
|
|
| 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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.withdraw (code, amount, address, tag[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchPositions" id="fetchpositions"></a>
|
|
|
|
### fetchPositions{docsify-ignore}
|
|
fetch all open positions
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - a list of [position structure](https://docs.ccxt.com/#/?id=position-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-positions
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | list of unified market symbols |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchPositions (symbols[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchLedger" id="fetchledger"></a>
|
|
|
|
### fetchLedger{docsify-ignore}
|
|
fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [ledger structure](https://docs.ccxt.com/#/?id=ledger)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-ledgers
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| code | <code>string</code> | No | 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 entries to return, default is undefined, max is 2500 |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.until | <code>int</code> | No | timestamp in ms of the latest ledger entry |
|
|
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchLedger ([code, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchFundingRates" id="fetchfundingrates"></a>
|
|
|
|
### fetchFundingRates{docsify-ignore}
|
|
fetch the current funding rate for multiple symbols
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - a list of [funding rate structures](https://docs.ccxt.com/#/?id=funding-rate-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbols | <code>Array<string></code> | Yes | list of unified market symbols |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchFundingRates (symbols[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>
|
|
|
|
### fetchFundingRateHistory{docsify-ignore}
|
|
fetches historical funding rate prices
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol |
|
|
| since | <code>int</code> | No | timestamp in ms of the earliest funding rate entry |
|
|
| limit | <code>int</code> | No | max number of funding rate entrys to return |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.until | <code>int</code> | No | timestamp in ms of the latest funding rate |
|
|
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchFundingRateHistory (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOpenInterests" id="fetchopeninterests"></a>
|
|
|
|
### fetchOpenInterests{docsify-ignore}
|
|
Retrieves the open interest for a list of symbols
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - a list of [open interest structures](https://docs.ccxt.com/#/?id=open-interest-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbols | <code>Array<string></code> | No | a list of unified CCXT market symbols |
|
|
| params | <code>object</code> | No | exchange specific parameters |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchOpenInterests ([symbols, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOpenInterest" id="fetchopeninterest"></a>
|
|
|
|
### fetchOpenInterest{docsify-ignore}
|
|
retrieves the open interest of a contract trading pair
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an [open interest structure](https://docs.ccxt.com/#/?id=open-interest-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified CCXT market symbol |
|
|
| params | <code>object</code> | No | exchange specific parameters |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchOpenInterest (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOpenInterestHistory" id="fetchopeninteresthistory"></a>
|
|
|
|
### fetchOpenInterestHistory{docsify-ignore}
|
|
retrieves the open interest history of a currency
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: An array of [open interest structures](https://docs.ccxt.com/#/?id=open-interest-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified CCXT market symbol |
|
|
| timeframe | <code>string</code> | Yes | the time period of each row of data, not used by bitfinex |
|
|
| since | <code>int</code> | No | the time in ms of the earliest record to retrieve as a unix timestamp |
|
|
| limit | <code>int</code> | No | the number of records in the response |
|
|
| params | <code>object</code> | No | exchange specific parameters |
|
|
| params.until | <code>int</code> | No | the time in ms of the latest record to retrieve as a unix timestamp |
|
|
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchOpenInterestHistory (symbol, timeframe[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="fetchLiquidations" id="fetchliquidations"></a>
|
|
|
|
### fetchLiquidations{docsify-ignore}
|
|
retrieves the public liquidations of a trading pair
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an array of [liquidation structures](https://docs.ccxt.com/#/?id=liquidation-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-public-liquidations
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified CCXT market symbol |
|
|
| since | <code>int</code> | No | the earliest time in ms to fetch liquidations for |
|
|
| limit | <code>int</code> | No | the maximum number of liquidation structures to retrieve |
|
|
| params | <code>object</code> | No | exchange specific parameters |
|
|
| params.until | <code>int</code> | No | timestamp in ms of the latest liquidation |
|
|
| params.paginate | <code>boolean</code> | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchLiquidations (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="setMargin" id="setmargin"></a>
|
|
|
|
### setMargin{docsify-ignore}
|
|
either adds or reduces margin in a swap position in order to set the margin to a specific value
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - A [margin structure](https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-deriv-pos-collateral-set
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol of the market to set margin in |
|
|
| amount | <code>float</code> | Yes | the amount to set the margin to |
|
|
| params | <code>object</code> | No | parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.setMargin (symbol, amount[, params])
|
|
```
|
|
|
|
|
|
<a name="fetchOrder" id="fetchorder"></a>
|
|
|
|
### fetchOrder{docsify-ignore}
|
|
fetches information on an order made by the user
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**
|
|
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
- https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| id | <code>string</code> | Yes | the order id |
|
|
| symbol | <code>string</code> | No | unified symbol of the market the order was made in |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.fetchOrder (id[, symbol, params])
|
|
```
|
|
|
|
|
|
<a name="editOrder" id="editorder"></a>
|
|
|
|
### editOrder{docsify-ignore}
|
|
edit a trade order
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - an [order structure](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
**See**: https://docs.bitfinex.com/reference/rest-auth-update-order
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| id | <code>string</code> | Yes | edit order id |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to edit 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 you want to trade in units of the base currency |
|
|
| price | <code>float</code> | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.triggerPrice | <code>float</code> | No | the price that triggers a trigger order |
|
|
| params.postOnly | <code>boolean</code> | No | set to true if you want to make a post only order |
|
|
| params.reduceOnly | <code>boolean</code> | No | indicates that the order is to reduce the size of a position |
|
|
| params.flags | <code>int</code> | No | additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates) |
|
|
| params.leverage | <code>int</code> | No | leverage for a derivative order, supported by derivative symbol orders only, the value should be between 1 and 100 inclusive |
|
|
| params.clientOrderId | <code>int</code> | No | a unique client order id for the order |
|
|
| params.trailingAmount | <code>float</code> | No | *swap only* the quote amount to trail away from the current market price |
|
|
|
|
|
|
```javascript
|
|
bitfinex.editOrder (id, symbol, type, side, amount[, price, params])
|
|
```
|
|
|
|
|
|
<a name="watchOHLCV" id="watchohlcv"></a>
|
|
|
|
### watchOHLCV{docsify-ignore}
|
|
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
|
|
|
|
|
|
| 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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.watchOHLCV (symbol, timeframe[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="unWatchOHLCV" id="unwatchohlcv"></a>
|
|
|
|
### unWatchOHLCV{docsify-ignore}
|
|
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>bool</code> - true if successfully unsubscribed, false otherwise
|
|
|
|
|
|
| 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 |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.unWatchOHLCV (symbol, timeframe[, params])
|
|
```
|
|
|
|
|
|
<a name="watchTrades" id="watchtrades"></a>
|
|
|
|
### watchTrades{docsify-ignore}
|
|
get the list of most recent trades for a particular symbol
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
|
|
|
|
|
|
| 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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.watchTrades (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="unWatchTrades" id="unwatchtrades"></a>
|
|
|
|
### unWatchTrades{docsify-ignore}
|
|
unWatches the list of most recent trades for a particular symbol
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
|
|
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.unWatchTrades (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="watchMyTrades" id="watchmytrades"></a>
|
|
|
|
### watchMyTrades{docsify-ignore}
|
|
watches information on multiple trades made by the user
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
|
|
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| symbol | <code>string</code> | Yes | unified market symbol of the market trades were made in |
|
|
| 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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.watchMyTrades (symbol[, since, limit, params])
|
|
```
|
|
|
|
|
|
<a name="watchTicker" id="watchticker"></a>
|
|
|
|
### 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 [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
|
|
|
|
|
| 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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.watchTicker (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="unWatchTicker" id="unwatchticker"></a>
|
|
|
|
### unWatchTicker{docsify-ignore}
|
|
unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure)
|
|
|
|
|
|
| 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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.unWatchTicker (symbol[, params])
|
|
```
|
|
|
|
|
|
<a name="watchOrderBook" id="watchorderbook"></a>
|
|
|
|
### watchOrderBook{docsify-ignore}
|
|
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
|
|
|
|
|
|
| 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 |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
|
|
|
|
```javascript
|
|
bitfinex.watchOrderBook (symbol[, limit, params])
|
|
```
|
|
|
|
|
|
<a name="watchBalance" id="watchbalance"></a>
|
|
|
|
### watchBalance{docsify-ignore}
|
|
watch balance and get the amount of funds available for trading or funds locked in orders
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>object</code> - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
|
|
|
|
|
|
| Param | Type | Required | Description |
|
|
| --- | --- | --- | --- |
|
|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
|
|
| params.type | <code>str</code> | No | spot or contract if not provided this.options['defaultType'] is used |
|
|
|
|
|
|
```javascript
|
|
bitfinex.watchBalance ([params])
|
|
```
|
|
|
|
|
|
<a name="watchOrders" id="watchorders"></a>
|
|
|
|
### watchOrders{docsify-ignore}
|
|
watches information on multiple orders made by the user
|
|
|
|
**Kind**: instance method of [<code>bitfinex</code>](#bitfinex)
|
|
**Returns**: <code>Array<object></code> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
|
|
|
|
|
|
| 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 |
|
|
|
|
|
|
```javascript
|
|
bitfinex.watchOrders (symbol[, since, limit, params])
|
|
```
|
|
|