## kuna{docsify-ignore} **Kind**: global class **Extends**: Exchange * [fetchTime](#fetchtime) * [fetchCurrencies](#fetchcurrencies) * [fetchMarkets](#fetchmarkets) * [fetchOrderBook](#fetchorderbook) * [fetchTickers](#fetchtickers) * [fetchTicker](#fetchticker) * [fetchL3OrderBook](#fetchl3orderbook) * [fetchTrades](#fetchtrades) * [fetchBalance](#fetchbalance) * [createOrder](#createorder) * [cancelOrder](#cancelorder) * [cancelOrder](#cancelorder) * [fetchOrder](#fetchorder) * [fetchOpenOrders](#fetchopenorders) * [fetchClosedOrders](#fetchclosedorders) * [fetchOrdersByStatus](#fetchordersbystatus) * [fetchMyTrades](#fetchmytrades) * [withdraw](#withdraw) * [fetchWithdrawals](#fetchwithdrawals) * [fetchWithdrawal](#fetchwithdrawal) * [createDepositAddress](#createdepositaddress) * [fetchDepositAddress](#fetchdepositaddress) * [fetchDeposits](#fetchdeposits) * [fetchDeposit](#fetchdeposit) ### kuna{docsify-ignore} Use the public-key as your apiKey ```javascript kuna.kuna () ``` ### fetchTime{docsify-ignore} fetches the current integer timestamp in milliseconds from the exchange server **Kind**: instance method of [kuna](#kuna) **Returns**: int - the current integer timestamp in milliseconds from the exchange server **See**: https://docs.kuna.io/docs/get-time-on-the-server | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchTime ([params]) ``` ### fetchCurrencies{docsify-ignore} fetches all available currencies on an exchange **Kind**: instance method of [kuna](#kuna) **Returns**: object - an associative dictionary of currencies **See**: https://docs.kuna.io/docs/get-information-about-available-currencies | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchCurrencies ([params]) ``` ### fetchMarkets{docsify-ignore} retrieves data on all markets for kuna **Kind**: instance method of [kuna](#kuna) **Returns**: Array<object> - an array of objects representing market data **See**: https://docs.kuna.io/docs/get-all-traded-markets | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchMarkets ([params]) ``` ### fetchOrderBook{docsify-ignore} fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [kuna](#kuna) **Returns**: object - A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols **See**: https://docs.kuna.io/docs/get-public-orders-book | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified symbol of the market to fetch the order book for | | limit | int | No | 5, 10, 20, 50, 100, 500, or 1000 (default) | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchOrderBook (symbol[, limit, params]) ``` ### fetchTickers{docsify-ignore} fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market. The average is not returned in the response, but the median can be accessed via response['info']['price'] **Kind**: instance method of [kuna](#kuna) **Returns**: object - a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://docs.kuna.io/docs/get-market-info-by-tickers | 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 | ```javascript kuna.fetchTickers ([symbols, params]) ``` ### fetchTicker{docsify-ignore} fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market **Kind**: instance method of [kuna](#kuna) **Returns**: object - a [ticker structure](https://docs.ccxt.com/#/?id=ticker-structure) **See**: https://docs.kuna.io/docs/get-market-info-by-tickers | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified symbol of the market to fetch the ticker for | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchTicker (symbol[, params]) ``` ### fetchL3OrderBook{docsify-ignore} fetches level 3 information on open orders with bid (buy) and ask (sell) prices, volumes and other data **Kind**: instance method of [kuna](#kuna) **Returns**: object - an [order book structure](https://docs.ccxt.com/#/?id=order-book-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | limit | int | No | max number of orders to return, default is undefined | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchL3OrderBook (symbol[, limit, params]) ``` ### fetchTrades{docsify-ignore} get the list of most recent trades for a particular symbol **Kind**: instance method of [kuna](#kuna) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades) **See**: https://docs.kuna.io/docs/get-public-trades-book | 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 | between 1 and 100, 25 by default | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchTrades (symbol[, since, limit, params]) ``` ### fetchBalance{docsify-ignore} query for balance and get the amount of funds available for trading or funds locked in orders **Kind**: instance method of [kuna](#kuna) **Returns**: object - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchBalance ([params]) ``` ### createOrder{docsify-ignore} create a trade order **Kind**: instance method of [kuna](#kuna) **Returns**: object - an [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.kuna.io/docs/create-a-new-order-private | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified symbol of the market to create an order in | | type | string | Yes | 'market' or 'limit' | | side | string | Yes | 'buy' or 'sell' | | amount | float | Yes | how much of currency you want to trade in units of 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.triggerPrice | float | No | the price at which a trigger order is triggered at EXCHANGE SPECIFIC PARAMETERS | | params.id | string | No | id must be a UUID format, if you do not specify id, it will be generated automatically. | | params.quoteQuantity | float | No | the max quantity of the quote asset to use for selling/buying | ```javascript kuna.createOrder (symbol, type, side, amount[, price, params]) ``` ### cancelOrder{docsify-ignore} cancels an open order **Kind**: instance method of [kuna](#kuna) **Returns**: object - An [order structure](https://docs.ccxt.com/#/?id=order-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | order id | | symbol | string | Yes | unified market symbol | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.cancelOrder (id, symbol[, params]) ``` ### cancelOrder{docsify-ignore} cancels an open order **Kind**: instance method of [kuna](#kuna) **Returns**: object - An [order structure](https://docs.ccxt.com/#/?id=order-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | ids | string | Yes | order ids | | symbol | string | Yes | not used by kuna cancelOrder | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.cancelOrder (ids, symbol[, params]) ``` ### fetchOrder{docsify-ignore} fetches information on an order made by the user **Kind**: instance method of [kuna](#kuna) **Returns**: object - An [order structure](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.kuna.io/docs/get-order-details-by-id | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | not used by kuna fetchOrder | | params | object | No | extra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS | | params.withTrades | boolean | No | default == true, specify if the response should include trades associated with the order | ```javascript kuna.fetchOrder (symbol[, params]) ``` ### fetchOpenOrders{docsify-ignore} fetch all unfilled currently open orders **Kind**: instance method of [kuna](#kuna) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.kuna.io/docs/get-active-client-orders-private | 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 | 1-100, the maximum number of open orders structures to retrieve | | params | object | No | extra parameters specific to the exchange API endpoint | | params.until | int | No | the latest timestamp (ms) to fetch orders for EXCHANGE SPECIFIC PARAMETERS | | params.sort | string | No | asc (oldest-on-top) or desc (newest-on-top) | ```javascript kuna.fetchOpenOrders (symbol[, since, limit, params]) ``` ### fetchClosedOrders{docsify-ignore} fetches information on multiple closed orders made by the user **Kind**: instance method of [kuna](#kuna) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.kuna.io/docs/get-private-orders-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 | the latest time in ms to fetch orders for EXCHANGE SPECIFIC PARAMETERS | | params.sort | string | No | asc (oldest-on-top) or desc (newest-on-top) | ```javascript kuna.fetchClosedOrders (symbol[, since, limit, params]) ``` ### fetchOrdersByStatus{docsify-ignore} fetch a list of orders **Kind**: instance method of [kuna](#kuna) **Returns**: Array<Order> - a list of [order structures](https://docs.ccxt.com/#/?id=order-structure) **See**: https://docs.kuna.io/docs/get-private-orders-history | Param | Type | Required | Description | | --- | --- | --- | --- | | status | string | Yes | canceled, closed, expired, open, pending, rejected, or waitStop | | 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 | 1-100, the maximum number of open orders structures to retrieve | | params | object | No | extra parameters specific to the exchange API endpoint | | params.until | int | No | the latest timestamp (ms) to fetch orders for EXCHANGE SPECIFIC PARAMETERS | | params.sort | string | No | asc (oldest-on-top) or desc (newest-on-top) | ```javascript kuna.fetchOrdersByStatus (status, symbol[, since, limit, params]) ``` ### fetchMyTrades{docsify-ignore} fetch all trades made by the user **Kind**: instance method of [kuna](#kuna) **Returns**: Array<Trade> - a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure) **See**: https://docs.kuna.io/docs/get-private-trades-history | Param | Type | Required | Description | | --- | --- | --- | --- | | symbol | string | Yes | unified market symbol | | since | int | No | not used by kuna fetchMyTrades | | limit | int | No | not used by kuna fetchMyTrades | | params | object | No | extra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS | | params.orderId | string | No | UUID of an order, to receive trades for this order only | | params.sort | string | No | asc (oldest-on-top) or desc (newest-on-top) | ```javascript kuna.fetchMyTrades (symbol[, since, limit, params]) ``` ### withdraw{docsify-ignore} make a withdrawal **Kind**: instance method of [kuna](#kuna) **Returns**: object - a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure) **See**: https://docs.kuna.io/docs/create-a-withdraw | 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 | | params.chain | string | No | the chain to withdraw to EXCHANGE SPECIFIC PARAMETERS | | params.id | string | No | id must be a uuid format, if you do not specify id, it will be generated automatically | | params.withdrawAll | boolean | No | this field says that the amount should also include a fee | ```javascript kuna.withdraw (code, amount, address, tag[, params]) ``` ### fetchWithdrawals{docsify-ignore} fetch all withdrawals made to an account **Kind**: instance method of [kuna](#kuna) **Returns**: Array<object> - a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure) **See**: https://docs.kuna.io/docs/get-withdraw-history | 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 deposits for EXCHANGE SPECIFIC PARAMETERS | | params.status | string | No | Created, Canceled, PartiallyProcessed, Processing, Processed, WaitForConfirmation, Pending, AmlChecking | | params.sortField | string | No | amount (sorting by time), createdAt (sorting by date) | | params.sortOrder | string | No | asc (oldest-on-top), or desc (newest-on-top, default) | | params.skip | int | No | 0 - ... Select the number of transactions to skip | | params.address | string | No | | ```javascript kuna.fetchWithdrawals (code[, since, limit, params]) ``` ### fetchWithdrawal{docsify-ignore} fetch data on a currency withdrawal via the withdrawal id **Kind**: instance method of [kuna](#kuna) **Returns**: object - a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure) **See**: https://docs.kuna.io/docs/get-withdraw-details-by-id | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | withdrawal id | | code | string | Yes | not used by kuna.fetchWithdrawal | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchWithdrawal (id, code[, params]) ``` ### createDepositAddress{docsify-ignore} create a currency deposit address **Kind**: instance method of [kuna](#kuna) **Returns**: object - an [address structure](https://docs.ccxt.com/#/?id=address-structure) **See**: https://docs.kuna.io/docs/generate-a-constant-crypto-address-for-deposit | 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 | ```javascript kuna.createDepositAddress (code[, params]) ``` ### fetchDepositAddress{docsify-ignore} fetch the deposit address for a currency associated with this account **Kind**: instance method of [kuna](#kuna) **Returns**: object - an [address structure](https://docs.ccxt.com/#/?id=address-structure) **See**: https://docs.kuna.io/docs/find-crypto-address-for-deposit | Param | Type | Required | Description | | --- | --- | --- | --- | | code | string | Yes | unified currency code | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchDepositAddress (code[, params]) ``` ### fetchDeposits{docsify-ignore} fetch all deposits made to an account **Kind**: instance method of [kuna](#kuna) **Returns**: Array<object> - a list of [transaction structures](https://docs.ccxt.com/#/?id=transaction-structure) **See**: https://docs.kuna.io/docs/get-deposit-history | 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 deposits for EXCHANGE SPECIFIC PARAMETERS | | params.status | string | No | Created, Canceled, PartiallyProcessed, Processing, Processed, WaitForConfirmation, Pending, AmlChecking | | params.sortField | string | No | amount (sorting by time), createdAt (sorting by date) | | params.sortOrder | string | No | asc (oldest-on-top), or desc (newest-on-top, default) | | params.skip | int | No | 0 - ... Select the number of transactions to skip | | params.address | string | No | | ```javascript kuna.fetchDeposits (code[, since, limit, params]) ``` ### fetchDeposit{docsify-ignore} fetch data on a currency deposit via the deposit id **Kind**: instance method of [kuna](#kuna) **Returns**: object - a [transaction structure](https://docs.ccxt.com/#/?id=transaction-structure) **See**: https://docs.kuna.io/docs/get-deposit-details-by-id | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | deposit id | | code | string | Yes | filter by currency code | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript kuna.fetchDeposit (id, code[, params]) ```