diff --git a/js/ftx.js b/js/ftx.js index 3dfd478fb3e1..b958835b9216 100644 --- a/js/ftx.js +++ b/js/ftx.js @@ -712,7 +712,6 @@ module.exports = class ftx extends Exchange { request['limit'] = limit; request['end_time'] = this.sum (request['start_time'], limit * this.parseTimeframe (timeframe)); } - let response = {}; let method = 'publicGetMarketsMarketNameCandles'; if (price === 'index') { if (symbol in this.markets) { @@ -720,7 +719,7 @@ module.exports = class ftx extends Exchange { } method = 'publicGetIndexesMarketNameCandles'; } - response = await this[method] (this.extend (request, params)); + const response = await this[method] (this.extend (request, params)); // // { // "success": true, @@ -752,7 +751,7 @@ module.exports = class ftx extends Exchange { async fetchIndexOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { const request = { - 'index': true, + 'price': 'index', }; return await this.fetchOHLCV (symbol, timeframe, since, limit, this.extend (request, params)); }