diff --git a/build/transpile.js b/build/transpile.js index 7f2028bc608a..d72585ceb16e 100644 --- a/build/transpile.js +++ b/build/transpile.js @@ -398,6 +398,9 @@ class Transpiler { [ /(\s+) \* @description (.*)/g, '$1$2' ], // docstring description [ /\s+\* @name .*/g, '' ], // docstring @name [ /(\s+) \* @see( .*)/g, '$1see$2' ], // docstring @see + [ /(\s+ \* @(param|returns) {[^}]*)string([^}]*}.*)/g, '$1str$3' ], // docstring type conversion + [ /(\s+ \* @(param|returns) {[^}]*)number([^}]*}.*)/g, '$1int|float$3' ], // docstring type conversion + [ /(\s+ \* @(param|returns) {[^}]*)object([^}]*}.*)/g, '$1dict$3' ], // docstring type conversion [ /(\s+) \* @returns ([^\{])/g, '$1:returns: $2' ], // docstring return [ /(\s+) \* @returns \{(.+)\}/g, '$1:returns $2:' ], // docstring return [ /(\s+ \* @param \{[\]\[\|a-zA-Z]+\} )([a-zA-Z0-9_-]+)\.([a-zA-Z0-9_-]+) (.*)/g, '$1$2[\'$3\'] $4' ], // docstring params.anything @@ -512,7 +515,6 @@ class Transpiler { [ /Precise\.stringGe\s/g, 'Precise::string_ge' ], [ /Precise\.stringLt\s/g, 'Precise::string_lt' ], [ /Precise\.stringLe\s/g, 'Precise::string_le' ], - // insert common regexes in the middle (critical) ].concat (this.getCommonRegexes ()).concat ([ @@ -592,6 +594,9 @@ class Transpiler { [ /super\./g, 'parent::'], [ /\sdelete\s([^\n]+)\;/g, ' unset($1);' ], [ /\~([\]\[\|@\.\s+\:\/#\-a-zA-Z0-9_-]+?)\~/g, '{$1}' ], // resolve the "arrays vs url params" conflict (both are in {}-brackets) + // docstring "string" type is the same as JS so no need to convert + [ /(\s+ \* @(param|return) {[^}]*)number([^}]*}.*)/g, '$1int|float$3' ], // docstring type conversion + [ /(\s+ \* @(param|return) {[^}]*)object([^}]*}.*)/g, '$1array$3' ], // docstring type conversion ]) } diff --git a/js/aax.js b/js/aax.js index bd0609c8fa16..059d1c26cc28 100644 --- a/js/aax.js +++ b/js/aax.js @@ -339,7 +339,7 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the aax api endpoint + * @param {object} params extra parameters specific to the aax api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -359,8 +359,8 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.publicGetAnnouncementMaintenance (params); // @@ -418,8 +418,8 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchMarkets * @description retrieves data on all markets for aax - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetInstruments (params); // @@ -591,8 +591,8 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -714,10 +714,10 @@ module.exports = class aax extends Exchange { * @name aax#setMargin * @description Either adds or reduces margin in an isolated position in order to set the margin to a specific value * @see https://www.aax.com/apidoc/index.html#modify-isolated-position-margin - * @param {str} symbol unified market symbol of the market to set margin in - * @param {float} amount the amount to set the margin to - * @param {dict} params parameters specific to the aax api endpoint - * @returns {dict} A [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol of the market to set margin in + * @param {number} amount the amount to set the margin to + * @param {object} params parameters specific to the aax api endpoint + * @returns {object} A [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -818,9 +818,9 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetMarketTickers (params); @@ -857,10 +857,10 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1004,11 +1004,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1046,11 +1046,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1101,12 +1101,12 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -1147,8 +1147,8 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ const response = await this.privateGetAccountBalances (params); // @@ -1201,8 +1201,8 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'spot'); @@ -1262,13 +1262,13 @@ module.exports = class aax extends Exchange { * @method * @name aax#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ let orderType = type.toUpperCase (); const orderSide = side.toUpperCase (); @@ -1518,10 +1518,10 @@ module.exports = class aax extends Exchange { * @method * @name aax#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1626,9 +1626,9 @@ module.exports = class aax extends Exchange { * @method * @name aax#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelAllOrders() requires a symbol argument'); @@ -1664,9 +1664,9 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchOrder', 'defaultType', 'spot'); @@ -1696,11 +1696,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1834,11 +1834,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'orderStatus': '2', // 1 new, 2 filled, 3 canceled @@ -1851,11 +1851,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'orderStatus': '3', // 1 new, 2 filled, 3 canceled @@ -1868,11 +1868,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -2160,11 +2160,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -2250,9 +2250,9 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2289,11 +2289,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -2336,11 +2336,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -2492,9 +2492,9 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2591,12 +2591,12 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the aax api endpoint - * @param {int|undefined} params.until timestamp in ms of the latest funding rate to fetch - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the aax api endpoint + * @param {number|undefined} params.until timestamp in ms of the latest funding rate to fetch + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchFundingRateHistory() requires a symbol argument'); @@ -2654,11 +2654,11 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ await this.loadMarkets (); if (symbol === undefined) { @@ -2718,10 +2718,10 @@ module.exports = class aax extends Exchange { * @method * @name aax#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} response from the exchange */ await this.loadMarkets (); if (symbol === undefined) { @@ -2785,12 +2785,12 @@ module.exports = class aax extends Exchange { * @method * @name aax#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2943,9 +2943,9 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3008,9 +3008,9 @@ module.exports = class aax extends Exchange { * @method * @name aax#fetchPositions * @description fetch all open positions - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const request = {}; diff --git a/js/ascendex.js b/js/ascendex.js index 15cf69555c42..ce0a92311489 100644 --- a/js/ascendex.js +++ b/js/ascendex.js @@ -346,8 +346,8 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} an associative dictionary of currencies */ const assets = await this.v1PublicGetAssets (params); // @@ -454,8 +454,8 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchMarkets * @description retrieves data on all markets for ascendex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const products = await this.v1PublicGetProducts (params); // @@ -645,7 +645,7 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchTime * @description fetches the current integer timestamp in milliseconds from the ascendex server - * @param {dict} params extra parameters specific to the ascendex api endpoint + * @param {object} params extra parameters specific to the ascendex api endpoint * @returns {int} the current integer timestamp in milliseconds from the ascendex server */ const request = { @@ -671,8 +671,8 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ let accountGroup = this.safeString (this.options, 'account-group'); let response = undefined; @@ -751,8 +751,8 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -830,10 +830,10 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -924,9 +924,9 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -959,9 +959,9 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = {}; @@ -1024,12 +1024,12 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -1119,11 +1119,11 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1332,8 +1332,8 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); await this.loadAccounts (); @@ -1382,15 +1382,15 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#createOrder * @description Create an order on the exchange - * @param {str} symbol Unified CCXT market symbol - * @param {str} type "limit" or "market" - * @param {str} side "buy" or "sell" - * @param {float} amount the amount of currency to trade - * @param {float} price *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency - * @param {dict} params Extra parameters specific to the exchange API endpoint - * @param {str} params.timeInForce "GTC", "IOC", "FOK", or "PO" - * @param {bool} params.postOnly true or false - * @param {float} params.stopPrice The price at which a trigger order is triggered at + * @param {string} symbol Unified CCXT market symbol + * @param {string} type "limit" or "market" + * @param {string} side "buy" or "sell" + * @param {number} amount the amount of currency to trade + * @param {number} price *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency + * @param {object} params Extra parameters specific to the exchange API endpoint + * @param {string} params.timeInForce "GTC", "IOC", "FOK", or "PO" + * @param {boolean} params.postOnly true or false + * @param {number} params.stopPrice The price at which a trigger order is triggered at * @returns [An order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); @@ -1539,9 +1539,9 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1650,11 +1650,11 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1772,11 +1772,11 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1938,10 +1938,10 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -2056,9 +2056,9 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -2184,9 +2184,9 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2256,11 +2256,11 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'txType': 'deposit', @@ -2273,11 +2273,11 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'txType': 'withdrawal', @@ -2290,11 +2290,11 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -2418,9 +2418,9 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchPositions * @description fetch all open positions - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -2580,9 +2580,9 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchFundingRates * @description fetch the funding rate for multiple markets - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols */ await this.loadMarkets (); const response = await this.v2PublicGetFuturesPricingData (params); @@ -2663,10 +2663,10 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'reduce', params); } @@ -2676,10 +2676,10 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'add', params); } @@ -2689,10 +2689,10 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setLeverage() requires a symbol argument'); @@ -2721,10 +2721,10 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#setMarginMode * @description set margin mode to 'cross' or 'isolated' - * @param {str} marginMode 'cross' or 'isolated' - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} response from the exchange + * @param {string} marginMode 'cross' or 'isolated' + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} response from the exchange */ marginMode = marginMode.toLowerCase (); if (marginMode === 'cross') { @@ -2754,9 +2754,9 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#fetchLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols */ await this.loadMarkets (); const response = await this.v2PublicGetFuturesContract (params); @@ -2794,8 +2794,8 @@ module.exports = class ascendex extends Exchange { parseMarketLeverageTiers (info, market = undefined) { /** - * @param {dict} info Exchange market response for 1 market - * @param {dict} market CCXT market + * @param {object} info Exchange market response for 1 market + * @param {object} market CCXT market */ // // { @@ -2845,12 +2845,12 @@ module.exports = class ascendex extends Exchange { * @method * @name ascendex#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the ascendex api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the ascendex api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); await this.loadAccounts (); diff --git a/js/base/Exchange.js b/js/base/Exchange.js index 55143581f4d0..560d968d7619 100644 --- a/js/base/Exchange.js +++ b/js/base/Exchange.js @@ -2502,7 +2502,7 @@ module.exports = class Exchange { * @method * @param {string} type Order type * @param {boolean} exchangeSpecificParam exchange specific postOnly - * @param {dict} params exchange specific params + * @param {object} params exchange specific params * @returns {boolean} true if a post only order, false otherwise */ const timeInForce = this.safeStringUpper (params, 'timeInForce'); @@ -2576,11 +2576,11 @@ module.exports = class Exchange { * @method * @name exchange#fetchMarkOHLCV * @description fetches historical mark price candlestick data containing the open, high, low, and close price of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the exchange api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the exchange api endpoint * @returns {[[int|float]]} A list of candles ordered as timestamp, open, high, low, close, undefined */ if (this.has['fetchMarkOHLCV']) { @@ -2598,11 +2598,11 @@ module.exports = class Exchange { * @method * @name exchange#fetchIndexOHLCV * @description fetches historical index price candlestick data containing the open, high, low, and close price of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the exchange api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the exchange api endpoint * @returns {[[int|float]]} A list of candles ordered as timestamp, open, high, low, close, undefined */ if (this.has['fetchIndexOHLCV']) { @@ -2620,11 +2620,11 @@ module.exports = class Exchange { * @method * @name exchange#fetchPremiumIndexOHLCV * @description fetches historical premium index price candlestick data containing the open, high, low, and close price of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the exchange api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the exchange api endpoint * @returns {[[int|float]]} A list of candles ordered as timestamp, open, high, low, close, undefined */ if (this.has['fetchPremiumIndexOHLCV']) { @@ -2642,7 +2642,7 @@ module.exports = class Exchange { * @ignore * @method * * Must add timeInForce to this.options to use this method - * @return {str} returns the exchange specific value for timeInForce + * @return {string} returns the exchange specific value for timeInForce */ const timeInForce = this.safeStringUpper (params, 'timeInForce'); // supported values GTC, IOC, PO if (timeInForce !== undefined) { diff --git a/js/bibox.js b/js/bibox.js index d0d085ea4c11..3a665fc2bf2f 100644 --- a/js/bibox.js +++ b/js/bibox.js @@ -330,8 +330,8 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchMarkets * @description retrieves data on all markets for bibox - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const request = { 'cmd': 'pairList', @@ -500,9 +500,9 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -520,9 +520,9 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const request = { 'cmd': 'marketAll', @@ -581,11 +581,11 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -605,10 +605,10 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -649,12 +649,12 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -685,8 +685,8 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} an associative dictionary of currencies */ if (this.checkRequiredCredentials (false)) { return await this.fetchCurrenciesPrivate (params); @@ -875,8 +875,8 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const type = this.safeString (params, 'type', 'assets'); @@ -915,11 +915,11 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); if (limit === undefined) { @@ -984,11 +984,11 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); if (limit === undefined) { @@ -1139,13 +1139,13 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1189,10 +1189,10 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by bibox cancelOrder () - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by bibox cancelOrder () + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'cmd': 'orderpending/cancelTrade', @@ -1222,9 +1222,9 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by bibox fetchOrder - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by bibox fetchOrder + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1340,11 +1340,11 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1407,11 +1407,11 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchClosedOrders() requires a `symbol` argument'); @@ -1471,11 +1471,11 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a `symbol` argument'); @@ -1535,9 +1535,9 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1591,12 +1591,12 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1643,9 +1643,9 @@ module.exports = class bibox extends Exchange { * @method * @name bibox#fetchTransactionFees * @description fetch transaction fees - * @param {[str]|undefined} codes list of unified currency codes - * @param {dict} params extra parameters specific to the bibox api endpoint - * @returns {[dict]} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {[string]|undefined} codes list of unified currency codes + * @param {object} params extra parameters specific to the bibox api endpoint + * @returns {[object]} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ // by default it will try load withdrawal fees of all currencies (with separate requests) // however if you define codes = [ 'ETH', 'BTC' ] in args it will only load those diff --git a/js/bigone.js b/js/bigone.js index 962152ffbc10..741fd7ff3ae5 100644 --- a/js/bigone.js +++ b/js/bigone.js @@ -174,8 +174,8 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchMarkets * @description retrieves data on all markets for bigone - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetAssetPairs (params); // @@ -334,9 +334,9 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -369,9 +369,9 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = {}; @@ -424,7 +424,7 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the bigone api endpoint + * @param {object} params extra parameters specific to the bigone api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetPing (params); @@ -445,10 +445,10 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -621,11 +621,11 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -684,12 +684,12 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -759,8 +759,8 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const type = this.safeString (params, 'type', ''); @@ -841,13 +841,13 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -904,10 +904,10 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol Not used by bigone cancelOrder () - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol Not used by bigone cancelOrder () + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { 'id': id }; @@ -933,9 +933,9 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -963,9 +963,9 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by bigone fetchOrder - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by bigone fetchOrder + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { 'id': id }; @@ -979,11 +979,11 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -1030,11 +1030,11 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); if (symbol === undefined) { @@ -1101,11 +1101,11 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'state': 'PENDING', @@ -1118,11 +1118,11 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'state': 'FILLED', @@ -1172,9 +1172,9 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1319,11 +1319,11 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1371,11 +1371,11 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1423,12 +1423,12 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1497,12 +1497,12 @@ module.exports = class bigone extends Exchange { * @method * @name bigone#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bigone api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bigone api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); diff --git a/js/binance.js b/js/binance.js index 6a9193d2d6ad..a62002727ecd 100644 --- a/js/binance.js +++ b/js/binance.js @@ -1254,7 +1254,7 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the binance api endpoint + * @param {object} params extra parameters specific to the binance api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const defaultType = this.safeString2 (this.options, 'fetchTime', 'defaultType', 'spot'); @@ -1275,8 +1275,8 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} an associative dictionary of currencies */ const fetchCurrenciesEnabled = this.safeValue (this.options, 'fetchCurrencies'); if (!fetchCurrenciesEnabled) { @@ -1425,8 +1425,8 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchMarkets * @description retrieves data on all markets for binance - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const defaultType = this.safeString2 (this.options, 'fetchMarkets', 'defaultType', 'spot'); const type = this.safeString (params, 'type', defaultType); @@ -1829,11 +1829,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the binance api endpoint - * @param {str|undefined} params.type 'future', 'delivery', 'savings', 'funding', or 'spot' - * @param {str|undefined} params.marginMode 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null + * @param {object} params extra parameters specific to the binance api endpoint + * @param {string|undefined} params.type 'future', 'delivery', 'savings', 'funding', or 'spot' + * @param {string|undefined} params.marginMode 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null * @param {[str]|undefined} params.symbols unified market symbols, only used in isolated margin mode - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'spot'); @@ -2110,10 +2110,10 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -2244,8 +2244,8 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.sapiGetSystemStatus (params); // @@ -2269,9 +2269,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2297,9 +2297,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchBidsAsks * @description fetches the bid and ask price and volume for multiple markets - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBidsAsks', 'defaultType', 'spot'); @@ -2322,9 +2322,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchTickers', 'defaultType', 'spot'); @@ -2393,14 +2393,14 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the binance api endpoint - * @param {str|undefined} params.price "mark" or "index" for mark price and index price candles - * @param {int|undefined} params.until timestamp in ms of the latest candle to fetch - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the binance api endpoint + * @param {string|undefined} params.price "mark" or "index" for mark price and index price candles + * @param {number|undefined} params.until timestamp in ms of the latest candle to fetch + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -2623,11 +2623,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2906,13 +2906,13 @@ module.exports = class binance extends Exchange { * @method * @name binance#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3096,9 +3096,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -3134,11 +3134,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -3218,11 +3218,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -3263,11 +3263,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const orders = await this.fetchOrders (symbol, since, limit, params); return this.filterBy (orders, 'status', 'closed'); @@ -3278,10 +3278,10 @@ module.exports = class binance extends Exchange { * @method * @name binance#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -3320,9 +3320,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelAllOrders() requires a symbol argument'); @@ -3356,12 +3356,12 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrderTrades() requires a symbol argument'); @@ -3384,11 +3384,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -3466,11 +3466,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchMyDustTrades * @description fetch all dust trades made by the user - * @param {str|undefined} symbol not used by binance fetchMyDustTrades () - * @param {int|undefined} since the earliest time in ms to fetch my dust trades for - * @param {int|undefined} limit the maximum number of dust trades to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol not used by binance fetchMyDustTrades () + * @param {number|undefined} since the earliest time in ms to fetch my dust trades for + * @param {number|undefined} limit the maximum number of dust trades to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ // // Binance provides an opportunity to trade insignificant (i.e. non-tradable and non-withdrawable) @@ -3605,12 +3605,12 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @param {int|undefined} params.until the latest time in ms to fetch deposits for - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @param {number|undefined} params.until the latest time in ms to fetch deposits for + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -3703,11 +3703,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const legalMoney = this.safeValue (this.options, 'legalMoney', {}); @@ -4077,12 +4077,12 @@ module.exports = class binance extends Exchange { * @method * @name binance#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -4118,11 +4118,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); let currency = undefined; @@ -4182,9 +4182,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -4257,9 +4257,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchTransactionFees * @description fetch transaction fees - * @param {[str]|undefined} codes not used by binance fetchTransactionFees () - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {[string]|undefined} codes not used by binance fetchTransactionFees () + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const response = await this.sapiGetCapitalConfigGetall (params); @@ -4371,12 +4371,12 @@ module.exports = class binance extends Exchange { * @method * @name binance#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -4428,9 +4428,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -4456,8 +4456,8 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); let method = undefined; @@ -4618,12 +4618,12 @@ module.exports = class binance extends Exchange { * @method * @name binance#futuresTransfer * @description transfer between futures account - * @param {str} code unified currency code - * @param {float} amount the amount to transfer - * @param {str} type 1 - transfer from spot account to USDT-Ⓜ futures account, 2 - transfer from USDT-Ⓜ futures account to spot account, 3 - transfer from spot account to COIN-Ⓜ futures account, 4 - transfer from COIN-Ⓜ futures account to spot account - * @param {dict} params extra parameters specific to the binance api endpoint - * @param {float|undefined} params.recvWindow - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#futures-transfer-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to transfer + * @param {string} type 1 - transfer from spot account to USDT-Ⓜ futures account, 2 - transfer from USDT-Ⓜ futures account to spot account, 3 - transfer from spot account to COIN-Ⓜ futures account, 4 - transfer from COIN-Ⓜ futures account to spot account + * @param {object} params extra parameters specific to the binance api endpoint + * @param {number|undefined} params.recvWindow + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#futures-transfer-structure} */ if ((type < 1) || (type > 4)) { throw new ArgumentsRequired (this.id + ' type must be between 1 and 4'); @@ -4649,9 +4649,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -4690,12 +4690,12 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the binance api endpoint - * @param {int|undefined} params.until timestamp in ms of the latest funding rate - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the binance api endpoint + * @param {number|undefined} params.until timestamp in ms of the latest funding rate + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ await this.loadMarkets (); const request = {}; @@ -4762,9 +4762,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchFundingRates * @description fetch the funding rate for multiple markets - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols */ await this.loadMarkets (); let method = undefined; @@ -5274,9 +5274,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols */ await this.loadMarkets (); const [ type, query ] = this.handleMarketTypeAndParams ('fetchLeverageTiers', undefined, params); @@ -5334,8 +5334,8 @@ module.exports = class binance extends Exchange { /** * @ignore * @method - * @param {dict} info Exchange response for 1 market - * @param {dict} market CCXT market + * @param {object} info Exchange response for 1 market + * @param {object} market CCXT market */ // // { @@ -5377,9 +5377,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchPositions * @description fetch all open positions - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ const defaultMethod = this.safeString (this.options, 'fetchPositions', 'positionRisk'); if (defaultMethod === 'positionRisk') { @@ -5396,9 +5396,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchAccountPositions * @description fetch account positions - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} data on account positions + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} data on account positions */ if (symbols !== undefined) { if (!Array.isArray (symbols)) { @@ -5429,9 +5429,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchPositionsRisk * @description fetch positions risk - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} data on the positions risk + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} data on the positions risk */ if (symbols !== undefined) { if (!Array.isArray (symbols)) { @@ -5522,11 +5522,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ await this.loadMarkets (); let market = undefined; @@ -5571,10 +5571,10 @@ module.exports = class binance extends Exchange { * @method * @name binance#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setLeverage() requires a symbol argument'); @@ -5606,10 +5606,10 @@ module.exports = class binance extends Exchange { * @method * @name binance#setMarginMode * @description set margin mode to 'cross' or 'isolated' - * @param {str} marginMode 'cross' or 'isolated' - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} response from the exchange + * @param {string} marginMode 'cross' or 'isolated' + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setMarginMode() requires a symbol argument'); @@ -5668,10 +5668,10 @@ module.exports = class binance extends Exchange { * @method * @name binance#setPositionMode * @description set hedged to true or false for a market - * @param {bool} hedged set to true to use dualSidePosition - * @param {str|undefined} symbol not used by binance setPositionMode () - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} response from the exchange + * @param {boolean} hedged set to true to use dualSidePosition + * @param {string|undefined} symbol not used by binance setPositionMode () + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} response from the exchange */ const defaultType = this.safeString (this.options, 'defaultType', 'future'); const type = this.safeString (params, 'type', defaultType); @@ -5939,10 +5939,10 @@ module.exports = class binance extends Exchange { * @method * @name binance#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 2, params); } @@ -5952,10 +5952,10 @@ module.exports = class binance extends Exchange { * @method * @name binance#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 1, params); } @@ -5965,9 +5965,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchBorrowRate * @description fetch the rate of interest to borrow a currency for margin trading - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -5995,11 +5995,11 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchBorrowRateHistory * @description retrieves a history of a currencies borrow interest rate at specific time slots - * @param {str} code unified currency code - * @param {int|undefined} since timestamp for the earliest borrow rate - * @param {int|undefined} limit the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} to retrieve - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {string} code unified currency code + * @param {number|undefined} since timestamp for the earliest borrow rate + * @param {number|undefined} limit the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} to retrieve + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); if (limit === undefined) { @@ -6070,10 +6070,10 @@ module.exports = class binance extends Exchange { * @method * @name binance#createGiftCode * @description create gift code - * @param {str} code gift code - * @param {float} amount amount of currency for the gift - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} The gift code id, code, currency and amount + * @param {string} code gift code + * @param {number} amount amount of currency for the gift + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} The gift code id, code, currency and amount */ await this.loadMarkets (); const currency = this.currency (code); @@ -6108,9 +6108,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#redeemGiftCode * @description redeem gift code - * @param {str} giftcardCode - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} response from the exchange + * @param {string} giftcardCode + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} response from the exchange */ const request = { 'code': giftcardCode, @@ -6135,9 +6135,9 @@ module.exports = class binance extends Exchange { * @method * @name binance#verifyGiftCode * @description verify gift code - * @param {str} id reference number id - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} response from the exchange + * @param {string} id reference number id + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} response from the exchange */ const request = { 'referenceNo': id, @@ -6159,12 +6159,12 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchBorrowInterest * @description fetch the interest owed by the user for borrowing currency for margin trading - * @param {str|undefined} code unified currency code - * @param {str|undefined} symbol unified market symbol when fetch interest in isolated markets - * @param {int|undefined} since the earliest time in ms to fetch borrrow interest for - * @param {int|undefined} limit the maximum number of structures to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} + * @param {string|undefined} code unified currency code + * @param {string|undefined} symbol unified market symbol when fetch interest in isolated markets + * @param {number|undefined} since the earliest time in ms to fetch borrrow interest for + * @param {number|undefined} limit the maximum number of structures to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} */ await this.loadMarkets (); const request = {}; @@ -6229,11 +6229,11 @@ module.exports = class binance extends Exchange { * @name binance#repayMargin * @description repay borrowed margin and interest * @see https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin - * @param {str} code unified currency code of the currency to repay - * @param {float} amount the amount to repay - * @param {str|undefined} symbol unified market symbol, required for isolated margin - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to repay + * @param {number} amount the amount to repay + * @param {string|undefined} symbol unified market symbol, required for isolated margin + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); let market = undefined; @@ -6276,11 +6276,11 @@ module.exports = class binance extends Exchange { * @name binance#borrowMargin * @description create a loan to borrow margin * @see https://binance-docs.github.io/apidocs/spot/en/#margin-account-borrow-margin - * @param {str} code unified currency code of the currency to borrow - * @param {float} amount the amount to borrow - * @param {str|undefined} symbol unified market symbol, required for isolated margin - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to borrow + * @param {number} amount the amount to borrow + * @param {string|undefined} symbol unified market symbol, required for isolated margin + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); let market = undefined; @@ -6340,13 +6340,13 @@ module.exports = class binance extends Exchange { * @method * @name binance#fetchOpenInterestHistory * @description Retrieves the open intestest history of a currency - * @param {str} symbol Unified CCXT market symbol - * @param {str} timeframe "5m","15m","30m","1h","2h","4h","6h","12h", or "1d" - * @param {int|undefined} since the time(ms) of the earliest record to retrieve as a unix timestamp - * @param {int|undefined} limit default 30, max 500 - * @param {dict} params exchange specific parameters - * @param {int|undefined} params.until the time(ms) of the latest record to retrieve as a unix timestamp - * @returns {dict} an array of [open interest history structure]{@link https://docs.ccxt.com/en/latest/manual.html#interest-history-structure} + * @param {string} symbol Unified CCXT market symbol + * @param {string} timeframe "5m","15m","30m","1h","2h","4h","6h","12h", or "1d" + * @param {number|undefined} since the time(ms) of the earliest record to retrieve as a unix timestamp + * @param {number|undefined} limit default 30, max 500 + * @param {object} params exchange specific parameters + * @param {number|undefined} params.until the time(ms) of the latest record to retrieve as a unix timestamp + * @returns {object} an array of [open interest history structure]{@link https://docs.ccxt.com/en/latest/manual.html#interest-history-structure} */ if (timeframe === '1m') { throw new BadRequest (this.id + 'fetchOpenInterestHistory cannot use the 1m timeframe'); diff --git a/js/bit2c.js b/js/bit2c.js index 1505809b187a..55e8f482c093 100644 --- a/js/bit2c.js +++ b/js/bit2c.js @@ -166,8 +166,8 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAccountBalanceV2 (params); @@ -221,10 +221,10 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -270,9 +270,9 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -288,11 +288,11 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -325,8 +325,8 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetAccountBalance (params); @@ -374,13 +374,13 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let method = 'privatePostOrderAddOrder'; @@ -408,10 +408,10 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol Not used by bit2c cancelOrder () - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol Not used by bit2c cancelOrder () + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'id': id, @@ -424,11 +424,11 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -488,11 +488,11 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -655,9 +655,9 @@ module.exports = class bit2c extends Exchange { * @method * @name bit2c#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bit2c api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bit2c api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); diff --git a/js/bitbank.js b/js/bitbank.js index 7898d48188f8..5eb4090d4382 100644 --- a/js/bitbank.js +++ b/js/bitbank.js @@ -148,8 +148,8 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchMarkets * @description retrieves data on all markets for bitbank - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.marketsGetSpotPairs (params); // @@ -276,9 +276,9 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -295,10 +295,10 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -351,11 +351,11 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -373,8 +373,8 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.marketsGetSpotPairs (params); @@ -452,12 +452,12 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ if (since === undefined) { throw new ArgumentsRequired (this.id + ' fetchOHLCV() requires a since argument'); @@ -521,8 +521,8 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetUserAssets (params); @@ -616,13 +616,13 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -645,10 +645,10 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -666,9 +666,9 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -686,11 +686,11 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -714,11 +714,11 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -744,9 +744,9 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -773,12 +773,12 @@ module.exports = class bitbank extends Exchange { * @method * @name bitbank#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitbank api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitbank api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); if (!('uuid' in params)) { diff --git a/js/bitbns.js b/js/bitbns.js index c052dd4fa868..3f0a6cced6ec 100644 --- a/js/bitbns.js +++ b/js/bitbns.js @@ -156,8 +156,8 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.v1GetPlatformStatus (params); // @@ -187,8 +187,8 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchMarkets * @description retrieves data on all markets for bitbns - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.wwwGetOrderFetchMarkets (params); // @@ -288,10 +288,10 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -387,9 +387,9 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.wwwGetOrderFetchTickers (params); @@ -462,8 +462,8 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.v1PostCurrentCoinBalanceEVERYTHING (params); @@ -597,13 +597,13 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type !== 'limit' && type !== 'market') { throw new ExchangeError (this.id + ' allows limit and market orders only'); @@ -648,10 +648,10 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -673,9 +673,9 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -722,11 +722,11 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -847,11 +847,11 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -916,11 +916,11 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchTrades() requires a symbol argument'); @@ -947,11 +947,11 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchDeposits * @description fetch all deposits made to an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchDeposits() requires a currency code argument'); @@ -995,11 +995,11 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchWithdrawals() requires a currency code argument'); @@ -1109,9 +1109,9 @@ module.exports = class bitbns extends Exchange { * @method * @name bitbns#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitbns api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitbns api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); diff --git a/js/bitfinex.js b/js/bitfinex.js index 05e2b2dae761..c1a5c5e564f6 100644 --- a/js/bitfinex.js +++ b/js/bitfinex.js @@ -394,9 +394,9 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchTransactionFees * @description fetch transaction fees - * @param {[str]|undefined} codes not used by bitfinex2 fetchTransactionFees () - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {[dict]} a list of [fees structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {[string]|undefined} codes not used by bitfinex2 fetchTransactionFees () + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {[object]} a list of [fees structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const response = await this.privatePostAccountFees (params); @@ -420,8 +420,8 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privatePostSummary (params); @@ -501,8 +501,8 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchMarkets * @description retrieves data on all markets for bitfinex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const ids = await this.publicGetSymbols (); // @@ -619,8 +619,8 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const accountsByType = this.safeValue (this.options, 'accountsByType', {}); @@ -677,12 +677,12 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ // transferring between derivatives wallet and regular wallet is not documented in their API // however we support it in CCXT (from just looking at web inspector) @@ -766,10 +766,10 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -789,9 +789,9 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTickers (params); @@ -809,9 +809,9 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -951,11 +951,11 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -975,11 +975,11 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a `symbol` argument'); @@ -1004,13 +1004,13 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1066,10 +1066,10 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by bitfinex cancelOrder () - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by bitfinex cancelOrder () + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1083,9 +1083,9 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} response from exchange + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} response from exchange */ return await this.privatePostOrderCancelAll (params); } @@ -1166,11 +1166,11 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); if (symbol !== undefined) { @@ -1191,11 +1191,11 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1216,9 +1216,9 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by bitfinex fetchOrder - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by bitfinex fetchOrder + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1254,12 +1254,12 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); if (limit === undefined) { @@ -1300,9 +1300,9 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const request = { @@ -1316,9 +1316,9 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); // todo rewrite for https://api-pub.bitfinex.com//v2/conf/pub:map:tx:method @@ -1350,11 +1350,11 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currencyId = this.safeString (params, 'currency'); @@ -1490,12 +1490,12 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1541,9 +1541,9 @@ module.exports = class bitfinex extends Exchange { * @method * @name bitfinex#fetchPositions * @description fetch all open positions - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the bitfinex api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the bitfinex api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const response = await this.privatePostPositions (params); diff --git a/js/bitfinex2.js b/js/bitfinex2.js index cf93550606d1..c8aaf679e9c1 100644 --- a/js/bitfinex2.js +++ b/js/bitfinex2.js @@ -424,8 +424,8 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ // // [1] // operative @@ -447,8 +447,8 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchMarkets * @description retrieves data on all markets for bitfinex2 - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ let spotMarketsInfo = await this.publicGetConfPubInfoPair (params); let futuresMarketsInfo = await this.publicGetConfPubInfoPairFutures (params); @@ -573,8 +573,8 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} an associative dictionary of currencies */ const labels = [ 'pub:list:currency', @@ -783,8 +783,8 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ // this api call does not return the 'used' amount - use the v1 version instead (which also returns zero balances) // there is a difference between this and the v1 api, namely trading wallet is called margin in v2 @@ -824,12 +824,12 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ // transferring between derivatives wallet and regular wallet is not documented in their API // however we support it in CCXT (from just looking at web inspector) @@ -971,9 +971,9 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ throw new NotSupported (this.id + ' fetchOrder() is not supported yet. Consider using fetchOpenOrder() or fetchClosedOrder() instead.'); } @@ -983,10 +983,10 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const precision = this.safeValue (this.options, 'precision', 'R0'); @@ -1097,9 +1097,9 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = {}; @@ -1167,9 +1167,9 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1298,11 +1298,11 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1338,12 +1338,12 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -1517,22 +1517,22 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#createOrder * @description Create an order on the exchange - * @param {str} symbol Unified CCXT market symbol - * @param {str} type 'limit' or 'market' - * @param {str} side 'buy' or 'sell' - * @param {float} amount the amount of currency to trade - * @param {float} price price of order - * @param {dict} params Extra parameters specific to the exchange API endpoint - * @param {float} params.stopPrice The price at which a trigger order is triggered at - * @param {str} params.timeInForce "GTC", "IOC", "FOK", or "PO" - * @param {bool} params.postOnly - * @param {bool} params.reduceOnly Ensures that the executed order does not flip the opened position. - * @param {int} params.flags additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates) - * @param {int} params.lev leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive. - * @param {str} params.price_traling The trailing price for a trailing stop order - * @param {str} params.price_aux_limit Order price for stop limit orders - * @param {str} params.price_oco_stop OCO stop price - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol Unified CCXT market symbol + * @param {string} type 'limit' or 'market' + * @param {string} side 'buy' or 'sell' + * @param {number} amount the amount of currency to trade + * @param {number} price price of order + * @param {object} params Extra parameters specific to the exchange API endpoint + * @param {number} params.stopPrice The price at which a trigger order is triggered at + * @param {string} params.timeInForce "GTC", "IOC", "FOK", or "PO" + * @param {boolean} params.postOnly + * @param {boolean} params.reduceOnly Ensures that the executed order does not flip the opened position. + * @param {number} params.flags additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates) + * @param {number} params.lev leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive. + * @param {string} params.price_traling The trailing price for a trailing stop order + * @param {string} params.price_aux_limit Order price for stop limit orders + * @param {string} params.price_oco_stop OCO stop price + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1675,9 +1675,9 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'all': 1, @@ -1692,10 +1692,10 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol Not used by bitfinex2 cancelOrder () - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol Not used by bitfinex2 cancelOrder () + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const cid = this.safeValue2 (params, 'cid', 'clientOrderId'); // client order id let request = undefined; @@ -1724,10 +1724,10 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchOpenOrder * @description fetch an open order by it's id - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'id': [ parseInt (id) ], @@ -1745,10 +1745,10 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchClosedOrder * @description fetch an open order by it's id - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'id': [ parseInt (id) ], @@ -1766,11 +1766,11 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1829,11 +1829,11 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // returns the most recent closed or canceled orders up to circa two weeks ago await this.loadMarkets (); @@ -1899,12 +1899,12 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrderTrades() requires a symbol argument'); @@ -1926,11 +1926,11 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -1958,9 +1958,9 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const request = { @@ -1974,9 +1974,9 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2176,8 +2176,8 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privatePostAuthRSummary (params); @@ -2288,11 +2288,11 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -2346,12 +2346,12 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ this.checkAddress (address); await this.loadMarkets (); @@ -2431,9 +2431,9 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchPositions * @description fetch all open positions - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const response = await this.privatePostAuthRPositions (params); @@ -2607,11 +2607,11 @@ module.exports = class bitfinex2 extends Exchange { * @method * @name bitfinex2#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the bitfinex2 api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the bitfinex2 api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); await this.loadMarkets (); diff --git a/js/bitflyer.js b/js/bitflyer.js index 5c31b5b64cfa..9358855455b2 100644 --- a/js/bitflyer.js +++ b/js/bitflyer.js @@ -139,8 +139,8 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchMarkets * @description retrieves data on all markets for bitflyer - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const jp_markets = await this.publicGetGetmarkets (params); // @@ -305,8 +305,8 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetGetbalance (params); @@ -337,10 +337,10 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -384,9 +384,9 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -465,11 +465,11 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -485,9 +485,9 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -514,13 +514,13 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -544,10 +544,10 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a `symbol` argument'); @@ -622,11 +622,11 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a `symbol` argument'); @@ -650,11 +650,11 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'child_order_state': 'ACTIVE', @@ -667,11 +667,11 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'child_order_state': 'COMPLETED', @@ -684,9 +684,9 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a `symbol` argument'); @@ -704,11 +704,11 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a `symbol` argument'); @@ -730,9 +730,9 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchPositions * @description fetch all open positions - * @param {[str]} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {[string]} symbols list of unified market symbols + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ if (symbols === undefined) { throw new ArgumentsRequired (this.id + ' fetchPositions() requires a `symbols` argument, exactly one symbol in an array'); @@ -768,12 +768,12 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ this.checkAddress (address); await this.loadMarkets (); @@ -800,11 +800,11 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -838,11 +838,11 @@ module.exports = class bitflyer extends Exchange { * @method * @name bitflyer#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bitflyer api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bitflyer api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; diff --git a/js/bitforex.js b/js/bitforex.js index 550ac104e828..17404597a506 100644 --- a/js/bitforex.js +++ b/js/bitforex.js @@ -151,8 +151,8 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#fetchMarkets * @description retrieves data on all markets for bitforex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetApiV1MarketSymbols (params); // @@ -280,11 +280,11 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const request = { @@ -335,8 +335,8 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostApiV1FundAllAccount (params); @@ -386,9 +386,9 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.markets[symbol]; @@ -442,12 +442,12 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -479,10 +479,10 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -568,9 +568,9 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -588,11 +588,11 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -609,11 +609,11 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -630,13 +630,13 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let sideId = undefined; @@ -665,10 +665,10 @@ module.exports = class bitforex extends Exchange { * @method * @name bitforex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitforex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitforex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { diff --git a/js/bitget.js b/js/bitget.js index 8c9f0dd97d84..4847db738414 100644 --- a/js/bitget.js +++ b/js/bitget.js @@ -757,7 +757,7 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the bitget api endpoint + * @param {object} params extra parameters specific to the bitget api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicSpotGetPublicTime (params); @@ -777,8 +777,8 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchMarkets * @description retrieves data on all markets for bitget - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const types = this.safeValue (this.options, 'fetchMarkets', [ 'spot', 'swap' ]); let result = []; @@ -1016,8 +1016,8 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicSpotGetPublicCurrencies (params); // @@ -1109,10 +1109,10 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1222,9 +1222,9 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1265,9 +1265,9 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchTickers', undefined, params); @@ -1427,11 +1427,11 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1473,9 +1473,9 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1512,8 +1512,8 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicSpotGetPublicProducts (params); @@ -1603,13 +1603,13 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitget api endpoint - * @param {int|undefined} params.until timestamp in ms of the latest candle to fetch - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitget api endpoint + * @param {number|undefined} params.until timestamp in ms of the latest candle to fetch + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -1666,8 +1666,8 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchBalance', undefined, params); @@ -1856,13 +1856,13 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1969,10 +1969,10 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument for spot orders'); @@ -2010,10 +2010,10 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#cancelOrders * @description cancel multiple orders - * @param {[str]} ids order ids - * @param {str} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {[string]} ids order ids + * @param {string} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrders() requires a symbol argument'); @@ -2084,9 +2084,9 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -2164,11 +2164,11 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -2277,11 +2277,11 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchClosedOrders() requires a symbol argument'); @@ -2376,11 +2376,11 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); let currency = undefined; @@ -2466,11 +2466,11 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -2519,12 +2519,12 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrderTrades() requires a symbol argument'); @@ -2573,9 +2573,9 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2621,9 +2621,9 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchPositions * @description fetch all open positions - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const defaultSubType = this.safeString (this.options, 'defaultSubType'); @@ -2744,11 +2744,11 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchFundingRateHistory() requires a symbol argument'); @@ -2803,9 +2803,9 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2909,10 +2909,10 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ if (amount > 0) { throw new BadRequest (this.id + ' reduceMargin() amount parameter must be a negative value'); @@ -2929,10 +2929,10 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ const holdSide = this.safeString (params, 'holdSide'); if (holdSide === undefined) { @@ -2989,9 +2989,9 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#fetchLeverage * @description fetch the set leverage for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} a [leverage structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3019,10 +3019,10 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setLeverage() requires a symbol argument'); @@ -3047,10 +3047,10 @@ module.exports = class bitget extends Exchange { * @method * @name bitget#setMarginMode * @description set margin mode to 'cross' or 'isolated' - * @param {str} marginMode 'cross' or 'isolated' - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitget api endpoint - * @returns {dict} response from the exchange + * @param {string} marginMode 'cross' or 'isolated' + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitget api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setMarginMode() requires a symbol argument'); diff --git a/js/bithumb.js b/js/bithumb.js index 629c94af2524..162bff52c45e 100644 --- a/js/bithumb.js +++ b/js/bithumb.js @@ -176,8 +176,8 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#fetchMarkets * @description retrieves data on all markets for bithumb - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const result = []; const quoteCurrencies = this.safeValue (this.options, 'quoteCurrencies', {}); @@ -277,8 +277,8 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const request = { @@ -293,10 +293,10 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -386,9 +386,9 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTickerAll (params); @@ -441,9 +441,9 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -500,12 +500,12 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -624,11 +624,11 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -662,13 +662,13 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -703,9 +703,9 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -884,11 +884,11 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -933,10 +933,10 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const side_in_params = ('side' in params); if (!side_in_params) { @@ -970,12 +970,12 @@ module.exports = class bithumb extends Exchange { * @method * @name bithumb#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bithumb api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bithumb api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/bitmart.js b/js/bitmart.js index 03d0351697d4..e840f57fcbed 100644 --- a/js/bitmart.js +++ b/js/bitmart.js @@ -367,7 +367,7 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the bitmart api endpoint + * @param {object} params extra parameters specific to the bitmart api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetSystemTime (params); @@ -390,8 +390,8 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const options = this.safeValue (this.options, 'fetchStatus', {}); const defaultType = this.safeString (this.options, 'defaultType'); @@ -667,8 +667,8 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchMarkets * @description retrieves data on all markets for bitmart - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const spot = await this.fetchSpotMarkets (params); const contract = await this.fetchContractMarkets (params); @@ -680,8 +680,8 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetSpotV1Currencies (params); // @@ -733,9 +733,9 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchTransactionFee * @description fetch the fee for a transaction - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -853,9 +853,9 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -940,9 +940,9 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchTickers', undefined, params); @@ -968,10 +968,10 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1141,11 +1141,11 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1276,12 +1276,12 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -1352,11 +1352,11 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades () requires a symbol argument'); @@ -1440,12 +1440,12 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrderTrades() requires a symbol argument'); @@ -1542,8 +1542,8 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchBalance', undefined, params); @@ -1757,13 +1757,13 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1838,10 +1838,10 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder () requires a symbol argument'); @@ -1916,9 +1916,9 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelAllOrders() requires a symbol argument'); @@ -2054,11 +2054,11 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('open', symbol, since, limit, params); } @@ -2068,11 +2068,11 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('closed', symbol, since, limit, params); } @@ -2082,11 +2082,11 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('canceled', symbol, since, limit, params); } @@ -2096,9 +2096,9 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -2192,9 +2192,9 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2256,12 +2256,12 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -2357,10 +2357,10 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchDeposit * @description fetch information on a deposit - * @param {str} id deposit id - * @param {str|undefined} code not used by bitmart fetchDeposit () - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code not used by bitmart fetchDeposit () + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -2399,11 +2399,11 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsByType ('deposit', code, since, limit, params); } @@ -2413,10 +2413,10 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id - * @param {str} id withdrawal id - * @param {str|undefined} code not used by bitmart.fetchWithdrawal - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string|undefined} code not used by bitmart.fetchWithdrawal + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -2455,11 +2455,11 @@ module.exports = class bitmart extends Exchange { * @method * @name bitmart#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsByType ('withdraw', code, since, limit, params); } @@ -2555,11 +2555,11 @@ module.exports = class bitmart extends Exchange { * @name bitmart#repayMargin * @description repay borrowed margin and interest * @see https://developer-pro.bitmart.com/en/spot/#margin-repay-isolated - * @param {str} code unified currency code of the currency to repay - * @param {str} amount the amount to repay - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to repay + * @param {string} amount the amount to repay + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); if (symbol === undefined) { @@ -2603,11 +2603,11 @@ module.exports = class bitmart extends Exchange { * @name bitmart#borrowMargin * @description create a loan to borrow margin * @see https://developer-pro.bitmart.com/en/spot/#margin-borrow-isolated - * @param {str} code unified currency code of the currency to borrow - * @param {str} amount the amount to borrow - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to borrow + * @param {string} amount the amount to borrow + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); if (symbol === undefined) { @@ -2677,9 +2677,9 @@ module.exports = class bitmart extends Exchange { * @name bitmart#fetchBorrowRate * @description fetch the rate of interest to borrow a currency for margin trading * @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitmart api endpoint - * @returns {dict} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitmart api endpoint + * @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); let market = undefined; diff --git a/js/bitmex.js b/js/bitmex.js index e8eef8379939..7e40baaedb25 100644 --- a/js/bitmex.js +++ b/js/bitmex.js @@ -221,8 +221,8 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchMarkets * @description retrieves data on all markets for bitmex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetInstrumentActiveAndIndices (params); // @@ -512,8 +512,8 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const request = { @@ -575,10 +575,10 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -619,9 +619,9 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const filter = { 'filter': { @@ -641,11 +641,11 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -676,11 +676,11 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'filter': { @@ -695,11 +695,11 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // Bitmex barfs if you set 'open': false in the filter... const orders = await this.fetchOrders (symbol, since, limit, params); @@ -711,11 +711,11 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -911,11 +911,11 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); let currency = undefined; @@ -962,11 +962,11 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1073,9 +1073,9 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1092,9 +1092,9 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetInstrumentActiveAndIndices (params); @@ -1398,12 +1398,12 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); // send JSON key/value pairs, such as {"key": "value"} @@ -1691,11 +1691,11 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1748,13 +1748,13 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1824,10 +1824,10 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by bitmex cancelOrder () - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by bitmex cancelOrder () + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); // https://github.com/ccxt/ccxt/issues/6507 @@ -1855,10 +1855,10 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#cancelOrders * @description cancel multiple orders - * @param {[str]} ids order ids - * @param {str|undefined} symbol not used by bitmex cancelOrders () - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {[string]} ids order ids + * @param {string|undefined} symbol not used by bitmex cancelOrders () + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // return await this.cancelOrder (ids, symbol, params); await this.loadMarkets (); @@ -1880,9 +1880,9 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1939,9 +1939,9 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchPositions * @description fetch all open positions - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const response = await this.privateGetPosition (params); @@ -2210,12 +2210,12 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -2241,9 +2241,9 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchFundingRates * @description fetch the funding rate for multiple markets - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols */ await this.loadMarkets (); const response = await this.publicGetInstrumentActiveAndIndices (params); @@ -2510,16 +2510,16 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#fetchFundingRateHistory * @description Fetches the history of funding rates - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @param {int|undefined} params.until timestamp in ms for ending date filter + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the bitmex api endpoint + * @param {number|undefined} params.until timestamp in ms for ending date filter * @param {bool|undefined} params.reverse if true, will sort results newest first - * @param {int|undefined} params.start starting point for results - * @param {str|undefined} params.columns array of column names to fetch in info, if omitted, will return all columns - * @param {str|undefined} params.filter generic table filter, send json key/value pairs, such as {"key": "value"}, you can key on individual fields, and do more advanced querying on timestamps, see the [timestamp docs]{@link https://www.bitmex.com/app/restAPI#Timestamp-Filters} for more details - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {number|undefined} params.start starting point for results + * @param {string|undefined} params.columns array of column names to fetch in info, if omitted, will return all columns + * @param {string|undefined} params.filter generic table filter, send json key/value pairs, such as {"key": "value"}, you can key on individual fields, and do more advanced querying on timestamps, see the [timestamp docs]{@link https://www.bitmex.com/app/restAPI#Timestamp-Filters} for more details + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ await this.loadMarkets (); const request = {}; @@ -2592,10 +2592,10 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setLeverage() requires a symbol argument'); @@ -2620,10 +2620,10 @@ module.exports = class bitmex extends Exchange { * @method * @name bitmex#setMarginMode * @description set margin mode to 'cross' or 'isolated' - * @param {str} marginMode 'cross' or 'isolated' - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitmex api endpoint - * @returns {dict} response from the exchange + * @param {string} marginMode 'cross' or 'isolated' + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitmex api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setMarginMode() requires a symbol argument'); diff --git a/js/bitopro.js b/js/bitopro.js index 713cb8ba051e..a7e361c2dd4d 100644 --- a/js/bitopro.js +++ b/js/bitopro.js @@ -205,8 +205,8 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetProvisioningCurrencies (params); const currencies = this.safeValue (response, 'data', []); @@ -268,8 +268,8 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchMarkets * @description retrieves data on all markets for bitopro - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetProvisioningTradingPairs (); const markets = this.safeValue (response, 'data', []); @@ -403,9 +403,9 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -436,8 +436,8 @@ module.exports = class bitopro extends Exchange { * @name bitopro#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTickers (); @@ -465,10 +465,10 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -594,11 +594,11 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -627,8 +627,8 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetProvisioningLimitationsAndFees (params); @@ -728,11 +728,11 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitopro api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitopro api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -850,8 +850,8 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAccountsBalance (params); @@ -974,13 +974,13 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1028,10 +1028,10 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires the symbol argument'); @@ -1061,9 +1061,9 @@ module.exports = class bitopro extends Exchange { * @name bitopro#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrders() requires a symbol argument'); @@ -1092,9 +1092,9 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1127,9 +1127,9 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires the symbol argument'); @@ -1172,11 +1172,11 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires the symbol argument'); @@ -1242,11 +1242,11 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'statusKind': 'DONE', @@ -1259,11 +1259,11 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires the symbol argument'); @@ -1395,11 +1395,11 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchDeposits * @description fetch all deposits made to an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchDeposits() requires the code argument'); @@ -1447,11 +1447,11 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchWithdrawals() requires the code argument'); @@ -1498,10 +1498,10 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id - * @param {str} id withdrawal id - * @param {str} code unified currency code of the currency withdrawn, default is undefined - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string} code unified currency code of the currency withdrawn, default is undefined + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchWithdrawal() requires the code argument'); @@ -1538,12 +1538,12 @@ module.exports = class bitopro extends Exchange { * @method * @name bitopro#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitopro api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitopro api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); diff --git a/js/bitpanda.js b/js/bitpanda.js index 2531bc157fc0..a54b3b40367c 100644 --- a/js/bitpanda.js +++ b/js/bitpanda.js @@ -296,7 +296,7 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the bitpanda api endpoint + * @param {object} params extra parameters specific to the bitpanda api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -314,8 +314,8 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -353,8 +353,8 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchMarkets * @description retrieves data on all markets for bitpanda - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetInstruments (params); // @@ -437,8 +437,8 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ let method = this.safeString (params, 'method'); params = this.omit (params, 'method'); @@ -615,9 +615,9 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -652,8 +652,8 @@ module.exports = class bitpanda extends Exchange { * @name bitpanda#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetMarketTicker (params); @@ -691,10 +691,10 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -818,11 +818,11 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitpanda api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitpanda api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -947,11 +947,11 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1004,8 +1004,8 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAccountBalances (params); @@ -1050,9 +1050,9 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1076,9 +1076,9 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1103,11 +1103,11 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1168,11 +1168,11 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1234,12 +1234,12 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1506,13 +1506,13 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1573,10 +1573,10 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by bitmex cancelOrder () - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by bitmex cancelOrder () + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const clientOrderId = this.safeString2 (params, 'clientOrderId', 'client_id'); @@ -1601,9 +1601,9 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1626,9 +1626,9 @@ module.exports = class bitpanda extends Exchange { * @name bitpanda#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1648,9 +1648,9 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by bitpanda fetchOrder - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by bitpanda fetchOrder + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1706,11 +1706,11 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1827,11 +1827,11 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'with_cancelled_and_rejected': true, // default is false, orders which have been cancelled by the user before being filled or rejected by the system as invalid, additionally, all inactive filled orders which would return with "with_just_filled_inactive" @@ -1844,12 +1844,12 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1904,11 +1904,11 @@ module.exports = class bitpanda extends Exchange { * @method * @name bitpanda#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitpanda api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitpanda api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { diff --git a/js/bitrue.js b/js/bitrue.js index e828b0e2cc7e..bb1109f7db5c 100644 --- a/js/bitrue.js +++ b/js/bitrue.js @@ -342,8 +342,8 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.v1PublicGetPing (params); // @@ -368,7 +368,7 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the bitrue api endpoint + * @param {object} params extra parameters specific to the bitrue api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.v1PublicGetTime (params); @@ -457,8 +457,8 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.v1PublicGetExchangeInfo (params); // @@ -565,8 +565,8 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchMarkets * @description retrieves data on all markets for bitrue - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.v1PublicGetExchangeInfo (params); // @@ -713,8 +713,8 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.v1PrivateGetAccount (params); @@ -743,10 +743,10 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -825,9 +825,9 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -873,8 +873,8 @@ module.exports = class bitrue extends Exchange { * @name bitrue#fetchBidsAsks * @description fetches the bid and ask price and volume for multiple markets * @param {[str]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBidsAsks', 'defaultType', 'spot'); @@ -898,8 +898,8 @@ module.exports = class bitrue extends Exchange { * @name bitrue#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = { @@ -1038,11 +1038,11 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1209,13 +1209,13 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1268,9 +1268,9 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -1296,11 +1296,11 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchClosedOrders() requires a symbol argument'); @@ -1351,11 +1351,11 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -1396,10 +1396,10 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -1436,11 +1436,11 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const method = this.safeString (this.options, 'fetchMyTradesMethod', 'v2PrivateGetMyTrades'); if ((symbol === undefined) && (method === 'v2PrivateGetMyTrades')) { @@ -1492,11 +1492,11 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchDeposits * @description fetch all deposits made to an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchDeposits() requires a code argument'); @@ -1564,11 +1564,11 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchWithdrawals() requires a code argument'); @@ -1755,12 +1755,12 @@ module.exports = class bitrue extends Exchange { * @method * @name bitrue#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitrue api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitrue api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/bitso.js b/js/bitso.js index 9841f58bb4da..444c40fb3576 100644 --- a/js/bitso.js +++ b/js/bitso.js @@ -181,11 +181,11 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ const request = {}; if (limit !== undefined) { @@ -337,8 +337,8 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchMarkets * @description retrieves data on all markets for bitso - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetAvailableBooks (params); // @@ -497,8 +497,8 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalance (params); @@ -535,10 +535,10 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -601,9 +601,9 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -637,12 +637,12 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -813,11 +813,11 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -833,8 +833,8 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetFees (params); @@ -905,11 +905,11 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -943,13 +943,13 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -975,10 +975,10 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by bitso cancelOrder () - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by bitso cancelOrder () + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -992,10 +992,10 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#cancelOrders * @description cancel multiple orders - * @param {[str]} ids order ids - * @param {str|undefined} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {[string]} ids order ids + * @param {string|undefined} symbol unified market symbol + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (!Array.isArray (ids)) { throw new ArgumentsRequired (this.id + ' cancelOrders() ids argument should be an array'); @@ -1030,8 +1030,8 @@ module.exports = class bitso extends Exchange { * @name bitso#cancelAllOrders * @description cancel all open orders * @param {undefined} symbol bitso does not support canceling orders for only a specific market - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol !== undefined) { throw new NotSupported (this.id + ' cancelAllOrders() deletes all orders for user, it does not support filtering by symbol.'); @@ -1112,11 +1112,11 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1151,9 +1151,9 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by bitso fetchOrder - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by bitso fetchOrder + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const response = await this.privateGetOrdersOid ({ @@ -1174,12 +1174,12 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1195,10 +1195,10 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchDeposit * @description fetch information on a deposit - * @param {str} id deposit id - * @param {str|undefined} code bitso does not support filtering by currency code and will ignore this argument - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code bitso does not support filtering by currency code and will ignore this argument + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1238,11 +1238,11 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const response = await this.privateGetFundings (params); @@ -1278,9 +1278,9 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1310,9 +1310,9 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#fetchTransactionFees * @description fetch transaction fees - * @param {[str]|undefined} codes not used by bitso fetchTransactionFees - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {[dict]} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {[string]|undefined} codes not used by bitso fetchTransactionFees + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {[object]} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const response = await this.privateGetFees (params); @@ -1388,12 +1388,12 @@ module.exports = class bitso extends Exchange { * @method * @name bitso#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitso api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitso api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/bitstamp.js b/js/bitstamp.js index 4dadecbcad79..2a1c0daeeff7 100644 --- a/js/bitstamp.js +++ b/js/bitstamp.js @@ -397,8 +397,8 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchMarkets * @description retrieves data on all markets for bitstamp - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.fetchMarketsFromCache (params); // @@ -541,8 +541,8 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.fetchMarketsFromCache (params); // @@ -590,10 +590,10 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -674,9 +674,9 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -906,11 +906,11 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -966,12 +966,12 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -1041,8 +1041,8 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostBalance (params); @@ -1072,9 +1072,9 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1115,8 +1115,8 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privatePostBalance (params); @@ -1146,9 +1146,9 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchTransactionFees * @description fetch transaction fees - * @param {[str]|undefined} codes not used by bitstamp fetchTransactionFees () - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {[dict]} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {[string]|undefined} codes not used by bitstamp fetchTransactionFees () + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {[object]} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const balance = await this.privatePostBalance (params); @@ -1160,13 +1160,13 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1200,10 +1200,10 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1217,9 +1217,9 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1262,9 +1262,9 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1306,11 +1306,11 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -1334,11 +1334,11 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -1385,11 +1385,11 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -1750,11 +1750,11 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); const request = {}; @@ -1774,11 +1774,11 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ let market = undefined; await this.loadMarkets (); @@ -1817,9 +1817,9 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ if (this.isFiat (code)) { throw new NotSupported (this.id + ' fiat fetchDepositAddress() for ' + code + ' is not supported!'); @@ -1844,12 +1844,12 @@ module.exports = class bitstamp extends Exchange { * @method * @name bitstamp#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitstamp api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitstamp api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ // For fiat withdrawals please provide all required additional parameters in the 'params' // Check https://www.bitstamp.net/api/ under 'Open bank withdrawal' for list and description. diff --git a/js/bitstamp1.js b/js/bitstamp1.js index 7e81a9f05567..27a101440577 100644 --- a/js/bitstamp1.js +++ b/js/bitstamp1.js @@ -126,10 +126,10 @@ module.exports = class bitstamp1 extends Exchange { * @method * @name bitstamp1#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitstamp1 api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitstamp1 api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ if (symbol !== 'BTC/USD') { throw new ExchangeError (this.id + ' ' + this.version + " fetchOrderBook doesn't support " + symbol + ', use it for BTC/USD only'); @@ -189,9 +189,9 @@ module.exports = class bitstamp1 extends Exchange { * @method * @name bitstamp1#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitstamp1 api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitstamp1 api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ if (symbol !== 'BTC/USD') { throw new ExchangeError (this.id + ' ' + this.version + " fetchTicker doesn't support " + symbol + ', use it for BTC/USD only'); @@ -246,11 +246,11 @@ module.exports = class bitstamp1 extends Exchange { * @method * @name bitstamp1#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitstamp1 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitstamp1 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ if (symbol !== 'BTC/USD') { throw new BadSymbol (this.id + ' ' + this.version + " fetchTrades doesn't support " + symbol + ', use it for BTC/USD only'); @@ -285,8 +285,8 @@ module.exports = class bitstamp1 extends Exchange { * @method * @name bitstamp1#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitstamp1 api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitstamp1 api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ const response = await this.privatePostBalance (params); return this.parseBalance (response); @@ -297,13 +297,13 @@ module.exports = class bitstamp1 extends Exchange { * @method * @name bitstamp1#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitstamp1 api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitstamp1 api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type !== 'limit') { throw new ExchangeError (this.id + ' ' + this.version + ' accepts limit orders only'); @@ -330,10 +330,10 @@ module.exports = class bitstamp1 extends Exchange { * @method * @name bitstamp1#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitstamp1 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitstamp1 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.privatePostCancelOrder ({ 'id': id }); } @@ -362,11 +362,11 @@ module.exports = class bitstamp1 extends Exchange { * @method * @name bitstamp1#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitstamp1 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitstamp1 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; diff --git a/js/bittrex.js b/js/bittrex.js index e3d798be004e..3b5bc7263046 100644 --- a/js/bittrex.js +++ b/js/bittrex.js @@ -289,8 +289,8 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchMarkets * @description retrieves data on all markets for bittrex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarkets (params); // @@ -397,8 +397,8 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalances (params); @@ -410,10 +410,10 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -452,8 +452,8 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -567,8 +567,8 @@ module.exports = class bittrex extends Exchange { * @name bittrex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const options = this.safeValue (this.options, 'fetchTickers', {}); @@ -615,9 +615,9 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -661,8 +661,8 @@ module.exports = class bittrex extends Exchange { * @name bittrex#fetchBidsAsks * @description fetches the bid and ask price and volume for multiple markets * @param {[str]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetMarketsTickers (params); @@ -746,7 +746,7 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the bittrex api endpoint + * @param {object} params extra parameters specific to the bittrex api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetPing (params); @@ -763,11 +763,11 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -794,9 +794,9 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -819,8 +819,8 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetAccountFeesTrading (params); @@ -887,11 +887,11 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bittrex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bittrex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -950,11 +950,11 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1021,12 +1021,12 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1045,13 +1045,13 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // A ceiling order is a market or limit order that allows you to specify // the amount of quote currency you want to spend (or receive, if selling) @@ -1230,10 +1230,10 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const stop = this.safeValue (params, 'stop'); @@ -1312,9 +1312,9 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1361,10 +1361,10 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchDeposit * @description fetch data on a currency deposit via the deposit id - * @param {str} id deposit id - * @param {str|undefined} code filter by currency code - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code filter by currency code + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1380,14 +1380,14 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @param {int|undefined} params.endDate Filters out result after this timestamp. Uses ISO-8602 format. - * @param {str|undefined} params.nextPageToken The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. - * @param {str|undefined} params.previousPageToken The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bittrex api endpoint + * @param {number|undefined} params.endDate Filters out result after this timestamp. Uses ISO-8602 format. + * @param {string|undefined} params.nextPageToken The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. + * @param {string|undefined} params.previousPageToken The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); // https://support.bittrex.com/hc/en-us/articles/115003723911 @@ -1426,14 +1426,14 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchPendingDeposits * @description fetch all pending deposits made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @param {int|undefined} params.endDate Filters out result after this timestamp. Uses ISO-8602 format. - * @param {str|undefined} params.nextPageToken The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. - * @param {str|undefined} params.previousPageToken The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bittrex api endpoint + * @param {number|undefined} params.endDate Filters out result after this timestamp. Uses ISO-8602 format. + * @param {string|undefined} params.nextPageToken The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. + * @param {string|undefined} params.previousPageToken The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); return this.fetchDeposits (code, since, limit, this.extend (params, { 'status': 'pending' })); @@ -1444,10 +1444,10 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id - * @param {str} id withdrawal id - * @param {str|undefined} code filter by currency code - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string|undefined} code filter by currency code + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1463,14 +1463,14 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @param {int|undefined} params.endDate Filters out result after this timestamp. Uses ISO-8602 format. - * @param {str|undefined} params.nextPageToken The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. - * @param {str|undefined} params.previousPageToken The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bittrex api endpoint + * @param {number|undefined} params.endDate Filters out result after this timestamp. Uses ISO-8602 format. + * @param {string|undefined} params.nextPageToken The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. + * @param {string|undefined} params.previousPageToken The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); // https://support.bittrex.com/hc/en-us/articles/115003723911 @@ -1506,14 +1506,14 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchPendingWithdrawals * @description fetch all pending withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @param {int|undefined} params.endDate Filters out result after this timestamp. Uses ISO-8602 format. - * @param {str|undefined} params.nextPageToken The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. - * @param {str|undefined} params.previousPageToken The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bittrex api endpoint + * @param {number|undefined} params.endDate Filters out result after this timestamp. Uses ISO-8602 format. + * @param {string|undefined} params.nextPageToken The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. + * @param {string|undefined} params.previousPageToken The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); return this.fetchWithdrawals (code, since, limit, this.extend (params, { 'status': 'pending' })); @@ -1804,9 +1804,9 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const stop = this.safeValue (params, 'stop'); @@ -1844,11 +1844,11 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -1874,11 +1874,11 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const stop = this.safeValue (params, 'stop'); @@ -1958,9 +1958,9 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2000,9 +2000,9 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2043,12 +2043,12 @@ module.exports = class bittrex extends Exchange { * @method * @name bittrex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bittrex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bittrex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/bitvavo.js b/js/bitvavo.js index f0a3b429bc97..4653a76c9ffa 100644 --- a/js/bitvavo.js +++ b/js/bitvavo.js @@ -291,7 +291,7 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the bitvavo api endpoint + * @param {object} params extra parameters specific to the bitvavo api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -306,8 +306,8 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchMarkets * @description retrieves data on all markets for bitvavo - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarkets (params); const currencies = await this.fetchCurrenciesFromCache (params); @@ -410,8 +410,8 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.fetchCurrenciesFromCache (params); // @@ -472,9 +472,9 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -557,8 +557,8 @@ module.exports = class bitvavo extends Exchange { * @name bitvavo#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTicker24h (params); @@ -588,11 +588,11 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -727,8 +727,8 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetAccount (params); @@ -764,10 +764,10 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -825,11 +825,11 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bitvavo api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bitvavo api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -887,8 +887,8 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalance (params); @@ -909,9 +909,9 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -942,24 +942,24 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @param {str} params.timeInForce "GTC", "IOC", or "PO" - * @param {float} params.stopPrice The price at which a trigger order is triggered at - * @param {float} params.triggerPrice The price at which a trigger order is triggered at + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @param {string} params.timeInForce "GTC", "IOC", or "PO" + * @param {number} params.stopPrice The price at which a trigger order is triggered at + * @param {number} params.triggerPrice The price at which a trigger order is triggered at * @param {bool} params.postOnly If true, the order will only be posted to the order book and not executed immediately - * @param {float} params.stopLossPrice The price at which a stop loss order is triggered at - * @param {float} params.takeProfitPrice The price at which a take profit order is triggered at - * @param {str} params.triggerType "price" - * @param {str} params.triggerReference "lastTrade", "bestBid", "bestAsk", "midPrice" Only for stop orders: Use this to determine which parameter will trigger the order - * @param {str} params.selfTradePrevention "decrementAndCancel", "cancelOldest", "cancelNewest", "cancelBoth" + * @param {number} params.stopLossPrice The price at which a stop loss order is triggered at + * @param {number} params.takeProfitPrice The price at which a take profit order is triggered at + * @param {string} params.triggerType "price" + * @param {string} params.triggerReference "lastTrade", "bestBid", "bestAsk", "midPrice" Only for stop orders: Use this to determine which parameter will trigger the order + * @param {string} params.selfTradePrevention "decrementAndCancel", "cancelOldest", "cancelNewest", "cancelBoth" * @param {bool} params.disableMarketProtection don't cancel if the next fill price is 10% worse than the best fill price * @param {bool} params.responseRequired Set this to 'false' when only an acknowledgement of success or failure is required, this is faster. - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1093,10 +1093,10 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -1121,9 +1121,9 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1148,9 +1148,9 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -1204,11 +1204,11 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -1274,11 +1274,11 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1452,11 +1452,11 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -1503,12 +1503,12 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1540,11 +1540,11 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1587,11 +1587,11 @@ module.exports = class bitvavo extends Exchange { * @method * @name bitvavo#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bitvavo api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bitvavo api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { diff --git a/js/bkex.js b/js/bkex.js index 49b2e4e18251..f6722c20d483 100644 --- a/js/bkex.js +++ b/js/bkex.js @@ -230,8 +230,8 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchMarkets * @description retrieves data on all markets for bkex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetCommonSymbols (params); // @@ -316,8 +316,8 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCommonCurrencys (params); // @@ -376,7 +376,7 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the bkex api endpoint + * @param {object} params extra parameters specific to the bkex api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetCommonTimestamp (params); @@ -396,8 +396,8 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.publicGetCommonTimestamp (params); // @@ -425,11 +425,11 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bkex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bkex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -492,9 +492,9 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -533,8 +533,8 @@ module.exports = class bkex extends Exchange { * @name bkex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = {}; @@ -599,10 +599,10 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -641,11 +641,11 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -743,8 +743,8 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const query = this.omit (params, 'type'); @@ -793,9 +793,9 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -842,11 +842,11 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchDeposits * @description fetch all deposits made to an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchDeposits() requires code argument'); @@ -900,11 +900,11 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchWithdrawals() requires code argument'); @@ -1011,13 +1011,13 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1048,10 +1048,10 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = (symbol !== undefined) ? this.market (symbol) : undefined; @@ -1075,9 +1075,9 @@ module.exports = class bkex extends Exchange { * @name bkex#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (!Array.isArray (ids)) { throw new ArgumentsRequired (this.id + ' cancelOrders() ids argument should be an array'); @@ -1107,11 +1107,11 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -1166,10 +1166,10 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchOpenOrder * @description fetch an open order by it's id - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'orderId': id, @@ -1207,11 +1207,11 @@ module.exports = class bkex extends Exchange { * @method * @name bkex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bkex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bkex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchClosedOrders() requires a symbol argument'); diff --git a/js/bl3p.js b/js/bl3p.js index 00bbf6740fc2..f50166e0efd9 100644 --- a/js/bl3p.js +++ b/js/bl3p.js @@ -131,8 +131,8 @@ module.exports = class bl3p extends Exchange { * @method * @name bl3p#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bl3p api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bl3p api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostGENMKTMoneyInfo (params); @@ -153,10 +153,10 @@ module.exports = class bl3p extends Exchange { * @method * @name bl3p#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bl3p api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bl3p api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ const market = this.market (symbol); const request = { @@ -216,9 +216,9 @@ module.exports = class bl3p extends Exchange { * @method * @name bl3p#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bl3p api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bl3p api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const market = this.market (symbol); const request = { @@ -271,11 +271,11 @@ module.exports = class bl3p extends Exchange { * @method * @name bl3p#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bl3p api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bl3p api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ const market = this.market (symbol); const response = await this.publicGetMarketTrades (this.extend ({ @@ -290,8 +290,8 @@ module.exports = class bl3p extends Exchange { * @method * @name bl3p#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bl3p api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bl3p api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privatePostGENMKTMoneyInfo (params); @@ -346,13 +346,13 @@ module.exports = class bl3p extends Exchange { * @method * @name bl3p#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bl3p api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bl3p api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const market = this.market (symbol); const order = { @@ -377,10 +377,10 @@ module.exports = class bl3p extends Exchange { * @method * @name bl3p#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bl3p api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bl3p api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'order_id': id, diff --git a/js/blockchaincom.js b/js/blockchaincom.js index dc945b7e6ee4..cae7f2b82c9e 100644 --- a/js/blockchaincom.js +++ b/js/blockchaincom.js @@ -180,8 +180,8 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchMarkets * @description retrieves data on all markets for blockchaincom - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ // // "USDC-GBP": { @@ -308,10 +308,10 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ return await this.fetchL3OrderBook (symbol, limit, params); } @@ -321,10 +321,10 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchL3OrderBook * @description fetches level 3 information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified market symbol - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} an [order book structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} an [order book structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -394,9 +394,9 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -413,8 +413,8 @@ module.exports = class blockchaincom extends Exchange { * @name blockchaincom#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const tickers = await this.publicGetTickers (params); @@ -495,13 +495,13 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -557,10 +557,10 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'orderId': id, @@ -577,9 +577,9 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol of the market to cancel orders in, all markets are used if undefined, default is undefined - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market to cancel orders in, all markets are used if undefined, default is undefined + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // cancels all open orders if no symbol specified // cancels all open orders of specified symbol, if symbol is specified @@ -603,8 +603,8 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetFees (params); @@ -635,11 +635,11 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const state = 'CANCELED'; return await this.fetchOrdersByState (state, symbol, since, limit, params); @@ -650,11 +650,11 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const state = 'FILLED'; return await this.fetchOrdersByState (state, symbol, since, limit, params); @@ -665,11 +665,11 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const state = 'OPEN'; return await this.fetchOrdersByState (state, symbol, since, limit, params); @@ -744,11 +744,11 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -769,9 +769,9 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -882,8 +882,8 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchWithdrawalWhitelist * @description fetch the list of withdrawal addresses on the whitelist - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} dictionary with keys beneficiaryId, name, currency + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} dictionary with keys beneficiaryId, name, currency */ await this.loadMarkets (); const response = await this.privateGetWhitelist (); @@ -925,12 +925,12 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -960,11 +960,11 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -983,10 +983,10 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id - * @param {str} id withdrawal id - * @param {str|undefined} code not used by blockchaincom.fetchWithdrawal - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string|undefined} code not used by blockchaincom.fetchWithdrawal + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1001,11 +1001,11 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1024,10 +1024,10 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchDeposit * @description fetch information on a deposit - * @param {str} id deposit id - * @param {str|undefined} code not used by blockchaincom fetchDeposit () - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code not used by blockchaincom fetchDeposit () + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const depositId = this.safeString (params, 'depositId', id); @@ -1043,8 +1043,8 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const accountName = this.safeString (params, 'account', 'primary'); @@ -1090,9 +1090,9 @@ module.exports = class blockchaincom extends Exchange { * @method * @name blockchaincom#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by blockchaincom fetchOrder - * @param {dict} params extra parameters specific to the blockchaincom api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by blockchaincom fetchOrder + * @param {object} params extra parameters specific to the blockchaincom api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // note: only works with exchange-order-id // does not work with clientOrderId diff --git a/js/btcalpha.js b/js/btcalpha.js index a9b721b2cb33..f3f3aea46f69 100644 --- a/js/btcalpha.js +++ b/js/btcalpha.js @@ -146,8 +146,8 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchMarkets * @description retrieves data on all markets for btcalpha - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetPairs (params); // @@ -233,10 +233,10 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -316,11 +316,11 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); let market = undefined; @@ -341,11 +341,11 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const response = await this.privateGetDeposits (params); @@ -367,11 +367,11 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -477,11 +477,11 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the btcalpha api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the btcalpha api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -526,8 +526,8 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetWallets (params); @@ -620,13 +620,13 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -652,10 +652,10 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'order': id, @@ -669,9 +669,9 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by btcalpha fetchOrder - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by btcalpha fetchOrder + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -686,11 +686,11 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -711,11 +711,11 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': '1', @@ -728,11 +728,11 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': '3', @@ -745,11 +745,11 @@ module.exports = class btcalpha extends Exchange { * @method * @name btcalpha#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the btcalpha api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the btcalpha api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; diff --git a/js/btcbox.js b/js/btcbox.js index d22390861000..6175e864a537 100644 --- a/js/btcbox.js +++ b/js/btcbox.js @@ -140,8 +140,8 @@ module.exports = class btcbox extends Exchange { * @method * @name btcbox#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the btcbox api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the btcbox api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostBalance (params); @@ -153,10 +153,10 @@ module.exports = class btcbox extends Exchange { * @method * @name btcbox#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the btcbox api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the btcbox api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -202,9 +202,9 @@ module.exports = class btcbox extends Exchange { * @method * @name btcbox#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the btcbox api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the btcbox api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -258,11 +258,11 @@ module.exports = class btcbox extends Exchange { * @method * @name btcbox#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the btcbox api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the btcbox api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -291,13 +291,13 @@ module.exports = class btcbox extends Exchange { * @method * @name btcbox#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the btcbox api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the btcbox api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -322,10 +322,10 @@ module.exports = class btcbox extends Exchange { * @method * @name btcbox#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the btcbox api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the btcbox api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); // a special case for btcbox – default symbol is BTC/JPY @@ -419,9 +419,9 @@ module.exports = class btcbox extends Exchange { * @method * @name btcbox#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the btcbox api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the btcbox api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); // a special case for btcbox – default symbol is BTC/JPY @@ -489,11 +489,11 @@ module.exports = class btcbox extends Exchange { * @method * @name btcbox#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the btcbox api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the btcbox api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByType ('all', symbol, since, limit, params); } @@ -503,11 +503,11 @@ module.exports = class btcbox extends Exchange { * @method * @name btcbox#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the btcbox api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the btcbox api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByType ('open', symbol, since, limit, params); } diff --git a/js/btcmarkets.js b/js/btcmarkets.js index fc8aab7ec564..ba469c070f52 100644 --- a/js/btcmarkets.js +++ b/js/btcmarkets.js @@ -188,11 +188,11 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsWithMethod ('privateGetTransfers', code, since, limit, params); } @@ -202,11 +202,11 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsWithMethod ('privateGetDeposits', code, since, limit, params); } @@ -216,11 +216,11 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsWithMethod ('privateGetWithdrawals', code, since, limit, params); } @@ -350,8 +350,8 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchMarkets * @description retrieves data on all markets for btcmarkets - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarkets (params); // @@ -443,7 +443,7 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the btcmarkets api endpoint + * @param {object} params extra parameters specific to the btcmarkets api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -474,8 +474,8 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAccountsMeBalances (params); @@ -508,11 +508,11 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the btcmarkets api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the btcmarkets api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -548,10 +548,10 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -637,9 +637,9 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -747,11 +747,11 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -775,13 +775,13 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -872,9 +872,9 @@ module.exports = class btcmarkets extends Exchange { * @name btcmarkets#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol not used by btcmarkets cancelOrders () - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by btcmarkets cancelOrders () + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); for (let i = 0; i < ids.length; i++) { @@ -891,10 +891,10 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by btcmarket cancelOrder () - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by btcmarket cancelOrder () + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1007,9 +1007,9 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by btcmarkets fetchOrder - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by btcmarkets fetchOrder + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1024,11 +1024,11 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1054,11 +1054,11 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'open' }; return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); @@ -1069,11 +1069,11 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const orders = await this.fetchOrders (symbol, since, limit, params); return this.filterBy (orders, 'status', 'closed'); @@ -1084,11 +1084,11 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -1139,12 +1139,12 @@ module.exports = class btcmarkets extends Exchange { * @method * @name btcmarkets#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the btcmarkets api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the btcmarkets api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); diff --git a/js/btctradeua.js b/js/btctradeua.js index 968e52bbf549..93a89f5d157b 100644 --- a/js/btctradeua.js +++ b/js/btctradeua.js @@ -134,7 +134,7 @@ module.exports = class btctradeua extends Exchange { * @method * @name btctradeua#signIn * @description sign in, must be called prior to using other authenticated methods - * @param {dict} params extra parameters specific to the btctradeua api endpoint + * @param {object} params extra parameters specific to the btctradeua api endpoint * @returns response from exchange */ return await this.privatePostAuth (params); @@ -159,8 +159,8 @@ module.exports = class btctradeua extends Exchange { * @method * @name btctradeua#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the btctradeua api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the btctradeua api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostBalance (params); @@ -172,10 +172,10 @@ module.exports = class btctradeua extends Exchange { * @method * @name btctradeua#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the btctradeua api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the btctradeua api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -267,9 +267,9 @@ module.exports = class btctradeua extends Exchange { * @method * @name btctradeua#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the btctradeua api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the btctradeua api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -391,11 +391,11 @@ module.exports = class btctradeua extends Exchange { * @method * @name btctradeua#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the btctradeua api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the btctradeua api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -420,13 +420,13 @@ module.exports = class btctradeua extends Exchange { * @method * @name btctradeua#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the btctradeua api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the btctradeua api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type === 'market') { throw new ExchangeError (this.id + ' createOrder() allows limit orders only'); @@ -448,10 +448,10 @@ module.exports = class btctradeua extends Exchange { * @method * @name btctradeua#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by btctradeua cancelOrder () - * @param {dict} params extra parameters specific to the btctradeua api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by btctradeua cancelOrder () + * @param {object} params extra parameters specific to the btctradeua api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'id': id, @@ -496,11 +496,11 @@ module.exports = class btctradeua extends Exchange { * @method * @name btctradeua#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the btctradeua api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the btctradeua api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); diff --git a/js/btcturk.js b/js/btcturk.js index fcbbfeb6c5ab..f8d409ae125e 100644 --- a/js/btcturk.js +++ b/js/btcturk.js @@ -126,8 +126,8 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#fetchMarkets * @description retrieves data on all markets for btcturk - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetServerExchangeinfo (params); // @@ -277,8 +277,8 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetUsersBalances (params); @@ -306,10 +306,10 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -389,8 +389,8 @@ module.exports = class btcturk extends Exchange { * @name btcturk#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -403,9 +403,9 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const tickers = await this.fetchTickers ([ symbol ], params); @@ -480,11 +480,11 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -546,11 +546,11 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the btcturk api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the btcturk api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -570,13 +570,13 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -604,10 +604,10 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by btcturk cancelOrder () - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by btcturk cancelOrder () + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'id': id, @@ -620,11 +620,11 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -645,11 +645,11 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -770,11 +770,11 @@ module.exports = class btcturk extends Exchange { * @method * @name btcturk#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the btcturk api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the btcturk api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; diff --git a/js/buda.js b/js/buda.js index 258655eda94f..beeba50942fe 100644 --- a/js/buda.js +++ b/js/buda.js @@ -226,8 +226,8 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchMarkets * @description retrieves data on all markets for buda - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const marketsResponse = await this.publicGetMarkets (params); // @@ -328,8 +328,8 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (); // @@ -402,8 +402,8 @@ module.exports = class buda extends Exchange { * @name buda#fetchTransactionFees * @description fetch transaction fees * @param {[str]|undefined} codes list of unified currency codes - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} a list of [fees structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} a list of [fees structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ // by default it will try load withdrawal fees of all currencies (with separate requests) // however if you define codes = [ 'ETH', 'BTC' ] in args it will only load those @@ -454,9 +454,9 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -534,11 +534,11 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -611,10 +611,10 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -631,11 +631,11 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the buda api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the buda api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -673,8 +673,8 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalances (params); @@ -686,9 +686,9 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by buda fetchOrder - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by buda fetchOrder + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -704,11 +704,11 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -729,11 +729,11 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'state': 'pending', @@ -746,11 +746,11 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'state': 'traded', @@ -763,13 +763,13 @@ module.exports = class buda extends Exchange { * @method * @name buda#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); side = (side === 'buy') ? 'Bid' : 'Ask'; @@ -793,10 +793,10 @@ module.exports = class buda extends Exchange { * @method * @name buda#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by buda cancelOrder () - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by buda cancelOrder () + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -912,9 +912,9 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -954,9 +954,9 @@ module.exports = class buda extends Exchange { * @method * @name buda#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1031,11 +1031,11 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchDeposits * @description fetch all deposits made to an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); if (code === undefined) { @@ -1056,11 +1056,11 @@ module.exports = class buda extends Exchange { * @method * @name buda#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); if (code === undefined) { @@ -1081,12 +1081,12 @@ module.exports = class buda extends Exchange { * @method * @name buda#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the buda api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the buda api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/bw.js b/js/bw.js index 96a7d6e04951..7aba9daa6db6 100644 --- a/js/bw.js +++ b/js/bw.js @@ -150,8 +150,8 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchMarkets * @description retrieves data on all markets for bw - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetExchangeConfigControllerWebsiteMarketcontrollerGetByWebId (params); // @@ -267,8 +267,8 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetExchangeConfigControllerWebsiteCurrencycontrollerGetCurrencyList (params); // @@ -413,9 +413,9 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -450,8 +450,8 @@ module.exports = class bw extends Exchange { * @name bw#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetApiDataV1Tickers (params); @@ -491,10 +491,10 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -582,11 +582,11 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -622,8 +622,8 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetExchangeConfigControllerWebsiteMarketcontrollerGetByWebId (); @@ -714,11 +714,11 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bw api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bw api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -767,8 +767,8 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostExchangeFundControllerWebsiteFundcontrollerFindbypage (params); @@ -797,13 +797,13 @@ module.exports = class bw extends Exchange { * @method * @name bw#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (price === undefined) { throw new ExchangeError (this.id + ' createOrder() allows limit orders only'); @@ -933,9 +933,9 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -976,10 +976,10 @@ module.exports = class bw extends Exchange { * @method * @name bw#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -1008,11 +1008,11 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -1065,11 +1065,11 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchClosedOrders() requires a symbol argument'); @@ -1096,11 +1096,11 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -1194,9 +1194,9 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1316,11 +1316,11 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchDeposits * @description fetch all deposits made to an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchDeposits() requires a currency code argument'); @@ -1370,11 +1370,11 @@ module.exports = class bw extends Exchange { * @method * @name bw#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bw api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bw api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchWithdrawals() requires a currency code argument'); diff --git a/js/bybit.js b/js/bybit.js index 8d791f4c697a..7d4119d31715 100644 --- a/js/bybit.js +++ b/js/bybit.js @@ -534,7 +534,7 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the bybit api endpoint + * @param {object} params extra parameters specific to the bybit api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetV2PublicTime (params); @@ -564,8 +564,8 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} an associative dictionary of currencies */ if (!this.checkRequiredCredentials (false)) { return undefined; @@ -673,8 +673,8 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchMarkets * @description retrieves data on all markets for bybit - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ if (this.options['adjustForTimeDifference']) { await this.loadTimeDifference (); @@ -1266,9 +1266,9 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1375,8 +1375,8 @@ module.exports = class bybit extends Exchange { * @name bybit#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); let type = undefined; @@ -1503,11 +1503,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bybit api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bybit api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1653,9 +1653,9 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1913,11 +1913,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2019,10 +2019,10 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -2224,8 +2224,8 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ const request = {}; let type = undefined; @@ -2587,9 +2587,9 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -2643,13 +2643,13 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3110,10 +3110,10 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -3209,9 +3209,9 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -3328,11 +3328,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -3469,11 +3469,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -3542,11 +3542,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -3635,12 +3635,12 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const request = { 'order_id': id, @@ -3653,11 +3653,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -3848,9 +3848,9 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchDepositAddressesByNetwork * @description fetch a dictionary of addresses for a currency, indexed by network - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network */ await this.loadMarkets (); let currency = this.currency (code); @@ -3893,9 +3893,9 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const rawNetwork = this.safeStringUpper (params, 'network'); const networks = this.safeValue (this.options, 'networks', {}); @@ -3934,11 +3934,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -4003,11 +4003,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -4153,11 +4153,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); const request = { @@ -4283,12 +4283,12 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); @@ -4332,8 +4332,8 @@ module.exports = class bybit extends Exchange { * @name bybit#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const request = {}; @@ -4576,10 +4576,10 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#setMarginMode * @description set margin mode to 'cross' or 'isolated' - * @param {str} marginMode 'cross' or 'isolated' - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} response from the exchange + * @param {string} marginMode 'cross' or 'isolated' + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setMarginMode() requires a symbol argument'); @@ -4646,10 +4646,10 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setLeverage() requires a symbol argument'); @@ -4753,11 +4753,11 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchOpenInterestHistory * @description Gets the total amount of unsettled contracts. In other words, the total number of contracts held in open positions - * @param {str} symbol Unified market symbol - * @param {str} timeframe "5m", 15m, 30m, 1h, 4h, 1d - * @param {int} since Not used by Bybit - * @param {int} limit The number of open interest structures to return. Max 200, default 50 - * @param {dict} params Exchange specific parameters + * @param {string} symbol Unified market symbol + * @param {string} timeframe "5m", 15m, 30m, 1h, 4h, 1d + * @param {number} since Not used by Bybit + * @param {number} limit The number of open interest structures to return. Max 200, default 50 + * @param {object} params Exchange specific parameters * @returns An array of open interest structures */ if (timeframe === '1m') { @@ -5086,9 +5086,9 @@ module.exports = class bybit extends Exchange { * @method * @name bybit#fetchMarketLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the bybit api endpoint - * @returns {dict} a [leverage tiers structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the bybit api endpoint + * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure} */ await this.loadMarkets (); const request = {}; diff --git a/js/bytetrade.js b/js/bytetrade.js index 074b68b103a0..4f4932349aeb 100644 --- a/js/bytetrade.js +++ b/js/bytetrade.js @@ -168,8 +168,8 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} an associative dictionary of currencies */ const currencies = await this.publicGetCurrencies (params); const result = {}; @@ -276,8 +276,8 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchMarkets * @description retrieves data on all markets for bytetrade - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const markets = await this.publicGetSymbols (params); // @@ -418,8 +418,8 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ if (!('userid' in params) && (this.apiKey === undefined)) { throw new ArgumentsRequired (this.id + ' fetchBalance() requires this.apiKey or userid argument'); @@ -437,10 +437,10 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -511,9 +511,9 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -558,8 +558,8 @@ module.exports = class bytetrade extends Exchange { * @name bytetrade#fetchBidsAsks * @description fetches the bid and ask price and volume for multiple markets * @param {[str]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.marketGetDepth (params); @@ -572,8 +572,8 @@ module.exports = class bytetrade extends Exchange { * @name bytetrade#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.marketGetTickers (params); @@ -606,11 +606,11 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the bytetrade api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the bytetrade api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -717,11 +717,11 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -743,8 +743,8 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetSymbols (params); @@ -866,13 +866,13 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ this.checkRequiredDependencies (); if (this.apiKey === undefined) { @@ -1072,9 +1072,9 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (!('userid' in params) && (this.apiKey === undefined)) { throw new ArgumentsRequired ('fetchOrder() requires this.apiKey or userid argument'); @@ -1098,11 +1098,11 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (!('userid' in params) && (this.apiKey === undefined)) { throw new ArgumentsRequired ('fetchOpenOrders() requires this.apiKey or userid argument'); @@ -1131,11 +1131,11 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (!('userid' in params) && (this.apiKey === undefined)) { throw new ArgumentsRequired ('fetchClosedOrders() requires this.apiKey or userid argument'); @@ -1164,11 +1164,11 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (!('userid' in params) && (this.apiKey === undefined)) { throw new ArgumentsRequired ('fetchOrders() requires this.apiKey or userid argument'); @@ -1197,10 +1197,10 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (this.apiKey === undefined) { throw new ArgumentsRequired ('cancelOrder() requires hasAlreadyAuthenticatedSuccessfully'); @@ -1306,11 +1306,11 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (!('userid' in params) && (this.apiKey === undefined)) { throw new ArgumentsRequired ('fetchMyTrades() requires this.apiKey or userid argument'); @@ -1338,11 +1338,11 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); if (!('userid' in params) && (this.apiKey === undefined)) { @@ -1371,11 +1371,11 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); if (!('userid' in params) && (this.apiKey === undefined)) { @@ -1465,9 +1465,9 @@ module.exports = class bytetrade extends Exchange { * @method * @name bytetrade#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the bytetrade api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the bytetrade api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); if (!('userid' in params) && (this.apiKey === undefined)) { diff --git a/js/cdax.js b/js/cdax.js index b52a802ee2c3..11b043b9181f 100644 --- a/js/cdax.js +++ b/js/cdax.js @@ -263,7 +263,7 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the cdax api endpoint + * @param {object} params extra parameters specific to the cdax api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetCommonTimestamp (params); @@ -352,8 +352,8 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchMarkets * @description retrieves data on all markets for cdax - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetCommonSymbols (params); // @@ -545,10 +545,10 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -596,9 +596,9 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -639,8 +639,8 @@ module.exports = class cdax extends Exchange { * @name cdax#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.marketGetTickers (params); @@ -768,12 +768,12 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -788,11 +788,11 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -817,11 +817,11 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -897,11 +897,11 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the cdax api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the cdax api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -935,8 +935,8 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ await this.loadMarkets (); const response = await this.privateGetAccountAccounts (params); @@ -948,8 +948,8 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} an associative dictionary of currencies */ const request = { 'language': this.options['language'], @@ -1071,8 +1071,8 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1121,9 +1121,9 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by cdax fetchOrder - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by cdax fetchOrder + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1139,11 +1139,11 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStates ('pre-submitted,submitted,partial-filled,filled,partial-canceled,canceled', symbol, since, limit, params); } @@ -1153,11 +1153,11 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const method = this.safeString (this.options, 'fetchOpenOrdersMethod', 'fetch_open_orders_v1'); return await this[method] (symbol, since, limit, params); @@ -1175,11 +1175,11 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStates ('filled,partial-canceled,canceled', symbol, since, limit, params); } @@ -1340,13 +1340,13 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1414,10 +1414,10 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by cdax cancelOrder () - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by cdax cancelOrder () + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const response = await this.privatePostOrderOrdersIdSubmitcancel ({ 'id': id }); // @@ -1438,9 +1438,9 @@ module.exports = class cdax extends Exchange { * @name cdax#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol not used by cdax cancelOrders () - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by cdax cancelOrders () + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const clientOrderIds = this.safeValue2 (params, 'clientOrderIds', 'client-order-ids'); @@ -1492,9 +1492,9 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1571,11 +1571,11 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (limit === undefined || limit > 100) { limit = 100; @@ -1605,11 +1605,11 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (limit === undefined || limit > 100) { limit = 100; @@ -1740,12 +1740,12 @@ module.exports = class cdax extends Exchange { * @method * @name cdax#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the cdax api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the cdax api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); diff --git a/js/cex.js b/js/cex.js index c89f4cbb1840..486b2f69f857 100644 --- a/js/cex.js +++ b/js/cex.js @@ -212,8 +212,8 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.fetchCurrenciesFromCache (params); this.options['currencies'] = { @@ -319,8 +319,8 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchMarkets * @description retrieves data on all markets for cex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const currenciesResponse = await this.fetchCurrenciesFromCache (params); const currenciesData = this.safeValue (currenciesResponse, 'data', {}); @@ -452,8 +452,8 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostBalance (params); @@ -465,10 +465,10 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -509,11 +509,11 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the cex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the cex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -587,8 +587,8 @@ module.exports = class cex extends Exchange { * @name cex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const currencies = Object.keys (this.currencies); @@ -613,9 +613,9 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -667,11 +667,11 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -687,8 +687,8 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privatePostGetMyfee (params); @@ -729,13 +729,13 @@ module.exports = class cex extends Exchange { * @method * @name cex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // for market buy it requires the amount of quote currency to spend if ((type === 'market') && (side === 'buy')) { @@ -807,10 +807,10 @@ module.exports = class cex extends Exchange { * @method * @name cex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by cex cancelOrder () - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by cex cancelOrder () + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1081,11 +1081,11 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1108,11 +1108,11 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const method = 'privatePostArchivedOrdersPair'; @@ -1130,9 +1130,9 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by cex fetchOrder - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by cex fetchOrder + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1248,11 +1248,11 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1493,9 +1493,9 @@ module.exports = class cex extends Exchange { * @method * @name cex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the cex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the cex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ if (code === 'XRP' || code === 'XLM') { // https://github.com/ccxt/ccxt/pull/2327#issuecomment-375204856 diff --git a/js/coinbase.js b/js/coinbase.js index 37007cef4198..bd03d175d0be 100644 --- a/js/coinbase.js +++ b/js/coinbase.js @@ -209,7 +209,7 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the coinbase api endpoint + * @param {object} params extra parameters specific to the coinbase api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -230,8 +230,8 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ await this.loadMarkets (); const request = { @@ -319,9 +319,9 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ let accountId = this.safeString (params, 'account_id'); params = this.omit (params, 'account_id'); @@ -394,11 +394,11 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchMySells * @description fetch sells - * @param {str|undefined} symbol not used by coinbase fetchMySells () - * @param {int|undefined} since timestamp in ms of the earliest sell, default is undefined - * @param {int|undefined} limit max number of sells to return, default is undefined - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {dict} a [list of order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by coinbase fetchMySells () + * @param {number|undefined} since timestamp in ms of the earliest sell, default is undefined + * @param {number|undefined} limit max number of sells to return, default is undefined + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {object} a [list of order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // they don't have an endpoint for all historical trades const request = this.prepareAccountRequest (limit, params); @@ -413,11 +413,11 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchMyBuys * @description fetch buys - * @param {str|undefined} symbol not used by coinbase fetchMyBuys () - * @param {int|undefined} since timestamp in ms of the earliest buy, default is undefined - * @param {int|undefined} limit max number of buys to return, default is undefined - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by coinbase fetchMyBuys () + * @param {number|undefined} since timestamp in ms of the earliest buy, default is undefined + * @param {number|undefined} limit max number of buys to return, default is undefined + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // they don't have an endpoint for all historical trades const request = this.prepareAccountRequest (limit, params); @@ -440,11 +440,11 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ // fiat only, for crypto transactions use fetchLedger return await this.fetchTransactionsWithMethod ('privateGetAccountsAccountIdWithdrawals', code, since, limit, params); @@ -455,11 +455,11 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ // fiat only, for crypto transactions use fetchLedger return await this.fetchTransactionsWithMethod ('privateGetAccountsAccountIdDeposits', code, since, limit, params); @@ -662,8 +662,8 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchMarkets * @description retrieves data on all markets for coinbase - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.fetchCurrenciesFromCache (params); const currencies = this.safeValue (response, 'currencies', {}); @@ -759,8 +759,8 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.fetchCurrenciesFromCache (params); const currencies = this.safeValue (response, 'currencies', {}); @@ -835,9 +835,9 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = { @@ -877,9 +877,9 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -988,8 +988,8 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const request = { @@ -1044,11 +1044,11 @@ module.exports = class coinbase extends Exchange { * @method * @name coinbase#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the coinbase api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the coinbase api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); let currency = undefined; diff --git a/js/coinbasepro.js b/js/coinbasepro.js index 53fd1f745678..19ed98b87e14 100644 --- a/js/coinbasepro.js +++ b/js/coinbasepro.js @@ -226,8 +226,8 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -296,8 +296,8 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchMarkets * @description retrieves data on all markets for coinbasepro - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetProducts (params); // @@ -416,8 +416,8 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ await this.loadMarkets (); const response = await this.privateGetAccounts (params); @@ -484,8 +484,8 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAccounts (params); @@ -497,10 +497,10 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); // level 1 - only the best bid and ask @@ -618,8 +618,8 @@ module.exports = class coinbasepro extends Exchange { * @name coinbasepro#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = {}; @@ -663,9 +663,9 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -778,11 +778,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ // as of 2018-08-23 if (symbol === undefined) { @@ -805,11 +805,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -828,8 +828,8 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetFees (params); @@ -883,11 +883,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the coinbasepro api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the coinbasepro api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -923,7 +923,7 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the coinbasepro api endpoint + * @param {object} params extra parameters specific to the coinbasepro api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -1028,9 +1028,9 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by coinbasepro fetchOrder - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by coinbasepro fetchOrder + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1053,12 +1053,12 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -1077,11 +1077,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'all', @@ -1094,11 +1094,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1119,11 +1119,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'done', @@ -1136,13 +1136,13 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1229,10 +1229,10 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1261,9 +1261,9 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1284,10 +1284,10 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#deposit * @description Creates a new deposit address, as required by coinbasepro - * @param {str} code Unified CCXT currency code (e.g. `"USDT"`) - * @param {float} amount The amount of currency to send in the deposit (e.g. `20`) - * @param {str} address Not used by coinbasepro - * @param {dict} params Parameters specific to the exchange API endpoint (e.g. `{"network": "TRX"}`) + * @param {string} code Unified CCXT currency code (e.g. `"USDT"`) + * @param {number} amount The amount of currency to send in the deposit (e.g. `20`) + * @param {string} address Not used by coinbasepro + * @param {object} params Parameters specific to the exchange API endpoint (e.g. `{"network": "TRX"}`) * @returns a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); @@ -1324,12 +1324,12 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1447,11 +1447,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ // https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger if (code === undefined) { @@ -1492,11 +1492,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1543,11 +1543,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactions (code, since, limit, this.extend ({ 'type': 'deposit' }, params)); } @@ -1557,11 +1557,11 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactions (code, since, limit, this.extend ({ 'type': 'withdraw' }, params)); } @@ -1638,9 +1638,9 @@ module.exports = class coinbasepro extends Exchange { * @method * @name coinbasepro#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the coinbasepro api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the coinbasepro api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); diff --git a/js/coincheck.js b/js/coincheck.js index d08cc52ff5a0..31ffd40eeaf4 100644 --- a/js/coincheck.js +++ b/js/coincheck.js @@ -184,8 +184,8 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAccountsBalance (params); @@ -197,11 +197,11 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); // Only BTC/JPY is meaningful @@ -273,10 +273,10 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -331,9 +331,9 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ if (symbol !== 'BTC/JPY') { throw new BadSymbol (this.id + ' fetchTicker() supports BTC/JPY only'); @@ -462,11 +462,11 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -506,11 +506,11 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -540,8 +540,8 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetAccounts (params); @@ -587,13 +587,13 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -623,10 +623,10 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by coincheck cancelOrder () - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by coincheck cancelOrder () + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'id': id, @@ -639,11 +639,11 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -688,11 +688,11 @@ module.exports = class coincheck extends Exchange { * @method * @name coincheck#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the coincheck api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the coincheck api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; diff --git a/js/coinex.js b/js/coinex.js index dc0174134b6d..85b95caf2ff5 100644 --- a/js/coinex.js +++ b/js/coinex.js @@ -393,8 +393,8 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchMarkets * @description retrieves data on all markets for coinex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ let result = []; const [ type, query ] = this.handleMarketTypeAndParams ('fetchMarkets', undefined, params); @@ -667,9 +667,9 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -741,8 +741,8 @@ module.exports = class coinex extends Exchange { * @name coinex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchTickers', undefined, params); @@ -830,7 +830,7 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the coinex api endpoint + * @param {object} params extra parameters specific to the coinex api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.perpetualPublicGetTime (params); @@ -849,10 +849,10 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrderBook() requires a symbol argument'); @@ -1046,11 +1046,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1089,9 +1089,9 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1124,8 +1124,8 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetMarketInfo (params); @@ -1199,11 +1199,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the coinex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the coinex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1397,8 +1397,8 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ const accountType = this.safeString (params, 'type', 'main'); params = this.omit (params, 'type'); @@ -1710,20 +1710,20 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the coinex api endpoint - * @param {float} triggerPrice price at which to triger stop orders - * @param {float} stopPrice price at which to triger stop orders - * @param {float} stopLossPrice price at which to trigger stop-loss orders - * @param {float} takeProfitPrice price at which to trigger take-profit orders - * @param {str} params.timeInForce "GTC", "IOC", "FOK", "PO" + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the coinex api endpoint + * @param {number} triggerPrice price at which to triger stop orders + * @param {number} stopPrice price at which to triger stop orders + * @param {number} stopLossPrice price at which to trigger stop-loss orders + * @param {number} takeProfitPrice price at which to trigger take-profit orders + * @param {string} params.timeInForce "GTC", "IOC", "FOK", "PO" * @param {bool} params.postOnly * @param {bool} params.reduceOnly - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1959,10 +1959,10 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2106,9 +2106,9 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancellAllOrders() requires a symbol argument'); @@ -2156,9 +2156,9 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -2495,11 +2495,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('pending', symbol, since, limit, params); } @@ -2509,11 +2509,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('finished', symbol, since, limit, params); } @@ -2523,9 +2523,9 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2556,9 +2556,9 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2641,11 +2641,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -2780,8 +2780,8 @@ module.exports = class coinex extends Exchange { * @name coinex#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const request = {}; @@ -2873,9 +2873,9 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3049,10 +3049,10 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#setMarginMode * @description set margin mode to 'cross' or 'isolated' - * @param {str} marginMode 'cross' or 'isolated' - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} response from the exchange + * @param {string} marginMode 'cross' or 'isolated' + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setMarginMode() requires a symbol argument'); @@ -3098,10 +3098,10 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setLeverage() requires a symbol argument'); @@ -3140,8 +3140,8 @@ module.exports = class coinex extends Exchange { * @name coinex#fetchLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols */ await this.loadMarkets (); const response = await this.perpetualPublicGetMarketLimitConfig (params); @@ -3308,10 +3308,10 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 1, params); } @@ -3321,10 +3321,10 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 2, params); } @@ -3334,11 +3334,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchFundingHistory() requires a symbol argument'); @@ -3410,9 +3410,9 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3513,12 +3513,12 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -3575,11 +3575,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchFundingRateHistory() requires a symbol argument'); @@ -3734,12 +3734,12 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -3845,11 +3845,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); let currency = undefined; @@ -3930,11 +3930,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchWithdrawals() requires a currency code argument'); @@ -3998,11 +3998,11 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchDeposits * @description fetch all deposits made to an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchDeposits() requires a currency code argument'); @@ -4084,9 +4084,9 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchBorrowRate * @description fetch the rate of interest to borrow a currency for margin trading - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); let market = undefined; @@ -4129,8 +4129,8 @@ module.exports = class coinex extends Exchange { * @method * @name coinex#fetchBorrowRates * @description fetch the borrow interest rates of all currencies - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const response = await this.privateGetMarginConfig (params); @@ -4271,11 +4271,11 @@ module.exports = class coinex extends Exchange { * @name coinex#borrowMargin * @description create a loan to borrow margin * @see https://github.com/coinexcom/coinex_exchange_api/wiki/086margin_loan - * @param {str} code unified currency code of the currency to borrow - * @param {float} amount the amount to borrow - * @param {str} symbol unified market symbol, required for coinex - * @param {dict} params extra parameters specific to the coinex api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to borrow + * @param {number} amount the amount to borrow + * @param {string} symbol unified market symbol, required for coinex + * @param {object} params extra parameters specific to the coinex api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' borrowMargin() requires a symbol argument'); @@ -4312,12 +4312,12 @@ module.exports = class coinex extends Exchange { * @name coinex#repayMargin * @description repay borrowed margin and interest * @see https://github.com/coinexcom/coinex_exchange_api/wiki/087margin_flat - * @param {str} code unified currency code of the currency to repay - * @param {float} amount the amount to repay - * @param {str} symbol unified market symbol, required for coinex - * @param {dict} params extra parameters specific to the coinex api endpoint - * @param {str|undefined} params.loan_id extra parameter that is not required - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to repay + * @param {number} amount the amount to repay + * @param {string} symbol unified market symbol, required for coinex + * @param {object} params extra parameters specific to the coinex api endpoint + * @param {string|undefined} params.loan_id extra parameter that is not required + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' repayMargin() requires a symbol argument'); diff --git a/js/coinfalcon.js b/js/coinfalcon.js index 3cdccf191540..360edb5e79cf 100644 --- a/js/coinfalcon.js +++ b/js/coinfalcon.js @@ -138,8 +138,8 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchMarkets * @description retrieves data on all markets for coinfalcon - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarkets (params); // @@ -270,9 +270,9 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const tickers = await this.fetchTickers ([ symbol ], params); @@ -284,9 +284,9 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetMarkets (params); @@ -324,10 +324,10 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -405,11 +405,11 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -453,11 +453,11 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -490,8 +490,8 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetUserFees (params); @@ -545,8 +545,8 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetUserAccounts (params); @@ -577,9 +577,9 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.safeCurrency (code); @@ -672,13 +672,13 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -703,10 +703,10 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -723,9 +723,9 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -741,11 +741,11 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -769,11 +769,11 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -816,11 +816,11 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -864,12 +864,12 @@ module.exports = class coinfalcon extends Exchange { * @method * @name coinfalcon#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the coinfalcon api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the coinfalcon api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/coinmate.js b/js/coinmate.js index e6402f3711da..492d61c932b2 100644 --- a/js/coinmate.js +++ b/js/coinmate.js @@ -205,8 +205,8 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchMarkets * @description retrieves data on all markets for coinmate - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetTradingPairs (params); // @@ -312,8 +312,8 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostBalances (params); @@ -325,10 +325,10 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -347,9 +347,9 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -389,11 +389,11 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -509,12 +509,12 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -563,11 +563,11 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); if (limit === undefined) { @@ -657,11 +657,11 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -695,9 +695,9 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -732,11 +732,11 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const response = await this.privatePostOpenOrders (this.extend ({}, params)); const extension = { 'status': 'open' }; @@ -748,11 +748,11 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -874,13 +874,13 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let method = 'privatePost' + this.capitalize (side); @@ -913,9 +913,9 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -935,10 +935,10 @@ module.exports = class coinmate extends Exchange { * @method * @name coinmate#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by coinmate cancelOrder () - * @param {dict} params extra parameters specific to the coinmate api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by coinmate cancelOrder () + * @param {object} params extra parameters specific to the coinmate api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // {"error":false,"errorMessage":null,"data":{"success":true,"remainingAmount":0.01}} const request = { 'orderId': id }; diff --git a/js/coinone.js b/js/coinone.js index 3f1f155f19ff..e5fabeb14f18 100644 --- a/js/coinone.js +++ b/js/coinone.js @@ -143,8 +143,8 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchMarkets * @description retrieves data on all markets for coinone - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const request = { 'currency': 'all', @@ -260,8 +260,8 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostAccountBalance (params); @@ -273,10 +273,10 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -294,9 +294,9 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = { @@ -327,9 +327,9 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -464,11 +464,11 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -502,13 +502,13 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type !== 'limit') { throw new ExchangeError (this.id + ' createOrder() allows limit orders only'); @@ -537,9 +537,9 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -700,11 +700,11 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // The returned amount might not be same as the ordered amount. If an order is partially filled, the returned amount means the remaining amount. // For the same reason, the returned amount and remaining are always same, and the returned filled and cost are always zero. @@ -743,11 +743,11 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -787,10 +787,10 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { // eslint-disable-next-line quotes @@ -826,9 +826,9 @@ module.exports = class coinone extends Exchange { * @method * @name coinone#fetchDepositAddresses * @description fetch deposit addresses for multiple currencies and chain types - * @param {[str]|undefined} codes list of unified currency codes, default is undefined - * @param {dict} params extra parameters specific to the coinone api endpoint - * @returns {dict} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {[string]|undefined} codes list of unified currency codes, default is undefined + * @param {object} params extra parameters specific to the coinone api endpoint + * @returns {object} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const response = await this.privatePostAccountDepositAddress (params); diff --git a/js/coinspot.js b/js/coinspot.js index e182dd7f9993..4129231462e5 100644 --- a/js/coinspot.js +++ b/js/coinspot.js @@ -166,8 +166,8 @@ module.exports = class coinspot extends Exchange { * @method * @name coinspot#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the coinspot api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the coinspot api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const method = this.safeString (this.options, 'fetchBalance', 'private_post_my_balances'); @@ -196,10 +196,10 @@ module.exports = class coinspot extends Exchange { * @method * @name coinspot#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the coinspot api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the coinspot api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -252,9 +252,9 @@ module.exports = class coinspot extends Exchange { * @method * @name coinspot#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the coinspot api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the coinspot api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -283,11 +283,11 @@ module.exports = class coinspot extends Exchange { * @method * @name coinspot#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the coinspot api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the coinspot api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -348,13 +348,13 @@ module.exports = class coinspot extends Exchange { * @method * @name coinspot#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the coinspot api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the coinspot api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const method = 'privatePostMy' + this.capitalize (side); @@ -375,10 +375,10 @@ module.exports = class coinspot extends Exchange { * @method * @name coinspot#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by coinspot cancelOrder () - * @param {dict} params extra parameters specific to the coinspot api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by coinspot cancelOrder () + * @param {object} params extra parameters specific to the coinspot api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const side = this.safeString (params, 'side'); if (side !== 'buy' && side !== 'sell') { diff --git a/js/crex24.js b/js/crex24.js index 5f5adbaec6cd..4f3e5b395d34 100644 --- a/js/crex24.js +++ b/js/crex24.js @@ -242,8 +242,8 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchMarkets * @description retrieves data on all markets for crex24 - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetInstruments (params); // @@ -407,8 +407,8 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -487,8 +487,8 @@ module.exports = class crex24 extends Exchange { * @name crex24#fetchTransactionFees * @description fetch transaction fees * @param {[str]|undefined} codes not used by crex24 fetchTransactionFees - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} a list of [transaction fees structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} a list of [transaction fees structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const response = await this.publicGetCurrenciesWithdrawalFees (params); @@ -551,8 +551,8 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const request = { @@ -577,10 +577,10 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -660,9 +660,9 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -697,8 +697,8 @@ module.exports = class crex24 extends Exchange { * @name crex24#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = {}; @@ -800,11 +800,11 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -833,8 +833,8 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ let method = this.safeString (params, 'method'); params = this.omit (params, 'method'); @@ -959,11 +959,11 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the crex24 api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the crex24 api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1072,13 +1072,13 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1147,9 +1147,9 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1189,11 +1189,11 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1268,11 +1268,11 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1329,11 +1329,11 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1396,10 +1396,10 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const response = await this.cancelOrders ([ id ], symbol, params); return this.safeValue (response, 0); @@ -1411,9 +1411,9 @@ module.exports = class crex24 extends Exchange { * @name crex24#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol not used by crex24 cancelOrders () - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by crex24 cancelOrders () + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (!Array.isArray (ids)) { throw new ArgumentsRequired (this.id + ' cancelOrders() ids argument should be an array'); @@ -1441,9 +1441,9 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ let response = undefined; let market = undefined; @@ -1477,12 +1477,12 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1524,11 +1524,11 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -1579,11 +1579,11 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1641,11 +1641,11 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'type': 'deposit', @@ -1658,11 +1658,11 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'type': 'withdrawal', @@ -1741,9 +1741,9 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1774,12 +1774,12 @@ module.exports = class crex24 extends Exchange { * @method * @name crex24#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the crex24 api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the crex24 api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/cryptocom.js b/js/cryptocom.js index 9b51803c71ec..fe0d9ebe6eb1 100644 --- a/js/cryptocom.js +++ b/js/cryptocom.js @@ -288,8 +288,8 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchMarkets * @description retrieves data on all markets for cryptocom - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ // // { @@ -497,8 +497,8 @@ module.exports = class cryptocom extends Exchange { * @name cryptocom#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); symbols = this.marketSymbols (symbols); @@ -534,9 +534,9 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -565,11 +565,11 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -673,11 +673,11 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -726,11 +726,11 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the cryptocom api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the cryptocom api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -770,10 +770,10 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -844,8 +844,8 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchBalance', undefined, params); @@ -957,9 +957,9 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1026,13 +1026,13 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1076,9 +1076,9 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1107,10 +1107,10 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1144,11 +1144,11 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1222,11 +1222,11 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -1296,12 +1296,12 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); @@ -1340,9 +1340,9 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchDepositAddressesByNetwork * @description fetch a dictionary of addresses for a currency, indexed by network - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network */ await this.loadMarkets (); const currency = this.currency (code); @@ -1406,9 +1406,9 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const network = this.safeStringUpper (params, 'network'); params = this.omit (params, [ 'network' ]); @@ -1432,11 +1432,11 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1482,11 +1482,11 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1536,12 +1536,12 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1576,11 +1576,11 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ if (!('direction' in params)) { throw new ArgumentsRequired (this.id + ' fetchTransfers() requires a direction param to be either "IN" or "OUT"'); @@ -2082,11 +2082,11 @@ module.exports = class cryptocom extends Exchange { * @name cryptocom#repayMargin * @description repay borrowed margin and interest * @see https://exchange-docs.crypto.com/spot/index.html#private-margin-repay - * @param {str} code unified currency code of the currency to repay - * @param {float} amount the amount to repay - * @param {str|undefined} symbol unified market symbol, not used by cryptocom.repayMargin () - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to repay + * @param {number} amount the amount to repay + * @param {string|undefined} symbol unified market symbol, not used by cryptocom.repayMargin () + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2117,11 +2117,11 @@ module.exports = class cryptocom extends Exchange { * @name cryptocom#borrowMargin * @description create a loan to borrow margin * @see https://exchange-docs.crypto.com/spot/index.html#private-margin-borrow - * @param {str} code unified currency code of the currency to borrow - * @param {float} amount the amount to borrow - * @param {str|undefined} symbol unified market symbol, not used by cryptocom.repayMargin () - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to borrow + * @param {number} amount the amount to borrow + * @param {string|undefined} symbol unified market symbol, not used by cryptocom.repayMargin () + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2256,8 +2256,8 @@ module.exports = class cryptocom extends Exchange { * @method * @name cryptocom#fetchBorrowRates * @description fetch the borrow interest rates of all currencies - * @param {dict} params extra parameters specific to the cryptocom api endpoint - * @returns {dict} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {object} params extra parameters specific to the cryptocom api endpoint + * @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const response = await this.spotPrivatePostPrivateMarginGetUserConfig (params); diff --git a/js/currencycom.js b/js/currencycom.js index be1510a3d8d0..05d3ac7acfe0 100644 --- a/js/currencycom.js +++ b/js/currencycom.js @@ -297,7 +297,7 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the currencycom api endpoint + * @param {object} params extra parameters specific to the currencycom api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetV2Time (params); @@ -314,8 +314,8 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} an associative dictionary of currencies */ // requires authentication if (!this.checkRequiredCredentials (false)) { @@ -388,8 +388,8 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchMarkets * @description retrieves data on all markets for currencycom - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetV2ExchangeInfo (params); // @@ -575,8 +575,8 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ const response = await this.privateGetV2Account (params); // @@ -632,8 +632,8 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetV2Account (params); @@ -710,8 +710,8 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetV2Account (params); @@ -754,10 +754,10 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -872,9 +872,9 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -910,9 +910,9 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetV2Ticker24hr (params); @@ -963,12 +963,12 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -1076,11 +1076,11 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1269,13 +1269,13 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1364,11 +1364,11 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1410,10 +1410,10 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -1453,11 +1453,11 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -1497,11 +1497,11 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsByMethod ('privateGetV2Deposits', code, since, limit, params); } @@ -1511,11 +1511,11 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsByMethod ('privateGetV2Withdrawals', code, since, limit, params); } @@ -1525,11 +1525,11 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsByMethod ('privateGetV2Transactions', code, since, limit, params); } @@ -1626,11 +1626,11 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); const request = {}; @@ -1731,9 +1731,9 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchLeverage * @description fetch the set leverage for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} a [leverage structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1755,9 +1755,9 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1822,9 +1822,9 @@ module.exports = class currencycom extends Exchange { * @method * @name currencycom#fetchPositions * @description fetch all open positions - * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the currencycom api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {[string]|undefined} symbols list of unified market symbols + * @param {object} params extra parameters specific to the currencycom api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const response = await this.privateGetV2TradingPositions (params); diff --git a/js/delta.js b/js/delta.js index fefde3555f7d..6f40295085fc 100644 --- a/js/delta.js +++ b/js/delta.js @@ -198,7 +198,7 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the delta api endpoint + * @param {object} params extra parameters specific to the delta api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetSettings (params); @@ -212,8 +212,8 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.publicGetSettings (params); // @@ -287,8 +287,8 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetAssets (params); // @@ -374,8 +374,8 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchMarkets * @description retrieves data on all markets for delta - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetProducts (params); // @@ -733,9 +733,9 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -774,8 +774,8 @@ module.exports = class delta extends Exchange { * @name delta#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTickers (params); @@ -817,10 +817,10 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -958,11 +958,11 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1015,11 +1015,11 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the delta api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the delta api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1076,8 +1076,8 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetWalletBalances (params); @@ -1110,9 +1110,9 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1140,8 +1140,8 @@ module.exports = class delta extends Exchange { * @name delta#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const response = await this.privateGetPositionsMargined (params); @@ -1268,13 +1268,13 @@ module.exports = class delta extends Exchange { * @method * @name delta#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const orderType = type + '_order'; @@ -1381,10 +1381,10 @@ module.exports = class delta extends Exchange { * @method * @name delta#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -1441,9 +1441,9 @@ module.exports = class delta extends Exchange { * @method * @name delta#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelAllOrders() requires a symbol argument'); @@ -1470,11 +1470,11 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersWithMethod ('privateGetOrders', symbol, since, limit, params); } @@ -1484,11 +1484,11 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersWithMethod ('privateGetOrdersHistory', symbol, since, limit, params); } @@ -1549,11 +1549,11 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1631,11 +1631,11 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); const request = { @@ -1757,9 +1757,9 @@ module.exports = class delta extends Exchange { * @method * @name delta#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the delta api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the delta api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); diff --git a/js/deribit.js b/js/deribit.js index 48163fc909a8..744f664ec320 100644 --- a/js/deribit.js +++ b/js/deribit.js @@ -389,7 +389,7 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the deribit api endpoint + * @param {object} params extra parameters specific to the deribit api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetGetTime (params); @@ -418,8 +418,8 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.publicGetStatus (params); // @@ -451,8 +451,8 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ await this.loadMarkets (); const response = await this.privateGetGetSubaccounts (params); @@ -522,8 +522,8 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchMarkets * @description retrieves data on all markets for deribit - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const currenciesResponse = await this.publicGetGetCurrencies (params); // @@ -739,8 +739,8 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const code = this.codeFromOptions ('fetchBalance', params); @@ -800,9 +800,9 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -838,9 +838,9 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -958,9 +958,9 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1006,8 +1006,8 @@ module.exports = class deribit extends Exchange { * @name deribit#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const code = this.codeFromOptions ('fetchTickers', params); @@ -1061,11 +1061,11 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the deribit api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the deribit api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1204,11 +1204,11 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1259,8 +1259,8 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const code = this.codeFromOptions ('fetchTradingFees', params); @@ -1376,10 +1376,10 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1555,9 +1555,9 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1601,13 +1601,13 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1746,10 +1746,10 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by deribit cancelOrder () - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by deribit cancelOrder () + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1765,9 +1765,9 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1788,11 +1788,11 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1818,11 +1818,11 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1848,12 +1848,12 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1902,11 +1902,11 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1981,11 +1981,11 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchDeposits * @description fetch all deposits made to an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchDeposits() requires a currency code argument'); @@ -2029,11 +2029,11 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchWithdrawals() requires a currency code argument'); @@ -2218,9 +2218,9 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2264,8 +2264,8 @@ module.exports = class deribit extends Exchange { * @name deribit#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); let code = undefined; @@ -2364,11 +2364,11 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchTransfers() requires a currency code argument'); @@ -2425,12 +2425,12 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2514,12 +2514,12 @@ module.exports = class deribit extends Exchange { * @method * @name deribit#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the deribit api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the deribit api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/digifinex.js b/js/digifinex.js index de604df766cc..19b1ce65988f 100644 --- a/js/digifinex.js +++ b/js/digifinex.js @@ -229,8 +229,8 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -321,8 +321,8 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchMarkets * @description retrieves data on all markets for digifinex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const options = this.safeValue (this.options, 'fetchMarkets', {}); const method = this.safeString (options, 'method', 'fetch_markets_v2'); @@ -549,8 +549,8 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ const defaultType = this.safeString (this.options, 'defaultType', 'spot'); const type = this.safeString (params, 'type', defaultType); @@ -576,10 +576,10 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -616,8 +616,8 @@ module.exports = class digifinex extends Exchange { * @name digifinex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -657,9 +657,9 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -808,7 +808,7 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the digifinex api endpoint + * @param {object} params extra parameters specific to the digifinex api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -826,8 +826,8 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.publicGetPing (params); // @@ -852,11 +852,11 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -919,11 +919,11 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the digifinex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the digifinex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -966,13 +966,13 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1014,10 +1014,10 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by digifinex cancelOrder () - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by digifinex cancelOrder () + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const defaultType = this.safeString (this.options, 'defaultType', 'spot'); @@ -1054,9 +1054,9 @@ module.exports = class digifinex extends Exchange { * @name digifinex#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol not used by digifinex cancelOrders () - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by digifinex cancelOrders () + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const defaultType = this.safeString (this.options, 'defaultType', 'spot'); @@ -1176,11 +1176,11 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const defaultType = this.safeString (this.options, 'defaultType', 'spot'); const orderType = this.safeString (params, 'type', defaultType); @@ -1225,11 +1225,11 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const defaultType = this.safeString (this.options, 'defaultType', 'spot'); const orderType = this.safeString (params, 'type', defaultType); @@ -1280,9 +1280,9 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const defaultType = this.safeString (this.options, 'defaultType', 'spot'); const orderType = this.safeString (params, 'type', defaultType); @@ -1331,11 +1331,11 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const defaultType = this.safeString (this.options, 'defaultType', 'spot'); const orderType = this.safeString (params, 'type', defaultType); @@ -1426,11 +1426,11 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ const defaultType = this.safeString (this.options, 'defaultType', 'spot'); const orderType = this.safeString (params, 'type', defaultType); @@ -1500,9 +1500,9 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1579,11 +1579,11 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsByType ('deposit', code, since, limit, params); } @@ -1593,11 +1593,11 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsByType ('withdrawal', code, since, limit, params); } @@ -1708,12 +1708,12 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1746,12 +1746,12 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1881,8 +1881,8 @@ module.exports = class digifinex extends Exchange { * @method * @name digifinex#fetchBorrowRates * @description fetch the borrow interest rates of all currencies - * @param {dict} params extra parameters specific to the digifinex api endpoint - * @returns {dict} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {object} params extra parameters specific to the digifinex api endpoint + * @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const response = await this.privateGetMarginAssets (params); diff --git a/js/eqonex.js b/js/eqonex.js index b3558db86f87..c84a1218b2cc 100644 --- a/js/eqonex.js +++ b/js/eqonex.js @@ -138,8 +138,8 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchMarkets * @description retrieves data on all markets for eqonex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const request = { 'verbose': true, @@ -338,8 +338,8 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetGetInstruments (params); // @@ -417,11 +417,11 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the eqonex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the eqonex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -517,10 +517,10 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -556,11 +556,11 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -706,8 +706,8 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostGetPositions (params); @@ -741,13 +741,13 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -833,10 +833,10 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -939,9 +939,9 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by eqonex fetchOrder - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by eqonex fetchOrder + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -994,11 +994,11 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'ordStatus': '2', // '0' = New, '1' = Partially filled, '2' = Filled, '4' = Cancelled, '8' = Rejected, 'C' = Expired @@ -1011,11 +1011,11 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'ordStatus': '4', // '0' = New, '1' = Partially filled, '2' = Filled, '4' = Cancelled, '8' = Rejected, 'C' = Expired @@ -1028,11 +1028,11 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1106,11 +1106,11 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1167,9 +1167,9 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1217,11 +1217,11 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -1259,11 +1259,11 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -1386,12 +1386,12 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1433,8 +1433,8 @@ module.exports = class eqonex extends Exchange { * @method * @name eqonex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the eqonex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the eqonex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetGetExchangeInfo (params); diff --git a/js/exmo.js b/js/exmo.js index e023c81a550e..526099f8c05b 100644 --- a/js/exmo.js +++ b/js/exmo.js @@ -270,10 +270,10 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'reduce', params); } @@ -283,10 +283,10 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'add', params); } @@ -296,8 +296,8 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ let method = this.safeString (params, 'method'); params = this.omit (params, 'method'); @@ -423,9 +423,9 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchTransactionFees * @description fetch transaction fees - * @param {[str]|undefined} codes list of unified currency codes - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a list of [transaction fees structures]{@link https://docs.ccxt.com/en/latest/manual.html#fees-structure} + * @param {[string]|undefined} codes list of unified currency codes + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a list of [transaction fees structures]{@link https://docs.ccxt.com/en/latest/manual.html#fees-structure} */ await this.loadMarkets (); const currencyList = await this.publicGetCurrencyListExtended (params); @@ -503,8 +503,8 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} an associative dictionary of currencies */ // const currencyList = await this.publicGetCurrencyListExtended (params); @@ -624,8 +624,8 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchMarkets * @description retrieves data on all markets for exmo - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetPairSettings (params); // @@ -713,12 +713,12 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -812,8 +812,8 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostUserInfo (params); @@ -837,10 +837,10 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -860,10 +860,10 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchOrderBooks * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets - * @param {[str]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined - * @param {int|undefined} limit max number of entries per orderbook to return, default is undefined - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol + * @param {[string]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined + * @param {number|undefined} limit max number of entries per orderbook to return, default is undefined + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol */ await this.loadMarkets (); let ids = undefined; @@ -945,9 +945,9 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -983,9 +983,9 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -1084,11 +1084,11 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1127,11 +1127,11 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ // a symbol is required but it can be a single string, or a non-empty array if (symbol === undefined) { @@ -1186,13 +1186,13 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1268,10 +1268,10 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by exmo cancelOrder () - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by exmo cancelOrder () + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { 'order_id': id }; @@ -1283,9 +1283,9 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by exmo fetchOrder - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by exmo fetchOrder + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1324,12 +1324,12 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ let market = undefined; if (symbol !== undefined) { @@ -1373,11 +1373,11 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); if (symbol !== undefined) { @@ -1552,11 +1552,11 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1591,9 +1591,9 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const response = await this.privatePostDepositAddress (params); @@ -1633,12 +1633,12 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); @@ -1807,11 +1807,11 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -1861,11 +1861,11 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1915,10 +1915,10 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id - * @param {str} id withdrawal id - * @param {str|undefined} code unified currency code of the currency withdrawn, default is undefined - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string|undefined} code unified currency code of the currency withdrawn, default is undefined + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1967,10 +1967,10 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchDeposit * @description fetch information on a deposit - * @param {str} id deposit id - * @param {str|undefined} code unified currency code, default is undefined - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code unified currency code, default is undefined + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -2019,11 +2019,11 @@ module.exports = class exmo extends Exchange { * @method * @name exmo#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the exmo api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the exmo api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; diff --git a/js/ftx.js b/js/ftx.js index 470d35b0fc11..43b5c7dd654f 100644 --- a/js/ftx.js +++ b/js/ftx.js @@ -429,8 +429,8 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCoins (params); const currencies = this.safeValue (response, 'result', []); @@ -476,8 +476,8 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchMarkets * @description retrieves data on all markets for ftx - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarkets (params); // @@ -774,9 +774,9 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -818,8 +818,8 @@ module.exports = class ftx extends Exchange { * @name ftx#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); symbols = this.marketSymbols (symbols); @@ -859,10 +859,10 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -938,13 +938,13 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the ftx api endpoint - * @param {str|undefined} params.price "index" for index price candles - * @param {int|undefined} params.until timestamp in ms of the latest candle to fetch + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the ftx api endpoint + * @param {string|undefined} params.price "index" for index price candles + * @param {number|undefined} params.until timestamp in ms of the latest candle to fetch * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume (units in quote currency) */ await this.loadMarkets (); @@ -1156,11 +1156,11 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const [ market, marketId ] = this.getMarketParams (symbol, 'market_name', params); @@ -1271,9 +1271,9 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchTradingFee * @description fetch the trading fee for a market - * @param {str} symbol unified symbol of the market to fetch the fee for - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified symbol of the market to fetch the fee for + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1287,8 +1287,8 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetAccount (params); @@ -1338,12 +1338,12 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the ftx api endpoint - * @param {int|undefined} params.until timestamp in ms of the latest funding rate to fetch - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the ftx api endpoint + * @param {number|undefined} params.until timestamp in ms of the latest funding rate to fetch + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ await this.loadMarkets (); const request = {}; @@ -1412,8 +1412,8 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetWalletBalances (params); @@ -1616,13 +1616,13 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1884,11 +1884,11 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by ftx cancelOrder () - * @param {dict} params extra parameters specific to the ftx api endpoint + * @param {string} id order id + * @param {string|undefined} symbol not used by ftx cancelOrder () + * @param {object} params extra parameters specific to the ftx api endpoint * @param {bool} params.stop true if cancelling a stop/trigger order - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1926,9 +1926,9 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1956,9 +1956,9 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by ftx fetchOrder - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by ftx fetchOrder + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -2004,11 +2004,11 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -2062,11 +2062,11 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -2125,12 +2125,12 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const request = { 'orderId': id, @@ -2143,12 +2143,12 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchMyTrades * @description fetch trades specific to you account - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the ftx api endpoint - * @param {int|undefined} params.until timestamp in ms of the latest trade - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the ftx api endpoint + * @param {number|undefined} params.until timestamp in ms of the latest trade + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const [ market, marketId ] = this.getMarketParams (symbol, 'market', params); @@ -2204,12 +2204,12 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2282,12 +2282,12 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); @@ -2340,8 +2340,8 @@ module.exports = class ftx extends Exchange { * @name ftx#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const request = { @@ -2463,9 +2463,9 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2629,11 +2629,11 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const response = await this.privateGetWalletDeposits (params); @@ -2667,11 +2667,11 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const response = await this.privateGetWalletWithdrawals (params); @@ -2762,10 +2762,10 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str|undefined} symbol not used by ftx setLeverage () - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string|undefined} symbol not used by ftx setLeverage () + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} response from the exchange */ // WARNING: THIS WILL INCREASE LIQUIDATION PRICE FOR OPEN ISOLATED LONG POSITIONS // AND DECREASE LIQUIDATION PRICE FOR OPEN ISOLATED SHORT POSITIONS @@ -2824,11 +2824,11 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ await this.loadMarkets (); const request = {}; @@ -2897,9 +2897,9 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2927,8 +2927,8 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchBorrowRates * @description fetch the borrow interest rates of all currencies - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {dict} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const response = await this.privateGetSpotMarginBorrowRates (params); @@ -2952,11 +2952,11 @@ module.exports = class ftx extends Exchange { * @name ftx#fetchBorrowRateHistories * @description retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is undefined * @param {[str]|undefined} codes list of unified currency codes, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest borrowRate, default is undefined - * @param {int|undefined} limit max number of borrow rate prices to return, default is undefined - * @param {dict} params extra parameters specific to the ftx api endpoint - * @param {dict} params.till timestamp in ms of the latest time to fetch the borrow rate - * @returns {dict} a dictionary of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} indexed by the market symbol + * @param {number|undefined} since timestamp in ms of the earliest borrowRate, default is undefined + * @param {number|undefined} limit max number of borrow rate prices to return, default is undefined + * @param {object} params extra parameters specific to the ftx api endpoint + * @param {object} params.till timestamp in ms of the latest time to fetch the borrow rate + * @returns {object} a dictionary of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} indexed by the market symbol */ await this.loadMarkets (); const request = {}; @@ -3029,12 +3029,12 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchBorrowRateHistory * @description retrieves a history of a currencies borrow interest rate at specific time slots - * @param {str} code unified currency code - * @param {int|undefined} since timestamp for the earliest borrow rate - * @param {int|undefined} limit the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} to retrieve - * @param {dict} params extra parameters specific to the exchange api endpoint - * @param {int|undefined} params.till Timestamp in ms of the latest time to fetch the borrow rate - * @returns {[dict]} an array of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {string} code unified currency code + * @param {number|undefined} since timestamp for the earliest borrow rate + * @param {number|undefined} limit the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} to retrieve + * @param {object} params extra parameters specific to the exchange api endpoint + * @param {number|undefined} params.till Timestamp in ms of the latest time to fetch the borrow rate + * @returns {[object]} an array of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ const histories = await this.fetchBorrowRateHistories ([ code ], since, limit, params); const borrowRateHistory = this.safeValue (histories, code); @@ -3109,12 +3109,12 @@ module.exports = class ftx extends Exchange { * @method * @name ftx#fetchBorrowInterest * @description fetch the interest owed by the user for borrowing currency for margin trading - * @param {str|undefined} code unified currency code - * @param {str|undefined} symbol unified market symbol when fetch interest in isolated markets - * @param {int|undefined} since the earliest time in ms to fetch borrrow interest for - * @param {int|undefined} limit the maximum number of structures to retrieve - * @param {dict} params extra parameters specific to the ftx api endpoint - * @returns {[dict]} a list of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} + * @param {string|undefined} code unified currency code + * @param {string|undefined} symbol unified market symbol when fetch interest in isolated markets + * @param {number|undefined} since the earliest time in ms to fetch borrrow interest for + * @param {number|undefined} limit the maximum number of structures to retrieve + * @param {object} params extra parameters specific to the ftx api endpoint + * @returns {[object]} a list of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} */ await this.loadMarkets (); const request = {}; diff --git a/js/gate.js b/js/gate.js index 9c6ec3781f16..ebd32a3977fd 100644 --- a/js/gate.js +++ b/js/gate.js @@ -639,8 +639,8 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchMarkets * @description retrieves data on all markets for gate - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ let result = []; const [ type, query ] = this.handleMarketTypeAndParams ('fetchMarkets', undefined, params); @@ -1113,9 +1113,9 @@ module.exports = class gate extends Exchange { * @method * @name gate#prepareRequest * @description Fills request params contract, settle, currency_pair, market and account where applicable - * @param {dict} market CCXT market, required when type is undefined - * @param {str} type 'spot', 'swap', or 'future', required when market is undefined - * @param {dict} params request parameters + * @param {object} market CCXT market, required when type is undefined + * @param {string} type 'spot', 'swap', or 'future', required when market is undefined + * @param {object} params request parameters * @returns the api request object, and the new params object with non-needed parameters removed */ // * Do not call for multi spot order methods like cancelAllOrders and fetchOpenOrders. Use multiOrderSpotPrepareRequest instead @@ -1146,9 +1146,9 @@ module.exports = class gate extends Exchange { * @method * @name gate#multiOrderSpotPrepareRequest * @description Fills request params currency_pair, market and account where applicable for spot order methods like fetchOpenOrders, cancelAllOrders - * @param {dict} market CCXT market + * @param {object} market CCXT market * @param {bool} stop true if for a stop order - * @param {dict} params request parameters + * @param {object} params request parameters * @returns the api request object, and the new params object with non-needed parameters removed */ const [ marginMode, query ] = this.getMarginMode (stop, params); @@ -1169,9 +1169,9 @@ module.exports = class gate extends Exchange { * @method * @name gate#multiOrderSpotPrepareRequest * @description Fills request params currency_pair, market and account where applicable for spot order methods like fetchOpenOrders, cancelAllOrders - * @param {dict} market CCXT market + * @param {object} market CCXT market * @param {bool} stop true if for a stop order - * @param {dict} params request parameters + * @param {object} params request parameters * @returns the api request object, and the new params object with non-needed parameters removed */ const [ marginMode, query ] = this.getMarginMode (stop, params); @@ -1196,7 +1196,7 @@ module.exports = class gate extends Exchange { * @name gate#getMarginMode * @description Gets the margin type for this api call * @param {bool} stop True if for a stop order - * @param {dict} params Request params + * @param {object} params Request params * @returns The marginMode and the updated request params with marginMode removed, marginMode value is the value that can be read by the "account" property specified in gates api docs */ const defaultMarginMode = this.safeStringLower2 (this.options, 'defaultMarginMode', 'marginMode', 'spot'); // 'margin' is isolated margin on gate's api @@ -1233,8 +1233,8 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} an associative dictionary of currencies */ // sandbox/testnet only supports future markets const apiBackup = this.safeValue (this.urls, 'apiBackup'); @@ -1290,9 +1290,9 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1354,8 +1354,8 @@ module.exports = class gate extends Exchange { * @name gate#fetchFundingRates * @description fetch the funding rate for multiple markets * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols */ await this.loadMarkets (); const [ request, query ] = this.prepareRequest (undefined, 'swap', params); @@ -1526,9 +1526,9 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1580,9 +1580,9 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1612,8 +1612,8 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateWalletGetFee (params); @@ -1676,8 +1676,8 @@ module.exports = class gate extends Exchange { * @name gate#fetchTransactionFees * @description fetch transaction fees * @param {[str]|undefined} codes not used by gate fetchTransactionFees () - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const response = await this.privateWalletGetWithdrawStatus (params); @@ -1727,11 +1727,11 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ await this.loadMarkets (); // let defaultType = 'future'; @@ -1808,10 +1808,10 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1916,9 +1916,9 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2011,8 +2011,8 @@ module.exports = class gate extends Exchange { * @name gate#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const [ type, query ] = this.handleMarketTypeAndParams ('fetchTickers', undefined, params); @@ -2037,11 +2037,11 @@ module.exports = class gate extends Exchange { async fetchBalance (params = {}) { /** - * @param {dict} params exchange specific parameters - * @param {str} params.type spot, margin, swap or future, if not provided this.options['defaultType'] is used - * @param {str} params.settle 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future - * @param {str} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used - * @param {str} params.symbol margin only - unified ccxt symbol + * @param {object} params exchange specific parameters + * @param {string} params.type spot, margin, swap or future, if not provided this.options['defaultType'] is used + * @param {string} params.settle 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future + * @param {string} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used + * @param {string} params.symbol margin only - unified ccxt symbol */ await this.loadMarkets (); const symbol = this.safeString (params, 'symbol'); @@ -2223,13 +2223,13 @@ module.exports = class gate extends Exchange { * @method * @name gateio#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the gateio api endpoint - * @param {str|undefined} params.price "mark" or "index" for mark price and index price candles - * @param {int|undefined} params.until timestamp in ms of the latest candle to fetch + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the gateio api endpoint + * @param {string|undefined} params.price "mark" or "index" for mark price and index price candles + * @param {number|undefined} params.until timestamp in ms of the latest candle to fetch * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume (units in quote currency) */ await this.loadMarkets (); @@ -2287,11 +2287,11 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchFundingRateHistory() requires a symbol argument'); @@ -2379,11 +2379,11 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2458,12 +2458,12 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the binance api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the binance api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); if (symbol === undefined) { @@ -2497,20 +2497,20 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchMyTrades * @description Fetch personal trading history - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the gate api endpoint - * @param {str|undefined} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used - * @param {str|undefined} params.type 'spot', 'swap', or 'future', if not provided this.options['defaultMarginMode'] is used - * @param {int|undefined} params.until The latest timestamp, in ms, that fetched trades were made - * @param {int|undefined} params.page *spot only* Page number - * @param {str|undefined} params.order_id *spot only* Filter trades with specified order ID. symbol is also required if this field is present - * @param {str|undefined} params.order *contract only* Futures order ID, return related data only if specified - * @param {int|undefined} params.offset *contract only* list offset, starting from 0 - * @param {str|undefined} params.last_id *contract only* specify list staring point using the id of last record in previous list-query results - * @param {int|undefined} params.count_total *contract only* whether to return total number matched, default to 0(no return) - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the gate api endpoint + * @param {string|undefined} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used + * @param {string|undefined} params.type 'spot', 'swap', or 'future', if not provided this.options['defaultMarginMode'] is used + * @param {number|undefined} params.until The latest timestamp, in ms, that fetched trades were made + * @param {number|undefined} params.page *spot only* Page number + * @param {string|undefined} params.order_id *spot only* Filter trades with specified order ID. symbol is also required if this field is present + * @param {string|undefined} params.order *contract only* Futures order ID, return related data only if specified + * @param {number|undefined} params.offset *contract only* list offset, starting from 0 + * @param {string|undefined} params.last_id *contract only* specify list staring point using the id of last record in previous list-query results + * @param {number|undefined} params.count_total *contract only* whether to return total number matched, default to 0(no return) + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let type = undefined; @@ -2726,11 +2726,11 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -2756,11 +2756,11 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -2786,12 +2786,12 @@ module.exports = class gate extends Exchange { * @method * @name gate#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -2916,24 +2916,24 @@ module.exports = class gate extends Exchange { * @method * @name gate#createOrder * @description Create an order on the exchange - * @param {str} symbol Unified CCXT market symbol - * @param {str} type 'limit' or 'market' *"market" is contract only* - * @param {str} side 'buy' or 'sell' - * @param {float} amount the amount of currency to trade - * @param {float|undefined} price *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency - * @param {dict} params Extra parameters specific to the exchange API endpoint - * @param {float|undefined} params.stopPrice The price at which a trigger order is triggered at - * @param {str|undefined} params.timeInForce "GTC", "IOC", or "PO" - * @param {str|undefined} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used - * @param {int|undefined} params.iceberg Amount to display for the iceberg order, Null or 0 for normal orders, Set to -1 to hide the order completely - * @param {str|undefined} params.text User defined information - * @param {str|undefined} params.account *spot and margin only* "spot", "margin" or "cross_margin" + * @param {string} symbol Unified CCXT market symbol + * @param {string} type 'limit' or 'market' *"market" is contract only* + * @param {string} side 'buy' or 'sell' + * @param {number} amount the amount of currency to trade + * @param {number|undefined} price *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency + * @param {object} params Extra parameters specific to the exchange API endpoint + * @param {number|undefined} params.stopPrice The price at which a trigger order is triggered at + * @param {string|undefined} params.timeInForce "GTC", "IOC", or "PO" + * @param {string|undefined} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used + * @param {number|undefined} params.iceberg Amount to display for the iceberg order, Null or 0 for normal orders, Set to -1 to hide the order completely + * @param {string|undefined} params.text User defined information + * @param {string|undefined} params.account *spot and margin only* "spot", "margin" or "cross_margin" * @param {bool|undefined} params.auto_borrow *margin only* Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough - * @param {str|undefined} params.settle *contract only* Unified Currency Code for settle currency + * @param {string|undefined} params.settle *contract only* Unified Currency Code for settle currency * @param {bool|undefined} params.reduceOnly *contract only* Indicates if this order is to reduce the size of a position * @param {bool|undefined} params.close *contract only* Set as true to close the position, with size set to 0 * @param {bool|undefined} params.auto_size *contract only* Set side to close dual-mode position, close_long closes the long side, while close_short the short one, size also needs to be set to 0 - * @returns {dict|undefined} [An order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @returns {object|undefined} [An order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3447,13 +3447,13 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchOrder * @description Retrieves information on an order - * @param {str} id Order id - * @param {str} symbol Unified market symbol, *required for spot and margin* - * @param {dict} params Parameters specified by the exchange api + * @param {string} id Order id + * @param {string} symbol Unified market symbol, *required for spot and margin* + * @param {object} params Parameters specified by the exchange api * @param {bool} params.stop True if the order being fetched is a trigger order - * @param {str} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used - * @param {str} params.type 'spot', 'swap', or 'future', if not provided this.options['defaultMarginMode'] is used - * @param {str} params.settle 'btc' or 'usdt' - settle currency for perpetual swap and future - market settle currency is used if symbol !== undefined, default="usdt" for swap and "btc" for future + * @param {string} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used + * @param {string} params.type 'spot', 'swap', or 'future', if not provided this.options['defaultMarginMode'] is used + * @param {string} params.settle 'btc' or 'usdt' - settle currency for perpetual swap and future - market settle currency is used if symbol !== undefined, default="usdt" for swap and "btc" for future * @returns An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); @@ -3489,14 +3489,14 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the gate api endpoint + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the gate api endpoint * @param {bool} params.stop true for fetching stop orders - * @param {str} params.type spot, margin, swap or future, if not provided this.options['defaultType'] is used - * @param {str} params.marginMode 'cross' or 'isolated' - marginMode for type='margin', if not provided this.options['defaultMarginMode'] is used - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} params.type spot, margin, swap or future, if not provided this.options['defaultType'] is used + * @param {string} params.marginMode 'cross' or 'isolated' - marginMode for type='margin', if not provided this.options['defaultMarginMode'] is used + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('open', symbol, since, limit, params); } @@ -3506,14 +3506,14 @@ module.exports = class gate extends Exchange { * @method * @name gate#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the gate api endpoint + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the gate api endpoint * @param {bool} params.stop true for fetching stop orders - * @param {str} params.type spot, swap or future, if not provided this.options['defaultType'] is used - * @param {str} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} params.type spot, swap or future, if not provided this.options['defaultType'] is used + * @param {string} params.marginMode 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('finished', symbol, since, limit, params); } @@ -3685,9 +3685,9 @@ module.exports = class gate extends Exchange { * @method * @name gate#cancelOrder * @description Cancels an open order - * @param {str} id Order id - * @param {str} symbol Unified market symbol - * @param {dict} params Parameters specified by the exchange api + * @param {string} id Order id + * @param {string} symbol Unified market symbol + * @param {object} params Parameters specified by the exchange api * @param {bool} params.stop True if the order to be cancelled is a trigger order * @returns An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ @@ -3795,9 +3795,9 @@ module.exports = class gate extends Exchange { * @method * @name gate#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = (symbol === undefined) ? undefined : this.market (symbol); @@ -3849,12 +3849,12 @@ module.exports = class gate extends Exchange { * @method * @name gate#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code for currency being transferred - * @param {float} amount the amount of currency to transfer - * @param {str} fromAccount the account to transfer currency from - * @param {str} toAccount the account to transfer currency to - * @param {dict} params extra parameters specific to the gate api endpoint - * @param {str|undefined} params.symbol Unified market symbol *required for type == margin* + * @param {string} code unified currency code for currency being transferred + * @param {number} amount the amount of currency to transfer + * @param {string} fromAccount the account to transfer currency from + * @param {string} toAccount the account to transfer currency to + * @param {object} params extra parameters specific to the gate api endpoint + * @param {string|undefined} params.symbol Unified market symbol *required for type == margin* * @returns A [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); @@ -3943,10 +3943,10 @@ module.exports = class gate extends Exchange { * @method * @name gate#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setLeverage() requires a symbol argument'); @@ -4097,10 +4097,10 @@ module.exports = class gate extends Exchange { * @name gate#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols Not used by gate, but parsed internally by CCXT - * @param {dict} params extra parameters specific to the gate api endpoint - * @param {str} params.settle 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future - * @param {str} params.type swap or future, if not provided this.options['defaultType'] is used - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the gate api endpoint + * @param {string} params.settle 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future + * @param {string} params.type swap or future, if not provided this.options['defaultType'] is used + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const [ type, query ] = this.handleMarketTypeAndParams ('fetchPositions', undefined, params); @@ -4148,8 +4148,8 @@ module.exports = class gate extends Exchange { * @name gate#fetchLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the gate api endpoint - * @returns {dict} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols + * @param {object} params extra parameters specific to the gate api endpoint + * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols */ await this.loadMarkets (); const [ type, query ] = this.handleMarketTypeAndParams ('fetchLeverageTiers', undefined, params); @@ -4262,8 +4262,8 @@ module.exports = class gate extends Exchange { * @ignore * @method * @description https://www.gate.io/help/futures/perpetual/22162/instrctions-of-risk-limit - * @param {dict} info Exchange market response for 1 market - * @param {dict} market CCXT market + * @param {object} info Exchange market response for 1 market + * @param {object} market CCXT market */ // // Perpetual swap @@ -4387,13 +4387,13 @@ module.exports = class gate extends Exchange { * @description repay borrowed margin and interest * @see https://www.gate.io/docs/apiv4/en/#repay-cross-margin-loan * @see https://www.gate.io/docs/apiv4/en/#repay-a-loan - * @param {str} code unified currency code of the currency to repay - * @param {float} amount the amount to repay - * @param {str|undefined} symbol unified market symbol, required for isolated margin - * @param {dict} params extra parameters specific to the gate api endpoint - * @param {str} params.mode 'all' or 'partial' payment mode, extra parameter required for isolated margin - * @param {str} params.id '34267567' loan id, extra parameter required for isolated margin - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to repay + * @param {number} amount the amount to repay + * @param {string|undefined} symbol unified market symbol, required for isolated margin + * @param {object} params extra parameters specific to the gate api endpoint + * @param {string} params.mode 'all' or 'partial' payment mode, extra parameter required for isolated margin + * @param {string} params.id '34267567' loan id, extra parameter required for isolated margin + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -4478,12 +4478,12 @@ module.exports = class gate extends Exchange { * @description create a loan to borrow margin * @see https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan * @see https://www.gate.io/docs/apiv4/en/#lend-or-borrow - * @param {str} code unified currency code of the currency to borrow - * @param {float} amount the amount to borrow - * @param {str|undefined} symbol unified market symbol, required for isolated margin - * @param {dict} params extra parameters specific to the gate api endpoint - * @param {str} params.rate '0.0002' or '0.002' extra parameter required for isolated margin - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to borrow + * @param {number} amount the amount to borrow + * @param {string|undefined} symbol unified market symbol, required for isolated margin + * @param {object} params extra parameters specific to the gate api endpoint + * @param {string} params.rate '0.0002' or '0.002' extra parameter required for isolated margin + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); const currency = this.currency (code); diff --git a/js/gemini.js b/js/gemini.js index 3547693da86d..03f7965d5b0c 100644 --- a/js/gemini.js +++ b/js/gemini.js @@ -263,8 +263,8 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchMarkets * @description retrieves data on all markets for gemini - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const method = this.safeValue (this.options, 'fetchMarketsMethod', 'fetch_markets_from_api'); return await this[method] (params); @@ -446,10 +446,10 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -528,9 +528,9 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const method = this.safeValue (this.options, 'fetchTickerMethod', 'fetchTickerV1'); return await this[method] (symbol, params); @@ -635,9 +635,9 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetV1Pricefeed (params); @@ -727,11 +727,11 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -774,8 +774,8 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privatePostV1Notionalvolume (params); @@ -833,8 +833,8 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostV1Balances (params); @@ -1011,9 +1011,9 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1051,11 +1051,11 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const response = await this.privatePostV1Orders (params); @@ -1096,13 +1096,13 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); if (type === 'market') { @@ -1191,10 +1191,10 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1233,11 +1233,11 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -1262,12 +1262,12 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1318,11 +1318,11 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code not used by gemini.fetchTransactions - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code not used by gemini.fetchTransactions + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -1505,9 +1505,9 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1530,12 +1530,12 @@ module.exports = class gemini extends Exchange { * @method * @name gemini#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the gemini api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the gemini api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); diff --git a/js/hitbtc.js b/js/hitbtc.js index 9235e2512a49..8c9154b7e63a 100644 --- a/js/hitbtc.js +++ b/js/hitbtc.js @@ -275,8 +275,8 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchMarkets * @description retrieves data on all markets for hitbtc - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetSymbol (params); // @@ -371,12 +371,12 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ // account can be "exchange" or "bank", with aliases "main" or "trading" respectively await this.loadMarkets (); @@ -436,8 +436,8 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrency (params); // @@ -535,9 +535,9 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -577,8 +577,8 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const type = this.safeString (params, 'type', 'trading'); @@ -627,11 +627,11 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the hitbtc api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the hitbtc api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -662,10 +662,10 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -716,8 +716,8 @@ module.exports = class hitbtc extends Exchange { * @name hitbtc#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -737,9 +737,9 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -838,11 +838,11 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -955,11 +955,11 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -982,13 +982,13 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1050,10 +1050,10 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); // we use clientOrderId as the order id with this exchange intentionally @@ -1170,9 +1170,9 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by hitbtc fetchOrder - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by hitbtc fetchOrder + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); // we use clientOrderId as the order id with this exchange intentionally @@ -1194,10 +1194,10 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchOpenOrder * @description fetch an open order by it's id - * @param {str} id order id - * @param {str|undefined} symbol not used by hitbtc fetchOpenOrder () - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by hitbtc fetchOpenOrder () + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); // we use clientOrderId as the order id with this exchange intentionally @@ -1215,11 +1215,11 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1237,11 +1237,11 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1274,11 +1274,11 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1336,12 +1336,12 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ // The id needed here is the exchange's id, and not the clientOrderID, // which is the id that is stored in the unified order id @@ -1367,9 +1367,9 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1393,9 +1393,9 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1447,12 +1447,12 @@ module.exports = class hitbtc extends Exchange { * @method * @name hitbtc#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); diff --git a/js/hitbtc3.js b/js/hitbtc3.js index 725e6cf61849..ad82cd28a3b5 100644 --- a/js/hitbtc3.js +++ b/js/hitbtc3.js @@ -345,8 +345,8 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchMarkets * @description retrieves data on all markets for hitbtc3 - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetPublicSymbol (params); // @@ -484,8 +484,8 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetPublicCurrency (params); // @@ -603,9 +603,9 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the hitbtc api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the hitbtc api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -640,9 +640,9 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -695,8 +695,8 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ const type = this.safeStringLower (params, 'type', 'spot'); params = this.omit (params, [ 'type' ]); @@ -732,9 +732,9 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const response = await this.fetchTickers ([ symbol ], params); return this.safeValue (response, symbol); @@ -746,8 +746,8 @@ module.exports = class hitbtc3 extends Exchange { * @name hitbtc3#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = {}; @@ -833,11 +833,11 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); let market = undefined; @@ -871,11 +871,11 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -1146,11 +1146,11 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsHelper ('DEPOSIT,WITHDRAW', code, since, limit, params); } @@ -1160,11 +1160,11 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsHelper ('DEPOSIT', code, since, limit, params); } @@ -1174,11 +1174,11 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsHelper ('WITHDRAW', code, since, limit, params); } @@ -1189,9 +1189,9 @@ module.exports = class hitbtc3 extends Exchange { * @name hitbtc3#fetchOrderBooks * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets * @param {[str]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined - * @param {int|undefined} limit max number of entries per orderbook to return, default is undefined - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol + * @param {number|undefined} limit max number of entries per orderbook to return, default is undefined + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol */ await this.loadMarkets (); const request = {}; @@ -1220,10 +1220,10 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ const result = await this.fetchOrderBooks ([ symbol ], limit, params); return result[symbol]; @@ -1254,9 +1254,9 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1282,8 +1282,8 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchTradingFees', undefined, params); @@ -1315,11 +1315,11 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the hitbtc3 api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1419,11 +1419,11 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1454,9 +1454,9 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1501,12 +1501,12 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -1569,11 +1569,11 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1616,10 +1616,10 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchOpenOrder * @description fetch an open order by it's id - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1644,9 +1644,9 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1670,10 +1670,10 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1724,13 +1724,13 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1923,12 +1923,12 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ // account can be "spot", "wallet", or "derivatives" await this.loadMarkets (); @@ -2018,12 +2018,12 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); @@ -2060,11 +2060,11 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ await this.loadMarkets (); let market = undefined; @@ -2134,8 +2134,8 @@ module.exports = class hitbtc3 extends Exchange { * @name hitbtc3#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols not used by hitbtc3 fetchPositions () - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const request = {}; @@ -2189,9 +2189,9 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2326,9 +2326,9 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2468,10 +2468,10 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ if (amount !== 0) { throw new BadRequest (this.id + ' reduceMargin() on hitbtc3 requires the amount to be 0 and that will remove the entire margin amount'); @@ -2484,10 +2484,10 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'add', params); } @@ -2497,9 +2497,9 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#fetchLeverage * @description fetch the set leverage for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} a [leverage structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2550,10 +2550,10 @@ module.exports = class hitbtc3 extends Exchange { * @method * @name hitbtc3#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the hitbtc3 api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the hitbtc3 api endpoint + * @returns {object} response from the exchange */ await this.loadMarkets (); if (symbol === undefined) { diff --git a/js/hollaex.js b/js/hollaex.js index 2f2b5831c92e..e1e631069d35 100644 --- a/js/hollaex.js +++ b/js/hollaex.js @@ -203,8 +203,8 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchMarkets * @description retrieves data on all markets for hollaex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetConstants (params); // @@ -318,8 +318,8 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetConstants (params); // @@ -405,9 +405,9 @@ module.exports = class hollaex extends Exchange { * @name hollaex#fetchOrderBooks * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets * @param {[str]|undefined} symbols not used by hollaex fetchOrderBooks () - * @param {int|undefined} limit not used by hollaex fetchOrderBooks () - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol + * @param {number|undefined} limit not used by hollaex fetchOrderBooks () + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol */ await this.loadMarkets (); const response = await this.publicGetOrderbooks (params); @@ -428,10 +428,10 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -468,9 +468,9 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -498,8 +498,8 @@ module.exports = class hollaex extends Exchange { * @name hollaex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTickers (this.extend (params)); @@ -596,11 +596,11 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -686,8 +686,8 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetTiers (params); @@ -746,11 +746,11 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the hollaex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the hollaex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -842,8 +842,8 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetUserBalance (params); @@ -867,10 +867,10 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchOpenOrder * @description fetch an open order by it's id - * @param {str} id order id - * @param {str|undefined} symbol not used by hollaex fetchOpenOrder () - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by hollaex fetchOpenOrder () + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -909,11 +909,11 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'open': true, @@ -926,11 +926,11 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'open': false, @@ -943,9 +943,9 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -986,11 +986,11 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1132,13 +1132,13 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1198,10 +1198,10 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1229,9 +1229,9 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + " cancelAllOrders() requires a 'symbol' argument"); @@ -1265,11 +1265,11 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1349,8 +1349,8 @@ module.exports = class hollaex extends Exchange { * @name hollaex#fetchDepositAddresses * @description fetch deposit addresses for multiple currencies and chain types * @param {[str]|undefined} codes list of unified currency codes, default is undefined - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const network = this.safeString (params, 'network'); @@ -1411,11 +1411,11 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1471,10 +1471,10 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id - * @param {str} id withdrawal id - * @param {str|undefined} code unified currency code of the currency withdrawn, default is undefined - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string|undefined} code unified currency code of the currency withdrawn, default is undefined + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1519,11 +1519,11 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1676,12 +1676,12 @@ module.exports = class hollaex extends Exchange { * @method * @name hollaex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the hollaex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the hollaex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/huobi.js b/js/huobi.js index 150576278e73..0e5d49303ad0 100644 --- a/js/huobi.js +++ b/js/huobi.js @@ -1187,7 +1187,7 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the huobi api endpoint + * @param {object} params extra parameters specific to the huobi api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const options = this.safeValue (this.options, 'fetchTime', {}); @@ -1235,9 +1235,9 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1341,8 +1341,8 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchMarkets * @description retrieves data on all markets for huobi - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const options = this.safeValue (this.options, 'fetchMarkets', {}); const types = this.safeValue (options, 'types', {}); @@ -1754,9 +1754,9 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1833,8 +1833,8 @@ module.exports = class huobi extends Exchange { * @name huobi#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const options = this.safeValue (this.options, 'fetchTickers', {}); @@ -1978,10 +1978,10 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -2204,12 +2204,12 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ let marketType = undefined; [ marketType, params ] = this.handleMarketTypeAndParams ('fetchOrderTrades', undefined, params); @@ -2235,11 +2235,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let marketType = undefined; @@ -2383,11 +2383,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2482,11 +2482,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the huobi api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the huobi api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -2598,8 +2598,8 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ await this.loadMarkets (); const response = await this.spotPrivateGetV1AccountAccounts (params); @@ -2653,8 +2653,8 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.spotPublicGetV2ReferenceCurrencies (params); // { @@ -2793,8 +2793,8 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); let type = undefined; @@ -3072,9 +3072,9 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let marketType = undefined; @@ -3458,11 +3458,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let marketType = undefined; @@ -3487,11 +3487,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let marketType = undefined; @@ -3512,11 +3512,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let marketType = undefined; @@ -3936,13 +3936,13 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -4205,10 +4205,10 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let marketType = undefined; @@ -4301,9 +4301,9 @@ module.exports = class huobi extends Exchange { * @name huobi#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let marketType = undefined; @@ -4430,9 +4430,9 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let marketType = undefined; @@ -4544,9 +4544,9 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchDepositAddressesByNetwork * @description fetch a dictionary of addresses for a currency, indexed by network - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network */ await this.loadMarkets (); const currency = this.currency (code); @@ -4577,9 +4577,9 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const rawNetwork = this.safeStringUpper (params, 'network'); const networks = this.safeValue (this.options, 'networks', {}); @@ -4677,11 +4677,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (limit === undefined || limit > 100) { limit = 100; @@ -4711,11 +4711,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (limit === undefined || limit > 100) { limit = 100; @@ -4853,12 +4853,12 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); @@ -4923,12 +4923,12 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -4967,8 +4967,8 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchBorrowRatesPerSymbol * @description fetch borrow rates for currencies within individual markets - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a dictionary of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} indexed by market symbol + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a dictionary of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} indexed by market symbol */ await this.loadMarkets (); const response = await this.spotPrivateGetV1MarginLoanInfo (params); @@ -5034,8 +5034,8 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchBorrowRates * @description fetch the borrow interest rates of all currencies - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const response = await this.spotPrivateGetV1MarginLoanInfo (params); @@ -5094,11 +5094,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since not used by huobi, but filtered internally by ccxt - * @param {int|undefined} limit not used by huobi, but filtered internally by ccxt - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since not used by huobi, but filtered internally by ccxt + * @param {number|undefined} limit not used by huobi, but filtered internally by ccxt + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchFundingRateHistory() requires a symbol argument'); @@ -5206,9 +5206,9 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -5249,8 +5249,8 @@ module.exports = class huobi extends Exchange { * @name huobi#fetchFundingRates * @description fetch the funding rate for multiple markets * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols */ await this.loadMarkets (); const options = this.safeValue (this.options, 'fetchFundingRates', {}); @@ -5294,12 +5294,12 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchBorrowInterest * @description fetch the interest owed by the user for borrowing currency for margin trading - * @param {str|undefined} code unified currency code - * @param {str|undefined} symbol unified market symbol when fetch interest in isolated markets - * @param {int|undefined} since the earliest time in ms to fetch borrrow interest for - * @param {int|undefined} limit the maximum number of structures to retrieve - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} + * @param {string|undefined} code unified currency code + * @param {string|undefined} symbol unified market symbol when fetch interest in isolated markets + * @param {number|undefined} since the earliest time in ms to fetch borrrow interest for + * @param {number|undefined} limit the maximum number of structures to retrieve + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} */ await this.loadMarkets (); const defaultMargin = this.safeString (params, 'marginMode', 'cross'); // cross or isolated @@ -5556,11 +5556,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -5639,10 +5639,10 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setLeverage() requires a symbol argument'); @@ -5835,8 +5835,8 @@ module.exports = class huobi extends Exchange { * @name huobi#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const marginMode = this.safeString2 (this.options, 'defaultMarginMode', 'marginMode', 'isolated'); @@ -5955,9 +5955,9 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -6270,11 +6270,11 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); const accountId = await this.fetchAccountIdByType ('spot', params); @@ -6342,8 +6342,8 @@ module.exports = class huobi extends Exchange { * @name huobi#fetchLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols */ await this.loadMarkets (); const response = await this.contractPublicGetLinearSwapApiV1SwapAdjustfactor (params); @@ -6385,9 +6385,9 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchMarketLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [leverage tiers structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure} */ await this.loadMarkets (); const request = {}; @@ -6472,14 +6472,14 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchOpenInterestHistory * @description Retrieves the open intestest history of a currency - * @param {str} symbol Unified CCXT market symbol - * @param {str} timeframe '1h', '4h', '12h', or '1d' - * @param {int|undefined} since Not used by huobi api, but response parsed by CCXT - * @param {int|undefined} limit Default:48,Data Range [1,200] - * @param {dict} params Exchange specific parameters - * @param {int} params.amount_type *required* Open interest unit. 1-cont,2-cryptocurrenty - * @param {int|undefined} params.pair eg BTC-USDT *Only for USDT-M* - * @returns {dict} an array of [open interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#open-interest-structure} + * @param {string} symbol Unified CCXT market symbol + * @param {string} timeframe '1h', '4h', '12h', or '1d' + * @param {number|undefined} since Not used by huobi api, but response parsed by CCXT + * @param {number|undefined} limit Default:48,Data Range [1,200] + * @param {object} params Exchange specific parameters + * @param {number} params.amount_type *required* Open interest unit. 1-cont,2-cryptocurrenty + * @param {number|undefined} params.pair eg BTC-USDT *Only for USDT-M* + * @returns {object} an array of [open interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#open-interest-structure} */ if (timeframe !== '1h' && timeframe !== '4h' && timeframe !== '12h' && timeframe !== '1d') { throw new BadRequest (this.id + ' fetchOpenInterestHistory cannot only use the 1h, 4h, 12h and 1d timeframe'); @@ -6610,11 +6610,11 @@ module.exports = class huobi extends Exchange { * @description create a loan to borrow margin * @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated * @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross - * @param {str} code unified currency code of the currency to borrow - * @param {float} amount the amount to borrow - * @param {str|undefined} symbol unified market symbol, required for isolated margin - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to borrow + * @param {number} amount the amount to borrow + * @param {string|undefined} symbol unified market symbol, required for isolated margin + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -6664,11 +6664,11 @@ module.exports = class huobi extends Exchange { * @name huobi#repayMargin * @description repay borrowed margin and interest * @see https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated - * @param {str} code unified currency code of the currency to repay - * @param {float} amount the amount to repay - * @param {str|undefined} symbol unified market symbol - * @param {dict} params extra parameters specific to the huobi api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to repay + * @param {number} amount the amount to repay + * @param {string|undefined} symbol unified market symbol + * @param {object} params extra parameters specific to the huobi api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -6743,13 +6743,13 @@ module.exports = class huobi extends Exchange { * @method * @name huobi#fetchSettlementHistory * @description Fetches historical settlement records - * @param {str} symbol unified symbol of the market to fetch the settlement history for - * @param {int} since timestamp in ms, value range = current time - 90 days,default = current time - 90 days - * @param {int} limit page items, default 20, shall not exceed 50 - * @param {dict} params exchange specific params - * @param {int} params.until timestamp in ms, value range = start_time -> current time,default = current time - * @param {int} params.page_index page index, default page 1 if not filled - * @param {int} params.code unified currency code, can be used when symbol is undefined + * @param {string} symbol unified symbol of the market to fetch the settlement history for + * @param {number} since timestamp in ms, value range = current time - 90 days,default = current time - 90 days + * @param {number} limit page items, default 20, shall not exceed 50 + * @param {object} params exchange specific params + * @param {number} params.until timestamp in ms, value range = start_time -> current time,default = current time + * @param {number} params.page_index page index, default page 1 if not filled + * @param {number} params.code unified currency code, can be used when symbol is undefined * @returns A list of settlement history objects */ const code = this.safeString (params, 'code'); diff --git a/js/huobijp.js b/js/huobijp.js index 65ae2ae48c76..782c9ba9e09f 100644 --- a/js/huobijp.js +++ b/js/huobijp.js @@ -332,7 +332,7 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the huobijp api endpoint + * @param {object} params extra parameters specific to the huobijp api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetCommonTimestamp (params); @@ -415,8 +415,8 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchMarkets * @description retrieves data on all markets for huobijp - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const method = this.options['fetchMarketsMethod']; const response = await this[method] (params); @@ -616,10 +616,10 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -667,9 +667,9 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -710,8 +710,8 @@ module.exports = class huobijp extends Exchange { * @name huobijp#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.marketGetTickers (params); @@ -820,12 +820,12 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -840,11 +840,11 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -869,11 +869,11 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -949,11 +949,11 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the huobijp api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the huobijp api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -987,8 +987,8 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ await this.loadMarkets (); const response = await this.privateGetAccountAccounts (params); @@ -1000,8 +1000,8 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} an associative dictionary of currencies */ const request = { 'language': this.options['language'], @@ -1123,8 +1123,8 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1173,9 +1173,9 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1191,11 +1191,11 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStates ('pre-submitted,submitted,partial-filled,filled,partial-canceled,canceled', symbol, since, limit, params); } @@ -1205,11 +1205,11 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const method = this.safeString (this.options, 'fetchOpenOrdersMethod', 'fetch_open_orders_v1'); return await this[method] (symbol, since, limit, params); @@ -1227,11 +1227,11 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStates ('filled,partial-canceled,canceled', symbol, since, limit, params); } @@ -1389,13 +1389,13 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1467,10 +1467,10 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by huobijp cancelOrder () - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by huobijp cancelOrder () + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const response = await this.privatePostOrderOrdersIdSubmitcancel ({ 'id': id }); // @@ -1491,9 +1491,9 @@ module.exports = class huobijp extends Exchange { * @name huobijp#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol not used by huobijp cancelOrders () - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by huobijp cancelOrders () + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const clientOrderIds = this.safeValue2 (params, 'clientOrderIds', 'client-order-ids'); @@ -1545,9 +1545,9 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1624,11 +1624,11 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (limit === undefined || limit > 100) { limit = 100; @@ -1658,11 +1658,11 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ if (limit === undefined || limit > 100) { limit = 100; @@ -1800,12 +1800,12 @@ module.exports = class huobijp extends Exchange { * @method * @name huobijp#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the huobijp api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the huobijp api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); diff --git a/js/idex.js b/js/idex.js index b9227a7042fe..6f1e5bc90e5d 100644 --- a/js/idex.js +++ b/js/idex.js @@ -188,8 +188,8 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchMarkets * @description retrieves data on all markets for idex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarkets (params); // @@ -318,9 +318,9 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -356,8 +356,8 @@ module.exports = class idex extends Exchange { * @name idex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); // [ @@ -433,11 +433,11 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the idex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the idex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -496,11 +496,11 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -611,8 +611,8 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ this.checkRequiredCredentials (); await this.loadMarkets (); @@ -657,10 +657,10 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -722,8 +722,8 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetAssets (params); // @@ -789,8 +789,8 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ this.checkRequiredCredentials (); await this.loadMarkets (); @@ -832,11 +832,11 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ this.checkRequiredCredentials (); await this.loadMarkets (); @@ -899,9 +899,9 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'orderId': id, @@ -914,11 +914,11 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'closed': false, @@ -931,11 +931,11 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'closed': true, @@ -1145,13 +1145,13 @@ module.exports = class idex extends Exchange { * @method * @name idex#createOrder * @description create a trade order, https://docs.idex.io/#create-order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ this.checkRequiredCredentials (); await this.loadMarkets (); @@ -1338,12 +1338,12 @@ module.exports = class idex extends Exchange { * @method * @name idex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkRequiredCredentials (); @@ -1392,9 +1392,9 @@ module.exports = class idex extends Exchange { * @method * @name idex#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ this.checkRequiredCredentials (); await this.loadMarkets (); @@ -1432,10 +1432,10 @@ module.exports = class idex extends Exchange { * @method * @name idex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ this.checkRequiredCredentials (); await this.loadMarkets (); @@ -1484,10 +1484,10 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchDeposit * @description fetch information on a deposit - * @param {str} id deposit id - * @param {str|undefined} code not used by idex fetchDeposit () - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code not used by idex fetchDeposit () + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const nonce = this.uuidv1 (); @@ -1505,11 +1505,11 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ params = this.extend ({ 'method': 'privateGetDeposits', @@ -1522,7 +1522,7 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the idex api endpoint + * @param {object} params extra parameters specific to the idex api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -1537,10 +1537,10 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id - * @param {str} id withdrawal id - * @param {str|undefined} code not used by idex.fetchWithdrawal - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string|undefined} code not used by idex.fetchWithdrawal + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const nonce = this.uuidv1 (); @@ -1558,11 +1558,11 @@ module.exports = class idex extends Exchange { * @method * @name idex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the idex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the idex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ params = this.extend ({ 'method': 'privateGetWithdrawals', diff --git a/js/independentreserve.js b/js/independentreserve.js index 17552d6cf4cb..ae8c8a479696 100644 --- a/js/independentreserve.js +++ b/js/independentreserve.js @@ -137,8 +137,8 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchMarkets * @description retrieves data on all markets for independentreserve - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const baseCurrencies = await this.publicGetGetValidPrimaryCurrencyCodes (params); // ['Xbt', 'Eth', 'Usdt', ...] @@ -234,8 +234,8 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostGetAccounts (params); @@ -247,10 +247,10 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -316,9 +316,9 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -468,9 +468,9 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const response = await this.privatePostGetOrderDetails (this.extend ({ @@ -488,11 +488,11 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = this.ordered ({}); @@ -517,11 +517,11 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = this.ordered ({}); @@ -546,11 +546,11 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const pageIndex = this.safeInteger (params, 'pageIndex', 1); @@ -615,11 +615,11 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -637,8 +637,8 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privatePostGetBrokerageFees (params); @@ -684,13 +684,13 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -719,10 +719,10 @@ module.exports = class independentreserve extends Exchange { * @method * @name independentreserve#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the independentreserve api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the independentreserve api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { diff --git a/js/indodax.js b/js/indodax.js index faec5d4043ce..fcdfc281da5d 100644 --- a/js/indodax.js +++ b/js/indodax.js @@ -175,7 +175,7 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the indodax api endpoint + * @param {object} params extra parameters specific to the indodax api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetServerTime (params); @@ -193,8 +193,8 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchMarkets * @description retrieves data on all markets for indodax - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetPairs (params); // @@ -314,8 +314,8 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostGetInfo (params); @@ -357,10 +357,10 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -418,9 +418,9 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -470,11 +470,11 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -577,9 +577,9 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol'); @@ -601,11 +601,11 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -642,11 +642,11 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchClosedOrders() requires a symbol argument'); @@ -670,13 +670,13 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type !== 'limit') { throw new ExchangeError (this.id + ' createOrder() allows limit orders only'); @@ -709,10 +709,10 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -736,9 +736,9 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchTransactionFee * @description fetch the fee for a transaction - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -770,11 +770,11 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -871,12 +871,12 @@ module.exports = class indodax extends Exchange { * @method * @name indodax#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the indodax api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the indodax api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/itbit.js b/js/itbit.js index 9bb6b5f80682..2233c889bc1c 100644 --- a/js/itbit.js +++ b/js/itbit.js @@ -140,10 +140,10 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -215,9 +215,9 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -370,11 +370,11 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code not used by itbit fetchTransactions () - * @param {int|undefined} since not used by itbit fetchTransactions () - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code not used by itbit fetchTransactions () + * @param {number|undefined} since not used by itbit fetchTransactions () + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const walletId = this.safeString (params, 'walletId'); @@ -449,11 +449,11 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const walletId = this.safeString (params, 'walletId'); @@ -509,11 +509,11 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -558,8 +558,8 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.fetchWallets (params); @@ -590,11 +590,11 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'open', @@ -607,11 +607,11 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'filled', @@ -624,11 +624,11 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -728,13 +728,13 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); if (type === 'market') { @@ -768,9 +768,9 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by itbit fetchOrder - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by itbit fetchOrder + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const walletIdInParams = ('walletId' in params); @@ -789,10 +789,10 @@ module.exports = class itbit extends Exchange { * @method * @name itbit#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the itbit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the itbit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const walletIdInParams = ('walletId' in params); if (!walletIdInParams) { diff --git a/js/kraken.js b/js/kraken.js index 0b7ac4f1cea0..35ebe425f234 100644 --- a/js/kraken.js +++ b/js/kraken.js @@ -341,8 +341,8 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchMarkets * @description retrieves data on all markets for kraken - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetAssetPairs (params); // @@ -527,8 +527,8 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetAssets (params); // @@ -585,9 +585,9 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -656,10 +656,10 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -761,8 +761,8 @@ module.exports = class kraken extends Exchange { * @name kraken#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ if (symbols === undefined) { throw new ArgumentsRequired (this.id + ' fetchTickers() requires a symbols argument, an array of symbols'); @@ -798,9 +798,9 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const darkpool = symbol.indexOf ('.d') >= 0; @@ -844,11 +844,11 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the kraken api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the kraken api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -956,11 +956,11 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ // https://www.kraken.com/features/api#get-ledgers-info await this.loadMarkets (); @@ -1135,11 +1135,11 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1210,8 +1210,8 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostBalance (params); @@ -1233,13 +1233,13 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1505,9 +1505,9 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by kraken fetchOrder - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by kraken fetchOrder + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const clientOrderId = this.safeValue2 (params, 'userref', 'clientOrderId'); @@ -1574,12 +1574,12 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const orderTrades = this.safeValue (params, 'trades'); const tradeIds = []; @@ -1670,11 +1670,11 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1730,10 +1730,10 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let response = undefined; @@ -1761,9 +1761,9 @@ module.exports = class kraken extends Exchange { * @name kraken#cancelOrders * @description cancel multiple orders * @param {[str]} ids open orders transaction ID (txid) or user reference (userref) - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'orders': ids, @@ -1785,9 +1785,9 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); return await this.privatePostCancelAll (params); @@ -1798,11 +1798,11 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1830,11 +1830,11 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -2031,11 +2031,11 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ // https://www.kraken.com/en-us/help/api#deposit-status if (code === undefined) { @@ -2068,7 +2068,7 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the kraken api endpoint + * @param {object} params extra parameters specific to the kraken api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ // https://www.kraken.com/en-us/features/api#get-server-time @@ -2091,11 +2091,11 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ // https://www.kraken.com/en-us/help/api#withdraw-status if (code === undefined) { @@ -2128,9 +2128,9 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const request = { 'new': 'true', @@ -2176,9 +2176,9 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2259,12 +2259,12 @@ module.exports = class kraken extends Exchange { * @method * @name kraken#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -2297,8 +2297,8 @@ module.exports = class kraken extends Exchange { * @name kraken#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols not used by kraken fetchPositions () - * @param {dict} params extra parameters specific to the kraken api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the kraken api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const request = { diff --git a/js/kucoin.js b/js/kucoin.js index 315ff16a9bca..f898699a0abc 100644 --- a/js/kucoin.js +++ b/js/kucoin.js @@ -457,7 +457,7 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the kucoin api endpoint + * @param {object} params extra parameters specific to the kucoin api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTimestamp (params); @@ -476,8 +476,8 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.publicGetStatus (params); // @@ -505,8 +505,8 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchMarkets * @description retrieves data on all markets for kucoin - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetSymbols (params); // @@ -644,8 +644,8 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -695,8 +695,8 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ const response = await this.privateGetAccounts (params); // @@ -745,9 +745,9 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchTransactionFee * @description fetch the fee for a transaction - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -882,8 +882,8 @@ module.exports = class kucoin extends Exchange { * @name kucoin#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetMarketAllTickers (params); @@ -935,9 +935,9 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -998,11 +998,11 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the kucoin api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the kucoin api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1049,9 +1049,9 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1084,9 +1084,9 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1128,10 +1128,10 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1199,33 +1199,33 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#createOrder * @description Create an order on the exchange - * @param {str} symbol Unified CCXT market symbol - * @param {str} type 'limit' or 'market' - * @param {str} side 'buy' or 'sell' - * @param {float} amount the amount of currency to trade - * @param {float} price *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency - * @param {dict} params Extra parameters specific to the exchange API endpoint - * @param {str} params.clientOid client order id, defaults to uuid if not passed - * @param {str} params.remark remark for the order, length cannot exceed 100 utf8 characters - * @param {str} params.tradeType 'TRADE', // TRADE, MARGIN_TRADE // not used with margin orders + * @param {string} symbol Unified CCXT market symbol + * @param {string} type 'limit' or 'market' + * @param {string} side 'buy' or 'sell' + * @param {number} amount the amount of currency to trade + * @param {number} price *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency + * @param {object} params Extra parameters specific to the exchange API endpoint + * @param {string} params.clientOid client order id, defaults to uuid if not passed + * @param {string} params.remark remark for the order, length cannot exceed 100 utf8 characters + * @param {string} params.tradeType 'TRADE', // TRADE, MARGIN_TRADE // not used with margin orders * limit orders --------------------------------------------------- - * @param {str} params.timeInForce GTC, GTT, IOC, or FOK, default is GTC, limit orders only - * @param {float} params.cancelAfter long, // cancel after n seconds, requires timeInForce to be GTT - * @param {str} params.postOnly Post only flag, invalid when timeInForce is IOC or FOK + * @param {string} params.timeInForce GTC, GTT, IOC, or FOK, default is GTC, limit orders only + * @param {number} params.cancelAfter long, // cancel after n seconds, requires timeInForce to be GTT + * @param {string} params.postOnly Post only flag, invalid when timeInForce is IOC or FOK * @param {bool} params.hidden false, // Order will not be displayed in the order book * @param {bool} params.iceberg false, // Only a portion of the order is displayed in the order book - * @param {str} params.visibleSize this.amountToPrecision (symbol, visibleSize), // The maximum visible size of an iceberg order + * @param {string} params.visibleSize this.amountToPrecision (symbol, visibleSize), // The maximum visible size of an iceberg order * market orders -------------------------------------------------- - * @param {str} params.funds // Amount of quote currency to use + * @param {string} params.funds // Amount of quote currency to use * stop orders ---------------------------------------------------- - * @param {str} params.stop Either loss or entry, the default is loss. Requires stopPrice to be defined - * @param {float} params.stopPrice The price at which a trigger order is triggered at + * @param {string} params.stop Either loss or entry, the default is loss. Requires stopPrice to be defined + * @param {number} params.stopPrice The price at which a trigger order is triggered at * margin orders -------------------------------------------------- - * @param {float} params.leverage Leverage size of the order - * @param {str} params.stp '', // self trade prevention, CN, CO, CB or DC - * @param {str} params.marginMode 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned + * @param {number} params.leverage Leverage size of the order + * @param {string} params.stp '', // self trade prevention, CN, CO, CB or DC + * @param {string} params.marginMode 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned * @param {bool} params.autoBorrow false, // The system will first borrow you funds at the optimal interest rate and then place an order for you - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const marketId = this.marketId (symbol); @@ -1315,9 +1315,9 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the kucoin api endpoint + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the kucoin api endpoint * @param {bool} params.stop True if cancelling a stop order * @returns Response from the exchange */ @@ -1348,11 +1348,11 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the kucoin api endpoint + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the kucoin api endpoint * @param {bool} params.stop true if cancelling all stop orders - * @param {str} params.tradeType The type of trading, "TRADE" for Spot Trading, "MARGIN_TRADE" for Margin Trading - * @param {str} params.orderIds *stop orders only* Comma seperated order IDs + * @param {string} params.tradeType The type of trading, "TRADE" for Spot Trading, "MARGIN_TRADE" for Margin Trading + * @param {string} params.orderIds *stop orders only* Comma seperated order IDs * @returns Response from the exchange */ await this.loadMarkets (); @@ -1375,18 +1375,18 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchOrdersByStatus * @description fetch a list of orders - * @param {str} status *not used for stop orders* 'open' or 'closed' - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since timestamp in ms of the earliest order - * @param {int|undefined} limit max number of orders to return - * @param {dict} params exchange specific params - * @param {int|undefined} params.until end time in ms + * @param {string} status *not used for stop orders* 'open' or 'closed' + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since timestamp in ms of the earliest order + * @param {number|undefined} limit max number of orders to return + * @param {object} params exchange specific params + * @param {number|undefined} params.until end time in ms * @param {bool|undefined} params.stop true if fetching stop orders - * @param {str|undefined} params.side buy or sell - * @param {str|undefined} params.type limit, market, limit_stop or market_stop - * @param {str|undefined} params.tradeType TRADE for spot trading, MARGIN_TRADE for Margin Trading - * @param {int|undefined} params.currentPage *stop orders only* current page - * @param {str|undefined} params.orderIds *stop orders only* comma seperated order ID list + * @param {string|undefined} params.side buy or sell + * @param {string|undefined} params.type limit, market, limit_stop or market_stop + * @param {string|undefined} params.tradeType TRADE for spot trading, MARGIN_TRADE for Margin Trading + * @param {number|undefined} params.currentPage *stop orders only* current page + * @param {string|undefined} params.orderIds *stop orders only* comma seperated order ID list * @returns An [array of order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); @@ -1474,15 +1474,15 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @param {int|undefined} params.till end time in ms - * @param {str|undefined} params.side buy or sell - * @param {str|undefined} params.type limit, market, limit_stop or market_stop - * @param {str|undefined} params.tradeType TRADE for spot trading, MARGIN_TRADE for Margin Trading - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the kucoin api endpoint + * @param {number|undefined} params.till end time in ms + * @param {string|undefined} params.side buy or sell + * @param {string|undefined} params.type limit, market, limit_stop or market_stop + * @param {string|undefined} params.tradeType TRADE for spot trading, MARGIN_TRADE for Margin Trading + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('done', symbol, since, limit, params); } @@ -1492,18 +1492,18 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @param {int} params.till end time in ms + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the kucoin api endpoint + * @param {number} params.till end time in ms * @param {bool} params.stop true if fetching stop orders - * @param {str} params.side buy or sell - * @param {str} params.type limit, market, limit_stop or market_stop - * @param {str} params.tradeType TRADE for spot trading, MARGIN_TRADE for Margin Trading - * @param {int} params.currentPage *stop orders only* current page - * @param {str} params.orderIds *stop orders only* comma seperated order ID list - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} params.side buy or sell + * @param {string} params.type limit, market, limit_stop or market_stop + * @param {string} params.tradeType TRADE for spot trading, MARGIN_TRADE for Margin Trading + * @param {number} params.currentPage *stop orders only* current page + * @param {string} params.orderIds *stop orders only* comma seperated order ID list + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('active', symbol, since, limit, params); } @@ -1513,9 +1513,9 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchOrder * @description fetch an order - * @param {str} id Order id - * @param {str} symbol not sent to exchange except for stop orders with clientOid, but used internally by CCXT to filter - * @param {dict} params exchange specific parameters + * @param {string} id Order id + * @param {string} symbol not sent to exchange except for stop orders with clientOid, but used internally by CCXT to filter + * @param {object} params exchange specific parameters * @param {bool} params.stop true if fetching a stop order * @param {bool} params.clientOid unique order id created by users to identify their orders * @returns An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} @@ -1659,12 +1659,12 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const request = { 'orderId': id, @@ -1677,11 +1677,11 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -1772,11 +1772,11 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1945,9 +1945,9 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1985,12 +1985,12 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); @@ -2157,11 +2157,11 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -2231,11 +2231,11 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -2306,8 +2306,8 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'spot'); @@ -2356,12 +2356,12 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2620,11 +2620,11 @@ module.exports = class kucoin extends Exchange { * @method * @name kucoin#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the kucoin api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the kucoin api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); await this.loadAccounts (); diff --git a/js/kucoinfutures.js b/js/kucoinfutures.js index d83e215e7ba1..7063ba86a58c 100644 --- a/js/kucoinfutures.js +++ b/js/kucoinfutures.js @@ -310,8 +310,8 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ throw new BadRequest (this.id + ' fetchAccounts() is not supported yet'); } @@ -321,8 +321,8 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.futuresPublicGetStatus (params); // @@ -350,8 +350,8 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchMarkets * @description retrieves data on all markets for kucoinfutures - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.futuresPublicGetContractsActive (params); // @@ -507,7 +507,7 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint + * @param {object} params extra parameters specific to the kucoinfutures api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.futuresPublicGetTimestamp (params); @@ -525,11 +525,11 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the kucoinfutures api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -594,9 +594,9 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ throw new BadRequest (this.id + ' createDepositAddress() is not supported yet'); } @@ -606,9 +606,9 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -646,10 +646,10 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const level = this.safeNumber (params, 'level'); @@ -704,9 +704,9 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -787,11 +787,11 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ // if (symbol === undefined) { @@ -861,8 +861,8 @@ module.exports = class kucoinfutures extends kucoin { * @name kucoinfutures#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const response = await this.futuresPrivateGetPositions (params); @@ -1012,24 +1012,24 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#createOrder * @description Create an order on the exchange - * @param {str} symbol Unified CCXT market symbol - * @param {str} type 'limit' or 'market' - * @param {str} side 'buy' or 'sell' - * @param {float} amount the amount of currency to trade - * @param {float} price *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency - * @param {dict} params Extra parameters specific to the exchange API endpoint - * @param {float} params.leverage Leverage size of the order - * @param {float} params.stopPrice The price at which a trigger order is triggered at + * @param {string} symbol Unified CCXT market symbol + * @param {string} type 'limit' or 'market' + * @param {string} side 'buy' or 'sell' + * @param {number} amount the amount of currency to trade + * @param {number} price *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency + * @param {object} params Extra parameters specific to the exchange API endpoint + * @param {number} params.leverage Leverage size of the order + * @param {number} params.stopPrice The price at which a trigger order is triggered at * @param {bool} params.reduceOnly A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true. - * @param {str} params.timeInForce GTC, GTT, IOC, or FOK, default is GTC, limit orders only - * @param {str} params.postOnly Post only flag, invalid when timeInForce is IOC or FOK - * @param {str} params.clientOid client order id, defaults to uuid if not passed - * @param {str} params.remark remark for the order, length cannot exceed 100 utf8 characters - * @param {str} params.stop 'up' or 'down', defaults to 'up' if side is sell and 'down' if side is buy, requires stopPrice - * @param {str} params.stopPriceType TP, IP or MP, defaults to TP + * @param {string} params.timeInForce GTC, GTT, IOC, or FOK, default is GTC, limit orders only + * @param {string} params.postOnly Post only flag, invalid when timeInForce is IOC or FOK + * @param {string} params.clientOid client order id, defaults to uuid if not passed + * @param {string} params.remark remark for the order, length cannot exceed 100 utf8 characters + * @param {string} params.stop 'up' or 'down', defaults to 'up' if side is sell and 'down' if side is buy, requires stopPrice + * @param {string} params.stopPriceType TP, IP or MP, defaults to TP * @param {bool} params.closeOrder set to true to close position * @param {bool} params.forceHold 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. - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1120,10 +1120,10 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1148,9 +1148,9 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @param {dict} params.stop When true, all the trigger orders will be cancelled + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @param {object} params.stop When true, all the trigger orders will be cancelled * @returns Response from the exchange */ await this.loadMarkets (); @@ -1179,10 +1179,10 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1317,15 +1317,15 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchOrdersByStatus * @description fetches a list of orders placed on the exchange - * @param {str} status 'active' or 'closed', only 'active' is valid for stop orders - * @param {str|undefined} symbol unified symbol for the market to retrieve orders from - * @param {int|undefined} since timestamp in ms of the earliest order to retrieve - * @param {int|undefined} limit The maximum number of orders to retrieve - * @param {dict} params exchange specific parameters + * @param {string} status 'active' or 'closed', only 'active' is valid for stop orders + * @param {string|undefined} symbol unified symbol for the market to retrieve orders from + * @param {number|undefined} since timestamp in ms of the earliest order to retrieve + * @param {number|undefined} limit The maximum number of orders to retrieve + * @param {object} params exchange specific parameters * @param {bool|undefined} params.stop set to true to retrieve untriggered stop orders - * @param {int|undefined} params.until End time in ms - * @param {str|undefined} params.side buy or sell - * @param {str|undefined} params.type limit or market + * @param {number|undefined} params.until End time in ms + * @param {string|undefined} params.side buy or sell + * @param {string|undefined} params.type limit or market * @returns An [array of order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); @@ -1366,14 +1366,14 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @param {int|undefined} params.till end time in ms - * @param {str|undefined} params.side buy or sell - * @param {str|undefined} params.type limit, or market - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @param {number|undefined} params.till end time in ms + * @param {string|undefined} params.side buy or sell + * @param {string|undefined} params.type limit, or market + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByStatus ('done', symbol, since, limit, params); } @@ -1383,9 +1383,9 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1481,9 +1481,9 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1548,8 +1548,8 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); // only fetches one balance at a time @@ -1585,12 +1585,12 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ if ((toAccount !== 'main' && toAccount !== 'funding') || (fromAccount !== 'futures' && fromAccount !== 'future' && fromAccount !== 'contract')) { throw new BadRequest (this.id + ' transfer() only supports transfers from contract(future) account to main(funding) account'); @@ -1654,11 +1654,11 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1721,11 +1721,11 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1878,11 +1878,11 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -1934,11 +1934,11 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -1990,9 +1990,9 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchTransactionFee * @description fetch the fee for a transaction - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ throw new BadRequest (this.id + ' fetchTransactionFee() is not supported yet'); } @@ -2006,9 +2006,9 @@ module.exports = class kucoinfutures extends kucoin { * @method * @name kucoinfutures#fetchMarketLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the kucoinfutures api endpoint - * @returns {dict} a [leverage tiers structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the kucoinfutures api endpoint + * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2044,8 +2044,8 @@ module.exports = class kucoinfutures extends kucoin { /** * @ignore * @method - * @param {dict} info Exchange market response for 1 market - * @param {dict} market CCXT market + * @param {object} info Exchange market response for 1 market + * @param {object} market CCXT market */ // // { diff --git a/js/kuna.js b/js/kuna.js index 74f9d2b86d2a..0be7b03c8453 100644 --- a/js/kuna.js +++ b/js/kuna.js @@ -298,7 +298,7 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the kuna api endpoint + * @param {object} params extra parameters specific to the kuna api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTimestamp (params); @@ -313,8 +313,8 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchMarkets * @description retrieves data on all markets for kuna - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const quotes = [ 'btc', 'rub', 'uah', 'usd', 'usdt', 'usdc' ]; const markets = []; @@ -410,10 +410,10 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -462,9 +462,9 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTickers (params); @@ -496,9 +496,9 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -514,10 +514,10 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchL3OrderBook * @description fetches level 3 information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified market symbol - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {dict} an [order book structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {object} an [order book structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} */ return await this.fetchOrderBook (symbol, limit, params); } @@ -527,11 +527,11 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -625,12 +625,12 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const trades = await this.fetchTrades (symbol, since, limit, params); @@ -670,8 +670,8 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetMembersMe (params); @@ -683,13 +683,13 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -711,10 +711,10 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by kuna cancelOrder () - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by kuna cancelOrder () + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -776,9 +776,9 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by kuna fetchOrder - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by kuna fetchOrder + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -793,11 +793,11 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -819,11 +819,11 @@ module.exports = class kuna extends Exchange { * @method * @name kuna#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the kuna api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the kuna api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); diff --git a/js/latoken.js b/js/latoken.js index f5791d250a7f..ac7a2bdb75f2 100644 --- a/js/latoken.js +++ b/js/latoken.js @@ -216,7 +216,7 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the latoken api endpoint + * @param {object} params extra parameters specific to the latoken api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -233,8 +233,8 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchMarkets * @description retrieves data on all markets for latoken - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const currencies = await this.fetchCurrenciesFromCache (params); // @@ -384,8 +384,8 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.fetchCurrenciesFromCache (params); // @@ -466,8 +466,8 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAuthAccount (params); @@ -532,10 +532,10 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -613,9 +613,9 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -645,8 +645,8 @@ module.exports = class latoken extends Exchange { * @name latoken#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -758,11 +758,11 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -791,9 +791,9 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ let method = this.safeString (params, 'method'); params = this.omit (params, 'method'); @@ -857,11 +857,11 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1039,11 +1039,11 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -1085,11 +1085,11 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1140,9 +1140,9 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by latoken fetchOrder - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by latoken fetchOrder + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1177,13 +1177,13 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1224,10 +1224,10 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by latoken cancelOrder () - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by latoken cancelOrder () + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1251,9 +1251,9 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1283,11 +1283,11 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1410,11 +1410,11 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1459,12 +1459,12 @@ module.exports = class latoken extends Exchange { * @method * @name latoken#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the latoken api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the latoken api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); diff --git a/js/lbank.js b/js/lbank.js index 433cd5519ebc..93230e078fa5 100644 --- a/js/lbank.js +++ b/js/lbank.js @@ -144,8 +144,8 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#fetchMarkets * @description retrieves data on all markets for lbank - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetAccuracy (params); // @@ -281,9 +281,9 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -312,8 +312,8 @@ module.exports = class lbank extends Exchange { * @name lbank#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = { @@ -334,10 +334,10 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); let size = 60; @@ -387,11 +387,11 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -435,11 +435,11 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the lbank api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the lbank api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -495,8 +495,8 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostUserInfo (params); @@ -593,13 +593,13 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -628,10 +628,10 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -648,9 +648,9 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // Id can be a list of ids delimited by a comma await this.loadMarkets (); @@ -675,11 +675,11 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); if (limit === undefined) { @@ -701,11 +701,11 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); if (symbol !== undefined) { @@ -724,12 +724,12 @@ module.exports = class lbank extends Exchange { * @method * @name lbank#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); // mark and fee are optional params, mark is a note and must be less than 255 characters diff --git a/js/lbank2.js b/js/lbank2.js index 8d5217e7d55a..65bae8b9aee9 100644 --- a/js/lbank2.js +++ b/js/lbank2.js @@ -267,8 +267,8 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchMarkets * @description retrieves data on all markets for lbank2 - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ // needs to return a list of unified market structures const response = await this.publicGetAccuracy (); @@ -406,9 +406,9 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -447,8 +447,8 @@ module.exports = class lbank2 extends Exchange { * @name lbank2#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the lbank api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the lbank api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = { @@ -464,10 +464,10 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -592,11 +592,11 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -663,11 +663,11 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the lbank2 api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the lbank2 api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ // endpoint doesnt work @@ -847,8 +847,8 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); let method = this.safeString (params, 'method'); @@ -883,9 +883,9 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ const market = this.market (symbol); const result = await this.fetchTradingFees (this.extend (params, { 'category': market['id'] })); @@ -897,8 +897,8 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const request = {}; @@ -918,13 +918,13 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1141,9 +1141,9 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let method = this.safeString (params, 'method'); @@ -1242,11 +1242,11 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades () requires a symbol argument'); @@ -1300,11 +1300,11 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // default query is for canceled and completely filled orders // does not return open orders unless specified explicitly @@ -1360,11 +1360,11 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -1417,10 +1417,10 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -1459,9 +1459,9 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelAllOrders() requires a symbol argument'); @@ -1498,9 +1498,9 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); let method = this.safeString (params, 'method'); @@ -1600,12 +1600,12 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1767,11 +1767,11 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1819,11 +1819,11 @@ module.exports = class lbank2 extends Exchange { * @method * @name lbank2#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1876,8 +1876,8 @@ module.exports = class lbank2 extends Exchange { * @name lbank2#fetchTransactionFees * @description fetch transaction fees * @param {[str]|undefined} codes not used by lbank2 fetchTransactionFees () - * @param {dict} params extra parameters specific to the lbank2 api endpoint - * @returns {dict} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {object} params extra parameters specific to the lbank2 api endpoint + * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ // private only returns information for currencies with non-zero balance await this.loadMarkets (); diff --git a/js/liquid.js b/js/liquid.js index 4baded5ce416..d6f76249063a 100644 --- a/js/liquid.js +++ b/js/liquid.js @@ -249,8 +249,8 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -321,8 +321,8 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchMarkets * @description retrieves data on all markets for liquid - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const spot = await this.publicGetProducts (params); // @@ -552,8 +552,8 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAccounts (params); @@ -599,10 +599,10 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -663,8 +663,8 @@ module.exports = class liquid extends Exchange { * @name liquid#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetProducts (params); @@ -682,9 +682,9 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -739,11 +739,11 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -767,9 +767,9 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -836,8 +836,8 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const spot = await this.publicGetProducts (params); @@ -942,11 +942,11 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -967,13 +967,13 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const clientOrderId = this.safeString2 (params, 'clientOrderId', 'client_order_id'); @@ -1023,10 +1023,10 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1172,9 +1172,9 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by liquid fetchOrder - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by liquid fetchOrder + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1237,11 +1237,11 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1323,11 +1323,11 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'live' }; return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); @@ -1338,11 +1338,11 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'filled' }; return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); @@ -1353,12 +1353,12 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1419,11 +1419,11 @@ module.exports = class liquid extends Exchange { * @method * @name liquid#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the liquid api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the liquid api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { diff --git a/js/luno.js b/js/luno.js index c7b32f0e3aa0..2b4293ca5a69 100644 --- a/js/luno.js +++ b/js/luno.js @@ -155,8 +155,8 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchMarkets * @description retrieves data on all markets for luno - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.exchangeGetMarkets (params); // @@ -245,8 +245,8 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ const response = await this.privateGetBalance (params); const wallets = this.safeValue (response, 'balance', []); @@ -300,8 +300,8 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalance (params); @@ -323,10 +323,10 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); let method = 'publicGetOrderbook'; @@ -431,9 +431,9 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by luno fetchOrder - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by luno fetchOrder + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -464,11 +464,11 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByState (undefined, symbol, since, limit, params); } @@ -478,11 +478,11 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByState ('PENDING', symbol, since, limit, params); } @@ -492,11 +492,11 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByState ('COMPLETE', symbol, since, limit, params); } @@ -545,8 +545,8 @@ module.exports = class luno extends Exchange { * @name luno#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTickers (params); @@ -568,9 +568,9 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -686,11 +686,11 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -723,11 +723,11 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -774,8 +774,8 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privateGetFeeInfo (params); @@ -791,13 +791,13 @@ module.exports = class luno extends Exchange { * @method * @name luno#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let method = 'privatePost'; @@ -832,10 +832,10 @@ module.exports = class luno extends Exchange { * @method * @name luno#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -859,11 +859,11 @@ module.exports = class luno extends Exchange { * @method * @name luno#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the luno api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the luno api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); await this.loadAccounts (); diff --git a/js/lykke.js b/js/lykke.js index 6f143e523658..10010679b1d9 100644 --- a/js/lykke.js +++ b/js/lykke.js @@ -181,8 +181,8 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetAssets (params); const currencies = this.safeValue (response, 'payload', []); @@ -258,8 +258,8 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchMarkets * @description retrieves data on all markets for lykke - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetAssetpairs (params); const markets = this.safeValue (response, 'payload', []); @@ -418,9 +418,9 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -473,8 +473,8 @@ module.exports = class lykke extends Exchange { * @name lykke#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTickers (params); @@ -504,10 +504,10 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -610,11 +610,11 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -676,8 +676,8 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalance (params); @@ -773,13 +773,13 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -845,10 +845,10 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'orderId': id, @@ -867,9 +867,9 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -894,9 +894,9 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by lykke fetchOrder - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by lykke fetchOrder + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -931,11 +931,11 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -980,11 +980,11 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1029,11 +1029,11 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1090,9 +1090,9 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1186,11 +1186,11 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1229,12 +1229,12 @@ module.exports = class lykke extends Exchange { * @method * @name lykke#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the lykke api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the lykke api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); this.checkAddress (address); diff --git a/js/mercado.js b/js/mercado.js index 5f9b1a4aedb7..ecd00c2be14b 100644 --- a/js/mercado.js +++ b/js/mercado.js @@ -153,8 +153,8 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchMarkets * @description retrieves data on all markets for mercado - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetCoins (params); // @@ -245,10 +245,10 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -304,9 +304,9 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -370,11 +370,11 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -418,8 +418,8 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostGetAccountInfo (params); @@ -431,13 +431,13 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -473,10 +473,10 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -602,9 +602,9 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -626,12 +626,12 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -741,11 +741,11 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the mercado api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the mercado api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -774,11 +774,11 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -799,11 +799,11 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -825,11 +825,11 @@ module.exports = class mercado extends Exchange { * @method * @name mercado#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the mercado api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the mercado api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); diff --git a/js/mexc.js b/js/mexc.js index b14e8fce8d34..910943234aeb 100644 --- a/js/mexc.js +++ b/js/mexc.js @@ -346,7 +346,7 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the mexc api endpoint + * @param {object} params extra parameters specific to the mexc api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchTime', undefined, params); @@ -379,8 +379,8 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.spotPublicGetCommonPing (params); // @@ -402,8 +402,8 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.spotPublicGetMarketCoinList (params); // @@ -526,8 +526,8 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchMarkets * @description retrieves data on all markets for mexc - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const defaultType = this.safeString2 (this.options, 'fetchMarkets', 'defaultType', 'spot'); const type = this.safeString (params, 'type', defaultType); @@ -772,8 +772,8 @@ module.exports = class mexc extends Exchange { * @name mexc#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchTickers', undefined, params); @@ -818,9 +818,9 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -969,10 +969,10 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1048,11 +1048,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1195,8 +1195,8 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.spotPublicGetMarketSymbols (params); @@ -1248,11 +1248,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the mexc api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the mexc api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1353,8 +1353,8 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchBalance', undefined, params); @@ -1463,9 +1463,9 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchDepositAddressesByNetwork * @description fetch a dictionary of addresses for a currency, indexed by network - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network */ await this.loadMarkets (); const currency = this.currency (code); @@ -1503,9 +1503,9 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const rawNetwork = this.safeStringUpper (params, 'network'); params = this.omit (params, 'network'); @@ -1545,11 +1545,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1607,11 +1607,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1758,9 +1758,9 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1778,8 +1778,8 @@ module.exports = class mexc extends Exchange { * @name mexc#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const response = await this.contractPrivateGetPositionOpenPositions (params); @@ -1884,13 +1884,13 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2049,10 +2049,10 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -2370,11 +2370,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -2493,9 +2493,9 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -2620,11 +2620,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchCanceledOrders() requires a symbol argument'); @@ -2646,11 +2646,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchClosedOrders() requires a symbol argument'); @@ -2670,9 +2670,9 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2726,11 +2726,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -2778,12 +2778,12 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -2863,10 +2863,10 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'SUB', params); } @@ -2876,10 +2876,10 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'ADD', params); } @@ -2889,10 +2889,10 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str|undefined} symbol unified market symbol - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string|undefined} symbol unified market symbol + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} response from the exchange */ await this.loadMarkets (); const request = { @@ -2943,11 +2943,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const request = {}; @@ -2995,12 +2995,12 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -3070,12 +3070,12 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); const networks = this.safeValue (this.options, 'networks', {}); @@ -3177,11 +3177,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ await this.loadMarkets (); let market = undefined; @@ -3294,9 +3294,9 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3328,11 +3328,11 @@ module.exports = class mexc extends Exchange { * @method * @name mexc#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since not used by mexc, but filtered internally by ccxt - * @param {int|undefined} limit mexc limit is page_size default 20, maximum is 100 - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since not used by mexc, but filtered internally by ccxt + * @param {number|undefined} limit mexc limit is page_size default 20, maximum is 100 + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchFundingRateHistory() requires a symbol argument'); @@ -3398,8 +3398,8 @@ module.exports = class mexc extends Exchange { * @name mexc#fetchLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {dict} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols */ await this.loadMarkets (); const response = await this.contractPublicGetDetail (params); @@ -3456,8 +3456,8 @@ module.exports = class mexc extends Exchange { /** * @ignore * @method - * @param {dict} info Exchange response for 1 market - * @param {dict} market CCXT market + * @param {object} info Exchange response for 1 market + * @param {object} market CCXT market */ // // { diff --git a/js/mexc3.js b/js/mexc3.js index f933c5560705..ee6f12c6b85b 100644 --- a/js/mexc3.js +++ b/js/mexc3.js @@ -424,8 +424,8 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchStatus', undefined, params); let response = undefined; @@ -459,7 +459,7 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the mexc3 api endpoint + * @param {object} params extra parameters specific to the mexc3 api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchTime', undefined, params); @@ -484,8 +484,8 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.spot2PublicGetMarketCoinList (params); // @@ -624,8 +624,8 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchMarkets * @description retrieves data on all markets for mexc3 - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const spotMarket = await this.fetchSpotMarkets (params); const swapMarket = await this.fetchSwapMarkets (params); @@ -860,10 +860,10 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -924,11 +924,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1174,11 +1174,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the mexc3 api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the mexc3 api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1264,8 +1264,8 @@ module.exports = class mexc3 extends Exchange { * @name mexc3#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = {}; @@ -1351,9 +1351,9 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1542,8 +1542,8 @@ module.exports = class mexc3 extends Exchange { * @name mexc3#fetchBidsAsks * @description fetches the bid and ask price and volume for multiple markets * @param {[str]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); let market = undefined; @@ -1583,13 +1583,13 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1753,9 +1753,9 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -1842,11 +1842,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -2038,11 +2038,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -2095,11 +2095,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByState (3, symbol, since, limit, params); } @@ -2109,11 +2109,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByState (4, symbol, since, limit, params); } @@ -2140,10 +2140,10 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -2213,9 +2213,9 @@ module.exports = class mexc3 extends Exchange { * @name mexc3#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = symbol !== undefined ? this.market (symbol) : undefined; @@ -2247,9 +2247,9 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = symbol !== undefined ? this.market (symbol) : undefined; @@ -2536,8 +2536,8 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ // TODO: is the below endpoints suitable for fetchAccounts? const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchAccounts', undefined, params); @@ -2564,8 +2564,8 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.fetchAccountHelper ('spot', params); @@ -2593,8 +2593,8 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchBalance', undefined, params); @@ -2645,11 +2645,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -2735,12 +2735,12 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -2834,10 +2834,10 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'SUB', params); } @@ -2847,10 +2847,10 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'ADD', params); } @@ -2860,10 +2860,10 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str|undefined} symbol unified market symbol - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string|undefined} symbol unified market symbol + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} response from the exchange */ await this.loadMarkets (); const request = { @@ -2892,11 +2892,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ await this.loadMarkets (); let market = undefined; @@ -3009,9 +3009,9 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3043,11 +3043,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since not used by mexc, but filtered internally by ccxt - * @param {int|undefined} limit mexc limit is page_size default 20, maximum is 100 - * @param {dict} params extra parameters specific to the mexc api endpoint - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since not used by mexc, but filtered internally by ccxt + * @param {number|undefined} limit mexc limit is page_size default 20, maximum is 100 + * @param {object} params extra parameters specific to the mexc api endpoint + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchFundingRateHistory() requires a symbol argument'); @@ -3113,8 +3113,8 @@ module.exports = class mexc3 extends Exchange { * @name mexc3#fetchLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols */ await this.loadMarkets (); const response = await this.contractPublicGetDetail (params); @@ -3263,9 +3263,9 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchDepositAddressesByNetwork * @description fetch a dictionary of addresses for a currency, indexed by network - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network */ await this.loadMarkets (); const currency = this.currency (code); @@ -3303,9 +3303,9 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const rawNetwork = this.safeStringUpper (params, 'network'); params = this.omit (params, 'network'); @@ -3345,11 +3345,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -3414,11 +3414,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -3571,9 +3571,9 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3590,8 +3590,8 @@ module.exports = class mexc3 extends Exchange { * @name mexc3#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const response = await this.contractPrivateGetPositionOpenPositions (params); @@ -3724,11 +3724,11 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchTransfers', undefined, params); await this.loadMarkets (); @@ -3811,12 +3811,12 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -3933,12 +3933,12 @@ module.exports = class mexc3 extends Exchange { * @method * @name mexc3#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the mexc3 api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the mexc3 api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); const networks = this.safeValue (this.options, 'networks', {}); diff --git a/js/ndax.js b/js/ndax.js index 557c45c841e4..afefd11fcc7b 100644 --- a/js/ndax.js +++ b/js/ndax.js @@ -262,7 +262,7 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#signIn * @description sign in, must be called prior to using other authenticated methods - * @param {dict} params extra parameters specific to the ndax api endpoint + * @param {object} params extra parameters specific to the ndax api endpoint * @returns response from exchange */ this.checkRequiredCredentials (); @@ -316,8 +316,8 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} an associative dictionary of currencies */ const omsId = this.safeInteger (this.options, 'omsId', 1); const request = { @@ -380,8 +380,8 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchMarkets * @description retrieves data on all markets for ndax - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const omsId = this.safeInteger (this.options, 'omsId', 1); const request = { @@ -540,10 +540,10 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -652,9 +652,9 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -726,11 +726,11 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the ndax api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the ndax api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ const omsId = this.safeInteger (this.options, 'omsId', 1); @@ -940,11 +940,11 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -972,8 +972,8 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ if (!this.login) { throw new AuthenticationError (this.id + ' fetchAccounts() requires exchange.login email credential'); @@ -1027,8 +1027,8 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1162,11 +1162,11 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1319,13 +1319,13 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1425,11 +1425,11 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1513,9 +1513,9 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1548,10 +1548,10 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1587,11 +1587,11 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1666,11 +1666,11 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1761,9 +1761,9 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1837,12 +1837,12 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1920,9 +1920,9 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -1994,9 +1994,9 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const request = { 'GenerateNewKey': true, @@ -2009,11 +2009,11 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -2059,11 +2059,11 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const omsId = this.safeInteger (this.options, 'omsId', 1); await this.loadMarkets (); @@ -2258,12 +2258,12 @@ module.exports = class ndax extends Exchange { * @method * @name ndax#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the ndax api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the ndax api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); // this method required login, password and twofa key diff --git a/js/novadax.js b/js/novadax.js index 2c2fe4d8963e..898c968c0a56 100644 --- a/js/novadax.js +++ b/js/novadax.js @@ -194,7 +194,7 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the novadax api endpoint + * @param {object} params extra parameters specific to the novadax api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetCommonTimestamp (params); @@ -213,8 +213,8 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchMarkets * @description retrieves data on all markets for novadax - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetCommonSymbols (params); // @@ -352,9 +352,9 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -390,8 +390,8 @@ module.exports = class novadax extends Exchange { * @name novadax#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetMarketTickers (params); @@ -430,10 +430,10 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -552,11 +552,11 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -587,11 +587,11 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the novadax api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the novadax api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -688,8 +688,8 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAccountGetBalance (params); @@ -715,13 +715,13 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -809,10 +809,10 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by novadax cancelOrder () - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by novadax cancelOrder () + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -837,9 +837,9 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by novadax fetchOrder - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by novadax fetchOrder + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -876,11 +876,11 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -936,11 +936,11 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'SUBMITTED,PROCESSING,PARTIAL_FILLED,CANCELING', @@ -953,11 +953,11 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'FILLED,CANCELED,REJECTED', @@ -970,12 +970,12 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1103,12 +1103,12 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1178,12 +1178,12 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); @@ -1212,8 +1212,8 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ const response = await this.privateGetAccountSubs (params); // @@ -1251,11 +1251,11 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'type': 'coin_in', @@ -1268,11 +1268,11 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'type': 'coin_out', @@ -1285,11 +1285,11 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1419,11 +1419,11 @@ module.exports = class novadax extends Exchange { * @method * @name novadax#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the novadax api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the novadax api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { diff --git a/js/oceanex.js b/js/oceanex.js index 6c3ca1b0edd4..7b1bdaf587ce 100644 --- a/js/oceanex.js +++ b/js/oceanex.js @@ -148,8 +148,8 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchMarkets * @description retrieves data on all markets for oceanex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const request = { 'show_details': true }; const response = await this.publicGetMarkets (this.extend (request, params)); @@ -235,9 +235,9 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -272,8 +272,8 @@ module.exports = class oceanex extends Exchange { * @name oceanex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); if (symbols === undefined) { @@ -357,10 +357,10 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -401,9 +401,9 @@ module.exports = class oceanex extends Exchange { * @name oceanex#fetchOrderBooks * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets * @param {[str]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined - * @param {int|undefined} limit max number of entries per orderbook to return, default is undefined - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol + * @param {number|undefined} limit max number of entries per orderbook to return, default is undefined + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol */ await this.loadMarkets (); if (symbols === undefined) { @@ -457,11 +457,11 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -545,7 +545,7 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the oceanex api endpoint + * @param {object} params extra parameters specific to the oceanex api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTimestamp (params); @@ -560,8 +560,8 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ const response = await this.publicGetFeesTrading (params); const data = this.safeValue (response, 'data', []); @@ -609,8 +609,8 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetMembersMe (params); @@ -622,13 +622,13 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -651,9 +651,9 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ let ids = id; if (!Array.isArray (id)) { @@ -685,11 +685,11 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'states': [ 'wait' ], @@ -702,11 +702,11 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'states': [ 'done', 'cancel' ], @@ -719,11 +719,11 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a `symbol` argument'); @@ -776,11 +776,11 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the oceanex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the oceanex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -882,10 +882,10 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by oceanex cancelOrder () - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by oceanex cancelOrder () + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const response = await this.privatePostOrderDelete (this.extend ({ 'id': id }, params)); @@ -899,9 +899,9 @@ module.exports = class oceanex extends Exchange { * @name oceanex#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol not used by oceanex cancelOrders () - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by oceanex cancelOrders () + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const response = await this.privatePostOrderDeleteMulti (this.extend ({ 'ids': ids }, params)); @@ -914,9 +914,9 @@ module.exports = class oceanex extends Exchange { * @method * @name oceanex#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the oceanex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the oceanex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const response = await this.privatePostOrdersClear (params); diff --git a/js/okcoin.js b/js/okcoin.js index 7edd37cdd0ab..931ecc54c0d5 100644 --- a/js/okcoin.js +++ b/js/okcoin.js @@ -786,7 +786,7 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the okcoin api endpoint + * @param {object} params extra parameters specific to the okcoin api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.generalGetTime (params); @@ -804,8 +804,8 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchMarkets * @description retrieves data on all markets for okcoin - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const types = this.safeValue (this.options, 'fetchMarkets'); let result = []; @@ -1104,8 +1104,8 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} an associative dictionary of currencies */ // despite that their docs say these endpoints are public: // https://www.okex.com/api/account/v3/withdrawal/fee @@ -1170,10 +1170,10 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1268,9 +1268,9 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1316,8 +1316,8 @@ module.exports = class okcoin extends Exchange { * @name okcoin#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const defaultType = this.safeString2 (this.options, 'fetchTickers', 'defaultType'); const type = this.safeString (params, 'type', defaultType); @@ -1457,11 +1457,11 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1565,11 +1565,11 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the okcoin api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the okcoin api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1929,8 +1929,8 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType'); const type = this.safeString (params, 'type', defaultType); @@ -2088,13 +2088,13 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2183,10 +2183,10 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -2417,9 +2417,9 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -2617,11 +2617,11 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // '-2': failed, // '-1': cancelled, @@ -2640,11 +2640,11 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // '-2': failed, // '-1': cancelled, @@ -2688,9 +2688,9 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const parts = code.split ('-'); @@ -2720,12 +2720,12 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2818,12 +2818,12 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -2871,11 +2871,11 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -2895,11 +2895,11 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = {}; @@ -3206,11 +3206,11 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ // okex actually returns ledger entries instead of fills here, so each fill in the order // is represented by two trades with opposite buy/sell sides, not one :\ @@ -3314,12 +3314,12 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const request = { // 'instrument_id': market['id'], @@ -3336,9 +3336,9 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3547,8 +3547,8 @@ module.exports = class okcoin extends Exchange { * @name okcoin#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols not used by okcoin fetchPositions - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); let method = undefined; @@ -3623,11 +3623,11 @@ module.exports = class okcoin extends Exchange { * @method * @name okcoin#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the okcoin api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the okcoin api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchLedger', 'defaultType'); diff --git a/js/okx.js b/js/okx.js index dd680f63d5b2..3b065a2855e3 100644 --- a/js/okx.js +++ b/js/okx.js @@ -733,8 +733,8 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.publicGetSystemStatus (params); // @@ -782,7 +782,7 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the okx api endpoint + * @param {object} params extra parameters specific to the okx api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetPublicTime (params); @@ -805,8 +805,8 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ const response = await this.privateGetAccountConfig (params); // @@ -849,8 +849,8 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchMarkets * @description retrieves data on all markets for okx - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const types = this.safeValue (this.options, 'fetchMarkets'); let promises = []; @@ -1085,8 +1085,8 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} an associative dictionary of currencies */ // this endpoint requires authentication // while fetchCurrencies is a public API method by design @@ -1241,10 +1241,10 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1344,9 +1344,9 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1436,8 +1436,8 @@ module.exports = class okx extends Exchange { * @name okx#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const [ type, query ] = this.handleMarketTypeAndParams ('fetchTickers', undefined, params); return await this.fetchTickersByType (type, symbols, query); @@ -1524,11 +1524,11 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1581,13 +1581,13 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the okx api endpoint - * @param {str|undefined} params.price "mark" or "index" for mark price and index price candles - * @param {int|undefined} params.until timestamp in ms of the latest candle to fetch + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the okx api endpoint + * @param {string|undefined} params.price "mark" or "index" for mark price and index price candles + * @param {number|undefined} params.until timestamp in ms of the latest candle to fetch * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1652,11 +1652,11 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchFundingRateHistory() requires a symbol argument'); @@ -1792,9 +1792,9 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1840,8 +1840,8 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchBalance', undefined, params); @@ -1965,15 +1965,15 @@ module.exports = class okx extends Exchange { * @method * @name okx#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the okx api endpoint + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the okx api endpoint * @param {bool|undefined} params.reduceOnly MARGIN orders only, or swap/future orders in net mode * @param {bool|undefined} params.postOnly true to place a post only order - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2156,10 +2156,10 @@ module.exports = class okx extends Exchange { * @method * @name okx#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const stop = this.safeValue (params, 'stop'); if (stop) { @@ -2211,9 +2211,9 @@ module.exports = class okx extends Exchange { * @name okx#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ // TODO : the original endpoint signature differs, according to that you can skip individual symbol and assign ids in batch. At this moment, `params` is not being used too. if (symbol === undefined) { @@ -2485,11 +2485,11 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchOrder * @description fetch an order by the id - * @param {str} id the order id - * @param {str} symbol unified market symbol - * @param {dict} params extra and exchange specific parameters + * @param {string} id the order id + * @param {string} symbol unified market symbol + * @param {object} params extra and exchange specific parameters * @param {bool|undefined} params.stop true if fetching trigger orders, params.ordtype set to "trigger" if true - * @param {str|undefined} params.ordType "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap" + * @param {string|undefined} params.ordType "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap" * @returns [an order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { @@ -2640,15 +2640,15 @@ module.exports = class okx extends Exchange { * @name okx#fetchOpenOrders * @description Fetch orders that are still open * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the okx api endpoint - * @param {int} params.till Timestamp in ms of the latest time to retrieve orders for + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the okx api endpoint + * @param {number} params.till Timestamp in ms of the latest time to retrieve orders for * @param {bool} params.stop True if fetching trigger orders - * @param {str} params.ordType "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap" - * @param {str} params.algoId Algo ID - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} params.ordType "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap" + * @param {string} params.algoId Algo ID + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -2788,11 +2788,11 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -2936,11 +2936,11 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -3017,11 +3017,11 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -3078,12 +3078,12 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const request = { // 'instrument_id': market['id'], @@ -3100,11 +3100,11 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); const options = this.safeValue (this.options, 'fetchLedger', {}); @@ -3435,9 +3435,9 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchDepositAddressesByNetwork * @description fetch a dictionary of addresses for a currency, indexed by network - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} indexed by the network */ await this.loadMarkets (); const currency = this.currency (code); @@ -3477,9 +3477,9 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const rawNetwork = this.safeStringUpper (params, 'network'); const networks = this.safeValue (this.options, 'networks', {}); @@ -3518,12 +3518,12 @@ module.exports = class okx extends Exchange { * @method * @name okx#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -3584,11 +3584,11 @@ module.exports = class okx extends Exchange { * @name okx#fetchDeposits * @description fetch all deposits made to an account * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -3658,10 +3658,10 @@ module.exports = class okx extends Exchange { * @name okx#fetchDeposit * @description fetch data on a currency deposit via the deposit id * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history - * @param {str} id deposit id - * @param {str|undefined} code filter by currency code - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code filter by currency code + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -3684,11 +3684,11 @@ module.exports = class okx extends Exchange { * @name okx#fetchWithdrawals * @description fetch all withdrawals made from an account * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -3750,10 +3750,10 @@ module.exports = class okx extends Exchange { * @name okx#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id * @see https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history - * @param {str} id withdrawal id - * @param {str|undefined} code unified currency code of the currency withdrawn, default is undefined - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string|undefined} code unified currency code of the currency withdrawn, default is undefined + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -3928,9 +3928,9 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchLeverage * @description fetch the set leverage for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [leverage structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-structure} */ await this.loadMarkets (); const marginMode = this.safeStringLower (params, 'mgnMode'); @@ -3966,9 +3966,9 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -4042,8 +4042,8 @@ module.exports = class okx extends Exchange { * @name okx#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); // const defaultType = this.safeString2 (this.options, 'fetchPositions', 'defaultType'); @@ -4246,12 +4246,12 @@ module.exports = class okx extends Exchange { * @method * @name okx#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -4470,9 +4470,9 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -4509,11 +4509,11 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ await this.loadMarkets (); const request = { @@ -4667,10 +4667,10 @@ module.exports = class okx extends Exchange { * @method * @name okx#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setLeverage() requires a symbol argument'); @@ -4716,9 +4716,9 @@ module.exports = class okx extends Exchange { * @name okx#setPositionMode * @description set hedged to true or false for a market * @param {bool} hedged set to true to use long_short_mode, false for net_mode - * @param {str|undefined} symbol not used by okx setPositionMode - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} response from the exchange + * @param {string|undefined} symbol not used by okx setPositionMode + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} response from the exchange */ let hedgeMode = undefined; if (hedged) { @@ -4749,10 +4749,10 @@ module.exports = class okx extends Exchange { * @method * @name okx#setMarginMode * @description set margin mode to 'cross' or 'isolated' - * @param {str} marginMode 'cross' or 'isolated' - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} response from the exchange + * @param {string} marginMode 'cross' or 'isolated' + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setMarginMode() requires a symbol argument'); @@ -4798,8 +4798,8 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchBorrowRates * @description fetch the borrow interest rates of all currencies - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const response = await this.privateGetAccountInterestRate (params); @@ -4838,9 +4838,9 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchBorrowRate * @description fetch the rate of interest to borrow a currency for margin trading - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -4936,10 +4936,10 @@ module.exports = class okx extends Exchange { * @name okx#fetchBorrowRateHistories * @description retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is undefined * @param {[str]|undefined} codes list of unified currency codes, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest borrowRate, default is undefined - * @param {int|undefined} limit max number of borrow rate prices to return, default is undefined - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a dictionary of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} indexed by the market symbol + * @param {number|undefined} since timestamp in ms of the earliest borrowRate, default is undefined + * @param {number|undefined} limit max number of borrow rate prices to return, default is undefined + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a dictionary of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} indexed by the market symbol */ await this.loadMarkets (); const request = { @@ -4978,11 +4978,11 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchBorrowRateHistory * @description retrieves a history of a currencies borrow interest rate at specific time slots - * @param {str} code unified currency code - * @param {int|undefined} since timestamp for the earliest borrow rate - * @param {int|undefined} limit the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} to retrieve - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {string} code unified currency code + * @param {number|undefined} since timestamp for the earliest borrow rate + * @param {number|undefined} limit the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} to retrieve + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -5072,10 +5072,10 @@ module.exports = class okx extends Exchange { * @method * @name okx#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'reduce', params); } @@ -5085,10 +5085,10 @@ module.exports = class okx extends Exchange { * @method * @name okx#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ return await this.modifyMarginHelper (symbol, amount, 'add', params); } @@ -5099,9 +5099,9 @@ module.exports = class okx extends Exchange { * @name okx#fetchMarketLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market * @see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-position-tiers - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [leverage tiers structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -5153,8 +5153,8 @@ module.exports = class okx extends Exchange { /** * @ignore * @method - * @param {dict} info Exchange response for 1 market - * @param {dict} market CCXT market + * @param {object} info Exchange response for 1 market + * @param {object} market CCXT market */ // // [ @@ -5195,13 +5195,13 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchBorrowInterest * @description fetch the interest owed by the user for borrowing currency for margin trading - * @param {str|undefined} code the unified currency code for the currency of the interest - * @param {str|undefined} symbol the market symbol of an isolated margin market, if undefined, the interest for cross margin markets is returned - * @param {int|undefined} since timestamp in ms of the earliest time to receive interest records for - * @param {int|undefined} limit the number of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} to retrieve - * @param {dict} params exchange specific parameters - * @param {int|undefined} params.type Loan type 1 - VIP loans 2 - Market loans *Default is Market loans* - * @returns {[dict]} An list of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} + * @param {string|undefined} code the unified currency code for the currency of the interest + * @param {string|undefined} symbol the market symbol of an isolated margin market, if undefined, the interest for cross margin markets is returned + * @param {number|undefined} since timestamp in ms of the earliest time to receive interest records for + * @param {number|undefined} limit the number of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} to retrieve + * @param {object} params exchange specific parameters + * @param {number|undefined} params.type Loan type 1 - VIP loans 2 - Market loans *Default is Market loans* + * @returns {[object]} An list of [borrow interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-interest-structure} */ await this.loadMarkets (); const request = { @@ -5276,11 +5276,11 @@ module.exports = class okx extends Exchange { * @name okx#borrowMargin * @description create a loan to borrow margin * @see https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay - * @param {str} code unified currency code of the currency to borrow - * @param {float} amount the amount to borrow - * @param {str|undefined} symbol not used by okx.borrowMargin () - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to borrow + * @param {number} amount the amount to borrow + * @param {string|undefined} symbol not used by okx.borrowMargin () + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -5321,11 +5321,11 @@ module.exports = class okx extends Exchange { * @name okx#repayMargin * @description repay borrowed margin and interest * @see https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay - * @param {str} code unified currency code of the currency to repay - * @param {float} amount the amount to repay - * @param {str|undefined} symbol not used by okx.repayMargin () - * @param {dict} params extra parameters specific to the okx api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to repay + * @param {number} amount the amount to repay + * @param {string|undefined} symbol not used by okx.repayMargin () + * @param {object} params extra parameters specific to the okx api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -5389,12 +5389,12 @@ module.exports = class okx extends Exchange { * @method * @name okx#fetchOpenInterestHistory * @description Retrieves the open interest history of a currency - * @param {str} symbol Unified CCXT currency code instead of a unified symbol - * @param {str} timeframe "5m", "1h", or "1d" - * @param {int|undefined} since The time in ms of the earliest record to retrieve as a unix timestamp - * @param {int|undefined} limit Not used by okx, but parsed internally by CCXT - * @param {dict} params Exchange specific parameters - * @param {int|undefined} params.until The time in ms of the latest record to retrieve as a unix timestamp + * @param {string} symbol Unified CCXT currency code instead of a unified symbol + * @param {string} timeframe "5m", "1h", or "1d" + * @param {number|undefined} since The time in ms of the earliest record to retrieve as a unix timestamp + * @param {number|undefined} limit Not used by okx, but parsed internally by CCXT + * @param {object} params Exchange specific parameters + * @param {number|undefined} params.until The time in ms of the latest record to retrieve as a unix timestamp * @returns An array of [open interest structures]{@link https://docs.ccxt.com/en/latest/manual.html#interest-history-structure} */ const options = this.safeValue (this.options, 'fetchOpenInterestHistory', {}); diff --git a/js/paymium.js b/js/paymium.js index 28fd02165348..c0953a82c1ff 100644 --- a/js/paymium.js +++ b/js/paymium.js @@ -133,8 +133,8 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetUser (params); @@ -146,10 +146,10 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -214,9 +214,9 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -275,11 +275,11 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -295,9 +295,9 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const response = await this.privatePostUserAddresses (params); @@ -317,9 +317,9 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const request = { @@ -342,9 +342,9 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#fetchDepositAddresses * @description fetch deposit addresses for multiple currencies and chain types - * @param {[str]|undefined} codes list of unified currency codes, default is undefined - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {dict} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {[string]|undefined} codes list of unified currency codes, default is undefined + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {object} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const response = await this.privateGetUserAddresses (params); @@ -386,13 +386,13 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -417,10 +417,10 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by paymium cancelOrder () - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by paymium cancelOrder () + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'uuid': id, @@ -433,12 +433,12 @@ module.exports = class paymium extends Exchange { * @method * @name paymium#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the paymium api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the paymium api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); diff --git a/js/phemex.js b/js/phemex.js index adeb79c34fa2..441971f37b44 100644 --- a/js/phemex.js +++ b/js/phemex.js @@ -650,8 +650,8 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchMarkets * @description retrieves data on all markets for phemex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const v2Products = await this.publicGetCfgV2Products (params); // @@ -797,8 +797,8 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCfgV2Products (params); // @@ -903,10 +903,10 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1037,11 +1037,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the phemex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the phemex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ const request = { @@ -1169,9 +1169,9 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1234,11 +1234,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1558,8 +1558,8 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'defaultType', 'fetchBalance', 'spot'); @@ -1933,13 +1933,13 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2169,10 +2169,10 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -2200,9 +2200,9 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelAllOrders() requires a symbol argument'); @@ -2227,9 +2227,9 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -2269,11 +2269,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -2301,11 +2301,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -2338,11 +2338,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchClosedOrders() requires a symbol argument'); @@ -2410,11 +2410,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -2516,9 +2516,9 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2564,11 +2564,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -2605,11 +2605,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -2733,8 +2733,8 @@ module.exports = class phemex extends Exchange { * @name phemex#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const defaultSubType = this.safeString (this.options, 'defaultSubType', 'linear'); @@ -2975,11 +2975,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchFundingHistory * @description fetch the history of funding payments paid and received on this account - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch funding history for - * @param {int|undefined} limit the maximum number of funding history structures to retrieve - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch funding history for + * @param {number|undefined} limit the maximum number of funding history structures to retrieve + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-history-structure} */ await this.loadMarkets (); if (symbol === undefined) { @@ -3044,9 +3044,9 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3134,10 +3134,10 @@ module.exports = class phemex extends Exchange { * @name phemex#setMargin * @description Either adds or reduces margin in an isolated position in order to set the margin to a specific value * @see https://github.com/phemex/phemex-api-docs/blob/master/Public-Contract-API-en.md#assign-position-balance-in-isolated-marign-mode - * @param {str} symbol unified market symbol of the market to set margin in - * @param {float} amount the amount to set the margin to - * @param {dict} params parameters specific to the phemex api endpoint - * @returns {dict} A [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol of the market to set margin in + * @param {number} amount the amount to set the margin to + * @param {object} params parameters specific to the phemex api endpoint + * @returns {object} A [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3192,10 +3192,10 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#setMarginMode * @description set margin mode to 'cross' or 'isolated' - * @param {str} marginMode 'cross' or 'isolated' - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} response from the exchange + * @param {string} marginMode 'cross' or 'isolated' + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} response from the exchange */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' setMarginMode() requires a symbol argument'); @@ -3229,8 +3229,8 @@ module.exports = class phemex extends Exchange { * @name phemex#fetchLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetCfgV2Products (params); @@ -3319,8 +3319,8 @@ module.exports = class phemex extends Exchange { parseMarketLeverageTiers (info, market = undefined) { /** - * @param {dict} info Exchange market response for 1 market - * @param {dict} market CCXT market + * @param {object} info Exchange market response for 1 market + * @param {object} market CCXT market */ // // { @@ -3393,10 +3393,10 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} response from the exchange */ // WARNING: THIS WILL INCREASE LIQUIDATION PRICE FOR OPEN ISOLATED LONG POSITIONS // AND DECREASE LIQUIDATION PRICE FOR OPEN ISOLATED SHORT POSITIONS @@ -3420,12 +3420,12 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -3505,11 +3505,11 @@ module.exports = class phemex extends Exchange { * @method * @name phemex#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the phemex api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the phemex api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); if (code === undefined) { diff --git a/js/poloniex.js b/js/poloniex.js index 468dcb2932c2..8b05049698c6 100644 --- a/js/poloniex.js +++ b/js/poloniex.js @@ -284,12 +284,12 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -336,8 +336,8 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchMarkets * @description retrieves data on all markets for poloniex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const markets = await this.publicGetReturnTicker (params); const keys = Object.keys (markets); @@ -420,8 +420,8 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const request = { @@ -443,8 +443,8 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.privatePostReturnFeeInfo (params); @@ -478,10 +478,10 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -502,10 +502,10 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchOrderBooks * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets - * @param {[str]|undefined} symbols not used by poloniex fetchOrderBooks () - * @param {int|undefined} limit max number of entries per orderbook to return, default is undefined - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol + * @param {[string]|undefined} symbols not used by poloniex fetchOrderBooks () + * @param {number|undefined} limit max number of entries per orderbook to return, default is undefined + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol */ await this.loadMarkets (); const request = { @@ -584,9 +584,9 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetReturnTicker (params); @@ -617,8 +617,8 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetReturnCurrencies (params); // @@ -682,9 +682,9 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -824,11 +824,11 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -848,11 +848,11 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -1109,11 +1109,11 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1146,13 +1146,13 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type === 'market') { throw new ExchangeError (this.id + ' createOrder() does not accept market orders'); @@ -1216,10 +1216,10 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1238,9 +1238,9 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1270,10 +1270,10 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchOpenOrder * @description fetch an open order by it's id - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); id = id.toString (); @@ -1312,10 +1312,10 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchClosedOrder * @description fetch an open order by it's id - * @param {str} id order id - * @param {str|undefined} symbol not used by poloniex fetchClosedOrder - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by poloniex fetchClosedOrder + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1379,12 +1379,12 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1399,9 +1399,9 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); // USDT, USDTETH, USDTTRON @@ -1444,9 +1444,9 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const response = await this.privatePostReturnDepositAddresses (params); @@ -1483,12 +1483,12 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1551,12 +1551,12 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1680,11 +1680,11 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const response = await this.fetchTransactionsHelper (code, since, limit, params); @@ -1705,11 +1705,11 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const response = await this.fetchTransactionsHelper (code, since, limit, params); let currency = undefined; @@ -1726,11 +1726,11 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const response = await this.fetchTransactionsHelper (code, since, limit, params); let currency = undefined; @@ -1850,9 +1850,9 @@ module.exports = class poloniex extends Exchange { * @method * @name poloniex#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the poloniex api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the poloniex api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const market = this.market (symbol); diff --git a/js/probit.js b/js/probit.js index 2da8cbf493c4..d8c63c2989d7 100644 --- a/js/probit.js +++ b/js/probit.js @@ -237,8 +237,8 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchMarkets * @description retrieves data on all markets for probit - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarket (params); // @@ -339,8 +339,8 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencyWithPlatform (params); // @@ -483,8 +483,8 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalance (params); @@ -507,10 +507,10 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -538,8 +538,8 @@ module.exports = class probit extends Exchange { * @name probit#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const request = {}; @@ -573,9 +573,9 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -656,11 +656,11 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -708,11 +708,11 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -829,7 +829,7 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the probit api endpoint + * @param {object} params extra parameters specific to the probit api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -881,11 +881,11 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the probit api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the probit api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -972,11 +972,11 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); since = this.parse8601 (since); @@ -996,11 +996,11 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1029,9 +1029,9 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -1137,13 +1137,13 @@ module.exports = class probit extends Exchange { * @method * @name probit#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1226,10 +1226,10 @@ module.exports = class probit extends Exchange { * @method * @name probit#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -1267,9 +1267,9 @@ module.exports = class probit extends Exchange { * @method * @name probit#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1322,8 +1322,8 @@ module.exports = class probit extends Exchange { * @name probit#fetchDepositAddresses * @description fetch deposit addresses for multiple currencies and chain types * @param {[str]|undefined} codes list of unified currency codes, default is undefined - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const request = {}; @@ -1345,12 +1345,12 @@ module.exports = class probit extends Exchange { * @method * @name probit#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the probit api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the probit api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); // In order to use this method @@ -1498,7 +1498,7 @@ module.exports = class probit extends Exchange { * @method * @name probit#signIn * @description sign in, must be called prior to using other authenticated methods - * @param {dict} params extra parameters specific to the probit api endpoint + * @param {object} params extra parameters specific to the probit api endpoint * @returns response from exchange */ this.checkRequiredCredentials (); diff --git a/js/qtrade.js b/js/qtrade.js index d18f4b2a75e0..6332642ccfd0 100644 --- a/js/qtrade.js +++ b/js/qtrade.js @@ -173,8 +173,8 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchMarkets * @description retrieves data on all markets for qtrade - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarkets (params); // @@ -283,8 +283,8 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -398,11 +398,11 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the qtrade api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the qtrade api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -433,10 +433,10 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -542,8 +542,8 @@ module.exports = class qtrade extends Exchange { * @name qtrade#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTickers (params); @@ -586,9 +586,9 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -624,11 +624,11 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -666,11 +666,11 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -801,9 +801,9 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -880,8 +880,8 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalancesAll (params); @@ -908,13 +908,13 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type !== 'limit') { throw new InvalidOrder (this.id + ' createOrder() allows limit orders only'); @@ -1089,10 +1089,10 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by qtrade cancelOrder () - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by qtrade cancelOrder () + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'id': parseInt (id), @@ -1106,9 +1106,9 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by qtrade fetchOrder - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by qtrade fetchOrder + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { 'order_id': id }; @@ -1151,11 +1151,11 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1212,11 +1212,11 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'open': true }; return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); @@ -1227,11 +1227,11 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'open': false }; return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); @@ -1275,9 +1275,9 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1310,10 +1310,10 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchDeposit * @description fetch information on a deposit - * @param {str} id deposit id - * @param {str|undefined} code not used by qtrade fetchDeposit () - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code not used by qtrade fetchDeposit () + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1369,11 +1369,11 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1433,11 +1433,11 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1505,10 +1505,10 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id - * @param {str} id withdrawal id - * @param {str|undefined} code not used by qtrade.fetchWithdrawal - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string|undefined} code not used by qtrade.fetchWithdrawal + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1561,11 +1561,11 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1764,12 +1764,12 @@ module.exports = class qtrade extends Exchange { * @method * @name qtrade#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the qtrade api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the qtrade api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); diff --git a/js/ripio.js b/js/ripio.js index 38050fe28f81..3924c33f0110 100644 --- a/js/ripio.js +++ b/js/ripio.js @@ -149,8 +149,8 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchMarkets * @description retrieves data on all markets for ripio - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetPair (params); // @@ -253,8 +253,8 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrency (params); // @@ -374,9 +374,9 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -413,8 +413,8 @@ module.exports = class ripio extends Exchange { * @name ripio#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetRateAll (params); @@ -454,10 +454,10 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -572,11 +572,11 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -606,8 +606,8 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetPair (params); @@ -679,8 +679,8 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalancesExchangeBalances (params); @@ -705,13 +705,13 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -785,10 +785,10 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -826,9 +826,9 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -866,11 +866,11 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -923,11 +923,11 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'OPEN,PART', @@ -940,11 +940,11 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'CLOS,CANC,COMP', @@ -1090,11 +1090,11 @@ module.exports = class ripio extends Exchange { * @method * @name ripio#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the ripio api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the ripio api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); diff --git a/js/stex.js b/js/stex.js index 128c780b6826..7a4275db88fa 100644 --- a/js/stex.js +++ b/js/stex.js @@ -304,8 +304,8 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -385,8 +385,8 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchMarkets * @description retrieves data on all markets for stex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const request = { 'code': 'ALL', @@ -501,9 +501,9 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -562,7 +562,7 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the stex api endpoint + * @param {object} params extra parameters specific to the stex api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetPing (params); @@ -589,10 +589,10 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -701,9 +701,9 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -782,12 +782,12 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -888,11 +888,11 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -935,9 +935,9 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -986,8 +986,8 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); // await this.loadAccounts (); @@ -1179,13 +1179,13 @@ module.exports = class stex extends Exchange { * @method * @name stex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type === 'market') { throw new ExchangeError (this.id + ' createOrder() allows limit orders only'); @@ -1231,9 +1231,9 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1272,10 +1272,10 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchClosedOrder * @description fetch an open order by it's id - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1330,12 +1330,12 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ const order = await this.fetchClosedOrder (id, symbol, params); return order['trades']; @@ -1346,11 +1346,11 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -1398,10 +1398,10 @@ module.exports = class stex extends Exchange { * @method * @name stex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by stex cancelOrder () - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by stex cancelOrder () + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1473,9 +1473,9 @@ module.exports = class stex extends Exchange { * @method * @name stex#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1504,11 +1504,11 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -1554,9 +1554,9 @@ module.exports = class stex extends Exchange { * @method * @name stex#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1637,9 +1637,9 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const balance = await this.fetchBalance (); @@ -1878,10 +1878,10 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchDeposit * @description fetch information on a deposit - * @param {str} id deposit id - * @param {str|undefined} code not used by stex fetchDeposit () - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code not used by stex fetchDeposit () + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1929,11 +1929,11 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1987,10 +1987,10 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchWithdrawal * @description fetch data on a currency withdrawal via the withdrawal id - * @param {str} id withdrawal id - * @param {str|undefined} code not used by stex.fetchWithdrawal - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id withdrawal id + * @param {string|undefined} code not used by stex.fetchWithdrawal + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -2045,11 +2045,11 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -2114,12 +2114,12 @@ module.exports = class stex extends Exchange { * @method * @name stex#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -2350,12 +2350,12 @@ module.exports = class stex extends Exchange { * @method * @name stex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -2421,9 +2421,9 @@ module.exports = class stex extends Exchange { * @method * @name stex#fetchTransactionFees * @description fetch transaction fees - * @param {[str]|undefined} codes not used by stex fetchTransactionFees () - * @param {dict} params extra parameters specific to the stex api endpoint - * @returns {dict} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {[string]|undefined} codes not used by stex fetchTransactionFees () + * @param {object} params extra parameters specific to the stex api endpoint + * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const response = await this.publicGetCurrencies (params); diff --git a/js/therock.js b/js/therock.js index 9f1e2e1285d2..b98bfc3aceb6 100644 --- a/js/therock.js +++ b/js/therock.js @@ -162,8 +162,8 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchMarkets * @description retrieves data on all markets for therock - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetFunds (params); // @@ -280,8 +280,8 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetBalances (params); @@ -293,10 +293,10 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -357,8 +357,8 @@ module.exports = class therock extends Exchange { * @name therock#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetFundsTickers (params); @@ -380,9 +380,9 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -646,11 +646,11 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); const request = { @@ -896,11 +896,11 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'type': 'withdraw', @@ -913,11 +913,11 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'type': 'atm_payment', @@ -930,11 +930,11 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1028,12 +1028,12 @@ module.exports = class therock extends Exchange { * @method * @name therock#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); await this.loadMarkets (); @@ -1189,11 +1189,11 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'active', @@ -1206,11 +1206,11 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'status': 'executed', @@ -1223,11 +1223,11 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -1279,8 +1279,8 @@ module.exports = class therock extends Exchange { * @name therock#fetchOrder * @description fetches information on an order made by the user * @param {strs} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -1329,13 +1329,13 @@ module.exports = class therock extends Exchange { * @method * @name therock#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); if (type === 'market') { @@ -1357,10 +1357,10 @@ module.exports = class therock extends Exchange { * @method * @name therock#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1376,11 +1376,11 @@ module.exports = class therock extends Exchange { * @method * @name exmo#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents in minutes - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the exmo api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents in minutes + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the exmo api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1448,11 +1448,11 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); @@ -1507,11 +1507,11 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1565,9 +1565,9 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1613,8 +1613,8 @@ module.exports = class therock extends Exchange { * @method * @name therock#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the therock api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the therock api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetFunds (params); diff --git a/js/tidebit.js b/js/tidebit.js index a009efc3f821..9892002c6313 100644 --- a/js/tidebit.js +++ b/js/tidebit.js @@ -167,9 +167,9 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -196,8 +196,8 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#fetchMarkets * @description retrieves data on all markets for tidebit - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarkets (params); // @@ -284,8 +284,8 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetMembersMe (params); @@ -297,10 +297,10 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -363,9 +363,9 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const tickers = await this.publicGetTickers (params); @@ -386,9 +386,9 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -440,11 +440,11 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -481,12 +481,12 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -604,13 +604,13 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -632,10 +632,10 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by tidebit cancelOrder () - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by tidebit cancelOrder () + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -655,12 +655,12 @@ module.exports = class tidebit extends Exchange { * @method * @name tidebit#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the tidebit api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the tidebit api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/tidex.js b/js/tidex.js index efc4ea0b0f04..2d69ebc8f8a8 100644 --- a/js/tidex.js +++ b/js/tidex.js @@ -165,8 +165,8 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.webGetCurrency (params); // @@ -251,8 +251,8 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchMarkets * @description retrieves data on all markets for tidex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetInfo (params); // @@ -364,8 +364,8 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostGetInfoExt (params); @@ -403,10 +403,10 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -430,10 +430,10 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchOrderBooks * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets - * @param {[str]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined - * @param {int|undefined} limit max number of entries per orderbook to return, default is undefined - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol + * @param {[string]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined + * @param {number|undefined} limit max number of entries per orderbook to return, default is undefined + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol */ await this.loadMarkets (); let ids = undefined; @@ -511,9 +511,9 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); let ids = this.ids; @@ -549,9 +549,9 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const tickers = await this.fetchTickers ([ symbol ], params); return tickers[symbol]; @@ -618,11 +618,11 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -647,13 +647,13 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type === 'market') { throw new ExchangeError (this.id + ' createOrder() allows limit orders only'); @@ -712,10 +712,10 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by tidex cancelOrder () - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by tidex cancelOrder () + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -780,9 +780,9 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by tidex fetchOrder - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by tidex fetchOrder + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -800,11 +800,11 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -845,11 +845,11 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -884,12 +884,12 @@ module.exports = class tidex extends Exchange { * @method * @name tidex#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the tidex api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the tidex api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/timex.js b/js/timex.js index 38973a1526a8..afa917cc8df2 100644 --- a/js/timex.js +++ b/js/timex.js @@ -241,8 +241,8 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchMarkets * @description retrieves data on all markets for timex - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarkets (params); // @@ -278,8 +278,8 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCurrencies (params); // @@ -321,8 +321,8 @@ module.exports = class timex extends Exchange { * @name timex#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const period = this.safeString (this.options['fetchTickers'], 'period', '1d'); @@ -355,9 +355,9 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -393,10 +393,10 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -440,11 +440,11 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -488,11 +488,11 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the timex api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the timex api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -555,8 +555,8 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.tradingGetBalances (params); @@ -577,13 +577,13 @@ module.exports = class timex extends Exchange { * @method * @name timex#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -704,10 +704,10 @@ module.exports = class timex extends Exchange { * @method * @name timex#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by timex cancelOrder () - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by timex cancelOrder () + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); return await this.cancelOrders ([ id ], symbol, params); @@ -719,9 +719,9 @@ module.exports = class timex extends Exchange { * @name timex#cancelOrders * @description cancel multiple orders * @param {[str]} ids order ids - * @param {str|undefined} symbol unified market symbol, default is undefined - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, default is undefined + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -760,9 +760,9 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by timex fetchOrder - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by timex fetchOrder + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -812,11 +812,11 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const options = this.safeValue (this.options, 'fetchOpenOrders', {}); @@ -867,11 +867,11 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const options = this.safeValue (this.options, 'fetchClosedOrders', {}); @@ -927,11 +927,11 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const options = this.safeValue (this.options, 'fetchMyTrades', {}); @@ -1007,9 +1007,9 @@ module.exports = class timex extends Exchange { * @method * @name timex#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the timex api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the timex api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); diff --git a/js/upbit.js b/js/upbit.js index 5a58e24c48f8..e4c4a5fb70a0 100644 --- a/js/upbit.js +++ b/js/upbit.js @@ -396,8 +396,8 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchMarkets * @description retrieves data on all markets for upbit - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetMarketAll (params); // @@ -494,8 +494,8 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetAccounts (params); @@ -520,9 +520,9 @@ module.exports = class upbit extends Exchange { * @name upbit#fetchOrderBooks * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets * @param {[str]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined - * @param {int|undefined} limit not used by upbit fetchOrderBooks () - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol + * @param {number|undefined} limit not used by upbit fetchOrderBooks () + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol */ await this.loadMarkets (); let ids = undefined; @@ -592,10 +592,10 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ const orderbooks = await this.fetchOrderBooks ([ symbol ], limit, params); return this.safeValue (orderbooks, symbol); @@ -664,8 +664,8 @@ module.exports = class upbit extends Exchange { * @name upbit#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); let ids = undefined; @@ -726,9 +726,9 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const tickers = await this.fetchTickers ([ symbol ], params); return this.safeValue (tickers, symbol); @@ -811,11 +811,11 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -857,9 +857,9 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchTradingFee * @description fetch the trading fees for a market - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} a [fee structure]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -948,11 +948,11 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the upbit api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the upbit api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1016,13 +1016,13 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type === 'market') { // for market buy it requires the amount of quote currency to spend @@ -1097,10 +1097,10 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by upbit cancelOrder () - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by upbit cancelOrder () + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1134,11 +1134,11 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1178,11 +1178,11 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -1485,11 +1485,11 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByState ('wait', symbol, since, limit, params); } @@ -1499,11 +1499,11 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByState ('done', symbol, since, limit, params); } @@ -1513,11 +1513,11 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ return await this.fetchOrdersByState ('cancel', symbol, since, limit, params); } @@ -1527,9 +1527,9 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by upbit fetchOrder - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by upbit fetchOrder + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1588,8 +1588,8 @@ module.exports = class upbit extends Exchange { * @name upbit#fetchDepositAddresses * @description fetch deposit addresses for multiple currencies and chain types * @param {[str]|undefined} codes list of unified currency codes, default is undefined - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const response = await this.privateGetDepositsCoinAddresses (params); @@ -1642,9 +1642,9 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1666,9 +1666,9 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1704,12 +1704,12 @@ module.exports = class upbit extends Exchange { * @method * @name upbit#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the upbit api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the upbit api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/wavesexchange.js b/js/wavesexchange.js index 5bf1781a336a..b2c6f36b607d 100644 --- a/js/wavesexchange.js +++ b/js/wavesexchange.js @@ -476,8 +476,8 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchMarkets * @description retrieves data on all markets for wavesexchange - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.marketGetTickers (); // @@ -576,10 +576,10 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -708,7 +708,7 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#signIn * @description sign in, must be called prior to using other authenticated methods - * @param {dict} params extra parameters specific to the wavesexchange api endpoint + * @param {object} params extra parameters specific to the wavesexchange api endpoint * @returns response from exchange */ if (!this.safeString (this.options, 'accessToken')) { @@ -807,9 +807,9 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -851,8 +851,8 @@ module.exports = class wavesexchange extends Exchange { * @name wavesexchange#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the aax api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the aax api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.publicGetPairs (params); @@ -888,11 +888,11 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the wavesexchange api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the wavesexchange api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1011,9 +1011,9 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.signIn (); const networks = this.safeValue (this.options, 'networks', {}); @@ -1239,13 +1239,13 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ this.checkRequiredDependencies (); this.checkRequiredKeys (); @@ -1400,10 +1400,10 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ this.checkRequiredDependencies (); this.checkRequiredKeys (); @@ -1449,9 +1449,9 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ this.checkRequiredDependencies (); this.checkRequiredKeys (); @@ -1483,11 +1483,11 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ this.checkRequiredDependencies (); this.checkRequiredKeys (); @@ -1536,11 +1536,11 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.signIn (); @@ -1562,11 +1562,11 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.signIn (); @@ -1753,8 +1753,8 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ // makes a lot of different requests to get all the data // in particular: @@ -1904,11 +1904,11 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const address = await this.getWavesAddress (); @@ -1997,11 +1997,11 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -2200,12 +2200,12 @@ module.exports = class wavesexchange extends Exchange { * @method * @name wavesexchange#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the wavesexchange api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the wavesexchange api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); // currently only works for BTC and WAVES diff --git a/js/wazirx.js b/js/wazirx.js index fe43e622f23f..59c1b54816ef 100644 --- a/js/wazirx.js +++ b/js/wazirx.js @@ -138,8 +138,8 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#fetchMarkets * @description retrieves data on all markets for wazirx - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetExchangeInfo (params); // @@ -252,10 +252,10 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -288,9 +288,9 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -322,8 +322,8 @@ module.exports = class wazirx extends Exchange { * @name wazirx#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const tickers = await this.publicGetTickers24hr (); @@ -359,11 +359,11 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -430,8 +430,8 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.publicGetSystemStatus (params); // @@ -455,7 +455,7 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the wazirx api endpoint + * @param {object} params extra parameters specific to the wazirx api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetTime (params); @@ -537,8 +537,8 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privateGetFunds (params); @@ -559,11 +559,11 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a `symbol` argument'); @@ -617,11 +617,11 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -667,9 +667,9 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelAllOrders() requires a `symbol` argument'); @@ -687,10 +687,10 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a `symbol` argument'); @@ -710,13 +710,13 @@ module.exports = class wazirx extends Exchange { * @method * @name wazirx#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the wazirx api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the wazirx api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ type = type.toLowerCase (); if ((type !== 'limit') && (type !== 'stop_limit')) { diff --git a/js/whitebit.js b/js/whitebit.js index de5bf48bfa23..adf4042a028a 100644 --- a/js/whitebit.js +++ b/js/whitebit.js @@ -242,8 +242,8 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchMarkets * @description retrieves data on all markets for whitebit - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.v2PublicGetMarkets (params); // @@ -340,8 +340,8 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.v4PublicGetAssets (params); // @@ -400,8 +400,8 @@ module.exports = class whitebit extends Exchange { * @name whitebit#fetchTransactionFees * @description fetch transaction fees * @param {[str]|undefined} codes not used by fetchTransactionFees () - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} */ await this.loadMarkets (); const response = await this.v4PublicGetFee (params); @@ -454,8 +454,8 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ const response = await this.v4PublicGetAssets (params); // @@ -501,9 +501,9 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -592,8 +592,8 @@ module.exports = class whitebit extends Exchange { * @name whitebit#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.v4PublicGetTicker (params); @@ -625,10 +625,10 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -667,11 +667,11 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -699,11 +699,11 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); let market = undefined; @@ -854,11 +854,11 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the whitebit api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the whitebit api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -925,8 +925,8 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchStatus * @description the latest known information on the availability of the exchange API - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} a [status structure]{@link https://docs.ccxt.com/en/latest/manual.html#exchange-status-structure} */ const response = await this.v4PublicGetPing (params); // @@ -949,7 +949,7 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the whitebit api endpoint + * @param {object} params extra parameters specific to the whitebit api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.v4PublicGetTime (params); @@ -966,13 +966,13 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ let method = undefined; await this.loadMarkets (); @@ -1041,10 +1041,10 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -1078,8 +1078,8 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.v4PrivatePostTradeAccountBalance (params); @@ -1097,11 +1097,11 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -1143,11 +1143,11 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -1302,12 +1302,12 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = { @@ -1350,9 +1350,9 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1423,10 +1423,10 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} response from the exchange */ await this.loadMarkets (); if (symbol !== undefined) { @@ -1449,12 +1449,12 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1512,12 +1512,12 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const currency = this.currency (code); // check if it has canDeposit @@ -1640,10 +1640,10 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchDeposit * @description fetch information on a deposit - * @param {str} id deposit id - * @param {str|undefined} code not used by whitebit fetchDeposit () - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} id deposit id + * @param {string|undefined} code not used by whitebit fetchDeposit () + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; @@ -1705,11 +1705,11 @@ module.exports = class whitebit extends Exchange { * @method * @name whitebit#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the whitebit api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the whitebit api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); let currency = undefined; diff --git a/js/woo.js b/js/woo.js index c14aa52477d8..63faf4457025 100644 --- a/js/woo.js +++ b/js/woo.js @@ -251,8 +251,8 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchMarkets * @description retrieves data on all markets for woo - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.v1PublicGetInfo (params); // @@ -359,11 +359,11 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchTrades() requires a symbol argument'); @@ -491,8 +491,8 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.v1PrivateGetClientInfo (params); @@ -540,8 +540,8 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} an associative dictionary of currencies */ const result = {}; const tokenResponse = await this.v1PublicGetToken (params); @@ -671,13 +671,13 @@ module.exports = class woo extends Exchange { * @method * @name woo#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -737,10 +737,10 @@ module.exports = class woo extends Exchange { * @method * @name woo#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -779,9 +779,9 @@ module.exports = class woo extends Exchange { * @method * @name woo#cancelAllOrders * @description cancel all open orders in a market - * @param {str|undefined} symbol unified market symbol - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' canelOrders() requires a symbol argument'); @@ -806,9 +806,9 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = (symbol !== undefined) ? this.market (symbol) : undefined; @@ -866,11 +866,11 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -994,10 +994,10 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1034,11 +1034,11 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the woo api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the woo api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1102,12 +1102,12 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchOrderTrades * @description fetch all the trades made from a single order - * @param {str} id order id - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades to retrieve - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} id order id + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades to retrieve + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); let market = undefined; @@ -1145,11 +1145,11 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -1194,8 +1194,8 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ const response = await this.v1PrivateGetSubAccountAssets (params); // @@ -1241,8 +1241,8 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.v2PrivateGetClientHolding (params); @@ -1294,9 +1294,9 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ // this method is TODO because of networks unification await this.loadMarkets (); @@ -1388,11 +1388,11 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ const [ currency, rows ] = await this.getAssetHistoryRows (code, since, limit, params); return this.parseLedger (rows, currency, since, limit, params); @@ -1455,11 +1455,11 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'token_side': 'DEPOSIT', @@ -1472,11 +1472,11 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'token_side': 'WITHDRAW', @@ -1489,11 +1489,11 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchTransactions * @description fetch history of deposits and withdrawals - * @param {str|undefined} code unified currency code for the currency of the transactions, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest transaction, default is undefined - * @param {int|undefined} limit max number of transactions to return, default is undefined - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code for the currency of the transactions, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest transaction, default is undefined + * @param {number|undefined} limit max number of transactions to return, default is undefined + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ const request = { 'type': 'BALANCE', @@ -1562,12 +1562,12 @@ module.exports = class woo extends Exchange { * @method * @name woo#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1600,11 +1600,11 @@ module.exports = class woo extends Exchange { * @method * @name woo#fetchTransfers * @description fetch a history of internal transfers made on an account - * @param {str|undefined} code unified currency code of the currency transferred - * @param {int|undefined} since the earliest time in ms to fetch transfers for - * @param {int|undefined} limit the maximum number of transfers structures to retrieve - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {[dict]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string|undefined} code unified currency code of the currency transferred + * @param {number|undefined} since the earliest time in ms to fetch transfers for + * @param {number|undefined} limit the maximum number of transfers structures to retrieve + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {[object]} a list of [transfer structures]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ const request = { 'type': 'COLLATERAL', @@ -1693,11 +1693,11 @@ module.exports = class woo extends Exchange { * @name woo#repayMargin * @description repay borrowed margin and interest * @see https://docs.woo.org/#repay-interest - * @param {str} code unified currency code of the currency to repay - * @param {float} amount the amount to repay - * @param {str|undefined} symbol not used by woo.repayMargin () - * @param {dict} params extra parameters specific to the woo api endpoint - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to repay + * @param {number} amount the amount to repay + * @param {string|undefined} symbol not used by woo.repayMargin () + * @param {object} params extra parameters specific to the woo api endpoint + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); let market = undefined; diff --git a/js/xena.js b/js/xena.js index 64773ab912e2..4b93b2ecb4a0 100644 --- a/js/xena.js +++ b/js/xena.js @@ -189,7 +189,7 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchTime * @description fetches the current integer timestamp in milliseconds from the exchange server - * @param {dict} params extra parameters specific to the xena api endpoint + * @param {object} params extra parameters specific to the xena api endpoint * @returns {int} the current integer timestamp in milliseconds from the exchange server */ const response = await this.publicGetMarketDataV2ServerTime (params); @@ -208,8 +208,8 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchMarkets * @description retrieves data on all markets for xena - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetCommonInstruments (params); // @@ -390,8 +390,8 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.publicGetCommonCurrencies (params); // @@ -509,9 +509,9 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const tickers = await this.fetchTickers (undefined, params); @@ -527,8 +527,8 @@ module.exports = class xena extends Exchange { * @name xena#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const tickers = await this.publicGetMarketDataMarketWatch (params); @@ -561,10 +561,10 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -614,8 +614,8 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchAccounts * @description fetch all the accounts associated with a profile - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/en/latest/manual.html#account-structure} indexed by the account type */ const response = await this.privateGetTradingAccounts (params); // @@ -704,8 +704,8 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -821,11 +821,11 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -935,11 +935,11 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the xena api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the xena api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -981,11 +981,11 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1121,13 +1121,13 @@ module.exports = class xena extends Exchange { * @method * @name xena#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1276,10 +1276,10 @@ module.exports = class xena extends Exchange { * @method * @name xena#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -1333,9 +1333,9 @@ module.exports = class xena extends Exchange { * @method * @name xena#cancelAllOrders * @description cancel all open orders - * @param {str|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1374,11 +1374,11 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1425,11 +1425,11 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1485,9 +1485,9 @@ module.exports = class xena extends Exchange { * @method * @name xena#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1521,9 +1521,9 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1615,11 +1615,11 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsByType ('withdrawals', code, since, limit, params); } @@ -1629,11 +1629,11 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ return await this.fetchTransactionsByType ('deposits', code, since, limit, params); } @@ -1737,12 +1737,12 @@ module.exports = class xena extends Exchange { * @method * @name xena#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); @@ -1844,11 +1844,11 @@ module.exports = class xena extends Exchange { * @method * @name xena#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ await this.loadMarkets (); await this.loadAccounts (); @@ -1908,8 +1908,8 @@ module.exports = class xena extends Exchange { * @name xena#fetchLeverageTiers * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the xena api endpoint - * @returns {dict} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols + * @param {object} params extra parameters specific to the xena api endpoint + * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/en/latest/manual.html#leverage-tiers-structure}, indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetCommonInstruments (params); @@ -1993,8 +1993,8 @@ module.exports = class xena extends Exchange { /** * @ignore * @method - * @param {dict} info Exchange market response for 1 market - * @param {dict} market CCXT market + * @param {object} info Exchange market response for 1 market + * @param {object} market CCXT market */ // // { diff --git a/js/yobit.js b/js/yobit.js index 1c062c9dbf1b..1388d6af4ac6 100644 --- a/js/yobit.js +++ b/js/yobit.js @@ -296,8 +296,8 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostGetInfo (params); @@ -334,8 +334,8 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchMarkets * @description retrieves data on all markets for yobit - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.publicGetInfo (params); // @@ -430,10 +430,10 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -457,10 +457,10 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchOrderBooks * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets - * @param {[str]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined - * @param {int|undefined} limit max number of entries per orderbook to return, default is undefined - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol + * @param {[string]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined + * @param {number|undefined} limit max number of entries per orderbook to return, default is undefined + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbol */ await this.loadMarkets (); let ids = undefined; @@ -538,9 +538,9 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); let ids = this.ids; @@ -577,9 +577,9 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ const tickers = await this.fetchTickers ([ symbol ], params); return tickers[symbol]; @@ -669,11 +669,11 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -712,8 +712,8 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchTradingFees * @description fetch the trading fees for multiple markets - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/en/latest/manual.html#fee-structure} indexed by market symbols */ await this.loadMarkets (); const response = await this.publicGetInfo (params); @@ -764,13 +764,13 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (type === 'market') { throw new ExchangeError (this.id + ' createOrder() allows limit orders only'); @@ -814,10 +814,10 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by yobit cancelOrder () - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by yobit cancelOrder () + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -965,9 +965,9 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchOrder * @description fetches information on an order made by the user - * @param {str|undefined} symbol not used by yobit fetchOrder - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by yobit fetchOrder + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = { @@ -1000,11 +1000,11 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -1049,11 +1049,11 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchMyTrades * @description fetch all trades made by the user - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a `symbol` argument'); @@ -1112,9 +1112,9 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#createDepositAddress * @description create a currency deposit address - * @param {str} code unified currency code of the currency for the deposit address - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code of the currency for the deposit address + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ const request = { 'need_new': 1, @@ -1135,9 +1135,9 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1162,12 +1162,12 @@ module.exports = class yobit extends Exchange { * @method * @name yobit#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the yobit api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the yobit api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/zaif.js b/js/zaif.js index 2665b0ddf99a..946ed475eb15 100644 --- a/js/zaif.js +++ b/js/zaif.js @@ -151,8 +151,8 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#fetchMarkets * @description retrieves data on all markets for zaif - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const markets = await this.publicGetCurrencyPairsAll (params); // @@ -272,8 +272,8 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the zaif api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the zaif api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.privatePostGetInfo (params); @@ -285,10 +285,10 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the zaif api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the zaif api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -346,9 +346,9 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the zaif api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the zaif api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -413,11 +413,11 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the zaif api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the zaif api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -452,13 +452,13 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the zaif api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the zaif api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); if (type !== 'limit') { @@ -483,10 +483,10 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str|undefined} symbol not used by zaif cancelOrder () - * @param {dict} params extra parameters specific to the zaif api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string|undefined} symbol not used by zaif cancelOrder () + * @param {object} params extra parameters specific to the zaif api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const request = { 'order_id': id, @@ -543,11 +543,11 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the zaif api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the zaif api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -568,11 +568,11 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str|undefined} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the zaif api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the zaif api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); let market = undefined; @@ -599,12 +599,12 @@ module.exports = class zaif extends Exchange { * @method * @name zaif#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the zaif api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the zaif api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address); diff --git a/js/zb.js b/js/zb.js index 7b2a51cb9bbd..8658f060c14f 100644 --- a/js/zb.js +++ b/js/zb.js @@ -546,8 +546,8 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchMarkets * @description retrieves data on all markets for zb - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ // // { @@ -698,8 +698,8 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchCurrencies * @description fetches all available currencies on an exchange - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} an associative dictionary of currencies + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} an associative dictionary of currencies */ const response = await this.spotV1PublicGetGetFeeInfo (params); // @@ -941,8 +941,8 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('fetchBalance', undefined, params); @@ -1221,9 +1221,9 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1253,10 +1253,10 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -1332,8 +1332,8 @@ module.exports = class zb extends Exchange { * @name zb#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.spotV1PublicGetAllTicker (params); @@ -1363,9 +1363,9 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1521,11 +1521,11 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the zb api endpoint + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the zb api endpoint * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); @@ -1714,11 +1714,11 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchTrades() requires a symbol argument'); @@ -1799,13 +1799,13 @@ module.exports = class zb extends Exchange { * @method * @name zb#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1955,10 +1955,10 @@ module.exports = class zb extends Exchange { * @method * @name zb#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); @@ -2005,9 +2005,9 @@ module.exports = class zb extends Exchange { * @method * @name zb#cancelAllOrders * @description cancel all open orders in a market - * @param {str} symbol unified market symbol of the market to cancel orders in - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market to cancel orders in + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' cancelAllOrders() requires a symbol argument'); @@ -2036,9 +2036,9 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchOrder * @description fetches information on an order made by the user - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); @@ -2174,11 +2174,11 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchOrders * @description fetches information on multiple orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrders() requires a symbol argument'); @@ -2335,11 +2335,11 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchCanceledOrders * @description fetches information on multiple canceled orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since timestamp in ms of the earliest order, default is undefined - * @param {int|undefined} limit max number of orders to return, default is undefined - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since timestamp in ms of the earliest order, default is undefined + * @param {number|undefined} limit max number of orders to return, default is undefined + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchCanceledOrders() requires a symbol argument'); @@ -2495,11 +2495,11 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchClosedOrders * @description fetches information on multiple closed orders made by the user - * @param {str} symbol unified market symbol of the market orders were made in - * @param {int|undefined} since the earliest time in ms to fetch orders for - * @param {int|undefined} limit the maximum number of orde structures to retrieve - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol of the market orders were made in + * @param {number|undefined} since the earliest time in ms to fetch orders for + * @param {number|undefined} limit the maximum number of orde structures to retrieve + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchClosedOrders() requires a symbol argument'); @@ -2613,11 +2613,11 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); @@ -3079,10 +3079,10 @@ module.exports = class zb extends Exchange { * @method * @name zb#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} response from the exchange */ await this.loadMarkets (); if (symbol === undefined) { @@ -3111,12 +3111,12 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchFundingRateHistory * @description fetches historical funding rate prices - * @param {str|undefined} symbol unified symbol of the market to fetch the funding rate history for - * @param {int|undefined} since timestamp in ms of the earliest funding rate to fetch - * @param {int|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch - * @param {dict} params extra parameters specific to the zb api endpoint - * @param {int|undefined} params.until timestamp in ms of the latest funding rate to fetch - * @returns {[dict]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} + * @param {string|undefined} symbol unified symbol of the market to fetch the funding rate history for + * @param {number|undefined} since timestamp in ms of the earliest funding rate to fetch + * @param {number|undefined} limit the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} to fetch + * @param {object} params extra parameters specific to the zb api endpoint + * @param {number|undefined} params.until timestamp in ms of the latest funding rate to fetch + * @returns {[object]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure} */ await this.loadMarkets (); const request = { @@ -3179,9 +3179,9 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchFundingRate * @description fetch the current funding rate - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rate-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -3257,8 +3257,8 @@ module.exports = class zb extends Exchange { * @name zb#fetchFundingRates * @description fetch the funding rate for multiple markets * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/en/latest/manual.html#funding-rates-structure}, indexe by market symbols */ await this.loadMarkets (); const response = await this.contractV2PublicGetPremiumIndex (params); @@ -3287,12 +3287,12 @@ module.exports = class zb extends Exchange { * @method * @name zb#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); const password = this.safeString (params, 'safePwd', this.password); @@ -3340,11 +3340,11 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchWithdrawals * @description fetch all withdrawals made from an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch withdrawals for - * @param {int|undefined} limit the maximum number of withdrawals structures to retrieve - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch withdrawals for + * @param {number|undefined} limit the maximum number of withdrawals structures to retrieve + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -3398,11 +3398,11 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchDeposits * @description fetch all deposits made to an account - * @param {str|undefined} code unified currency code - * @param {int|undefined} since the earliest time in ms to fetch deposits for - * @param {int|undefined} limit the maximum number of deposits structures to retrieve - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {[dict]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string|undefined} code unified currency code + * @param {number|undefined} since the earliest time in ms to fetch deposits for + * @param {number|undefined} limit the maximum number of deposits structures to retrieve + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {[object]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ await this.loadMarkets (); const request = { @@ -3458,9 +3458,9 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchPosition * @description fetch data on a single open contract trade position - * @param {str} symbol unified market symbol of the market the position is held in, default is undefined - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {string} symbol unified market symbol of the market the position is held in, default is undefined + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); let market = undefined; @@ -3534,8 +3534,8 @@ module.exports = class zb extends Exchange { * @name zb#fetchPositions * @description fetch all open positions * @param {[str]|undefined} symbols list of unified market symbols - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {[dict]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {[object]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ await this.loadMarkets (); const request = { @@ -3789,11 +3789,11 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ if (code === undefined) { throw new ArgumentsRequired (this.id + ' fetchLedger() requires a code argument'); @@ -3850,12 +3850,12 @@ module.exports = class zb extends Exchange { * @method * @name zb#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const [ marketType, query ] = this.handleMarketTypeAndParams ('transfer', undefined, params); @@ -4025,10 +4025,10 @@ module.exports = class zb extends Exchange { * @method * @name zb#addMargin * @description add margin - * @param {str} symbol unified market symbol - * @param {float} amount amount of margin to add - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount amount of margin to add + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#add-margin-structure} */ if (params['positionsId'] === undefined) { throw new ArgumentsRequired (this.id + ' addMargin() requires a positionsId argument in the params'); @@ -4041,10 +4041,10 @@ module.exports = class zb extends Exchange { * @method * @name zb#reduceMargin * @description remove margin from a position - * @param {str} symbol unified market symbol - * @param {float} amount the amount of margin to remove - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} + * @param {string} symbol unified market symbol + * @param {number} amount the amount of margin to remove + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [margin structure]{@link https://docs.ccxt.com/en/latest/manual.html#reduce-margin-structure} */ if (params['positionsId'] === undefined) { throw new ArgumentsRequired (this.id + ' reduceMargin() requires a positionsId argument in the params'); @@ -4057,9 +4057,9 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchBorrowRate * @description fetch the rate of interest to borrow a currency for margin trading - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -4102,8 +4102,8 @@ module.exports = class zb extends Exchange { * @method * @name zb#fetchBorrowRates * @description fetch the borrow interest rates of all currencies - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/en/latest/manual.html#borrow-rate-structure} */ if (params['coin'] === undefined) { throw new ArgumentsRequired (this.id + ' fetchBorrowRates() requires a coin argument in the params'); @@ -4153,10 +4153,10 @@ module.exports = class zb extends Exchange { * @method * @name zb#setLeverage * @description set the level of leverage for a market - * @param {float} leverage the rate of leverage - * @param {str} symbol unified market symbol - * @param {dict} params extra parameters specific to the zb api endpoint - * @returns {dict} response from the exchange + * @param {number} leverage the rate of leverage + * @param {string} symbol unified market symbol + * @param {object} params extra parameters specific to the zb api endpoint + * @returns {object} response from the exchange */ await this.loadMarkets (); if (symbol === undefined) { @@ -4203,12 +4203,12 @@ module.exports = class zb extends Exchange { * @method * @name zb#borrowMargin * @description create a loan to borrow margin - * @param {str} code unified currency code of the currency to borrow - * @param {float} amount the amount to borrow - * @param {str|undefined} symbol unified market symbol, required for isolated margin - * @param {dict} params extra parameters specific to the zb api endpoint - * @param {str} params.safePwd transaction password, extra parameter required for cross margin - * @returns {dict} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} + * @param {string} code unified currency code of the currency to borrow + * @param {number} amount the amount to borrow + * @param {string|undefined} symbol unified market symbol, required for isolated margin + * @param {object} params extra parameters specific to the zb api endpoint + * @param {string} params.safePwd transaction password, extra parameter required for cross margin + * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/en/latest/manual.html#margin-loan-structure} */ await this.loadMarkets (); let market = undefined; diff --git a/js/zonda.js b/js/zonda.js index 7632d5cb52a0..519b8e1939a3 100644 --- a/js/zonda.js +++ b/js/zonda.js @@ -288,8 +288,8 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchMarkets * @description retrieves data on all markets for zonda - * @param {dict} params extra parameters specific to the exchange api endpoint - * @returns {[dict]} an array of objects representing market data + * @param {object} params extra parameters specific to the exchange api endpoint + * @returns {[object]} an array of objects representing market data */ const response = await this.v1_01PublicGetTradingTicker (params); const fiatCurrencies = this.safeValue (this.options, 'fiatCurrencies', []); @@ -390,11 +390,11 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchOpenOrders * @description fetch all unfilled currently open orders - * @param {str|undefined} symbol not used by zonda fetchOpenOrders - * @param {int|undefined} since the earliest time in ms to fetch open orders for - * @param {int|undefined} limit the maximum number of open orders structures to retrieve - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {[dict]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string|undefined} symbol not used by zonda fetchOpenOrders + * @param {number|undefined} since the earliest time in ms to fetch open orders for + * @param {number|undefined} limit the maximum number of open orders structures to retrieve + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {[object]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const request = {}; @@ -458,11 +458,11 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchMyTrades * @description fetch all trades made by the user - * @param {str|undefined} symbol unified market symbol - * @param {int|undefined} since the earliest time in ms to fetch trades for - * @param {int|undefined} limit the maximum number of trades structures to retrieve - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} + * @param {string|undefined} symbol unified market symbol + * @param {number|undefined} since the earliest time in ms to fetch trades for + * @param {number|undefined} limit the maximum number of trades structures to retrieve + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure} */ await this.loadMarkets (); const request = {}; @@ -523,8 +523,8 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure} */ await this.loadMarkets (); const response = await this.v1_01PrivateGetBalancesBITBAYBalance (params); @@ -536,10 +536,10 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data - * @param {str} symbol unified symbol of the market to fetch the order book for - * @param {int|undefined} limit the maximum amount of order book entries to return - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols + * @param {string} symbol unified symbol of the market to fetch the order book for + * @param {number|undefined} limit the maximum amount of order book entries to return + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols */ await this.loadMarkets (); const market = this.market (symbol); @@ -623,9 +623,9 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market - * @param {str} symbol unified symbol of the market to fetch the ticker for - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {string} symbol unified symbol of the market to fetch the ticker for + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -654,9 +654,9 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchTickers * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market - * @param {[str]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} + * @param {[string]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure} */ await this.loadMarkets (); const response = await this.v1_01PublicGetTradingStats (params); @@ -683,11 +683,11 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchLedger * @description fetch the history of changes, actions done by the user or operations that altered balance of the user - * @param {str|undefined} code unified currency code, default is undefined - * @param {int|undefined} since timestamp in ms of the earliest ledger entry, default is undefined - * @param {int|undefined} limit max number of ledger entrys to return, default is undefined - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} + * @param {string|undefined} code unified currency code, default is undefined + * @param {number|undefined} since timestamp in ms of the earliest ledger entry, default is undefined + * @param {number|undefined} limit max number of ledger entrys to return, default is undefined + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure} */ const balanceCurrencies = []; if (code !== undefined) { @@ -1066,12 +1066,12 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchOHLCV * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market - * @param {str} symbol unified symbol of the market to fetch OHLCV data for - * @param {str} timeframe the length of time each candle represents - * @param {int|undefined} since timestamp in ms of the earliest candle to fetch - * @param {int|undefined} limit the maximum amount of candles to fetch - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {[[int]]} A list of candles ordered as timestamp, open, high, low, close, volume + * @param {string} symbol unified symbol of the market to fetch OHLCV data for + * @param {string} timeframe the length of time each candle represents + * @param {number|undefined} since timestamp in ms of the earliest candle to fetch + * @param {number|undefined} limit the maximum amount of candles to fetch + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {[[number]]} A list of candles ordered as timestamp, open, high, low, close, volume */ await this.loadMarkets (); const market = this.market (symbol); @@ -1192,11 +1192,11 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchTrades * @description get the list of most recent trades for a particular symbol - * @param {str} symbol unified symbol of the market to fetch trades for - * @param {int|undefined} since timestamp in ms of the earliest trade to fetch - * @param {int|undefined} limit the maximum amount of trades to fetch - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {[dict]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} + * @param {string} symbol unified symbol of the market to fetch trades for + * @param {number|undefined} since timestamp in ms of the earliest trade to fetch + * @param {number|undefined} limit the maximum amount of trades to fetch + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1220,13 +1220,13 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#createOrder * @description create a trade order - * @param {str} symbol unified symbol of the market to create an order in - * @param {str} type 'market' or 'limit' - * @param {str} side 'buy' or 'sell' - * @param {float} amount how much of currency you want to trade in units of base currency - * @param {float|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} symbol unified symbol of the market to create an order in + * @param {string} type 'market' or 'limit' + * @param {string} side 'buy' or 'sell' + * @param {number} amount how much of currency you want to trade in units of base currency + * @param {number|undefined} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ await this.loadMarkets (); const market = this.market (symbol); @@ -1346,10 +1346,10 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#cancelOrder * @description cancels an open order - * @param {str} id order id - * @param {str} symbol unified symbol of the market the order was made in - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} + * @param {string} id order id + * @param {string} symbol unified symbol of the market the order was made in + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure} */ const side = this.safeString (params, 'side'); if (side === undefined) { @@ -1409,10 +1409,10 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchDepositAddress * @description fetch the deposit address for a currency associated with this account - * @param {str} code unified currency code - * @param {dict} params extra parameters specific to the zonda api endpoint - * @param {str|undefined} params.walletId Wallet id to filter deposit adresses. - * @returns {dict} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {string} code unified currency code + * @param {object} params extra parameters specific to the zonda api endpoint + * @param {string|undefined} params.walletId Wallet id to filter deposit adresses. + * @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1443,9 +1443,9 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#fetchDepositAddresses * @description fetch deposit addresses for multiple currencies and chain types - * @param {[str]|undefined} codes zonda does not support filtering filtering by multiple codes and will ignore this parameter. - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} + * @param {[string]|undefined} codes zonda does not support filtering filtering by multiple codes and will ignore this parameter. + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} a list of [address structures]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} */ await this.loadMarkets (); const response = await this.v1_01PrivateGetApiPaymentsDepositsCryptoAddresses (params); @@ -1471,12 +1471,12 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#transfer * @description transfer currency internally between wallets on the same account - * @param {str} code unified currency code - * @param {float} amount amount to transfer - * @param {str} fromAccount account to transfer from - * @param {str} toAccount account to transfer to - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} + * @param {string} code unified currency code + * @param {number} amount amount to transfer + * @param {string} fromAccount account to transfer from + * @param {string} toAccount account to transfer to + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/en/latest/manual.html#transfer-structure} */ await this.loadMarkets (); const currency = this.currency (code); @@ -1585,12 +1585,12 @@ module.exports = class zonda extends Exchange { * @method * @name zonda#withdraw * @description make a withdrawal - * @param {str} code unified currency code - * @param {float} amount the amount to withdraw - * @param {str} address the address to withdraw to - * @param {str|undefined} tag - * @param {dict} params extra parameters specific to the zonda api endpoint - * @returns {dict} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} + * @param {string} code unified currency code + * @param {number} amount the amount to withdraw + * @param {string} address the address to withdraw to + * @param {string|undefined} tag + * @param {object} params extra parameters specific to the zonda api endpoint + * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure} */ [ tag, params ] = this.handleWithdrawTagAndParams (tag, params); this.checkAddress (address);