## poloniexfutures{docsify-ignore} **Kind**: global class **Extends**: Exchange * [fetchMarkets](#fetchmarkets) * [fetchTicker](#fetchticker) * [fetchTickers](#fetchtickers) * [fetchL3OrderBook](#fetchl3orderbook) * [fetchTrades](#fetchtrades) * [fetchTime](#fetchtime) * [fetchOHLCV](#fetchohlcv) * [fetchBalance](#fetchbalance) * [createOrder](#createorder) * [cancelOrder](#cancelorder) * [fetchPositions](#fetchpositions) * [fetchFundingHistory](#fetchfundinghistory) * [cancelAllOrders](#cancelallorders) * [fetchOrdersByStatus](#fetchordersbystatus) * [fetchOpenOrders](#fetchopenorders) * [fetchClosedOrders](#fetchclosedorders) * [fetchOrder](#fetchorder) * [fetchFundingRate](#fetchfundingrate) * [fetchMyTrades](#fetchmytrades) * [setMarginMode](#setmarginmode) * [watchTicker](#watchticker) * [watchTrades](#watchtrades) * [watchOrderBook](#watchorderbook) * [watchOrders](#watchorders) * [watchBalance](#watchbalance) ### fetchMarkets{docsify-ignore} retrieves data on all markets for poloniexfutures **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: Array<object> - an array of objects representing market data **See**: https://api-docs.poloniex.com/futures/api/symbol | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.fetchMarkets ([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 [poloniexfutures](#poloniexfutures) **Returns**: object - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://api-docs.poloniex.com/futures/api/ticker#get-real-time-ticker-20 | 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 poloniexfutures.fetchTicker (symbol[, 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 [poloniexfutures](#poloniexfutures) **Returns**: object - a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://api-docs.poloniex.com/futures/api/ticker#get-real-time-ticker-of-all-symbols | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string>, undefined | Yes | 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 poloniexfutures.fetchTickers (symbols[, params]) ``` ### fetchL3OrderBook{docsify-ignore} fetches level 3 information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: object - an [order book structure](https://docs.ccxt.com/#/?id=order-book-structure) **See**: https://api-docs.poloniex.com/futures/api/orderbook#get-full-order-book--level-3 | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | limit | int | No | max number of orders to return, default is undefined | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.fetchL3OrderBook (symbol[, limit, params]) ``` ### fetchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades) **See**: https://api-docs.poloniex.com/futures/api/historical#transaction-history | 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 poloniexfutures.fetchTrades (symbol[, since, limit, params]) ``` ### fetchTime{docsify-ignore} fetches the current integer timestamp in milliseconds from the poloniexfutures server **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: int - the current integer timestamp in milliseconds from the poloniexfutures server **See**: https://api-docs.poloniex.com/futures/api/time#server-time | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.fetchTime ([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 [poloniexfutures](#poloniexfutures) **Returns**: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume **See**: https://api-docs.poloniex.com/futures/api/kline#get-k-line-data-of-contract | 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 poloniexfutures.fetchOHLCV (symbol, timeframe[, since, limit, 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 [poloniexfutures](#poloniexfutures) **Returns**: object - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure) **See**: https://api-docs.poloniex.com/futures/api/account#get-account-overview | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.fetchBalance ([params]) ``` ### createOrder{docsify-ignore} Create an order on the exchange **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: object - an [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://api-docs.poloniex.com/futures/api/orders#place-an-order | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | Unified CCXT market symbol | | type | string | Yes | 'limit' or 'market' | | side | string | Yes | 'buy' or 'sell' | | amount | float | Yes | the amount of currency to trade | | 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 | | params.leverage | float | No | Leverage size of the order | | params.stopPrice | float | No | The price at which a trigger order is triggered at | | params.reduceOnly | bool | No | A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true. | | params.timeInForce | string | No | GTC, GTT, IOC, or FOK, default is GTC, limit orders only | | params.postOnly | string | No | Post only flag, invalid when timeInForce is IOC or FOK | | params.clientOid | string | No | client order id, defaults to uuid if not passed | | params.remark | string | No | remark for the order, length cannot exceed 100 utf8 characters | | params.stop | string | No | 'up' or 'down', defaults to 'up' if side is sell and 'down' if side is buy, requires stopPrice | | params.stopPriceType | string | No | TP, IP or MP, defaults to TP | | params.closeOrder | bool | No | set to true to close position | | params.forceHold | bool | No | A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default. | ```javascript poloniexfutures.createOrder (symbol, type, side, amount[, price, params]) ``` ### cancelOrder{docsify-ignore} cancels an open order **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: object - An [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://api-docs.poloniex.com/futures/api/orders#cancel-an-order | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | order id | | symbol | string | Yes | unified symbol of the market the order was made in | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.cancelOrder (id, symbol[, params]) ``` ### fetchPositions{docsify-ignore} fetch all open positions **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: Array<object> - a list of [position structure](https://docs.ccxt.com/#/?id=position-structure) **See**: https://api-docs.poloniex.com/futures/api/positions#get-position-list | 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 poloniexfutures.fetchPositions (symbols[, params]) ``` ### fetchFundingHistory{docsify-ignore} fetch the history of funding payments paid and received on this account **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: object - a [funding history structure](https://docs.ccxt.com/#/?id=funding-history-structure) **See**: https://api-docs.poloniex.com/futures/api/funding-fees#get-funding-history | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | since | int | No | the earliest time in ms to fetch funding history for | | limit | int | No | the maximum number of funding history structures to retrieve | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.fetchFundingHistory (symbol[, since, limit, params]) ``` ### cancelAllOrders{docsify-ignore} cancel all open orders **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined | | params | object | No | extra parameters specific to the exchange API endpoint | | params.stop | object | No | When true, all the trigger orders will be cancelled | ```javascript poloniexfutures.cancelAllOrders (symbol[, params]) ``` ### fetchOrdersByStatus{docsify-ignore} fetches a list of orders placed on the exchange **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: An [array of order structures](https://docs.ccxt.com/#/?id=order-structure) **See** - https://api-docs.poloniex.com/futures/api/orders#get-order-listdeprecated - https://api-docs.poloniex.com/futures/api/orders#get-untriggered-stop-order-list | Param | Type | Required | Description | | --- | --- | --- | --- | | status | string | Yes | 'active' or 'closed', only 'active' is valid for stop orders | | symbol | string | Yes | unified symbol for the market to retrieve orders from | | since | int | No | timestamp in ms of the earliest order to retrieve | | limit | int | No | The maximum number of orders to retrieve | | params | object | No | exchange specific parameters | | params.stop | bool | No | set to true to retrieve untriggered stop orders | | params.until | int | No | End time in ms | | params.side | string | No | buy or sell | | params.type | string | No | limit or market | ```javascript poloniexfutures.fetchOrdersByStatus (status, symbol[, since, limit, params]) ``` ### fetchOpenOrders{docsify-ignore} fetch all unfilled currently open orders **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See** - https://api-docs.poloniex.com/futures/api/orders#get-order-listdeprecated - https://api-docs.poloniex.com/futures/api/orders#get-untriggered-stop-order-list | 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 | | params.until | int | No | end time in ms | | params.side | string | No | buy or sell | | params.type | string | No | limit, or market | ```javascript poloniexfutures.fetchOpenOrders (symbol[, since, limit, params]) ``` ### fetchClosedOrders{docsify-ignore} fetches information on multiple closed orders made by the user **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See** - https://api-docs.poloniex.com/futures/api/orders#get-order-listdeprecated - https://api-docs.poloniex.com/futures/api/orders#get-untriggered-stop-order-list | 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 | | params.until | int | No | end time in ms | | params.side | string | No | buy or sell | | params.type | string | No | limit, or market | ```javascript poloniexfutures.fetchClosedOrders (symbol[, since, limit, params]) ``` ### fetchOrder{docsify-ignore} fetches information on an order made by the user **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: object - An [order structure](https://docs.ccxt.com/#/?id=order-structure) **See** - https://api-docs.poloniex.com/futures/api/orders#get-details-of-a-single-order - https://api-docs.poloniex.com/futures/api/orders#get-single-order-by-clientoid | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | the order id | | symbol | string | Yes | unified symbol of the market the order was made in | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.fetchOrder (id, symbol[, params]) ``` ### fetchFundingRate{docsify-ignore} fetch the current funding rate **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: object - a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure) **See**: https://api-docs.poloniex.com/futures/api/futures-index#get-premium-index | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.fetchFundingRate (symbol[, params]) ``` ### fetchMyTrades{docsify-ignore} fetch all trades made by the user **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure) **See**: https://api-docs.poloniex.com/futures/api/fills#get-fillsdeprecated | 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 | | orderIdFills | string | Yes | filles for a specific order (other parameters can be ignored if specified) | | side | string | Yes | buy or sell | | type | string | Yes | limit, market, limit_stop or market_stop | | endAt | int | Yes | end time (milisecond) | ```javascript poloniexfutures.fetchMyTrades (symbol[, since, limit, params, orderIdFills, side, type, endAt]) ``` ### setMarginMode{docsify-ignore} set margin mode to 'cross' or 'isolated' **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: object - response from the exchange **See**: https://api-docs.poloniex.com/futures/api/margin-mode#change-margin-mode | Param | Type | Required | Description | | --- | --- | --- | --- | | marginMode | string | Yes | "0" (isolated) or "1" (cross) | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.setMarginMode (marginMode, symbol[, 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 [poloniexfutures](#poloniexfutures) **Returns**: object - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://api-docs.poloniex.com/futures/websocket/public#get-real-time-symbol-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 poloniexfutures.watchTicker (symbol[, params]) ``` ### watchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades) **See**: https://api-docs.poloniex.com/futures/websocket/public#full-matching-engine-datalevel-3 | 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 poloniexfutures.watchTrades (symbol[, since, limit, params]) ``` ### watchOrderBook{docsify-ignore} watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols **See**: https://api-docs.poloniex.com/futures/websocket/public#level-2-market-data | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified symbol of the market to fetch the order book for | | limit | int | No | not used by poloniexfutures watchOrderBook | | params | object | No | extra parameters specific to the exchange API endpoint | | params.method | string | No | the method to use. Defaults to /contractMarket/level2 can also be /contractMarket/level3v2 to receive the raw stream of orders | ```javascript poloniexfutures.watchOrderBook (symbol[, limit, params]) ``` ### watchOrders{docsify-ignore} watches information on multiple orders made by the user **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See**: https://api-docs.poloniex.com/futures/websocket/user-messages#private-messages | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | filter by 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 | | params.method | string | No | the method to use will default to /contractMarket/tradeOrders. Set to /contractMarket/advancedOrders to watch stop orders | ```javascript poloniexfutures.watchOrders (symbol[, since, limit, params]) ``` ### watchBalance{docsify-ignore} watch balance and get the amount of funds available for trading or funds locked in orders **Kind**: instance method of [poloniexfutures](#poloniexfutures) **Returns**: object - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure) **See**: https://api-docs.poloniex.com/futures/websocket/user-messages#account-balance-events | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript poloniexfutures.watchBalance ([params]) ```