Skip to content

Commit d9fb5de

Browse files
authored
Added backadjustment parameter to session.js (#245)
2 parents f096176 + fc02292 commit d9fb5de

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/chart/session.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = (client) => class ChartSession {
331331
* @param {number} [options.range] Number of loaded periods/candles (Default: 100)
332332
* @param {number} [options.to] Last candle timestamp (Default is now)
333333
* @param {'splits' | 'dividends'} [options.adjustment] Market adjustment
334+
* @param {boolean} [options.backadjustment] Market backadjustment of futures contracts
334335
* @param {'regular' | 'extended'} [options.session] Chart session
335336
* @param {'EUR' | 'USD' | string} [options.currency] Chart currency
336337
* @param {ChartType} [options.type] Chart custom type
@@ -350,6 +351,7 @@ module.exports = (client) => class ChartSession {
350351
adjustment: options.adjustment || 'splits',
351352
};
352353

354+
if (options.backadjustment) symbolInit.backadjustment = 'default';
353355
if (options.session) symbolInit.session = options.session;
354356
if (options.currency) symbolInit['currency-id'] = options.currency;
355357

0 commit comments

Comments
 (0)