wiki/exchanges/kucoinfutures.md
<a name="kucoinfutures" id="kucoinfutures"></a>
Kind: global class
Extends: <code>Exchange</code>
<a name="fetchStatus" id="fetchstatus"></a>
the latest known information on the availability of the exchange API
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a status structure
See: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-service-status
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchStatus ([params])
<a name="fetchMarkets" id="fetchmarkets"></a>
retrieves data on all markets for kucoinfutures
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - 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 | <code>object</code> | No | extra parameters specific to the exchange api endpoint |
kucoinfutures.fetchMarkets ([params])
<a name="fetchTime" id="fetchtime"></a>
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>int</code> - 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 | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchTime ([params])
<a name="fetchOHLCV" id="fetchohlcv"></a>
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<Array<int>></code> - 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 | <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 |
| 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 |
kucoinfutures.fetchOHLCV (symbol, timeframe[, since, limit, params])
<a name="fetchDepositAddress" id="fetchdepositaddress"></a>
fetch the deposit address for a currency associated with this account
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - an address structure
See: https://www.kucoin.com/docs/rest/funding/deposit/get-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 |
kucoinfutures.fetchDepositAddress (code[, params])
<a name="fetchOrderBook" id="fetchorderbook"></a>
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - A dictionary of order book structures 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 | <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 |
kucoinfutures.fetchOrderBook (symbol[, limit, params])
<a name="fetchTicker" id="fetchticker"></a>
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>kucoinfutures</code>
Returns: <code>object</code> - a ticker structure
See: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-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 |
kucoinfutures.fetchTicker (symbol[, params])
<a name="fetchMarkPrice" id="fetchmarkprice"></a>
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>kucoinfutures</code>
Returns: <code>object</code> - a ticker structure
See: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-current-mark-price
| 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 |
kucoinfutures.fetchMarkPrice (symbol[, params])
<a name="fetchTickers" id="fetchtickers"></a>
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a dictionary of ticker structures
See: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | 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 |
| params.method | <code>string</code> | No | the method to use, futuresPublicGetAllTickers or futuresPublicGetContractsActive |
kucoinfutures.fetchTickers ([symbols, params])
<a name="fetchBidsAsks" id="fetchbidsasks"></a>
fetches the bid and ask price and volume for multiple markets
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a dictionary of ticker structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchBidsAsks ([symbols, params])
<a name="fetchFundingHistory" id="fetchfundinghistory"></a>
fetch the history of funding payments paid and received on this account
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a funding history structure
See: https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-funding-history
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch funding history for |
| limit | <code>int</code> | No | the maximum number of funding history structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchFundingHistory (symbol[, since, limit, params])
<a name="fetchPosition" id="fetchposition"></a>
fetch data on an open position
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a position structure
See: https://docs.kucoin.com/futures/#get-position-details
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market the position is held in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchPosition (symbol[, params])
<a name="fetchPositions" id="fetchpositions"></a>
fetch all open positions
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of position structure
See: https://docs.kucoin.com/futures/#get-position-list
| 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 |
kucoinfutures.fetchPositions (symbols[, params])
<a name="fetchPositionsHistory" id="fetchpositionshistory"></a>
fetches historical positions
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of position structure
See: https://www.kucoin.com/docs/rest/futures-trading/positions/get-positions-history
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | list of unified market symbols |
| since | <code>int</code> | No | the earliest time in ms to fetch position history for |
| limit | <code>int</code> | No | the maximum number of entries to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | closing end time |
| params.pageId | <code>int</code> | No | page id |
kucoinfutures.fetchPositionsHistory ([symbols, since, limit, params])
<a name="createOrder" id="createorder"></a>
Create an order on the exchange
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - an order structure
See
| 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 | 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.takeProfit | <code>object</code> | No | takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType |
| params.stopLoss | <code>object</code> | No | stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType |
| params.triggerPrice | <code>float</code> | No | The price a trigger order is triggered at |
| params.stopLossPrice | <code>float</code> | No | price to trigger stop-loss orders |
| params.takeProfitPrice | <code>float</code> | No | price to trigger take-profit orders |
| params.reduceOnly | <code>bool</code> | 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 | <code>string</code> | No | GTC, GTT, IOC, or FOK, default is GTC, limit orders only |
| params.postOnly | <code>string</code> | No | Post only flag, invalid when timeInForce is IOC or FOK |
| params.cost | <code>float</code> | No | the cost of the order in units of USDT |
| params.marginMode | <code>string</code> | No | 'cross' or 'isolated', default is 'isolated' |
| params.hedged | <code>bool</code> | No | swap and future only true for hedged mode, false for one way mode, default is false ----------------- Exchange Specific Parameters ----------------- |
| params.leverage | <code>float</code> | No | Leverage size of the order (mandatory param in request, default is 1) |
| params.clientOid | <code>string</code> | No | client order id, defaults to uuid if not passed |
| params.remark | <code>string</code> | No | remark for the order, length cannot exceed 100 utf8 characters |
| params.stop | <code>string</code> | No | 'up' or 'down', the direction the triggerPrice is triggered from, requires triggerPrice. down: Triggers when the price reaches or goes below the triggerPrice. up: Triggers when the price reaches or goes above the triggerPrice. |
| params.triggerPriceType | <code>string</code> | No | "last", "mark", "index" - defaults to "mark" |
| params.stopPriceType | <code>string</code> | No | exchange-specific alternative for triggerPriceType: TP, IP or MP |
| params.closeOrder | <code>bool</code> | No | set to true to close position |
| params.test | <code>bool</code> | No | set to true to use the test order endpoint (does not submit order, use to validate params) |
| params.forceHold | <code>bool</code> | 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.\ |
| params.positionSide | <code>string</code> | No | swap and future only hedged two-way position side, LONG or SHORT |
kucoinfutures.createOrder (symbol, type, side, amount[, price, params])
<a name="createOrders" id="createorders"></a>
create a list of trade orders
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - an order structure
See: https://www.kucoin.com/docs/rest/futures-trading/orders/place-multiple-orders
| 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 |
kucoinfutures.createOrders (orders[, params])
<a name="cancelOrder" id="cancelorder"></a>
cancels an open order
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - An order structure
See: https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-futures-order-by-orderid
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | <code>string</code> | No | cancel order by client order id |
kucoinfutures.cancelOrder (id, symbol[, params])
<a name="cancelOrders" id="cancelorders"></a>
cancel multiple orders
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - an list of order structures
See: https://www.kucoin.com/docs/rest/futures-trading/orders/batch-cancel-orders
| Param | Type | Required | Description |
|---|---|---|---|
| ids | <code>Array<string></code> | Yes | order ids |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderIds | <code>Array<string></code> | No | client order ids |
kucoinfutures.cancelOrders (ids, symbol[, params])
<a name="cancelAllOrders" id="cancelallorders"></a>
cancel all open orders
Kind: instance method of <code>kucoinfutures</code>
Returns: Response from the exchange
See
| 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 |
| params.trigger | <code>object</code> | No | When true, all the trigger orders will be cancelled |
kucoinfutures.cancelAllOrders (symbol[, params])
<a name="addMargin" id="addmargin"></a>
add margin
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a margin structure
See: https://www.kucoin.com/docs/rest/futures-trading/positions/add-margin-manually
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| amount | <code>float</code> | Yes | amount of margin to add |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.addMargin (symbol, amount[, params])
<a name="fetchOrdersByStatus" id="fetchordersbystatus"></a>
fetches a list of orders placed on the exchange
Kind: instance method of <code>kucoinfutures</code>
Returns: An array of order structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| status | <code>string</code> | Yes | 'active' or 'closed', only 'active' is valid for stop orders |
| symbol | <code>string</code> | Yes | unified symbol for the market to retrieve orders from |
| since | <code>int</code> | No | timestamp in ms of the earliest order to retrieve |
| limit | <code>int</code> | No | The maximum number of orders to retrieve |
| params | <code>object</code> | No | exchange specific parameters |
| params.trigger | <code>bool</code> | No | set to true to retrieve untriggered stop orders |
| params.until | <code>int</code> | No | End time in ms |
| params.side | <code>string</code> | No | buy or sell |
| params.type | <code>string</code> | No | limit or market |
| 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 |
kucoinfutures.fetchOrdersByStatus (status, symbol[, since, limit, params])
<a name="fetchClosedOrders" id="fetchclosedorders"></a>
fetches information on multiple closed orders made by the user
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<Order></code> - a list of order structures
See: https://docs.kucoin.com/futures/#get-order-list
| 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 | end time in ms |
| params.side | <code>string</code> | No | buy or sell |
| params.type | <code>string</code> | No | limit, or market |
| 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 |
kucoinfutures.fetchClosedOrders (symbol[, since, limit, params])
<a name="fetchOpenOrders" id="fetchopenorders"></a>
fetches information on multiple open orders made by the user
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<Order></code> - a list of order structures
See
| 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 | end time in ms |
| params.side | <code>string</code> | No | buy or sell |
| params.type | <code>string</code> | No | limit, or market |
| params.trigger | <code>boolean</code> | No | set to true to retrieve untriggered stop orders |
| 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 |
kucoinfutures.fetchOpenOrders (symbol[, since, limit, params])
<a name="fetchOrder" id="fetchorder"></a>
fetches information on an order made by the user
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - An order structure
See: https://docs.kucoin.com/futures/#get-details-of-a-single-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchOrder (id, symbol[, params])
<a name="fetchFundingRate" id="fetchfundingrate"></a>
fetch the current funding rate
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a funding rate structure
See: https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchFundingRate (symbol[, params])
<a name="fetchFundingInterval" id="fetchfundinginterval"></a>
fetch the current funding rate interval
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a funding rate structure
See: https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchFundingInterval (symbol[, params])
<a name="fetchBalance" id="fetchbalance"></a>
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a balance structure
See: https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-futures
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.code | <code>object</code> | No | the unified currency code to fetch the balance for, if not provided, the default .options['fetchBalance']['code'] will be used |
kucoinfutures.fetchBalance ([params])
<a name="transfer" id="transfer"></a>
transfer currency internally between wallets on the same account
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a transfer structure
See
| 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 |
kucoinfutures.transfer (code, amount, fromAccount, toAccount[, params])
<a name="fetchMyTrades" id="fetchmytrades"></a>
fetch all trades made by the user
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<Trade></code> - a list of trade structures
See: https://docs.kucoin.com/futures/#get-fills
| 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 |
| params.until | <code>int</code> | No | End time in ms |
| 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 |
kucoinfutures.fetchMyTrades (symbol[, since, limit, params])
<a name="fetchTrades" id="fetchtrades"></a>
get the list of most recent trades for a particular symbol
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<Trade></code> - a list of trade structures
See: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-transaction-history
| 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 |
kucoinfutures.fetchTrades (symbol[, since, limit, params])
<a name="fetchDeposits" id="fetchdeposits"></a>
fetch all deposits made to an account
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of transaction structures
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| since | <code>int</code> | No | the earliest time in ms to fetch deposits for |
| limit | <code>int</code> | No | the maximum number of deposits structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchDeposits (code[, since, limit, params])
<a name="fetchWithdrawals" id="fetchwithdrawals"></a>
fetch all withdrawals made from an account
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of transaction structures
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| since | <code>int</code> | No | the earliest time in ms to fetch withdrawals for |
| limit | <code>int</code> | No | the maximum number of withdrawals structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchWithdrawals (code[, since, limit, params])
<a name="fetchMarketLeverageTiers" id="fetchmarketleveragetiers"></a>
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a leverage tiers structure
See: https://www.kucoin.com/docs/rest/futures-trading/risk-limit/get-futures-risk-limit-level
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchMarketLeverageTiers (symbol[, params])
<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>
fetches historical funding rate prices
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of funding rate structures
See: https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-public-funding-history#request-url
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the funding rate history for |
| since | <code>int</code> | No | not used by kucuoinfutures |
| limit | <code>int</code> | No | the maximum amount of funding rate structures to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | end time in ms |
kucoinfutures.fetchFundingRateHistory (symbol[, since, limit, params])
<a name="closePosition" id="closeposition"></a>
closes open positions for a market
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - A list of position structures
See: https://www.kucoin.com/docs/rest/futures-trading/orders/place-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | Unified CCXT market symbol |
| side | <code>string</code> | Yes | not used by kucoinfutures closePositions |
| params | <code>object</code> | No | extra parameters specific to the okx api endpoint |
| params.clientOrderId | <code>string</code> | No | client order id of the order |
kucoinfutures.closePosition (symbol, side[, params])
<a name="fetchTradingFee" id="fetchtradingfee"></a>
fetch the trading fees for a market
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a fee structure
See: https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-futures
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchTradingFee (symbol[, params])
<a name="fetchMarginMode" id="fetchmarginmode"></a>
fetches the margin mode of a trading pair
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a margin mode structure
See: https://www.kucoin.com/docs/rest/futures-trading/positions/get-margin-mode
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the margin mode for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchMarginMode (symbol[, params])
<a name="setMarginMode" id="setmarginmode"></a>
set margin mode to 'cross' or 'isolated'
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - response from the exchange
See: https://www.kucoin.com/docs/rest/futures-trading/positions/modify-margin-mode
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | <code>string</code> | Yes | 'cross' or 'isolated' |
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.setMarginMode (marginMode, symbol[, params])
<a name="setPositionMode" id="setpositionmode"></a>
set hedged to true or false for a market
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a response from the exchange
See: https://www.kucoin.com/docs-new/3475097e0
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | <code>bool</code> | Yes | set to true to use two way position |
| symbol | <code>string</code> | No | not used by bybit setPositionMode () |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.setPositionMode (hedged[, symbol, params])
<a name="fetchLeverage" id="fetchleverage"></a>
fetch the set leverage for a market
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a leverage structure
See: https://www.kucoin.com/docs/rest/futures-trading/positions/get-cross-margin-leverage
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchLeverage (symbol[, params])
<a name="setLeverage" id="setleverage"></a>
set the level of leverage for a market
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - response from the exchange
See: https://www.kucoin.com/docs/rest/futures-trading/positions/modify-cross-margin-leverage
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | <code>float</code> | Yes | the rate of leverage |
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.setLeverage (leverage, symbol[, params])
<a name="fetchPositionsADLRank" id="fetchpositionsadlrank"></a>
fetches the auto deleveraging rank and risk percentage for a list of symbols
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - an array of auto de leverage structures
See: https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-position-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchPositionsADLRank ([symbols, params])
<a name="watchTicker" id="watchticker"></a>
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>kucoinfutures</code>
Returns: <code>object</code> - a ticker structure
See: https://www.kucoin.com/docs/websocket/futures-trading/public-channels/get-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 |
kucoinfutures.watchTicker (symbol[, params])
<a name="watchTickers" id="watchtickers"></a>
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 <code>kucoinfutures</code>
Returns: <code>object</code> - a ticker structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<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 |
kucoinfutures.watchTickers (symbols[, params])
<a name="watchBidsAsks" id="watchbidsasks"></a>
watches best bid & ask for symbols
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a ticker structure
See: https://www.kucoin.com/docs/websocket/futures-trading/public-channels/get-ticker-v2
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<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 |
kucoinfutures.watchBidsAsks (symbols[, params])
<a name="watchPosition" id="watchposition"></a>
watch open positions for a specific symbol
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a position structure
See: https://docs.kucoin.com/futures/#position-change-events
| Param | Type | Description |
|---|---|---|
| symbol | <code>string</code>, <code>undefined</code> | unified market symbol |
| params | <code>object</code> | extra parameters specific to the exchange API endpoint |
kucoinfutures.watchPosition (symbol, params[])
<a name="watchTrades" id="watchtrades"></a>
get the list of most recent trades for a particular symbol
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of trade structures
See: https://docs.kucoin.com/futures/#execution-data
| 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 |
kucoinfutures.watchTrades (symbol[, since, limit, params])
<a name="watchTradesForSymbols" id="watchtradesforsymbols"></a>
get the list of most recent trades for a particular symbol
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of trade structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | |
| 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 |
kucoinfutures.watchTradesForSymbols (symbols[, since, limit, params])
<a name="unWatchTrades" id="unwatchtrades"></a>
unWatches trades stream
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of trade structures
See: https://docs.kucoin.com/futures/#execution-data
| 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 |
kucoinfutures.unWatchTrades (symbol[, params])
<a name="unWatchTradesForSymbols" id="unwatchtradesforsymbols"></a>
get the list of most recent trades for a particular symbol
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of trade structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.unWatchTradesForSymbols (symbols[, params])
<a name="watchOHLCV" id="watchohlcv"></a>
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<Array<int>></code> - 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 | <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 |
kucoinfutures.watchOHLCV (symbol, timeframe[, since, limit, params])
<a name="watchOrderBook" id="watchorderbook"></a>
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See: https://docs.kucoin.com/futures/#level-2-market-data
| 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 |
kucoinfutures.watchOrderBook (symbol[, limit, params])
<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See: https://docs.kucoin.com/futures/#level-2-market-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified array of symbols |
| 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 |
kucoinfutures.watchOrderBookForSymbols (symbols[, limit, params])
<a name="unWatchOrderBook" id="unwatchorderbook"></a>
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See: https://docs.kucoin.com/futures/#level-2-market-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.unWatchOrderBook (symbol[, params])
<a name="unWatchOrderBookForSymbols" id="unwatchorderbookforsymbols"></a>
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified array of symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.unWatchOrderBookForSymbols (symbols[, params])
<a name="watchOrders" id="watchorders"></a>
watches information on multiple orders made by the user
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of order structures
See: https://docs.kucoin.com/futures/#trade-orders-according-to-the-market
| 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 |
kucoinfutures.watchOrders (symbol[, since, limit, params])
<a name="watchBalance" id="watchbalance"></a>
watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a balance structure
See: https://docs.kucoin.com/futures/#account-balance-events
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.watchBalance ([params])