kucoin
kucoin cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
kucoin
Kind: global class
Extends: Exchange
- fetchTime
- fetchStatus
- fetchMarkets
- loadMigrationStatus
- fetchCurrencies
- fetchAccounts
- fetchTransactionFee
- fetchDepositWithdrawFee
- fetchTickers
- fetchMarkPrices
- fetchTicker
- fetchMarkPrice
- fetchOHLCV
- createDepositAddress
- fetchDepositAddress
- fetchContractDepositAddress
- fetchDepositAddressesByNetwork
- fetchOrderBook
- createOrder
- createSpotOrder
- createContractOrder
- createUtaOrder
- createMarketOrderWithCost
- createMarketBuyOrderWithCost
- createMarketSellOrderWithCost
- createOrders
- createSpotOrders
- createContractOrders
- editOrder
- cancelOrder
- cancelSpotOrder
- cancelContractOrder
- cancelUtaOrder
- cancelAllOrders
- cancelAllSpotOrders
- cancelAllContractOrders
- cancelAllUtaOrders
- fetchOrdersByStatus
- fetchSpotOrdersByStatus
- fetchContractOrdersByStatus
- fetchUtaOrdersByStatus
- fetchClosedOrders
- fetchOpenOrders
- fetchOrder
- fetchSpotOrder
- fetchContractOrder
- fetchUtaOrder
- fetchOrderTrades
- fetchMyTrades
- fetchMySpotTrades
- fetchMyContractTrades
- fetchMyUtaTrades
- fetchTrades
- fetchTradingFee
- withdraw
- fetchDeposits
- fetchContractDeposits
- fetchWithdrawals
- fetchContractWithdrawals
- fetchBalance
- fetchContractBalance
- fetchUtaBalance
- transfer
- transferUta
- transferClassic
- fetchLedger
- fetchBorrowInterest
- fetchBorrowRateHistories
- fetchBorrowRateHistory
- fetchCrossBorrowRate
- borrowCrossMargin
- borrowIsolatedMargin
- repayCrossMargin
- repayIsolatedMargin
- fetchDepositWithdrawFees
- fetchLeverage
- setLeverage
- setContractLeverage
- fetchFundingInterval
- fetchFundingRate
- fetchFundingRateHistory
- fetchFundingHistory
- fetchPosition
- fetchPositions
- fetchPositionsHistory
- cancelOrders
- addMargin
- fetchMarginMode
- setMarginMode
- setPositionMode
- fetchPositionMode
- closePosition
- fetchMarketLeverageTiers
- fetchLeverageTiers
- fetchOpenInterests
- fetchOpenInterestHistory
- isUTAEnabled
- fetchTransfers
- watchTicker
- unWatchTicker
- watchTickers
- watchBidsAsks
- watchOHLCV
- unWatchOHLCV
- watchTrades
- watchTradesForSymbols
- unWatchTradesForSymbols
- unWatchTrades
- watchOrderBook
- unWatchOrderBook
- watchOrderBookForSymbols
- unWatchOrderBookForSymbols
- watchOrders
- watchMyTrades
- watchBalance
- watchPosition
- watchPositions
fetchTime
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of kucoin
Returns: int - the current integer timestamp in milliseconds from the exchange server
See
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-server-time
- https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-server-time
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.fetchTime (params?)fetchStatus
the latest known information on the availability of the exchange API
Kind: instance method of kucoin
Returns: object - a status structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-service-status
- https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-service-status
- https://www.kucoin.com/docs-new/rest/ua/get-service-status
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | spot or swap |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
| params.tradeType | string | No | uta only set to SPOT or FUTURES |
kucoin.fetchStatus (params?)fetchMarkets
retrieves data on all markets for kucoin
Kind: instance method of kucoin
Returns: Array<object> - an array of objects representing market data
See
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-all-symbols
- https://www.kucoin.com/docs-new/rest/ua/get-symbol
- https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-all-symbols
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
kucoin.fetchMarkets (params?)loadMigrationStatus
loads the migration status for the account (hf or not)
Kind: instance method of kucoin
Returns: any - ignore
See: https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/get-user-type
| Param | Type | Description |
|---|---|---|
| force | boolean | load account state for non hf |
kucoin.loadMigrationStatus (force)fetchCurrencies
fetches all available currencies on an exchange
Kind: instance method of kucoin
Returns: object - an associative dictionary of currencies
See
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-all-currencies
- https://www.kucoin.com/docs-new/rest/ua/get-currencies
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | Yes | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
kucoin.fetchCurrencies (params)fetchAccounts
fetch all the accounts associated with a profile
Kind: instance method of kucoin
Returns: object - a dictionary of account structures indexed by the account type
See: https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-list-spot
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
kucoin.fetchAccounts (params?)fetchTransactionFee
DEPRECATED please use fetchDepositWithdrawFee instead
Kind: instance method of kucoin
Returns: object - a fee structure
See: https://docs.kucoin.com/#get-withdrawal-quotas
| Param | Type | Description |
|---|---|---|
| code | string | unified currency code |
| params | object | extra parameters specific to the exchange API endpoint |
kucoin.fetchTransactionFee (code, params)fetchDepositWithdrawFee
fetch the fee for deposits and withdrawals
Kind: instance method of kucoin
Returns: object - a fee structure
See: https://www.kucoin.com/docs-new/rest/account-info/withdrawals/get-withdrawal-quotas
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.network | string | No | The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency; you can query the chain through the response of the GET /api/v2/currencies/{currency} interface |
kucoin.fetchDepositWithdrawFee (code, params?)fetchTickers
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of kucoin
Returns: object - a dictionary of ticker structures
See
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-all-tickers
- https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-all-tickers
- https://www.kucoin.com/docs-new/rest/ua/get-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | 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.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
| params.type | string | No | spot or swap (default is spot) |
| params.method | string | No | swap only the method to use, futuresPublicGetContractsActive or futuresPublicGetAllTickers (default is futuresPublicGetContractsActive) |
kucoin.fetchTickers (symbols?, params?)fetchMarkPrices
fetches the mark price for multiple markets
Kind: instance method of kucoin
Returns: object - a dictionary of ticker structures
See: https://www.kucoin.com/docs-new/rest/margin-trading/market-data/get-mark-price-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 |
kucoin.fetchMarkPrices (symbols?, 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 kucoin
Returns: object - a ticker structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-24hr-stats
- https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-ticker
- https://www.kucoin.com/docs-new/rest/ua/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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
kucoin.fetchTicker (symbol, params?)fetchMarkPrice
fetches the mark price for a specific market
Kind: instance method of kucoin
Returns: object - a ticker structure
See
- https://www.kucoin.com/docs-new/rest/margin-trading/market-data/get-mark-price-detail
- https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-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 |
kucoin.fetchMarkPrice (symbol, params?)fetchOHLCV
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of kucoin
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-klines
- https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-klines
- https://www.kucoin.com/docs-new/rest/ua/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.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
| 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 |
kucoin.fetchOHLCV (symbol, timeframe, since?, limit?, params?)createDepositAddress
create a currency deposit address
Kind: instance method of kucoin
Returns: object - an address structure
See: https://www.kucoin.com/docs-new/rest/account-info/deposit/add-deposit-address-v3
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code of the currency for the deposit address |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.network | string | No | the blockchain network name |
kucoin.createDepositAddress (code, params?)fetchDepositAddress
fetch the deposit address for a currency associated with this account
Kind: instance method of kucoin
Returns: object - an address structure
See
- https://www.kucoin.com/docs-new/rest/account-info/deposit/get-deposit-address-v3/en
- https://www.kucoin.com/docs-new/rest/ua/get-deposit-address
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.network | string | No | the blockchain network name |
| params.accountType | string | No | 'main', 'contract' or 'uta' (default is 'main') |
| params.uta | boolean | No | set to true for the unified trading account (uta) endpoint, defaults to false |
kucoin.fetchDepositAddress (code, params?)fetchContractDepositAddress
fetch the deposit address for a currency associated with this account
Kind: instance method of kucoin
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 |
kucoin.fetchContractDepositAddress (code, params?)fetchDepositAddressesByNetwork
fetch the deposit address for a currency associated with this account
Kind: instance method of kucoin
Returns: object - an array of address structures
See
- https://www.kucoin.com/docs-new/rest/account-info/deposit/get-deposit-address-v3/en
- https://www.kucoin.com/docs-new/rest/ua/get-deposit-address
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta) endpoint, defaults to false |
kucoin.fetchDepositAddressesByNetwork (code, params?)fetchOrderBook
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of kucoin
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-part-orderbook
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-full-orderbook
- https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-part-orderbook
- https://www.kucoin.com/docs-new/rest/ua/get-orderbook
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
kucoin.fetchOrderBook (symbol, limit?, params?)createOrder
Create an order on the exchange
Kind: instance method of kucoin
Returns: object - an order structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order-sync
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order-test
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-stop-order
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-order-test
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-stop-order
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order-test
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-take-profit-and-stop-loss-order
- https://www.kucoin.com/docs-new/rest/ua/place-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| type | string | Yes | 'limit' or 'market' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | the amount of currency to trade |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta) endpoint, defaults to false Check createSpotOrder(), createContractOrder() and createUtaOrder () for more details on the extra parameters that can be used in params |
kucoin.createOrder (symbol, type, side, amount, price?, params?)createSpotOrder
helper method for creating spot orders
Kind: instance method of kucoin
Returns: object - an order structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order-sync
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order-test
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-stop-order
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-order-test
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-stop-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| type | string | Yes | 'limit' or 'market' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | the amount of currency to trade |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.triggerPrice | float | No | The price at which a trigger order is triggered at |
| params.marginMode | string | No | 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned |
| params.timeInForce | string | No | GTC, GTT, IOC, or FOK, default is GTC, limit orders only |
| params.postOnly | bool | No | Post only flag, invalid when timeInForce is IOC or FOK EXCHANGE SPECIFIC PARAMETERS |
| 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.tradeType | string | No | 'TRADE', // TRADE, MARGIN_TRADE // not used with margin orders limit orders --------------------------------------------------- |
| params.cancelAfter | float | No | long, // cancel after n seconds, requires timeInForce to be GTT |
| params.hidden | bool | No | false, // Order will not be displayed in the order book |
| params.iceberg | bool | No | false, // Only a portion of the order is displayed in the order book |
| params.visibleSize | string | No | this.amountToPrecision (symbol, visibleSize), // The maximum visible size of an iceberg order market orders -------------------------------------------------- |
| params.funds | string | No | // Amount of quote currency to use stop orders ---------------------------------------------------- |
| params.stop | string | No | Either loss or entry, the default is loss. Requires triggerPrice to be defined margin orders -------------------------------------------------- |
| params.leverage | float | No | Leverage size of the order |
| params.stp | string | No | '', // self trade prevention, CN, CO, CB or DC |
| params.autoBorrow | bool | No | false, // The system will first borrow you funds at the optimal interest rate and then place an order for you |
| params.hf | bool | No | false, // true for hf order |
| params.test | bool | No | set to true to test an order, no order will be created but the request will be validated |
| params.sync | bool | No | set to true to use the hf sync call |
kucoin.createSpotOrder (symbol, type, side, amount, price?, params?)createContractOrder
helper method for creating contract orders
Kind: instance method of kucoin
Returns: object - an order structure
See
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order-test
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-take-profit-and-stop-loss-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| type | string | Yes | 'limit' or 'market' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | the amount of currency to trade |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.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 | bool | 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 |
kucoin.createContractOrder (symbol, type, side, amount, price?, params?)createUtaOrder
helper method for creating uta orders
Kind: instance method of kucoin
Returns: object - an order structure
See: https://www.kucoin.com/docs-new/rest/ua/place-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| type | string | Yes | 'limit' or 'market' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | the amount of currency to trade |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string | No | client order id, defaults to uuid if not passed |
| params.cost | float | No | the cost of the order in units of quote currency |
| params.timeInForce | string | No | GTC, GTD, IOC, FOK or PO |
| params.postOnly | bool | No | Post only flag, invalid when timeInForce is IOC or FOK (default is false) |
| params.reduceOnly | bool | No | contract markets only A mark to reduce the position size only. Set to false by default |
| params.triggerPrice | float | No | The price a trigger order is triggered at |
| params.triggerDirection | string | No | 'ascending' or 'descending', the direction the triggerPrice is triggered from, requires triggerPrice |
| params.triggerPriceType | string | No | contract markets only "last", "mark", "index" - defaults to "mark" |
| params.stopLossPrice | float | No | price to trigger stop-loss orders |
| params.takeProfitPrice | float | No | price to trigger take-profit orders |
| params.marginMode | string | No | 'cross' or 'isolated', (default is 'cross' for margin orders, default is 'isolated' for contract orders) Exchange-specific parameters ------------------------------------------------- |
| params.accountMode | string | No | 'unified' or 'classic', default is 'unified' |
| params.stp | string | No | '', // self trade prevention, CN, CO, CB or DC |
| params.cancelAfter | int | No | Cancel After N Seconds (Calculated from the time of entering the matching engine), only effective when timeInForce is GTD |
| params.sizeUnit | string | No | contracts only 'BASECCY' (amount of base currency) or 'UNIT' (number of contracts), default is 'UNIT' Classic account parameters |
| params.autoBorrow | bool | No | classic margin orders only |
| params.autoRepay | bool | No | classic margin orders only |
| params.hedged | string | No | classic contract orders only true for hedged mode, false for one way mode, default is false |
| params.leverage | int | No | classic contract orders with isolated marginMode only Leverage size of the order |
kucoin.createUtaOrder (symbol, type, side, amount, price?, params?)createMarketOrderWithCost
create a market order by providing the symbol, side and cost
Kind: instance method of kucoin
Returns: object - an order structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| side | string | Yes | 'buy' or 'sell' |
| cost | float | Yes | how much you want to trade in units of the quote currency |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.createMarketOrderWithCost (symbol, side, cost, params?)createMarketBuyOrderWithCost
create a market buy order by providing the symbol and cost
Kind: instance method of kucoin
Returns: object - an order structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| cost | float | Yes | how much you want to trade in units of the quote currency |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.createMarketBuyOrderWithCost (symbol, cost, params?)createMarketSellOrderWithCost
create a market sell order by providing the symbol and cost
Kind: instance method of kucoin
Returns: object - an order structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| cost | float | Yes | how much you want to trade in units of the quote currency |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.createMarketSellOrderWithCost (symbol, cost, params?)createOrders
create a list of trade orders
Kind: instance method of kucoin
Returns: object - an order structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-add-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-add-orders-sync
| 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 Check createSpotOrders() and createContractOrders() for more details on the extra parameters that can be used in params |
kucoin.createOrders (orders, params?)createSpotOrders
helper method for creating spot orders in batch
Kind: instance method of kucoin
Returns: object - an order structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-add-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-add-orders-sync
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/batch-add-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 |
| params.hf | bool | No | false, // true for hf orders |
| params.sync | bool | No | false, // true to use the hf sync call |
kucoin.createSpotOrders (orders, params?)createContractOrders
helper method for creating contract orders in batch
Kind: instance method of kucoin
Returns: object - an order structure
See: https://www.kucoin.com/docs-new/rest/futures-trading/orders/batch-add-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 |
kucoin.createContractOrders (orders, params?)editOrder
edit an order, kucoin currently only supports the modification of HF orders
Kind: instance method of kucoin
Returns: object - an order structure
See: https://www.kucoin.com/docs-new/rest/spot-trading/orders/modify-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | not used |
| side | string | Yes | not used |
| amount | float | Yes | how much of the currency you want to trade in units of the base currency |
| 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.clientOrderId | string | No | client order id, defaults to id if not passed |
kucoin.editOrder (id, symbol, type, side, amount, price?, params?)cancelOrder
cancels an open order
Kind: instance method of kucoin
Returns: Response from the exchange
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-orderld
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-orderld-sync
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-clientoid-sync
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-stop-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-stop-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-stop-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-stop-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-order-by-orderld
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/ua/cancel-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 |
| params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') |
| params.marginMode | string | No | spot only 'cross' or 'isolated' |
| params.uta | boolean | No | true for cancelling order with unified account endpoint (default is false) Check cancelSpotOrder() and cancelContractOrder() for more details on the extra parameters that can be used in params |
kucoin.cancelOrder (id, symbol, params?)cancelSpotOrder
helper method for cancelling spot orders
Kind: instance method of kucoin
Returns: Response from the exchange
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-orderld
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-orderld-sync
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-clientoid-sync
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-stop-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-stop-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-stop-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-stop-order-by-clientoid
| 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.trigger | bool | No | True if cancelling a stop order |
| params.hf | bool | No | false, // true for hf order |
| params.sync | bool | No | false, // true to use the hf sync call |
| params.marginMode | string | No | 'cross' or 'isolated' |
kucoin.cancelSpotOrder (id, symbol, params?)cancelContractOrder
helper method for cancelling contract orders
Kind: instance method of kucoin
Returns: object - An order structure
See
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-order-by-orderld
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-order-by-clientoid
| 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 |
kucoin.cancelContractOrder (id, symbol, params?)cancelUtaOrder
helper method for cancelling uta orders
Kind: instance method of kucoin
Returns: Response from the exchange
See: https://www.kucoin.com/docs-new/rest/ua/cancel-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 |
| params.accountMode | string | No | 'unified' or 'classic' (default is 'unified') |
| params.clientOrderId | string | No | client order id, required if id is not provided |
| params.marginMode | string | No | 'cross' or 'isolated', required if fetching a margin order (unified accountMode supports only cross margin) |
kucoin.cancelUtaOrder (id, symbol, params?)cancelAllOrders
cancel all open orders
Kind: instance method of kucoin
Returns: Response from the exchange
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-all-orders-by-symbol
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-all-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-cancel-stop-orders
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-all-orders-by-symbol
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/batch-cancel-stop-orders
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-all-orders
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-all-stop-orders
- https://www.kucoin.com/docs-new/rest/ua/batch-cancel-order-by-symbol
| 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.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') |
| params.marginMode | string | No | spot only 'cross' or 'isolated' |
| params.uta | boolean | No | true for cancelling orders with unified account endpoint (default is false) Check cancelAllSpotOrders(), cancelAllContractOrders() and cancelAllUtaOrders() for more details on the extra parameters that can be used in params |
kucoin.cancelAllOrders (symbol, params?)cancelAllSpotOrders
helper method for cancelling all spot orders
Kind: instance method of kucoin
Returns: Response from the exchange
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-all-orders-by-symbol
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-all-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-cancel-stop-orders
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-all-orders-by-symbol
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/batch-cancel-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 | bool | No | invalid for isolated margin true if cancelling all stop orders |
| params.marginMode | string | No | 'cross' or 'isolated' |
| params.orderIds | string | No | stop orders only Comma separated order IDs |
| params.hf | bool | No | false, // true for hf order |
kucoin.cancelAllSpotOrders (symbol, params?)cancelAllContractOrders
helper method for cancelling all contract orders
Kind: instance method of kucoin
Returns: Response from the exchange
See
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-all-orders
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-all-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 |
kucoin.cancelAllContractOrders (symbol, params?)cancelAllUtaOrders
helper method for cancelling all uta orders
Kind: instance method of kucoin
Returns: Response from the exchange
See: https://www.kucoin.com/docs-new/rest/ua/batch-cancel-order-by-symbol
| 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 | bool | No | true if cancelling all stop orders |
| params.marginMode | string | No | 'CROSS' or 'ISOLATED' |
kucoin.cancelAllUtaOrders (symbol, params?)fetchOrdersByStatus
fetches a list of orders placed on the exchange
Kind: instance method of kucoin
Returns: An array of order structures
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-open-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-closed-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-orders-list
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-open-orders
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-closed-orders
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-list
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-list
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-stop-order-list
- https://www.kucoin.com/docs-new/rest/ua/get-open-order-list
- https://www.kucoin.com/docs-new/rest/ua/get-order-history
| 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.uta | boolean | No | true for fetch orders with uta endpoint (default is false) Check fetchSpotOrdersByStatus(), fetchContractOrdersByStatus() and fetchUtaOrdersByStatus() for more details on the extra parameters that can be used in params |
kucoin.fetchOrdersByStatus (status, symbol, since?, limit?, params?)fetchSpotOrdersByStatus
fetch a list of spot orders
Kind: instance method of kucoin
Returns: An array of order structures
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-open-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-closed-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-orders-list
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-open-orders
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-closed-orders
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-list
| Param | Type | Required | Description |
|---|---|---|---|
| status | string | Yes | not used for stop orders 'open' or 'closed' |
| symbol | string | Yes | unified market symbol |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | max number of orders to return |
| params | object | No | exchange specific params |
| params.until | int | No | end time in ms |
| params.side | string | No | buy or sell |
| params.type | string | No | limit, market, limit_stop or market_stop |
| params.tradeType | string | No | TRADE for spot trading, MARGIN_TRADE or MARGIN_ISOLATED_TRADE for Margin Trading |
| params.currentPage | int | No | trigger orders only current page |
| params.orderIds | string | No | trigger orders only comma separated order ID list |
| params.trigger | bool | No | True if fetching a trigger order |
| params.hf | bool | No | false, // true for hf order |
| params.marginMode | string | No | 'cross' or 'isolated', only for margin orders |
kucoin.fetchSpotOrdersByStatus (status, symbol, since?, limit?, params?)fetchContractOrdersByStatus
fetches a list of contract orders placed on the exchange
Kind: instance method of kucoin
Returns: An array of order structures
See
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-list
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-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 |
kucoin.fetchContractOrdersByStatus (status, symbol, since?, limit?, params?)fetchUtaOrdersByStatus
helper method for fetching orders by status with uta endpoint
Kind: instance method of kucoin
Returns: An array of order structures
See
- https://www.kucoin.com/docs-new/rest/ua/get-open-order-list
- https://www.kucoin.com/docs-new/rest/ua/get-order-history
| 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.until | int | No | End time in ms |
| params.side | string | No | closed orders only 'BUY' or 'SELL' |
| params.accountMode | string | No | 'unified' or 'classic' (default is unified) |
| params.marginMode | string | No | 'cross' or 'isolated', only for margin orders (unified accountMode supports only cross margin) |
| 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 |
kucoin.fetchUtaOrdersByStatus (status, symbol, since?, limit?, params?)fetchClosedOrders
fetches information on multiple closed orders made by the user
Kind: instance method of kucoin
Returns: Array<Order> - a list of order structures
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-closed-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-orders-list
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-list
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-stop-order-list
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-open-orders
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-closed-orders
- https://www.kucoin.com/docs-new/rest/ua/get-order-history
| 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, market, limit_stop or market_stop |
| params.tradeType | string | No | TRADE for spot trading, MARGIN_TRADE for Margin Trading |
| params.trigger | bool | No | True if fetching a trigger order |
| params.hf | bool | No | false, // true for hf order |
| 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 |
kucoin.fetchClosedOrders (symbol, since?, limit?, params?)fetchOpenOrders
fetch all unfilled currently open orders
Kind: instance method of kucoin
Returns: Array<Order> - a list of order structures
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-open-orders
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-orders-list
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-list
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-stop-order-list
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-open-orders
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-closed-orders
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-list
- https://www.kucoin.com/docs-new/rest/ua/get-open-order-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| since | int | No | the earliest time in ms to fetch open orders for |
| limit | int | No | the maximum number of open orders structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | end time in ms |
| params.trigger | bool | No | true if fetching trigger orders |
| params.side | string | No | buy or sell |
| params.type | string | No | limit, market, limit_stop or market_stop |
| params.tradeType | string | No | TRADE for spot trading, MARGIN_TRADE for Margin Trading |
| params.currentPage | int | No | trigger orders only current page |
| params.orderIds | string | No | trigger orders only comma separated order ID list |
| params.hf | bool | No | false, // true for hf order |
| 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 |
kucoin.fetchOpenOrders (symbol, since?, limit?, params?)fetchOrder
fetches information on an order made by the user
Kind: instance method of kucoin
Returns: object - An order structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-order-by-orderld
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-order-by-orderld
- https://www.kucoin.com/docs-new/rest/spot-trading/get-stop-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-by-orderld
- https://www.kucoin.com/docs-new/rest/futures-trading/get-stop-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/ua/get-order-details
| 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.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') |
| params.uta | bool | No | true if fetching an order with uta endpoint (default is false) Check fetchSpotOrder(), fetchContractOrder() and fetchUtaOrder() for more details on the extra parameters that can be used in params |
kucoin.fetchOrder (id, symbol, params?)fetchSpotOrder
fetch a spot order
Kind: instance method of kucoin
Returns: An order structure
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-order-by-orderld
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-order-by-orderld
- https://www.kucoin.com/docs-new/rest/spot-trading/get-stop-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-order-by-clientoid
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-by-orderld
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-by-clientoid
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Order id |
| symbol | string | Yes | not sent to exchange except for trigger orders with clientOid, but used internally by CCXT to filter |
| params | object | No | exchange specific parameters |
| params.trigger | bool | No | true if fetching a trigger order |
| params.hf | bool | No | false, // true for hf order |
| params.clientOid | bool | No | unique order id created by users to identify their orders |
| params.marginMode | object | No | 'cross' or 'isolated' |
kucoin.fetchSpotOrder (id, symbol, params?)fetchContractOrder
fetc contract order
Kind: instance method of kucoin
Returns: object - An order structure
See
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-by-orderld
- https://www.kucoin.com/docs-new/rest/futures-trading/get-stop-order-by-clientoid
| 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 |
kucoin.fetchContractOrder (id, symbol, params?)fetchUtaOrder
fetch uta order
Kind: instance method of kucoin
Returns: object - An order structure
See: https://www.kucoin.com/docs-new/rest/ua/get-order-details
| 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.accountMode | string | No | 'unified' or 'classic' (default is 'unified') |
| params.clientOrderId | string | No | client order id, required if id is not provided |
| params.marginMode | string | No | 'cross' or 'isolated', required if fetching a margin order (unified accountMode supports only cross margin) |
kucoin.fetchUtaOrder (id, symbol, params?)fetchOrderTrades
fetch all the trades made from a single order
Kind: instance method of kucoin
Returns: Array<object> - a list of trade structures
See
- https://docs.kucoin.com/#list-fills
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-trade-history
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-trade-history
- https://www.kucoin.com/docs-new/rest/ua/get-trade-history
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| 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 to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') |
| params.uta | boolean | No | set to true if fetching trades from uta endpoint, default is false. |
kucoin.fetchOrderTrades (id, symbol, since?, limit?, params?)fetchMyTrades
fetch all trades made by the user
Kind: instance method of kucoin
Returns: Array<Trade> - a list of trade structures
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-trade-history
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-trade-history
- https://www.kucoin.com/docs-new/rest/ua/get-trade-history
| 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.paginate | boolean | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
| params.type | string | No | 'spot' or 'swap', used if symbol is not provided (default is 'spot') Check fetchMySpotTrades() and fetchMyContractTrades() for more details on the extra parameters that can be used in params |
kucoin.fetchMyTrades (symbol, since?, limit?, params?)fetchMySpotTrades
fetch all spot trades made by the user
Kind: instance method of kucoin
Returns: Array<Trade> - a list of trade structures
See
- https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-trade-history
- https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-trade-history
| 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 | the latest time in ms to fetch entries for |
| params.hf | bool | No | false, // true for hf order |
| params.marginMode | string | No | 'cross' or 'isolated', only for margin trades |
| 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 |
kucoin.fetchMySpotTrades (symbol, since?, limit?, params?)fetchMyContractTrades
fetch all contract trades made by the user
Kind: instance method of kucoin
Returns: Array<Trade> - a list of trade structures
See: https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-trade-history
| 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 |
kucoin.fetchMyContractTrades (symbol, since?, limit?, params?)fetchMyUtaTrades
fetch all trades made by the user
Kind: instance method of kucoin
Returns: Array<Trade> - a list of trade structures
See: https://www.kucoin.com/docs-new/rest/ua/get-trade-history
| 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 (default is 50, max is 200) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch entries for |
| params.accountMode | string | No | 'unified' or 'classic', defaults to 'unified' |
| params.marginMode | string | No | 'cross' or 'isolated', only for margin trades (unified accountMode support only cross margin) |
| params.side | string | No | 'BUY' or 'SELL' (both if not provided) |
| 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 |
kucoin.fetchMyUtaTrades (symbol, since?, limit?, params?)fetchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of kucoin
Returns: Array<Trade> - a list of trade structures
See
- https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-trade-history
- https://www.kucoin.com/docs-new/rest/ua/get-trades
- https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-trade-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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
kucoin.fetchTrades (symbol, since?, limit?, params?)fetchTradingFee
fetch the trading fees for a market
Kind: instance method of kucoin
Returns: object - a fee structure
See
- https://www.kucoin.com/docs-new/rest/account-info/trade-fee/get-actual-fee-spot-margin
- https://www.kucoin.com/docs-new/rest/account-info/trade-fee/get-actual-fee-futures
- https://www.kucoin.com/docs-new/rest/ua/get-actual-fee
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta) endpoint, defaults to false |
kucoin.fetchTradingFee (symbol, params?)withdraw
make a withdrawal
Kind: instance method of kucoin
Returns: object - a transaction structure
See: https://www.kucoin.com/docs-new/rest/account-info/withdrawals/withdraw-v3
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| amount | float | Yes | the amount to withdraw |
| address | string | Yes | the address to withdraw to |
| tag | string | Yes | |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.withdraw (code, amount, address, tag, params?)fetchDeposits
fetch all deposits made to an account
Kind: instance method of kucoin
Returns: Array<object> - a list of transaction structures
See
- https://www.kucoin.com/docs-new/rest/account-info/deposit/get-deposit-history
- https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-list
- https://www.kucoin.com/docs/rest/funding/deposit/get-v1-historical-deposits-list
| 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 |
| params.until | int | No | the latest time in ms to fetch entries for |
| params.paginate | boolean | No | main account only default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
| params.accountType | string | No | 'main' or 'contract' (default is 'main') |
kucoin.fetchDeposits (code, since?, limit?, params?)fetchContractDeposits
helper method for fetching deposits for futures accounts
Kind: instance method of kucoin
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 |
kucoin.fetchContractDeposits (code, since?, limit?, params?)fetchWithdrawals
fetch all withdrawals made from an account
Kind: instance method of kucoin
Returns: Array<object> - a list of transaction structures
See
- https://www.kucoin.com/docs-new/rest/account-info/withdrawals/get-withdrawal-history
- https://www.kucoin.com/docs/rest/funding/withdrawals/get-withdrawals-list
- https://www.kucoin.com/docs/rest/funding/withdrawals/get-v1-historical-withdrawals-list
| 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 |
| params.until | int | No | the latest time in ms to fetch entries for |
| params.paginate | boolean | No | main account only default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
| params.accountType | string | No | 'main' or 'contract' (default is 'main') |
kucoin.fetchWithdrawals (code, since?, limit?, params?)fetchContractWithdrawals
helper method for fetching withdrawals for futures accounts
Kind: instance method of kucoin
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 |
kucoin.fetchContractWithdrawals (code, since?, limit?, params?)fetchBalance
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of kucoin
Returns: object - a balance structure
See
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-detail-spot
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-cross-margin
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-isolated-margin
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-futures
- https://www.kucoin.com/docs-new/rest/ua/get-account-currency-assets-uta
- https://www.kucoin.com/docs-new/rest/ua/get-account-currency-assets-classic
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.marginMode | object | No | 'cross' or 'isolated', margin type for fetching margin balance |
| params.type | object | No | extra parameters specific to the exchange API endpoint |
| params.hf | object | No | default if false if true, the result includes the balance of the high frequency account |
| params.uta | boolean | No | set to true for the unified trading account (uta) endpoint, defaults to false |
kucoin.fetchBalance (params?)fetchContractBalance
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of kucoin
Returns: object - a balance structure
See: https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-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 |
kucoin.fetchContractBalance (params?)fetchUtaBalance
helper method for fetching balance with unified trading account (uta) endpoint
Kind: instance method of kucoin
Returns: object - a balance structure
See
- https://www.kucoin.com/docs-new/rest/ua/get-account-currency-assets-uta
- https://www.kucoin.com/docs-new/rest/ua/get-account-currency-assets-classic
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | 'unified', 'spot', 'funding', 'cross', 'isolated' or 'swap' (default is 'unified') |
| params.marginMode | string | No | 'cross' or 'isolated', margin type for fetching margin balance, only applicable if type is margin (default is cross) |
kucoin.fetchUtaBalance (params?)transfer
transfer currency internally between wallets on the same account
Kind: instance method of kucoin
Returns: object - a transfer structure
See
- https://www.kucoin.com/docs-new/rest/account-info/transfer/flex-transfer?lang=en_US&
- https://www.kucoin.com/docs-new/rest/ua/flex-transfer
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta) endpoint, defaults to false Check transferClassic() and transferUta() for more details on params |
kucoin.transfer (code, amount, fromAccount, toAccount, params?)transferUta
transfer currency internally between wallets on the same account with uta endpoint
Kind: instance method of kucoin
Returns: object - a transfer structure
See: https://www.kucoin.com/docs-new/rest/ua/flex-transfer
| 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 |
| params.transferType | string | No | INTERNAL, PARENT_TO_SUB, SUB_TO_PARENT, SUB_TO_SUB (default is INTERNAL) |
| params.fromUserId | string | No | required if transferType is SUB_TO_PARENT or SUB_TO_SUB |
| params.toUserId | string | No | required if transferType is PARENT_TO_SUB or SUB_TO_SUB |
kucoin.transferUta (code, amount, fromAccount, toAccount, params?)transferClassic
transfer currency internally between wallets on the same account with classic endpoints
Kind: instance method of kucoin
Returns: object - a transfer structure
See: https://www.kucoin.com/docs-new/rest/account-info/transfer/flex-transfer?lang=en_US&
| 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 |
| params.transferType | string | No | INTERNAL, PARENT_TO_SUB, SUB_TO_PARENT (default is INTERNAL) |
| params.fromUserId | string | No | required if transferType is SUB_TO_PARENT |
| params.toUserId | string | No | required if transferType is PARENT_TO_SUB |
kucoin.transferClassic (code, amount, fromAccount, toAccount, params?)fetchLedger
fetch the history of changes, actions done by the user or operations that altered the balance of the user
Kind: instance method of kucoin
Returns: object - a ledger structure
See
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-ledgers-spot-margin
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-ledgers-tradehf
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-ledgers-marginhf
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-ledgers-futures
- https://www.kucoin.com/docs-new/rest/ua/get-account-ledger
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code, default is undefined |
| since | int | No | timestamp in ms of the earliest ledger entry, default is undefined |
| limit | int | No | max number of ledger entries to return, default is undefined |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | object | No | extra parameters specific to the exchange API endpoint |
| params.hf | boolean | No | default false, when true will fetch ledger entries for the high frequency trading account |
| params.until | int | No | the latest time in ms to fetch entries for |
| params.uta | boolean | No | default false, when true will fetch ledger entries for the unified trading account (UTA) instead of the regular accounts endpoint |
| params.paginate | boolean | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
kucoin.fetchLedger (code?, since?, limit?, params?)fetchBorrowInterest
fetch the interest owed by the user for borrowing currency for margin trading
Kind: instance method of kucoin
Returns: Array<object> - a list of borrow interest structures
See
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-cross-margin
- https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-isolated-margin
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code |
| symbol | string | No | unified market symbol, required for isolated margin |
| since | int | No | the earliest time in ms to fetch borrrow interest for |
| limit | int | No | the maximum number of structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string | No | 'cross' or 'isolated' default is 'cross' |
kucoin.fetchBorrowInterest (code?, symbol?, since?, limit?, params?)fetchBorrowRateHistories
retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is undefined
Kind: instance method of kucoin
Returns: object - a dictionary of borrow rate structures indexed by the market symbol
See: https://www.kucoin.com/docs-new/rest/margin-trading/debit/get-interest-history
| Param | Type | Required | Description |
|---|---|---|---|
| codes | Array<string>, undefined | Yes | list of unified currency codes, default is undefined |
| since | int | No | timestamp in ms of the earliest borrowRate, default is undefined |
| limit | int | No | max number of borrow rate prices to return, default is undefined |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string | No | 'cross' or 'isolated' default is 'cross' |
| params.until | int | No | the latest time in ms to fetch entries for |
kucoin.fetchBorrowRateHistories (codes, since?, limit?, params?)fetchBorrowRateHistory
retrieves a history of a currencies borrow interest rate at specific time slots
Kind: instance method of kucoin
Returns: Array<object> - an array of borrow rate structures
See: https://www.kucoin.com/docs-new/rest/margin-trading/debit/get-interest-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| since | int | No | timestamp for the earliest borrow rate |
| limit | int | No | the maximum number of borrow rate structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string | No | 'cross' or 'isolated' default is 'cross' |
| params.until | int | No | the latest time in ms to fetch entries for |
kucoin.fetchBorrowRateHistory (code, since?, limit?, params?)fetchCrossBorrowRate
fetch the rate of interest to borrow a currency for margin trading
Kind: instance method of kucoin
Returns: object - a borrow rate structure
See: https://www.kucoin.com/docs-new/rest/ua/get-borrowing-rates-and-limits
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.fetchCrossBorrowRate (code, params?)borrowCrossMargin
create a loan to borrow margin
Kind: instance method of kucoin
Returns: object - a margin loan structure
See: https://www.kucoin.com/docs-new/rest/margin-trading/debit/borrow
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code of the currency to borrow |
| amount | float | Yes | the amount to borrow |
| params | object | No | extra parameters specific to the exchange API endpoints |
| params.timeInForce | string | No | either IOC or FOK |
kucoin.borrowCrossMargin (code, amount, params?)borrowIsolatedMargin
create a loan to borrow margin
Kind: instance method of kucoin
Returns: object - a margin loan structure
See: https://www.kucoin.com/docs-new/rest/margin-trading/debit/borrow
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol, required for isolated margin |
| code | string | Yes | unified currency code of the currency to borrow |
| amount | float | Yes | the amount to borrow |
| params | object | No | extra parameters specific to the exchange API endpoints |
| params.timeInForce | string | No | either IOC or FOK |
kucoin.borrowIsolatedMargin (symbol, code, amount, params?)repayCrossMargin
repay borrowed margin and interest
Kind: instance method of kucoin
Returns: object - a margin loan structure
See: https://www.kucoin.com/docs-new/rest/margin-trading/debit/repay
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code of the currency to repay |
| amount | float | Yes | the amount to repay |
| params | object | No | extra parameters specific to the exchange API endpoints |
kucoin.repayCrossMargin (code, amount, params?)repayIsolatedMargin
repay borrowed margin and interest
Kind: instance method of kucoin
Returns: object - a margin loan structure
See: https://www.kucoin.com/docs-new/rest/margin-trading/debit/repay
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| code | string | Yes | unified currency code of the currency to repay |
| amount | float | Yes | the amount to repay |
| params | object | No | extra parameters specific to the exchange API endpoints |
kucoin.repayIsolatedMargin (symbol, code, amount, params?)fetchDepositWithdrawFees
fetch deposit and withdraw fees - IMPORTANT use fetchDepositWithdrawFee to get more in-depth info
Kind: instance method of kucoin
Returns: object - a list of fee structures
See: https://docs.kucoin.com/#get-currencies
| Param | Type | Required | Description |
|---|---|---|---|
| codes | Array<string>, undefined | Yes | list of unified currency codes |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.fetchDepositWithdrawFees (codes, params?)fetchLeverage
fetch the set leverage for a market
Kind: instance method of kucoin
Returns: object - a leverage structure
See: https://www.kucoin.com/docs-new/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 |
kucoin.fetchLeverage (symbol, params?)setLeverage
set the level of leverage for a market
Kind: instance method of kucoin
Returns: object - response from the exchange
See
- https://www.kucoin.com/docs-new/rest/margin-trading/debit/modify-leverage // margin
- https://www.kucoin.com/docs-new/rest/futures-trading/positions/modify-cross-margin-leverage // contract
- https://www.kucoin.com/docs-new/rest/ua/modify-cross-margin-leverage-uta // margin uta
- https://www.kucoin.com/docs-new/rest/ua/modify-leverage-uta // contract uta
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | int | No | New leverage multiplier. Must be greater than 1 and up to two decimal places, and cannot be less than the user's current debt leverage or greater than the system's maximum leverage |
| symbol | string | No | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta) |
| params.marginMode | string | No | spot non-uta only 'cross' or 'isolated' default is 'cross' |
| params.code | string | No | uta margin only the unified currency code for the margin to set the leverage for |
kucoin.setLeverage (leverage?, symbol?, params?)setContractLeverage
set the level of leverage for a market
Kind: instance method of kucoin
Returns: object - response from the exchange
See
- https://www.kucoin.com/docs-new/rest/futures-trading/positions/modify-cross-margin-leverage
- https://www.kucoin.com/docs-new/rest/ua/modify-leverage-uta
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta) |
kucoin.setContractLeverage (leverage, symbol, params?)fetchFundingInterval
fetch the current funding rate interval
Kind: instance method of kucoin
Returns: object - a funding rate structure
See
- https://www.kucoin.com/docs-new/rest/ua/get-current-funding-rate
- https://www.kucoin.com/docs-new/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 |
kucoin.fetchFundingInterval (symbol, params?)fetchFundingRate
fetch the current funding rate
Kind: instance method of kucoin
Returns: object - a funding rate structure
See
- https://www.kucoin.com/docs-new/rest/ua/get-current-funding-rate
- https://www.kucoin.com/docs-new/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 |
| params.uta | boolean | No | set to true for the unified trading account (uta) |
kucoin.fetchFundingRate (symbol, params?)fetchFundingRateHistory
fetches historical funding rate prices
Kind: instance method of kucoin
Returns: Array<object> - a list of funding rate structures
See
- https://www.kucoin.com/docs-new/rest/futures-trading/funding-fees/get-public-funding-history
- https://www.kucoin.com/docs-new/rest/ua/get-history-funding-rate
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to true |
kucoin.fetchFundingRateHistory (symbol, since?, limit?, params?)fetchFundingHistory
fetch the history of funding payments paid and received on this account
Kind: instance method of kucoin
Returns: object - a funding history structure
See: https://www.kucoin.com/docs-new/rest/futures-trading/funding-fees/get-private-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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
kucoin.fetchFundingHistory (symbol, since?, limit?, params?)fetchPosition
fetch data on an open position
Kind: instance method of kucoin
Returns: object - a position structure
See
- https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-position-details
- https://www.kucoin.com/docs-new/rest/ua/get-position-list-uta
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
| params.pageSize | integer | No | uta only page size for the uta endpoint (default 50, max 200) |
| params.pageNumber | integer | No | uta only page number for the uta endpoint (default 1) |
kucoin.fetchPosition (symbol, params?)fetchPositions
fetch all open positions
Kind: instance method of kucoin
Returns: Array<object> - a list of position structure
See
- https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-position-list
- https://www.kucoin.com/docs-new/rest/ua/get-position-list-uta
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
| params.pageSize | integer | No | uta only page size for the uta endpoint (default 50, max 200) |
| params.pageNumber | integer | No | uta only page number for the uta endpoint (default 1) |
kucoin.fetchPositions (symbols, params?)fetchPositionsHistory
fetches historical positions
Kind: instance method of kucoin
Returns: Array<object> - a list of position structure
See
- https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-positions-history
- https://www.kucoin.com/docs-new/rest/ua/get-position-history-uta
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), defaults to false |
kucoin.fetchPositionsHistory (symbols?, since?, limit?, params?)cancelOrders
cancel multiple orders for contract markets
Kind: instance method of kucoin
Returns: object - an list of order structures
See
- https://www.kucoin.com/docs-new/3470241e0
- https://www.kucoin.com/docs-new/rest/ua/batch-cancel-order-by-id
| 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 |
| params.uta | boolean | No | set to true to use the unified trading account (uta) endpoint, defaults to false for the contract orders |
| params.accountMode | string | No | for uta endpoint only 'unified' or 'classic' (default is 'unified') |
| params.marginMode | string | No | for margin orders only 'cross' or 'isolated' (unified accountMode supports cross margin only) |
kucoin.cancelOrders (ids, symbol, params?)addMargin
add margin
Kind: instance method of kucoin
Returns: object - a margin structure
See: https://www.kucoin.com/docs-new/rest/futures-trading/positions/add-isolated-margin
| 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 |
| params.positionSide | string | No | required for hedged position 'BOTH', 'LONG' or 'SHORT' (default is 'BOTH') |
kucoin.addMargin (symbol, amount, params?)fetchMarginMode
fetches the margin mode of a trading pair
Kind: instance method of kucoin
Returns: object - a margin mode structure
See: https://www.kucoin.com/docs-new/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 |
kucoin.fetchMarginMode (symbol, params?)setMarginMode
set margin mode to 'cross' or 'isolated'
Kind: instance method of kucoin
Returns: object - response from the exchange
See: https://www.kucoin.com/docs-new/rest/futures-trading/positions/switch-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 |
kucoin.setMarginMode (marginMode, symbol, params?)setPositionMode
set hedged to true or false for a market
Kind: instance method of kucoin
Returns: object - a response from the exchange
See: https://www.kucoin.com/docs-new/rest/futures-trading/positions/switch-position-mode
| 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 |
kucoin.setPositionMode (hedged, symbol?, params?)fetchPositionMode
fetchs the position mode, hedged or one way
Kind: instance method of kucoin
Returns: object - an object detailing whether the market is in hedged or one-way mode
See: https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-position-mode
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified symbol of the market to fetch the position mode for (not used in blofin fetchPositionMode) |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.fetchPositionMode (symbol?, params?)closePosition
closes open positions for a market
Kind: instance method of kucoin
Returns: Array<object> - A list of position structures
See
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
- https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order-test
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| side | string | Yes | not used by kucoin closePositions |
| params | object | No | extra parameters specific to the okx api endpoint |
| params.clientOrderId | string | No | client order id of the order |
kucoin.closePosition (symbol, side, 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 kucoin
Returns: object - a leverage tiers structure
See: https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-isolated-margin-risk-limit
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true to fetch leverage tiers for unified trading account instead of futures account (default is false) |
kucoin.fetchMarketLeverageTiers (symbol, params?)fetchLeverageTiers
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
Kind: instance method of kucoin
Returns: object - a dictionary of leverage tiers structures, indexed by market symbols
See: https://www.kucoin.com/docs-new/rest/ua/get-position-tiers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.fetchLeverageTiers (symbols, params?)fetchOpenInterests
Retrieves the open interest for a list of symbols
Kind: instance method of kucoin
Returns: object - an open interest structure/docs/manual#open-interest-structure
See: https://www.kucoin.com/docs-new/rest/ua/get-futures-open-interset
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | Unified CCXT market symbol |
| params | object | No | exchange specific parameters |
kucoin.fetchOpenInterests (symbols?, params?)fetchOpenInterestHistory
Retrieves the open interest history of a currency
Kind: instance method of kucoin
Returns: object - an array of open interest structures
See: https://www.kucoin.com/docs-new/rest/ua/get-futures-open-interset
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| timeframe | string | Yes | '5m', '15m', '30m', '1h', '4h' or '1d' |
| since | int | No | the time(ms) of the earliest record to retrieve as a unix timestamp |
| limit | int | No | default 30,max 200 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch entries for |
| 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 |
kucoin.fetchOpenInterestHistory (symbol, timeframe, since?, limit?, params?)isUTAEnabled
returns true or false so the user can check if unified account is enabled
Kind: instance method of kucoin
Returns: boolean - true if unified account is enabled, false otherwise
See: https://www.kucoin.com/docs-new/rest/ua/get-account-mode
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.isUTAEnabled (params?)fetchTransfers
fetch a history of internal transfers made on an account
Kind: instance method of kucoin
Returns: Array<object> - a list of transfer structures
See: https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-ledgers-spot-margin
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code of the currency transferred |
| since | int | No | the earliest time in ms to fetch transfers for |
| limit | int | No | the maximum number of transfer structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch transfers for |
| 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 |
kucoin.fetchTransfers (code?, since?, limit?, 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 kucoin
Returns: object - a ticker structure
See
- https://www.kucoin.com/docs-new/3470063w0
- https://www.kucoin.com/docs-new/3470081w0
- https://www.kucoin.com/docs-new/3470222w0
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), default is false |
kucoin.watchTicker (symbol, params?)unWatchTicker
unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of kucoin
Returns: object - a ticker structure
See
- https://www.kucoin.com/docs-new/3470063w0
- https://www.kucoin.com/docs-new/3470081w0
- https://www.kucoin.com/docs-new/3470222w0
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), default is false |
kucoin.unWatchTicker (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 kucoin
Returns: object - a ticker structure
See
- https://www.kucoin.com/docs-new/3470063w0
- https://www.kucoin.com/docs-new/3470064w0
- https://www.kucoin.com/docs-new/3470081w0
- https://www.kucoin.com/docs-new/3470222w0
| 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 |
| params.method | string | No | spot markets only either '/market/snapshot' or '/market/ticker' default is '/market/ticker' |
| params.uta | boolean | No | set to true for the unified trading account (uta), default is false |
kucoin.watchTickers (symbols, params?)watchBidsAsks
watches best bid & ask for symbols
Kind: instance method of kucoin
Returns: object - a ticker structure
See
| 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 |
kucoin.watchBidsAsks (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 kucoin
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://www.kucoin.com/docs-new/3470071w0
- https://www.kucoin.com/docs-new/3470086w0
- https://www.kucoin.com/docs-new/3470223w0
| 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.uta | boolean | No | set to true for the unified trading account (uta), default is false |
kucoin.watchOHLCV (symbol, timeframe, since?, limit?, params?)unWatchOHLCV
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of kucoin
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://www.kucoin.com/docs-new/3470071w0
- https://www.kucoin.com/docs-new/3470086w0
- https://www.kucoin.com/docs-new/3470223w0
| 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 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta), default is false |
kucoin.unWatchOHLCV (symbol, timeframe, params?)watchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of kucoin
Returns: Array<object> - a list of trade structures
See
- https://www.kucoin.com/docs-new/3470072w0
- https://www.kucoin.com/docs-new/3470084w0
- https://www.kucoin.com/docs-new/3470224w0
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), default is false |
kucoin.watchTrades (symbol, since?, limit?, params?)watchTradesForSymbols
get the list of most recent trades for a particular symbol
Kind: instance method of kucoin
Returns: Array<object> - a list of trade structures
See
| 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 |
kucoin.watchTradesForSymbols (symbols, since?, limit?, params?)unWatchTradesForSymbols
unWatches trades stream
Kind: instance method of kucoin
Returns: Array<object> - a list of trade structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | string | Yes | |
| params | object | No | extra parameters specific to the exchange API endpoint |
kucoin.unWatchTradesForSymbols (symbols, params?)unWatchTrades
unWatches trades stream
Kind: instance method of kucoin
Returns: Array<object> - a list of trade structures
See
- https://www.kucoin.com/docs-new/3470072w0
- https://www.kucoin.com/docs-new/3470084w0
- https://www.kucoin.com/docs-new/3470224w0
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), default is false |
kucoin.unWatchTrades (symbol, params?)watchOrderBook
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of kucoin
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://www.kucoin.com/docs-new/3470069w0 // spot level 5
- https://www.kucoin.com/docs-new/3470070w0 // spot level 50
- https://www.kucoin.com/docs-new/3470068w0 // spot incremental
- https://www.kucoin.com/docs-new/3470083w0 // futures level 5
- https://www.kucoin.com/docs-new/3470097w0 // futures level 50
- https://www.kucoin.com/docs-new/3470082w0 // futures incremental
- https://www.kucoin.com/docs-new/3470221w0 // uta
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), default is false |
| params.method | string | No | either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2' |
kucoin.watchOrderBook (symbol, limit?, params?)unWatchOrderBook
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of kucoin
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level1-bbo-market-data
- https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level2-market-data
- https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level2-5-best-ask-bid-orders
- https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level2-50-best-ask-bid-orders
| 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 |
| params.uta | boolean | No | set to true for the unified trading account (uta), default is false |
| params.method | string | No | either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2' |
kucoin.unWatchOrderBook (symbol, params?)watchOrderBookForSymbols
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of kucoin
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://www.kucoin.com/docs-new/3470069w0 // spot level 5
- https://www.kucoin.com/docs-new/3470070w0 // spot level 50
- https://www.kucoin.com/docs-new/3470068w0 // spot incremental
- https://www.kucoin.com/docs-new/3470083w0 // futures level 5
- https://www.kucoin.com/docs-new/3470097w0 // futures level 50
- https://www.kucoin.com/docs-new/3470082w0 // futures incremental
- https://www.kucoin.com/docs-new/3470221w0 // uta
| 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 |
kucoin.watchOrderBookForSymbols (symbols, limit?, params?)unWatchOrderBookForSymbols
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of kucoin
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://www.kucoin.com/docs-new/3470069w0 // spot level 5
- https://www.kucoin.com/docs-new/3470070w0 // spot level 50
- https://www.kucoin.com/docs-new/3470068w0 // spot incremental
- https://www.kucoin.com/docs-new/3470083w0 // futures level 5
- https://www.kucoin.com/docs-new/3470097w0 // futures level 50
- https://www.kucoin.com/docs-new/3470082w0 // futures incremental
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified array of symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.method | string | No | either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' or '/contractMarket/level2' or '/contractMarket/level2Depth5' or '/contractMarket/level2Depth50' default is '/market/level2' for spot and '/contractMarket/level2' for futures |
kucoin.unWatchOrderBookForSymbols (symbols, params?)watchOrders
watches information on multiple orders made by the user
Kind: instance method of kucoin
Returns: Array<object> - a list of order structures
See
- https://www.kucoin.com/docs-new/3470074w0 // spot regular orders
- https://www.kucoin.com/docs-new/3470139w0 // spot trigger orders
- https://www.kucoin.com/docs-new/3470090w0 // contract regular orders
- https://www.kucoin.com/docs-new/3470091w0 // contract trigger orders
- https://www.kucoin.com/docs-new/3470228w0 // uta orders
| 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.uta | boolean | No | set to true for the unified trading account (uta) |
| params.trigger | boolean | No | trigger orders are watched if true |
| params.type | string | No | 'spot' or 'swap' (default is 'spot' if symbol is not provided) |
kucoin.watchOrders (symbol, since?, limit?, params?)watchMyTrades
watches information on multiple trades made by the user on spot
Kind: instance method of kucoin
Returns: Array<object> - a list of trade structures
See
- https://www.kucoin.com/docs-new/3470074w0
- https://www.kucoin.com/docs-new/3470090w0
- https://www.kucoin.com/docs-new/3470264w0
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market trades were made in |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trade structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta) |
| params.method | string | No | classic (non-uta) account only '/spotMarket/tradeOrders' or '/spot/tradeFills' or '/contractMarket/tradeOrders', default is '/spotMarket/tradeOrders' |
kucoin.watchMyTrades (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 kucoin
Returns: object - a balance structure
See
- https://www.kucoin.com/docs-new/3470075w0 // spot balance
- https://www.kucoin.com/docs-new/3470092w0 // contract balance
- https://www.kucoin.com/docs-new/3470231w0 // uta balance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta) |
| params.type | string | No | classic (non-uta) account only 'spot' or 'swap' (default is 'spot') |
kucoin.watchBalance (params?)watchPosition
watch open positions for a specific symbol
Kind: instance method of kucoin
Returns: object - a position structure
See: https://www.kucoin.com/docs-new/3470093w0
| Param | Type | Description |
|---|---|---|
| symbol | string, undefined | unified market symbol |
| params | object | extra parameters specific to the exchange API endpoint |
kucoin.watchPosition (symbol, params)watchPositions
watch all open positions
Kind: instance method of kucoin
Returns: Array<object> - a list of position structure
See: https://www.kucoin.com/docs-new/3470233w0
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| since | int | No | the earliest time in ms to fetch positions for |
| limit | int | No | the maximum number of positions to retrieve |
| params | object | Yes | extra parameters specific to the exchange API endpoint |
| params.uta | boolean | No | set to true for the unified trading account (uta) |
kucoin.watchPositions (symbols?, since?, limit?, params)