Back to Ccxt

Kucoinfutures

wiki/exchanges/kucoinfutures.md

4.5.5253.9 KB
Original Source

<a name="kucoinfutures" id="kucoinfutures"></a>

kucoinfutures{docsify-ignore}

Kind: global class
Extends: <code>Exchange</code>

<a name="fetchStatus" id="fetchstatus"></a>

fetchStatus{docsify-ignore}

the latest known information on the availability of the exchange API

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a status structure

See: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-service-status

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchStatus ([params])

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange api endpoint
javascript
kucoinfutures.fetchMarkets ([params])

<a name="fetchTime" id="fetchtime"></a>

fetchTime{docsify-ignore}

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchTime ([params])

<a name="fetchOHLCV" id="fetchohlcv"></a>

fetchOHLCV{docsify-ignore}

fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of <code>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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
kucoinfutures.fetchOHLCV (symbol, timeframe[, since, limit, params])

<a name="fetchDepositAddress" id="fetchdepositaddress"></a>

fetchDepositAddress{docsify-ignore}

fetch the deposit address for a currency associated with this account

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - an address structure

See: https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-address

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchDepositAddress (code[, params])

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook{docsify-ignore}

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchOrderBook (symbol[, limit, params])

<a name="fetchTicker" id="fetchticker"></a>

fetchTicker{docsify-ignore}

fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a ticker structure

See: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-ticker

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchTicker (symbol[, params])

<a name="fetchMarkPrice" id="fetchmarkprice"></a>

fetchMarkPrice{docsify-ignore}

fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a ticker structure

See: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-current-mark-price

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchMarkPrice (symbol[, params])

<a name="fetchTickers" id="fetchtickers"></a>

fetchTickers{docsify-ignore}

fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

Kind: instance method of <code>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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.method<code>string</code>Nothe method to use, futuresPublicGetAllTickers or futuresPublicGetContractsActive
javascript
kucoinfutures.fetchTickers ([symbols, params])

<a name="fetchBidsAsks" id="fetchbidsasks"></a>

