@@ -2059,9 +2059,9 @@ module.exports = (() => {
20592059 };
20602060 }
20612061 /**
2062- * This class is the **central component of the SDK**. It is responsible for connecting to
2063- * Barchart's servers, maintaining market data subscriptions, and maintaining market
2064- * state. The SDK consumer should use one instance at a time.
2062+ * The **central component of the SDK**. It is responsible for connecting to Barchart's
2063+ * servers, managing market data subscriptions, and maintaining market state. The
2064+ * SDK consumer should use one instance at a time.
20652065 *
20662066 * @public
20672067 * @exported
@@ -4942,7 +4942,7 @@ module.exports = (() => {
49424942 'use strict';
49434943
49444944 return {
4945- version: '5.0.1 '
4945+ version: '5.0.2 '
49464946 };
49474947})();
49484948
@@ -6563,7 +6563,7 @@ module.exports = (() => {
65636563 types.futures.options.long = /^([A-Z][A-Z0-9\$\-!\.]{0,2})([A-Z])([0-9]{1,4})\|(\-?[0-9]{1,5})(C|P)$/i;
65646564 types.futures.options.historical = /^([A-Z][A-Z0-9\$\-!\.]{0,2})([A-Z])([0-9]{2})([0-9]{1,5})(C|P)$/i;
65656565 types.equities = {};
6566- types.equities.options = /^([A-Z\$][A-Z\.\ -]{0,})([0-9]?)\|([[0-9]{4})([[0-9]{2})([[0-9]{2})\|([0-9]+\.[0-9]+)[P|W]?(C|P)/i;
6566+ types.equities.options = /^([A-Z\$][A-Z\-]{0,})([0-9]?)(\.[A-Z]{2})? \|([[0-9]{4})([[0-9]{2})([[0-9]{2})\|([0-9]+\.[0-9]+)[P|W]?(C|P)/i;
65676567 types.indicies = {};
65686568 types.indicies.external = /^\$(.*)$/i;
65696569 types.indicies.sector = /^\-(.*)$/i;
@@ -6627,15 +6627,16 @@ module.exports = (() => {
66276627 const match = symbol.match(types.equities.options);
66286628
66296629 if (match !== null) {
6630+ const suffix = typeof match[3] !== 'undefined' ? match[3] : '';
66306631 definition = {};
66316632 definition.symbol = symbol;
66326633 definition.type = 'equity_option';
6633- definition.option_type = match[7 ] === 'C' ? 'call' : 'put';
6634- definition.strike = parseFloat(match[6 ]);
6635- definition.root = match[1];
6636- definition.month = parseInt(match[4 ]);
6637- definition.day = parseInt(match[5 ]);
6638- definition.year = parseInt(match[3 ]);
6634+ definition.option_type = match[8 ] === 'C' ? 'call' : 'put';
6635+ definition.strike = parseFloat(match[7 ]);
6636+ definition.root = `${ match[1]}${suffix}` ;
6637+ definition.month = parseInt(match[5 ]);
6638+ definition.day = parseInt(match[6 ]);
6639+ definition.year = parseInt(match[4 ]);
66396640 definition.adjusted = match[2] !== '';
66406641 }
66416642
0 commit comments