@barchart/marketdata-api-js
Advanced tools
Comparing version 3.1.50 to 3.1.51
{ | ||
"name": "barchart-marketdata-api", | ||
"version": "3.1.50", | ||
"version": "3.1.51", | ||
"homepage": "https://github.com/barchart/marketdata-api-js", | ||
@@ -5,0 +5,0 @@ "description": "Barchart Market Data API for JavaScript", |
@@ -143,2 +143,4 @@ const version = require('./../../../lib/index').version; | ||
symbols = C3; | ||
} else if (symbol === '#CSTATS') { | ||
symbols = CSTATS; | ||
} else { | ||
@@ -368,2 +370,3 @@ symbols = [ symbol ]; | ||
const C3 = [ 'C3:AL79MRM1', 'C3:BSP9WGQ1', 'C3:RA10BGM1' ]; | ||
const CSTATS = [ 'BLS-LIQUOR-PRICE-USA-12011.CM', 'BLS-BEVALCOHO-PRICE-USA-12010.CM', 'BLS-LIQUOR-PRICE-USA-12012.CM' ]; | ||
@@ -370,0 +373,0 @@ $(document).ready(function() { |
@@ -26,2 +26,10 @@ module.exports = (() => { | ||
/** | ||
* Returns the unique items from an array, where the unique | ||
* key is determined via a strict equality check. | ||
* | ||
* @static | ||
* @param {Array} a | ||
* @returns {Array} | ||
*/ | ||
unique(array) { | ||
@@ -28,0 +36,0 @@ const arrayToFilter = array || [ ]; |
@@ -20,4 +20,4 @@ const connection = require('./connection/index'), | ||
version: '3.1.50' | ||
version: '3.1.51' | ||
}; | ||
})(); |
@@ -202,3 +202,12 @@ const xhr = require('xhr'); | ||
function retrieveSnapshotsUsingGetCmdtyStats(symbols, username, password) { | ||
return Promise.all(symbols.map((symbol) => retrieveSnapshotUsingGetCmdtyStats(symbol, username, password))); | ||
return Promise.all(symbols.map((symbol) => { | ||
return retrieveSnapshotUsingGetCmdtyStats(symbol, username, password) | ||
.catch(() => { | ||
console.log(`Snapshots: Out-of-bank request failed for [ ${symbol} ]`); | ||
return null; | ||
}); | ||
})).then((messages) => { | ||
return messages.filter((message) => message !== null); | ||
}); | ||
} | ||
@@ -205,0 +214,0 @@ |
{ | ||
"name": "@barchart/marketdata-api-js", | ||
"version": "3.1.50", | ||
"version": "3.1.51", | ||
"description": "Barchart client library for streaming market data from JERQ servers using JavaScript", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is too big to display
516153
15082