kucoinfutures
kucoinfutures cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
kucoinfutures
Kind: global class
Extends: Exchange
- fetchStatus
- fetchMarkets
- fetchTime
- fetchOHLCV
- fetchDepositAddress
- fetchOrderBook
- fetchTicker
- fetchMarkPrice
- fetchTickers
- fetchBidsAsks
- fetchFundingHistory
- fetchPosition
- fetchPositions
- fetchPositionsHistory
- createOrder
- createOrders
- cancelOrder
- cancelOrders
- cancelAllOrders
- addMargin
- fetchOrdersByStatus
- fetchClosedOrders
- fetchOpenOrders
- fetchOrder
- fetchFundingRate
- fetchFundingInterval
- fetchBalance
- transfer
- fetchMyTrades
- fetchTrades
- fetchDeposits
- fetchWithdrawals
- fetchMarketLeverageTiers
- fetchFundingRateHistory
- closePosition
- fetchTradingFee
- fetchMarginMode
- setMarginMode
- setPositionMode
- fetchLeverage
- setLeverage
- fetchPositionsADLRank
- watchTicker
- watchTickers
- watchBidsAsks
- watchPosition
- watchTrades
- watchTradesForSymbols
- unWatchTrades
- unWatchTradesForSymbols
- watchOHLCV
- watchOrderBook
- watchOrderBookForSymbols
- unWatchOrderBook
- unWatchOrderBookForSymbols
- watchOrders
- watchBalance
fetchStatus
the latest known information on the availability of the exchange API
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.fetchStatus (params?)fetchMarkets
retrieves data on all markets for kucoinfutures
Kind: instance method of 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 |
kucoinfutures.fetchMarkets (params?)fetchTime
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of 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 |
kucoinfutures.fetchTime (params?)fetchOHLCV
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of 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 |
kucoinfutures.fetchOHLCV (symbol, timeframe, since?, limit?, params?)fetchDepositAddress
fetch the deposit address for a currency associated with this account
Kind: instance method of kucoinfutures
Returns: object - an 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 |
kucoinfutures.fetchDepositAddress (code, params?)fetchOrderBook
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of kucoinfutures
Returns: object - 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 | 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 |
kucoinfutures.fetchOrderBook (symbol, limit?, params?)fetchTicker
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
Returns: object - a 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 |
kucoinfutures.fetchTicker (symbol, params?)fetchMarkPrice
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
Returns: object - a ticker structure
See: https://www.kucoin.com/docs/rest/futures-trading/market-data/get-current-mark-price
| 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 |
kucoinfutures.fetchMarkPrice (symbol, params?)fetchTickers
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of kucoinfutures
Returns: object - a dictionary of ticker structures
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 |
kucoinfutures.fetchTickers (symbols?, params?)fetchBidsAsks
fetches the bid and ask price and volume for multiple markets
Kind: instance method of kucoinfutures
Returns: object - a dictionary of ticker structures
| 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 |
kucoinfutures.fetchBidsAsks (symbols?, params?)fetchFundingHistory
fetch the history of funding payments paid and received on this account
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.fetchFundingHistory (symbol, since?, limit?, params?)fetchPosition
fetch data on an open position
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.fetchPosition (symbol, params?)fetchPositions
fetch all open positions
Kind: instance method of kucoinfutures
Returns: Array<object> - a list of 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 |
kucoinfutures.fetchPositions (symbols, params?)fetchPositionsHistory
fetches historical positions
Kind: instance method of kucoinfutures
Returns: Array<object> - a list of 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 |
| since | int | No | the earliest time in ms to fetch position history for |
| limit | int | No | the maximum number of entries to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | closing end time |
| params.pageId | int | No | page id |
kucoinfutures.fetchPositionsHistory (symbols?, since?, limit?, params?)createOrder
Create an order on the exchange
Kind: instance method of kucoinfutures
Returns: object - an order structure
See
- https://www.kucoin.com/docs/rest/futures-trading/orders/place-order
- https://www.kucoin.com/docs/rest/futures-trading/orders/place-take-profit-and-stop-loss-order#http-request
| 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.takeProfit | object | No | takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType |
| params.stopLoss | object | No | stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType |
| 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 |
| params.cost | float | No | the cost of the order in units of USDT |
| params.marginMode | string | No | 'cross' or 'isolated', default is 'isolated' |
| params.hedged | bool | No | swap and future only true for hedged mode, false for one way mode, default is false ----------------- Exchange Specific Parameters ----------------- |
| params.leverage | float | No | Leverage size of the order (mandatory param in request, default is 1) |
| 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 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 | string | No | "last", "mark", "index" - defaults to "mark" |
| params.stopPriceType | string | No | exchange-specific alternative for triggerPriceType: TP, IP or MP |
| 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.\ |
| params.positionSide | string | No | swap and future only hedged two-way position side, LONG or SHORT |
kucoinfutures.createOrder (symbol, type, side, amount, price?, params?)createOrders
create a list of trade orders
Kind: instance method of kucoinfutures
Returns: object - an 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 |
kucoinfutures.createOrders (orders, params?)cancelOrder
cancels an open order
Kind: instance method of kucoinfutures
Returns: object - An 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 |
kucoinfutures.cancelOrder (id, symbol, params?)cancelOrders
cancel multiple orders
Kind: instance method of kucoinfutures
Returns: object - an list of order structures
See: https://www.kucoin.com/docs/rest/futures-trading/orders/batch-cancel-orders
| Param | Type | Required | Description |
|---|---|---|---|
| ids | Array<string> | Yes | order ids |
| 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.clientOrderIds | Array<string> | No | client order ids |
kucoinfutures.cancelOrders (ids, symbol, params?)cancelAllOrders
cancel all open orders
Kind: instance method of 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 |
kucoinfutures.cancelAllOrders (symbol, params?)addMargin
add margin
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.addMargin (symbol, amount, params?)fetchOrdersByStatus
fetches a list of orders placed on the exchange
Kind: instance method of kucoinfutures
Returns: An array of order structures
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 |
kucoinfutures.fetchOrdersByStatus (status, symbol, since?, limit?, params?)fetchClosedOrders
fetches information on multiple closed orders made by the user
Kind: instance method of kucoinfutures
Returns: Array<Order> - a list of order structures
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 |
kucoinfutures.fetchClosedOrders (symbol, since?, limit?, params?)fetchOpenOrders
fetches information on multiple open orders made by the user
Kind: instance method of kucoinfutures
Returns: Array<Order> - a list of order structures
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 |
kucoinfutures.fetchOpenOrders (symbol, since?, limit?, params?)fetchOrder
fetches information on an order made by the user
Kind: instance method of kucoinfutures
Returns: object - An order structure
See: https://docs.kucoin.com/futures/#get-details-of-a-single-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified symbol of the market the order was made in |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchOrder (id, symbol, params?)fetchFundingRate
fetch the current funding rate
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.fetchFundingRate (symbol, params?)fetchFundingInterval
fetch the current funding rate interval
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.fetchFundingInterval (symbol, params?)fetchBalance
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of kucoinfutures
Returns: object - a 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 |
| params.code | object | No | the unified currency code to fetch the balance for, if not provided, the default .options['fetchBalance']['code'] will be used |
kucoinfutures.fetchBalance (params?)transfer
transfer currency internally between wallets on the same account
Kind: instance method of kucoinfutures
Returns: object - a transfer structure
See
- https://www.kucoin.com/docs/rest/funding/transfer/transfer-to-main-or-trade-account
- https://www.kucoin.com/docs/rest/funding/transfer/transfer-to-futures-account
| 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 |
kucoinfutures.transfer (code, amount, fromAccount, toAccount, params?)fetchMyTrades
fetch all trades made by the user
Kind: instance method of kucoinfutures
Returns: Array<Trade> - a list of trade structures
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 |
kucoinfutures.fetchMyTrades (symbol, since?, limit?, params?)fetchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of kucoinfutures
Returns: Array<Trade> - a list of trade structures
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 |
kucoinfutures.fetchTrades (symbol, since?, limit?, params?)fetchDeposits
fetch all deposits made to an account
Kind: instance method of kucoinfutures
Returns: Array<object> - a list of transaction structures
| 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 |
kucoinfutures.fetchDeposits (code, since?, limit?, params?)fetchWithdrawals
fetch all withdrawals made from an account
Kind: instance method of kucoinfutures
Returns: Array<object> - a list of transaction structures
| 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 |
kucoinfutures.fetchWithdrawals (code, since?, limit?, params?)fetchMarketLeverageTiers
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
Kind: instance method of kucoinfutures
Returns: object - 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 | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchMarketLeverageTiers (symbol, params?)fetchFundingRateHistory
fetches historical funding rate prices
Kind: instance method of kucoinfutures
Returns: Array<object> - 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 | 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 to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | end time in ms |
kucoinfutures.fetchFundingRateHistory (symbol, since?, limit?, params?)closePosition
closes open positions for a market
Kind: instance method of kucoinfutures
Returns: Array<object> - A list of position structures
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 |
kucoinfutures.closePosition (symbol, side, params?)fetchTradingFee
fetch the trading fees for a market
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.fetchTradingFee (symbol, params?)fetchMarginMode
fetches the margin mode of a trading pair
Kind: instance method of kucoinfutures
Returns: object - a margin mode structure
See: https://www.kucoin.com/docs/rest/futures-trading/positions/get-margin-mode
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the margin mode for |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchMarginMode (symbol, params?)setMarginMode
set margin mode to 'cross' or 'isolated'
Kind: instance method of kucoinfutures
Returns: object - response from the exchange
See: https://www.kucoin.com/docs/rest/futures-trading/positions/modify-margin-mode
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | string | Yes | 'cross' or 'isolated' |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.setMarginMode (marginMode, symbol, params?)setPositionMode
set hedged to true or false for a market
Kind: instance method of kucoinfutures
Returns: object - a response from the exchange
See: https://www.kucoin.com/docs-new/3475097e0
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | bool | Yes | set to true to use two way position |
| symbol | string | No | not used by bybit setPositionMode () |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.setPositionMode (hedged, symbol?, params?)fetchLeverage
fetch the set leverage for a market
Kind: instance method of kucoinfutures
Returns: object - a leverage structure
See: https://www.kucoin.com/docs/rest/futures-trading/positions/get-cross-margin-leverage
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchLeverage (symbol, params?)setLeverage
set the level of leverage for a market
Kind: instance method of kucoinfutures
Returns: object - response from the exchange
See: https://www.kucoin.com/docs/rest/futures-trading/positions/modify-cross-margin-leverage
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | float | Yes | the rate of leverage |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.setLeverage (leverage, symbol, params?)fetchPositionsADLRank
fetches the auto deleveraging rank and risk percentage for a list of symbols
Kind: instance method of kucoinfutures
Returns: Array<object> - 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 | Array<string> | No | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.fetchPositionsADLRank (symbols?, params?)watchTicker
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
Returns: object - a 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 |
kucoinfutures.watchTicker (symbol, params?)watchTickers
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
Returns: object - a 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 |
kucoinfutures.watchTickers (symbols, params?)watchBidsAsks
watches best bid & ask for symbols
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.watchBidsAsks (symbols, params?)watchPosition
watch open positions for a specific symbol
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.watchPosition (symbol, params)watchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of kucoinfutures
Returns: Array<object> - a list of trade structures
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 |
kucoinfutures.watchTrades (symbol, since?, limit?, params?)watchTradesForSymbols
get the list of most recent trades for a particular symbol
Kind: instance method of kucoinfutures
Returns: Array<object> - a list of trade structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | |
| 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 |
kucoinfutures.watchTradesForSymbols (symbols, since?, limit?, params?)unWatchTrades
unWatches trades stream
Kind: instance method of kucoinfutures
Returns: Array<object> - a list of trade structures
See: https://docs.kucoin.com/futures/#execution-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch trades for |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.unWatchTrades (symbol, params?)unWatchTradesForSymbols
get the list of most recent trades for a particular symbol
Kind: instance method of kucoinfutures
Returns: Array<object> - a list of trade structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.unWatchTradesForSymbols (symbols, params?)watchOHLCV
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of 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 |
kucoinfutures.watchOHLCV (symbol, timeframe, since?, limit?, params?)watchOrderBook
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
- After receiving the websocket Level 2 data flow, cache the data.
- Initiate a REST request to get the snapshot data of Level 2 order book.
- Playback the cached Level 2 data flow.
- 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.
- 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.
- 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
Returns: object - 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 | 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 |
kucoinfutures.watchOrderBook (symbol, limit?, params?)watchOrderBookForSymbols
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of kucoinfutures
Returns: object - 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 | 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 |
kucoinfutures.watchOrderBookForSymbols (symbols, limit?, params?)unWatchOrderBook
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of kucoinfutures
Returns: object - 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 | string | Yes | unified symbol of the market to fetch the order book for |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.unWatchOrderBook (symbol, params?)unWatchOrderBookForSymbols
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of kucoinfutures
Returns: object - A dictionary of order book structures indexed by market symbols
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified array of symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoinfutures.unWatchOrderBookForSymbols (symbols, params?)watchOrders
watches information on multiple orders made by the user
Kind: instance method of kucoinfutures
Returns: Array<object> - a list of order structures
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 |
kucoinfutures.watchOrders (symbol, since?, limit?, params?)watchBalance
watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of kucoinfutures
Returns: object - a 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 |
kucoinfutures.watchBalance (params?)