Skip to content

Commit 0ee23c5

Browse files
BryanBryan
authored andcommitted
Release. Bump version number
1 parent 493e0e2 commit 0ee23c5

File tree

5 files changed

+67
-12
lines changed

5 files changed

+67
-12
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 5.4.0</small>
1+
# Barchart Market Data SDK <small>JavaScript 5.5.0</small>
22

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

example/browser/example.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ module.exports = (() => {
417417
const C3 = ['AL79MRM1.C3', 'BSP9WGQ1.C3', 'RA10BGM1.C3'];
418418
const C3_OLD = ['C3:AL79MRM1', 'C3:BSP9WGQ1', 'C3:RA10BGM1'];
419419
const CMDTY = ['EUJU0Q51.CS', 'BC5L09YB.CS', 'EI3E06EI.CS', 'EI3E06EJ.CS'];
420-
const PLATTS = ['PLATTS:RD52017', 'PLATTS:RD5MA17', 'PLATTS:RD52018'];
420+
const PLATTS = ['PLATTS:AAWAB00', 'AAWAB00.PT', 'PLATTS:AAXVA00', 'AAXVA00.PT', 'PLATTS:CBAAF00', 'CBAAF00.PT'];
421421
const AG = ['ZCPAIA.CM', 'ZCPAIL.CM', 'ZCPAIN.CM', 'ZCPAKS.CM', 'ZCPAMI.CM'];
422422
const BOTH = ['ESZ19', 'ESZ9'];
423423
$(document).ready(function () {
@@ -1987,7 +1987,7 @@ module.exports = (() => {
19871987

19881988

19891989
function getIsSnapshotSymbol(symbol) {
1990-
return SymbolParser.getIsPlatts(symbol) || SymbolParser.getIsCmdty(symbol);
1990+
return SymbolParser.getIsCmdty(symbol);
19911991
}
19921992
/**
19931993
* Indicates if some profile information cannot be extracted from JERQ via
@@ -5048,7 +5048,7 @@ module.exports = (() => {
50485048
'use strict';
50495049

50505050
return {
5051-
version: '5.4.0'
5051+
version: '5.5.0'
50525052
};
50535053
})();
50545054

@@ -6847,7 +6847,7 @@ module.exports = (() => {
68476847

68486848

68496849
static getIsPlatts(symbol) {
6850-
return is.string(symbol) && types.platts.test(symbol);
6850+
return is.string(symbol) && (types.platts.concrete.test(symbol) || types.platts.alias.test(symbol));
68516851
}
68526852
/**
68536853
* Returns a simple instrument definition containing information which
@@ -7002,7 +7002,9 @@ module.exports = (() => {
70027002
types.indicies = {};
70037003
types.indicies.external = /^\$(.*)$/i;
70047004
types.indicies.sector = /^\-(.*)$/i;
7005-
types.platts = /^(PLATTS:)(.*)$/i;
7005+
types.platts = {};
7006+
types.platts.alias = /^(PLATTS:)(.*)$/i;
7007+
types.platts.concrete = /^(.*)(\.PT)$/i;
70067008
const parsers = [];
70077009
parsers.push(symbol => {
70087010
let definition = null;
@@ -7183,6 +7185,15 @@ module.exports = (() => {
71837185

71847186
return converted;
71857187
});
7188+
converters.push(symbol => {
7189+
let converted = null;
7190+
7191+
if (types.platts.alias.test(symbol)) {
7192+
converted = symbol.replace(types.platts.alias, '$2.PT');
7193+
}
7194+
7195+
return converted;
7196+
});
71867197
converters.push(symbol => {
71877198
return symbol;
71887199
});

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: '5.4.0'
5+
version: '5.5.0'
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": "5.4.0",
3+
"version": "5.5.0",
44
"description": "SDK for streaming market data from Barchart.com",
55
"author": {
66
"name": "Eero Pikat",

test/dist/barchart-marketdata-api-tests-5.js

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2780,7 +2780,7 @@ module.exports = (() => {
27802780

27812781

27822782
static getIsPlatts(symbol) {
2783-
return is.string(symbol) && types.platts.test(symbol);
2783+
return is.string(symbol) && (types.platts.concrete.test(symbol) || types.platts.alias.test(symbol));
27842784
}
27852785
/**
27862786
* Returns a simple instrument definition containing information which
@@ -2935,7 +2935,9 @@ module.exports = (() => {
29352935
types.indicies = {};
29362936
types.indicies.external = /^\$(.*)$/i;
29372937
types.indicies.sector = /^\-(.*)$/i;
2938-
types.platts = /^(PLATTS:)(.*)$/i;
2938+
types.platts = {};
2939+
types.platts.alias = /^(PLATTS:)(.*)$/i;
2940+
types.platts.concrete = /^(.*)(\.PT)$/i;
29392941
const parsers = [];
29402942
parsers.push(symbol => {
29412943
let definition = null;
@@ -3116,6 +3118,15 @@ module.exports = (() => {
31163118

31173119
return converted;
31183120
});
3121+
converters.push(symbol => {
3122+
let converted = null;
3123+
3124+
if (types.platts.alias.test(symbol)) {
3125+
converted = symbol.replace(types.platts.alias, '$2.PT');
3126+
}
3127+
3128+
return converted;
3129+
});
31193130
converters.push(symbol => {
31203131
return symbol;
31213132
});
@@ -17093,6 +17104,9 @@ describe('When checking to see if a symbol is a future', () => {
1709317104
it('the symbol "PLATTS:AAVSV00" should return false', () => {
1709417105
expect(SymbolParser.getIsFuture('PLATTS:AAVSV00')).toEqual(false);
1709517106
});
17107+
it('the symbol "AAVSV00.PT" should return false', () => {
17108+
expect(SymbolParser.getIsFuture('AAVSV00.PT')).toEqual(false);
17109+
});
1709617110
it('the symbol "ZCPAUS.CM" should return false', () => {
1709717111
expect(SymbolParser.getIsFuture('ZCPAUS.CM')).toEqual(false);
1709817112
});
@@ -17216,6 +17230,9 @@ describe('When checking to see if a symbol is sector', () => {
1721617230
it('the symbol "PLATTS:AAVSV00" should return false', () => {
1721717231
expect(SymbolParser.getIsSector('PLATTS:AAVSV00')).toEqual(false);
1721817232
});
17233+
it('the symbol "AAVSV00.PT" should return false', () => {
17234+
expect(SymbolParser.getIsSector('AAVSV00.PT')).toEqual(false);
17235+
});
1721917236
it('the symbol "ZCPAUS.CM" should return false', () => {
1722017237
expect(SymbolParser.getIsSector('ZCPAUS.CM')).toEqual(false);
1722117238
});
@@ -17302,6 +17319,9 @@ describe('When checking to see if a symbol is forex', () => {
1730217319
it('the symbol "PLATTS:AAVSV00" should return false', () => {
1730317320
expect(SymbolParser.getIsForex('PLATTS:AAVSV00')).toEqual(false);
1730417321
});
17322+
it('the symbol "AAVSV00.PT" should return false', () => {
17323+
expect(SymbolParser.getIsForex('AAVSV00.PT')).toEqual(false);
17324+
});
1730517325
it('the symbol "ZCPAUS.CM" should return false', () => {
1730617326
expect(SymbolParser.getIsForex('ZCPAUS.CM')).toEqual(false);
1730717327
});
@@ -17388,6 +17408,9 @@ describe('When checking to see if a symbol is a future spread', () => {
1738817408
it('the symbol "PLATTS:AAVSV00" should return false', () => {
1738917409
expect(SymbolParser.getIsFutureSpread('PLATTS:AAVSV00')).toEqual(false);
1739017410
});
17411+
it('the symbol "AAVSV00.PT" should return false', () => {
17412+
expect(SymbolParser.getIsFutureSpread('AAVSV00.PT')).toEqual(false);
17413+
});
1739117414
it('the symbol "ZCPAUS.CM" should return false', () => {
1739217415
expect(SymbolParser.getIsFutureSpread('ZCPAUS.CM')).toEqual(false);
1739317416
});
@@ -17474,6 +17497,9 @@ describe('When checking to see if a symbol is a future option', () => {
1747417497
it('the symbol "PLATTS:AAVSV00" should return false', () => {
1747517498
expect(SymbolParser.getIsFutureOption('PLATTS:AAVSV00')).toEqual(false);
1747617499
});
17500+
it('the symbol "AAVSV00.PT" should return false', () => {
17501+
expect(SymbolParser.getIsFutureOption('AAVSV00.PT')).toEqual(false);
17502+
});
1747717503
it('the symbol "ZCPAUS.CM" should return false', () => {
1747817504
expect(SymbolParser.getIsFutureOption('ZCPAUS.CM')).toEqual(false);
1747917505
});
@@ -17560,6 +17586,9 @@ describe('When checking to see if a symbol is a cmdty index option', () => {
1756017586
it('the symbol "PLATTS:AAVSV00" should return false', () => {
1756117587
expect(SymbolParser.getIsCmdty('PLATTS:AAVSV00')).toEqual(false);
1756217588
});
17589+
it('the symbol "AAVSV00.PT" should return false', () => {
17590+
expect(SymbolParser.getIsCmdty('AAVSV00.PT')).toEqual(false);
17591+
});
1756317592
it('the symbol "ZCPAUS.CM" should return true', () => {
1756417593
expect(SymbolParser.getIsCmdty('ZCPAUS.CM')).toEqual(true);
1756517594
});
@@ -17646,6 +17675,9 @@ describe('When checking to see if a symbol is a equity option', () => {
1764617675
it('the symbol "PLATTS:AAVSV00" should return false', () => {
1764717676
expect(SymbolParser.getIsEquityOption('PLATTS:AAVSV00')).toEqual(false);
1764817677
});
17678+
it('the symbol "AAVSV00.PT" should return false', () => {
17679+
expect(SymbolParser.getIsEquityOption('AAVSV00.PT')).toEqual(false);
17680+
});
1764917681
it('the symbol "ZCPAUS.CM" should return false', () => {
1765017682
expect(SymbolParser.getIsEquityOption('ZCPAUS.CM')).toEqual(false);
1765117683
});
@@ -17732,6 +17764,9 @@ describe('When checking to see if a symbol is a C3 instrument', () => {
1773217764
it('the symbol "PLATTS:AAVSV00" should return false', () => {
1773317765
expect(SymbolParser.getIsC3('PLATTS:AAVSV00')).toEqual(false);
1773417766
});
17767+
it('the symbol "AAVSV00.PT" should return false', () => {
17768+
expect(SymbolParser.getIsC3('AAVSV00.PT')).toEqual(false);
17769+
});
1773517770
it('the symbol "ZCPAUS.CM" should return false', () => {
1773617771
expect(SymbolParser.getIsC3('ZCPAUS.CM')).toEqual(false);
1773717772
});
@@ -17812,6 +17847,9 @@ describe('When checking to see if a symbol is a Platts instrument', () => {
1781217847
it('the symbol "PLATTS:AAVSV00" should return true', () => {
1781317848
expect(SymbolParser.getIsPlatts('PLATTS:AAVSV00')).toEqual(true);
1781417849
});
17850+
it('the symbol "AAVSV00.PT" should return true', () => {
17851+
expect(SymbolParser.getIsPlatts('AAVSV00.PT')).toEqual(true);
17852+
});
1781517853
it('the symbol "ZCPAUS.CM" should return false', () => {
1781617854
expect(SymbolParser.getIsPlatts('ZCPAUS.CM')).toEqual(false);
1781717855
});
@@ -17892,6 +17930,9 @@ describe('When checking to see if a symbol is a Canadian mutual fund', () => {
1789217930
it('the symbol "PLATTS:AAVSV00" should return false', () => {
1789317931
expect(SymbolParser.getIsCanadianFund('PLATTS:AAVSV00')).toEqual(false);
1789417932
});
17933+
it('the symbol "AAVSV00.PT" should return false', () => {
17934+
expect(SymbolParser.getIsCanadianFund('AAVSV00.PT')).toEqual(false);
17935+
});
1789517936
it('the symbol "ZCPAUS.CM" should return false', () => {
1789617937
expect(SymbolParser.getIsCanadianFund('ZCPAUS.CM')).toEqual(false);
1789717938
});
@@ -17976,8 +18017,11 @@ describe('When getting a producer symbol', () => {
1797618017
it('BZ6N20|25P should map to BZ6N20|25P', () => {
1797718018
expect(SymbolParser.getProducerSymbol('BZ6N20|25P')).toEqual('BZ6N0|25P');
1797818019
});
17979-
it('PLATTS:AAVSV00 should map to PLATTS:AAVSV00', () => {
17980-
expect(SymbolParser.getProducerSymbol('PLATTS:AAVSV00')).toEqual('PLATTS:AAVSV00');
18020+
it('PLATTS:AAVSV00 should map to AAVSV00.PT', () => {
18021+
expect(SymbolParser.getProducerSymbol('PLATTS:AAVSV00')).toEqual('AAVSV00.PT');
18022+
});
18023+
it('AAVSV00.PT should map to AAVSV00.PT', () => {
18024+
expect(SymbolParser.getProducerSymbol('AAVSV00.PT')).toEqual('AAVSV00.PT');
1798118025
});
1798218026
it('VIC400.CF should map to VIC400.CF', () => {
1798318027
expect(SymbolParser.getProducerSymbol('VIC400.CF')).toEqual('VIC400.CF');

0 commit comments

Comments
 (0)