Skip to content

Commit b0ddb69

Browse files
committed
Release. Bump version number
1 parent 4e7bac1 commit b0ddb69

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

docs/_coverpage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Barchart Market Data SDK <small>JavaScript 4.0.24</small>
1+
# Barchart Market Data SDK <small>JavaScript 4.0.25</small>
22

33
> Inject real-time market data into your JavaScript applications
44

example/browser/example.js

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ module.exports = (() => {
7676

7777
var handleEvents = function (data) {
7878
if (data.event) {
79-
debugger;
8079
var event = data.event;
8180

8281
if (event === 'login success') {
@@ -4943,7 +4942,7 @@ module.exports = (() => {
49434942
'use strict';
49444943

49454944
return {
4946-
version: '4.0.24'
4945+
version: '4.0.25'
49474946
};
49484947
})();
49494948

@@ -6442,6 +6441,8 @@ module.exports = (() => {
64426441
types.futures.options.short = /^([A-Z][A-Z0-9\$\-!\.]?)([A-Z])([0-9]{1,4})([A-Z])$/i;
64436442
types.futures.options.long = /^([A-Z][A-Z0-9\$\-!\.]{0,2})([A-Z])([0-9]{1,4})\|(\-?[0-9]{1,5})(C|P)$/i;
64446443
types.futures.options.historical = /^([A-Z][A-Z0-9\$\-!\.]{0,2})([A-Z])([0-9]{2})([0-9]{1,5})(C|P)$/i;
6444+
types.equities = {};
6445+
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;
64456446
types.indicies = {};
64466447
types.indicies.external = /^\$(.*)$/i;
64476448
types.indicies.sector = /^\-(.*)$/i;
@@ -6500,6 +6501,25 @@ module.exports = (() => {
65006501

65016502
return definition;
65026503
});
6504+
parsers.push(symbol => {
6505+
let definition = null;
6506+
const match = symbol.match(types.equities.options);
6507+
6508+
if (match !== null) {
6509+
definition = {};
6510+
definition.symbol = symbol;
6511+
definition.type = 'equity_option';
6512+
definition.option_type = match[7] === 'C' ? 'call' : 'put';
6513+
definition.strike = parseFloat(match[6]);
6514+
definition.root = match[1];
6515+
definition.month = parseInt(match[4]);
6516+
definition.day = parseInt(match[5]);
6517+
definition.year = parseInt(match[3]);
6518+
definition.adjusted = match[2] !== '';
6519+
}
6520+
6521+
return definition;
6522+
});
65036523
parsers.push(symbol => {
65046524
let definition = null;
65056525

@@ -6870,6 +6890,20 @@ module.exports = (() => {
68706890
static getIsBats(symbol) {
68716891
return is.string(symbol) && predicates.bats.test(symbol);
68726892
}
6893+
/**
6894+
* Returns true if the symbol represents an option on an equity or index; false
6895+
* otherwise.
6896+
*
6897+
* @public
6898+
* @static
6899+
* @param {String} symbol
6900+
* @returns {Boolean}
6901+
*/
6902+
6903+
6904+
static getIsEquityOption(symbol) {
6905+
return is.string(symbol) && types.equities.options.test(symbol);
6906+
}
68736907
/**
68746908
* Returns true if the symbol has an expiration and the symbol appears
68756909
* to be expired (e.g. a future for a past year).

lib/meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module.exports = (() => {
22
'use strict';
33

44
return {
5-
version: '4.0.24'
5+
version: '4.0.25'
66
};
77
})();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@barchart/marketdata-api-js",
3-
"version": "4.0.24",
3+
"version": "4.0.25",
44
"description": "SDK for streaming market data from Barchart.com",
55
"author": {
66
"name": "Eero Pikat",

0 commit comments

Comments
 (0)