fetchBidsAsks{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchBidsAsks ([symbols, params])

<a name="fetchFundingHistory" id="fetchfundinghistory"></a>

fetchFundingHistory{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch funding history for
limit<code>int</code>Nothe maximum number of funding history structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchFundingHistory (symbol[, since, limit, params])

<a name="fetchPosition" id="fetchposition"></a>

fetchPosition{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the position is held in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchPosition (symbol[, params])

<a name="fetchPositions" id="fetchpositions"></a>

fetchPositions{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchPositions (symbols[, params])

<a name="fetchPositionsHistory" id="fetchpositionshistory"></a>

fetchPositionsHistory{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
since<code>int</code>Nothe earliest time in ms to fetch position history for
limit<code>int</code>Nothe maximum number of entries to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noclosing end time
params.pageId<code>int</code>Nopage id
javascript
kucoinfutures.fetchPositionsHistory ([symbols, since, limit, params])

<a name="createOrder" id="createorder"></a>

createOrder{docsify-ignore}

Create an order on the exchange

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>YesUnified CCXT market symbol
type<code>string</code>Yes'limit' or 'market'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yesthe amount of currency to trade
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.takeProfit<code>object</code>NotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType
params.stopLoss<code>object</code>NostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType
params.triggerPrice<code>float</code>NoThe price a trigger order is triggered at
params.stopLossPrice<code>float</code>Noprice to trigger stop-loss orders
params.takeProfitPrice<code>float</code>Noprice to trigger take-profit orders
params.reduceOnly<code>bool</code>NoA 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>NoGTC, GTT, IOC, or FOK, default is GTC, limit orders only
params.postOnly<code>string</code>NoPost only flag, invalid when timeInForce is IOC or FOK
params.cost<code>float</code>Nothe 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>Noswap and future only true for hedged mode, false for one way mode, default is false ----------------- Exchange Specific Parameters -----------------
params.leverage<code>float</code>NoLeverage size of the order (mandatory param in request, default is 1)
params.clientOid<code>string</code>Noclient order id, defaults to uuid if not passed
params.remark<code>string</code>Noremark 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>Noexchange-specific alternative for triggerPriceType: TP, IP or MP
params.closeOrder<code>bool</code>Noset to true to close position
params.test<code>bool</code>Noset to true to use the test order endpoint (does not submit order, use to validate params)
params.forceHold<code>bool</code>NoA 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>Noswap and future only hedged two-way position side, LONG or SHORT
javascript
kucoinfutures.createOrder (symbol, type, side, amount[, price, params])

<a name="createOrders" id="createorders"></a>

createOrders{docsify-ignore}

create a list of trade orders

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - an order structure

See: https://www.kucoin.com/docs/rest/futures-trading/orders/place-multiple-orders

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist 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>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.createOrders (orders[, params])

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder{docsify-ignore}

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

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderId<code>string</code>Nocancel order by client order id
javascript
kucoinfutures.cancelOrder (id, symbol[, params])

<a name="cancelOrders" id="cancelorders"></a>

cancelOrders{docsify-ignore}

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

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderIds<code>Array<string></code>Noclient order ids
javascript
kucoinfutures.cancelOrders (ids, symbol[, params])

<a name="cancelAllOrders" id="cancelallorders"></a>

cancelAllOrders{docsify-ignore}

cancel all open orders

Kind: instance method of <code>kucoinfutures</code>
Returns: Response from the exchange

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>object</code>NoWhen true, all the trigger orders will be cancelled
javascript
kucoinfutures.cancelAllOrders (symbol[, params])

<a name="addMargin" id="addmargin"></a>

addMargin{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesamount of margin to add
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.addMargin (symbol, amount[, params])

<a name="fetchOrdersByStatus" id="fetchordersbystatus"></a>

fetchOrdersByStatus{docsify-ignore}

fetches a list of orders placed on the exchange

Kind: instance method of <code>kucoinfutures</code>
Returns: An array of order structures

See

ParamTypeRequiredDescription
status<code>string</code>Yes'active' or 'closed', only 'active' is valid for stop orders
symbol<code>string</code>Yesunified symbol for the market to retrieve orders from
since<code>int</code>Notimestamp in ms of the earliest order to retrieve
limit<code>int</code>NoThe maximum number of orders to retrieve
params<code>object</code>Noexchange specific parameters
params.trigger<code>bool</code>Noset to true to retrieve untriggered stop orders
params.until<code>int</code>NoEnd time in ms
params.side<code>string</code>Nobuy or sell
params.type<code>string</code>Nolimit or market
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
kucoinfutures.fetchOrdersByStatus (status, symbol[, since, limit, params])

<a name="fetchClosedOrders" id="fetchclosedorders"></a>

fetchClosedOrders{docsify-ignore}

fetches information on multiple closed orders made by the user

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<Order></code> - a list of order structures

See: https://docs.kucoin.com/futures/#get-order-list

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noend time in ms
params.side<code>string</code>Nobuy or sell
params.type<code>string</code>Nolimit, or market
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
kucoinfutures.fetchClosedOrders (symbol[, since, limit, params])

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noend time in ms
params.side<code>string</code>Nobuy or sell
params.type<code>string</code>Nolimit, or market
params.trigger<code>boolean</code>Noset to true to retrieve untriggered stop orders
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
kucoinfutures.fetchOpenOrders (symbol[, since, limit, params])

<a name="fetchOrder" id="fetchorder"></a>

fetchOrder{docsify-ignore}

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

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchOrder (id, symbol[, params])

<a name="fetchFundingRate" id="fetchfundingrate"></a>

fetchFundingRate{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchFundingRate (symbol[, params])

<a name="fetchFundingInterval" id="fetchfundinginterval"></a>

fetchFundingInterval{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchFundingInterval (symbol[, params])

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance{docsify-ignore}

query for balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a balance structure

See: https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-futures

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.code<code>object</code>Nothe unified currency code to fetch the balance for, if not provided, the default .options['fetchBalance']['code'] will be used
javascript
kucoinfutures.fetchBalance ([params])

<a name="transfer" id="transfer"></a>

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a transfer structure

See

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from
toAccount<code>string</code>Yesaccount to transfer to
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.transfer (code, amount, fromAccount, toAccount[, params])

<a name="fetchMyTrades" id="fetchmytrades"></a>

fetchMyTrades{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>NoEnd time in ms
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
kucoinfutures.fetchMyTrades (symbol[, since, limit, params])

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchTrades (symbol[, since, limit, params])

<a name="fetchDeposits" id="fetchdeposits"></a>

fetchDeposits{docsify-ignore}

fetch all deposits made to an account

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of transaction structures

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposits structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchDeposits (code[, since, limit, params])

<a name="fetchWithdrawals" id="fetchwithdrawals"></a>

fetchWithdrawals{docsify-ignore}

fetch all withdrawals made from an account

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of transaction structures

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawals structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchWithdrawals (code[, since, limit, params])

<a name="fetchMarketLeverageTiers" id="fetchmarketleveragetiers"></a>

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 <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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchMarketLeverageTiers (symbol[, params])

<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>

fetchFundingRateHistory{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the funding rate history for
since<code>int</code>Nonot used by kucuoinfutures
limit<code>int</code>Nothe maximum amount of funding rate structures to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Noend time in ms
javascript
kucoinfutures.fetchFundingRateHistory (symbol[, since, limit, params])

<a name="closePosition" id="closeposition"></a>

closePosition{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>YesUnified CCXT market symbol
side<code>string</code>Yesnot used by kucoinfutures closePositions
params<code>object</code>Noextra parameters specific to the okx api endpoint
params.clientOrderId<code>string</code>Noclient order id of the order
javascript
kucoinfutures.closePosition (symbol, side[, params])

<a name="fetchTradingFee" id="fetchtradingfee"></a>

fetchTradingFee{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchTradingFee (symbol[, params])

<a name="fetchMarginMode" id="fetchmarginmode"></a>

fetchMarginMode{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the margin mode for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchMarginMode (symbol[, params])

<a name="setMarginMode" id="setmarginmode"></a>

setMarginMode{docsify-ignore}

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

ParamTypeRequiredDescription
marginMode<code>string</code>Yes'cross' or 'isolated'
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.setMarginMode (marginMode, symbol[, params])

<a name="setPositionMode" id="setpositionmode"></a>

setPositionMode{docsify-ignore}

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

ParamTypeRequiredDescription
hedged<code>bool</code>Yesset to true to use two way position
symbol<code>string</code>Nonot used by bybit setPositionMode ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.setPositionMode (hedged[, symbol, params])

<a name="fetchLeverage" id="fetchleverage"></a>

fetchLeverage{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchLeverage (symbol[, params])

<a name="setLeverage" id="setleverage"></a>

setLeverage{docsify-ignore}

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

ParamTypeRequiredDescription
leverage<code>float</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.setLeverage (leverage, symbol[, params])

<a name="fetchPositionsADLRank" id="fetchpositionsadlrank"></a>

fetchPositionsADLRank{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.fetchPositionsADLRank ([symbols, params])

<a name="watchTicker" id="watchticker"></a>

watchTicker{docsify-ignore}

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a ticker structure

See: https://www.kucoin.com/docs/websocket/futures-trading/public-channels/get-ticker

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchTicker (symbol[, params])

<a name="watchTickers" id="watchtickers"></a>

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 <code>kucoinfutures</code>
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchTickers (symbols[, params])

<a name="watchBidsAsks" id="watchbidsasks"></a>

watchBidsAsks{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchBidsAsks (symbols[, params])

<a name="watchPosition" id="watchposition"></a>

watchPosition{docsify-ignore}

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

ParamTypeDescription
symbol<code>string</code>, <code>undefined</code>unified market symbol
params<code>object</code>extra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchPosition (symbol, params[])

<a name="watchTrades" id="watchtrades"></a>

watchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>Array<object></code> - a list of trade structures

See: https://docs.kucoin.com/futures/#execution-data

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchTrades (symbol[, since, limit, params])

<a name="watchTradesForSymbols" id="watchtradesforsymbols"></a>

watchTradesForSymbols{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yes
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchTradesForSymbols (symbols[, since, limit, params])

<a name="unWatchTrades" id="unwatchtrades"></a>

unWatchTrades{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.unWatchTrades (symbol[, params])

<a name="unWatchTradesForSymbols" id="unwatchtradesforsymbols"></a>

unWatchTradesForSymbols{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.unWatchTradesForSymbols (symbols[, params])

<a name="watchOHLCV" id="watchohlcv"></a>

watchOHLCV{docsify-ignore}

watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of <code>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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchOHLCV (symbol, timeframe[, since, limit, params])

<a name="watchOrderBook" id="watchorderbook"></a>

watchOrderBook{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

  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 <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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchOrderBook (symbol[, limit, params])

<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>

watchOrderBookForSymbols{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified array of symbols
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchOrderBookForSymbols (symbols[, limit, params])

<a name="unWatchOrderBook" id="unwatchorderbook"></a>

unWatchOrderBook{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.unWatchOrderBook (symbol[, params])

<a name="unWatchOrderBookForSymbols" id="unwatchorderbookforsymbols"></a>

unWatchOrderBookForSymbols{docsify-ignore}

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified array of symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.unWatchOrderBookForSymbols (symbols[, params])

<a name="watchOrders" id="watchorders"></a>

watchOrders{docsify-ignore}

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchOrders (symbol[, since, limit, params])

<a name="watchBalance" id="watchbalance"></a>

watchBalance{docsify-ignore}

watch balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>kucoinfutures</code>
Returns: <code>object</code> - a balance structure

See: https://docs.kucoin.com/futures/#account-balance-events

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
kucoinfutures.watchBalance ([params])