Skip to content

Commit

Permalink
Adjust to call the param 'price': 'index'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan-krm committed Jan 26, 2022
1 parent d8fdabf commit afee2f2
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions js/aax.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,33 +897,10 @@ module.exports = class aax extends Exchange {
}

async fetchIndexOHLCV (symbol, timeframe = '1h', since = undefined, limit = undefined, params = {}) {
await this.loadMarkets ();
const market = this.market (symbol);
const request = {
'symbol': market['id'],
'timeFrame': this.timeframes[timeframe],
'price': 'index',
};
const response = await this.publicGetMarketIndexCandles (this.extend (request, params));
//
// {
// c: '36592.81000000',
// e: 'BTCUSDT_INDEX@1h_candles',
// h: '36669.29000000',
// l: '36555.28000000',
// o: '36555.83000000',
// s: '1643148000',
// t: '1643148978',
// v: '0.00000000'
// }
//
return [
this.safeTimestamp (response, 't'),
this.safeNumber (response, 'o'),
this.safeNumber (response, 'h'),
this.safeNumber (response, 'l'),
this.safeNumber (response, 'c'),
this.safeNumber (response, 'v'),
];
return await this.fetchOHLCV (symbol, timeframe, since, limit, this.extend (request, params));
}

async fetchBalance (params = {}) {
Expand Down

0 comments on commit afee2f2

Please sign in to comment.