Skip to content

Commit f5e8393

Browse files
Svetozar KorytiakSvetozar Korytiak
authored andcommitted
Added backadjustment parameter to session.js, this will allow to define if futures contracts should be backadjusted in terms of roll yield or not
1 parent 693f205 commit f5e8393

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)