Skip to content

Commit

Permalink
Added backadjustment parameter to session.js (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu2301 authored Sep 22, 2024
2 parents f096176 + fc02292 commit d9fb5de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/chart/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ module.exports = (client) => class ChartSession {
* @param {number} [options.range] Number of loaded periods/candles (Default: 100)
* @param {number} [options.to] Last candle timestamp (Default is now)
* @param {'splits' | 'dividends'} [options.adjustment] Market adjustment
* @param {boolean} [options.backadjustment] Market backadjustment of futures contracts
* @param {'regular' | 'extended'} [options.session] Chart session
* @param {'EUR' | 'USD' | string} [options.currency] Chart currency
* @param {ChartType} [options.type] Chart custom type
Expand All @@ -350,6 +351,7 @@ module.exports = (client) => class ChartSession {
adjustment: options.adjustment || 'splits',
};

if (options.backadjustment) symbolInit.backadjustment = 'default';
if (options.session) symbolInit.session = options.session;
if (options.currency) symbolInit['currency-id'] = options.currency;

Expand Down

0 comments on commit d9fb5de

Please sign in to comment.