## kucoinfutures{docsify-ignore} **Kind**: global class **Extends**: Exchange * [fetchStatus](#fetchstatus) * [fetchMarkets](#fetchmarkets) * [fetchTime](#fetchtime) * [fetchOHLCV](#fetchohlcv) * [fetchDepositAddress](#fetchdepositaddress) * [fetchOrderBook](#fetchorderbook) * [fetchTicker](#fetchticker) * [fetchTickers](#fetchtickers) * [fetchBidsAsks](#fetchbidsasks) * [fetchFundingHistory](#fetchfundinghistory) * [fetchPosition](#fetchposition) * [fetchPositions](#fetchpositions) * [fetchPositionsHistory](#fetchpositionshistory) * [createOrder](#createorder) * [createOrders](#createorders) * [cancelOrder](#cancelorder) * [cancelAllOrders](#cancelallorders) * [addMargin](#addmargin) * [fetchOrdersByStatus](#fetchordersbystatus) * [fetchClosedOrders](#fetchclosedorders) * [fetchOpenOrders](#fetchopenorders) * [fetchOrder](#fetchorder) * [fetchFundingRate](#fetchfundingrate) * [fetchBalance](#fetchbalance) * [transfer](#transfer) * [fetchMyTrades](#fetchmytrades) * [fetchTrades](#fetchtrades) * [fetchDeposits](#fetchdeposits) * [fetchWithdrawals](#fetchwithdrawals) * [fetchMarketLeverageTiers](#fetchmarketleveragetiers) * [fetchFundingRateHistory](#fetchfundingratehistory) * [closePosition](#closeposition) * [fetchTradingFee](#fetchtradingfee) * [watchTicker](#watchticker) * [watchTickers](#watchtickers) * [watchBidsAsks](#watchbidsasks) * [watchPosition](#watchposition) * [watchTrades](#watchtrades) * [watchTrades](#watchtrades) * [watchOHLCV](#watchohlcv) * [watchOrderBook](#watchorderbook) * [watchOrderBookForSymbols](#watchorderbookforsymbols) * [watchOrders](#watchorders) * [watchBalance](#watchbalance) ### fetchStatus{docsify-ignore} the latest known information on the availability of the exchange API **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [status structure](https://docs.ccxt.com/#/?id=exchange-status-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-service-status | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchStatus ([params]) ``` ### fetchMarkets{docsify-ignore} retrieves data on all markets for kucoinfutures **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - an array of objects representing market data **See**: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange api endpoint | ```javascript kucoinfutures.fetchMarkets ([params]) ``` ### fetchTime{docsify-ignore} fetches the current integer timestamp in milliseconds from the exchange server **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: int - the current integer timestamp in milliseconds from the exchange server **See**: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-server-time | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.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 [kucoinfutures](#kucoinfutures) **Returns**: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume **See**: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-klines | 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 | | params.paginate | boolean | 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 kucoinfutures.fetchOHLCV (symbol, timeframe[, since, limit, params]) ``` ### fetchDepositAddress{docsify-ignore} fetch the deposit address for a currency associated with this account **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - an [address structure](https://docs.ccxt.com/#/?id=address-structure) **See**: https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-address | Param | Type | Required | Description | | --- | --- | --- | --- | | code | string | Yes | unified currency code | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchDepositAddress (code[, params]) ``` ### fetchOrderBook{docsify-ignore} fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols **See**: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-part-order-book-level-2 | 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 kucoinfutures.fetchOrderBook (symbol[, limit, 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 [kucoinfutures](#kucoinfutures) **Returns**: object - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-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 kucoinfutures.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 [kucoinfutures](#kucoinfutures) **Returns**: object - a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list | 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 | | params.method | string | No | the method to use, futuresPublicGetAllTickers or futuresPublicGetContractsActive | ```javascript kucoinfutures.fetchTickers ([symbols, params]) ``` ### fetchBidsAsks{docsify-ignore} fetches the bid and ask price and volume for multiple markets **Kind**: instance method of [kucoinfutures](#kucoinfutures) **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 bids and asks for, all markets are returned if not assigned | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchBidsAsks ([symbols, params]) ``` ### fetchFundingHistory{docsify-ignore} fetch the history of funding payments paid and received on this account **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [funding history structure](https://docs.ccxt.com/#/?id=funding-history-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/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 kucoinfutures.fetchFundingHistory (symbol[, since, limit, params]) ``` ### fetchPosition{docsify-ignore} fetch data on an open position **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [position structure](https://docs.ccxt.com/#/?id=position-structure) **See**: https://docs.kucoin.com/futures/#get-position-details | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol of the market the position is held in | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchPosition (symbol[, params]) ``` ### fetchPositions{docsify-ignore} fetch all open positions **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - a list of [position structure](https://docs.ccxt.com/#/?id=position-structure) **See**: https://docs.kucoin.com/futures/#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 kucoinfutures.fetchPositions (symbols[, params]) ``` ### fetchPositionsHistory{docsify-ignore} fetches historical positions **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - a list of [position structure](https://docs.ccxt.com/#/?id=position-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/positions/get-positions-history | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | No | list of unified market symbols | | params | object | No | extra parameters specific to the exchange API endpoint | | params.until | int | No | closing end time | | params.pageId | int | No | page id | ```javascript kucoinfutures.fetchPositionsHistory ([symbols, params]) ``` ### createOrder{docsify-ignore} Create an order on the exchange **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - an [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.kucoin.com/futures/#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.triggerPrice | float | No | The price a trigger order is triggered at | | params.stopLossPrice | float | No | price to trigger stop-loss orders | | params.takeProfitPrice | float | No | price to trigger take-profit orders | | 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 ----------------- Exchange Specific Parameters ----------------- | | params.leverage | float | No | Leverage size of the order | | 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', the direction the stopPrice is triggered from, requires stopPrice. down: Triggers when the price reaches or goes below the stopPrice. up: Triggers when the price reaches or goes above the stopPrice. | | params.stopPriceType | string | No | TP, IP or MP, defaults to MP: Mark Price | | params.closeOrder | bool | No | set to true to close position | | params.test | bool | No | set to true to use the test order endpoint (does not submit order, use to validate params) | | 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 kucoinfutures.createOrder (symbol, type, side, amount[, price, params]) ``` ### createOrders{docsify-ignore} create a list of trade orders **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - an [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/orders/place-multiple-orders | Param | Type | Required | Description | | --- | --- | --- | --- | | orders | Array | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.createOrders (orders[, params]) ``` ### cancelOrder{docsify-ignore} cancels an open order **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - An [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-futures-order-by-orderid | 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 | | params.clientOrderId | string | No | cancel order by client order id | ```javascript kucoinfutures.cancelOrder (id, symbol[, params]) ``` ### cancelAllOrders{docsify-ignore} cancel all open orders **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Response from the exchange **See** - https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-multiple-futures-limit-orders - https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-multiple-futures-stop-orders | 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.trigger | object | No | When true, all the trigger orders will be cancelled | ```javascript kucoinfutures.cancelAllOrders (symbol[, params]) ``` ### addMargin{docsify-ignore} add margin **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [margin structure](https://docs.ccxt.com/#/?id=add-margin-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/positions/add-margin-manually | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | amount | float | Yes | amount of margin to add | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.addMargin (symbol, amount[, params]) ``` ### fetchOrdersByStatus{docsify-ignore} fetches a list of orders placed on the exchange **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: An [array of order structures](https://docs.ccxt.com/#/?id=order-structure) **See** - https://docs.kucoin.com/futures/#get-order-list - https://docs.kucoin.com/futures/#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.trigger | 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 | | params.paginate | boolean | 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 kucoinfutures.fetchOrdersByStatus (status, symbol[, since, limit, params]) ``` ### fetchClosedOrders{docsify-ignore} fetches information on multiple closed orders made by the user **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.kucoin.com/futures/#get-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 | | params.paginate | boolean | 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 kucoinfutures.fetchClosedOrders (symbol[, since, limit, params]) ``` ### fetchOpenOrders{docsify-ignore} fetches information on multiple open orders made by the user **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See** - https://docs.kucoin.com/futures/#get-order-list - https://docs.kucoin.com/futures/#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 | | params.trigger | boolean | No | set to true to retrieve untriggered stop orders | | params.paginate | boolean | 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 kucoinfutures.fetchOpenOrders (symbol[, since, limit, params]) ``` ### fetchOrder{docsify-ignore} fetches information on an order made by the user **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - An [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.kucoin.com/futures/#get-details-of-a-single-order | Param | Type | Required | Description | | --- | --- | --- | --- | | 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 kucoinfutures.fetchOrder (symbol[, params]) ``` ### fetchFundingRate{docsify-ignore} fetch the current funding rate **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [funding rate structure](https://docs.ccxt.com/#/?id=funding-rate-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchFundingRate (symbol[, 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 [kucoinfutures](#kucoinfutures) **Returns**: object - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure) **See**: https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-futures | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchBalance ([params]) ``` ### transfer{docsify-ignore} transfer currency internally between wallets on the same account **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [transfer structure](https://docs.ccxt.com/#/?id=transfer-structure) | 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 kucoinfutures.transfer (code, amount, fromAccount, toAccount[, params]) ``` ### fetchMyTrades{docsify-ignore} fetch all trades made by the user **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure) **See**: https://docs.kucoin.com/futures/#get-fills | 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 | | params.until | int | No | End time in ms | | params.paginate | boolean | 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 kucoinfutures.fetchMyTrades (symbol[, since, limit, params]) ``` ### fetchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades) **See**: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-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 kucoinfutures.fetchTrades (symbol[, since, limit, params]) ``` ### fetchDeposits{docsify-ignore} fetch all deposits made to an account **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | code | string | Yes | unified currency code | | since | int | No | the earliest time in ms to fetch deposits for | | limit | int | No | the maximum number of deposits structures to retrieve | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchDeposits (code[, since, limit, params]) ``` ### fetchWithdrawals{docsify-ignore} fetch all withdrawals made from an account **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | code | string | Yes | unified currency code | | since | int | No | the earliest time in ms to fetch withdrawals for | | limit | int | No | the maximum number of withdrawals structures to retrieve | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchWithdrawals (code[, since, limit, params]) ``` ### fetchMarketLeverageTiers{docsify-ignore} retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [leverage tiers structure](https://docs.ccxt.com/#/?id=leverage-tiers-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/risk-limit/get-futures-risk-limit-level | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchMarketLeverageTiers (symbol[, params]) ``` ### fetchFundingRateHistory{docsify-ignore} fetches historical funding rate prices **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - a list of [funding rate structures](https://docs.ccxt.com/#/?id=funding-rate-history-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-public-funding-history#request-url | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified symbol of the market to fetch the funding rate history for | | since | int | No | not used by kucuoinfutures | | limit | int | No | the maximum amount of [funding rate structures](https://docs.ccxt.com/#/?id=funding-rate-history-structure) to fetch | | params | object | No | extra parameters specific to the exchange API endpoint | | params.until | int | No | end time in ms | ```javascript kucoinfutures.fetchFundingRateHistory (symbol[, since, limit, params]) ``` ### closePosition{docsify-ignore} closes open positions for a market **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - [A list of position structures](https://docs.ccxt.com/#/?id=position-structure) **See**: https://www.kucoin.com/docs/rest/futures-trading/orders/place-order | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | Unified CCXT market symbol | | side | string | Yes | not used by kucoinfutures closePositions | | params | object | No | extra parameters specific to the okx api endpoint | | params.clientOrderId | string | No | client order id of the order | ```javascript kucoinfutures.closePosition (symbol, side[, params]) ``` ### fetchTradingFee{docsify-ignore} fetch the trading fees for a market **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [fee structure](https://docs.ccxt.com/#/?id=fee-structure) **See**: https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-futures | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.fetchTradingFee (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 [kucoinfutures](#kucoinfutures) **Returns**: object - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://www.kucoin.com/docs/websocket/futures-trading/public-channels/get-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 kucoinfutures.watchTicker (symbol[, params]) ``` ### watchTickers{docsify-ignore} watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | Yes | unified symbol of the market to fetch the ticker for | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.watchTickers (symbols[, params]) ``` ### watchBidsAsks{docsify-ignore} watches best bid & ask for symbols **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://www.kucoin.com/docs/websocket/futures-trading/public-channels/get-ticker-v2 | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | Yes | unified symbol of the market to fetch the ticker for | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.watchBidsAsks (symbols[, params]) ``` ### watchPosition{docsify-ignore} watch open positions for a specific symbol **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - a [position structure](https://docs.ccxt.com/en/latest/manual.html#position-structure) **See**: https://docs.kucoin.com/futures/#position-change-events | Param | Type | Description | | --- | --- | --- | | symbol | string, undefined | unified market symbol | | params | object | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.watchPosition (symbol, params[]) ``` ### watchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades) **See**: https://docs.kucoin.com/futures/#execution-data | 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 kucoinfutures.watchTrades (symbol[, since, limit, params]) ``` ### watchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - a list of [trade structures](https://docs.ccxt.com/#/?id=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 kucoinfutures.watchTrades (symbol[, since, limit, params]) ``` ### 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 [kucoinfutures](#kucoinfutures) **Returns**: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume **See**: https://www.kucoin.com/docs/websocket/futures-trading/public-channels/klines | 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 kucoinfutures.watchOHLCV (symbol, timeframe[, since, limit, params]) ``` ### watchOrderBook{docsify-ignore} watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data 1. After receiving the websocket Level 2 data flow, cache the data. 2. Initiate a REST request to get the snapshot data of Level 2 order book. 3. Playback the cached Level 2 data flow. 4. Apply the new Level 2 data flow to the local snapshot to ensure that the sequence of the new Level 2 update lines up with the sequence of the previous Level 2 data. Discard all the message prior to that sequence, and then playback the change to snapshot. 5. Update the level2 full data based on sequence according to the size. If the price is 0, ignore the messages and update the sequence. If the size=0, update the sequence and remove the price of which the size is 0 out of level 2. For other cases, please update the price. 6. If the sequence of the newly pushed message does not line up to the sequence of the last message, you could pull through REST Level 2 message request to get the updated messages. Please note that the difference between the start and end parameters cannot exceed 500. **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols **See**: https://docs.kucoin.com/futures/#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 | the maximum amount of order book entries to return | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.watchOrderBook (symbol[, limit, params]) ``` ### watchOrderBookForSymbols{docsify-ignore} watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols | Param | Type | Required | Description | | --- | --- | --- | --- | | symbols | Array<string> | Yes | unified array of symbols | | limit | int | No | the maximum amount of order book entries to return | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.watchOrderBookForSymbols (symbols[, limit, params]) ``` ### watchOrders{docsify-ignore} watches information on multiple orders made by the user **Kind**: instance method of [kucoinfutures](#kucoinfutures) **Returns**: Array<object> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.kucoin.com/futures/#trade-orders-according-to-the-market | 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 kucoinfutures.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 [kucoinfutures](#kucoinfutures) **Returns**: object - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure) **See**: https://docs.kucoin.com/futures/#account-balance-events | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kucoinfutures.watchBalance ([params]) ```