@barchart/marketdata-api-js
Advanced tools
Comparing version 5.14.0 to 5.14.1
@@ -5,4 +5,4 @@ module.exports = (() => { | ||
return { | ||
version: '5.14.0' | ||
version: '5.14.1' | ||
}; | ||
})(); |
@@ -9,16 +9,9 @@ const AssetClass = require('./../../data/AssetClass'); | ||
/* | ||
// This is a listing of futures option roots which do not use the | ||
// same default formatting rules, as specified in the UnitCode | ||
// class. The desired formatting rules can be viewed on the CME | ||
// website. | ||
const regex = { }; | ||
const futures = { }; | ||
regex.ZB = /^BB\d$/; | ||
regex.ZT = /^BT\d$/; | ||
regex.ZF = /^BF\d$/; | ||
regex.ZN = /^BN\d$/; | ||
futures["ZB"] = [ 'ZB', 'BB1', 'BB3', 'BB5', 'BB8' ]; // T-Bond, includes weekly and wednesday options | ||
futures["ZT"] = [ 'ZT', 'BT1', 'BT3', 'BT5', 'BT8' ]; // 2-year note, includes weekly and wednesday options | ||
futures["ZF"] = [ 'ZF', 'BF1', 'BF3', 'BF5', 'BF8' ]; // 5-year note, includes weekly and wednesday options | ||
futures["ZN"] = [ 'ZN', 'BN1', 'BN3', 'BN5', 'BN8' ]; // 10-year note, includes weekly and wednesday options | ||
*/ | ||
/** | ||
@@ -48,3 +41,3 @@ * An implementation of {@link Callbacks.CustomPriceFormatterCallback} which can be | ||
if (root === 'ZB' || root === 'BB1' || root === 'BB3' || root === 'BB5' || root === 'BB8' || root === 'ZN' || root === 'BN1' || root === 'BN3' || root === 'BN5' || root === 'BN8') { | ||
if (root === 'ZB' || root === 'ZN' || regex.ZB.test(root) || regex.ZN.test(root)) { | ||
return formatFraction(value, 64, 2, '-', false); | ||
@@ -61,3 +54,3 @@ } | ||
if (root === 'ZT' || root === 'BT1' || root === 'BT3' || root === 'BT5' || root === 'BT8' || root === 'ZF' || root === 'BF1' || root === 'BF3' || root === 'BF5' || root === 'BF8') { | ||
if (root === 'ZT' || root === 'ZF' || regex.ZT.test(root) || regex.ZF.test(root)) { | ||
return formatFraction(value, 640, 3, '-', false); | ||
@@ -64,0 +57,0 @@ } |
{ | ||
"name": "@barchart/marketdata-api-js", | ||
"version": "5.14.0", | ||
"version": "5.14.1", | ||
"description": "SDK for streaming market data from Barchart.com", | ||
@@ -5,0 +5,0 @@ "author": { |
246288
7803