Skip to content

Commit b2a9550

Browse files
BryanBryan
authored andcommitted
Release. Bump version number
1 parent eee7363 commit b2a9550

File tree

5 files changed

+17684
-20
lines changed

5 files changed

+17684
-20
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.0.3</small>
1+
# Barchart Market Data SDK <small>JavaScript 5.1.0</small>
22

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

example/browser/example.js

Lines changed: 70 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4121,6 +4121,7 @@ module.exports = (() => {
41214121
q.askSize = undefined;
41224122

41234123
if (q.settlementPrice) {
4124+
q.previousSettlementPrice = q.settlementPrice;
41244125
q.previousPrice = q.settlementPrice;
41254126
q.settlementPrice = undefined;
41264127
} else if (q.lastPrice) {
@@ -4278,6 +4279,11 @@ module.exports = (() => {
42784279
q.numberOfTrades = message.numberOfTrades;
42794280
q.previousPrice = message.previousPrice;
42804281
q.settlementPrice = message.settlementPrice;
4282+
4283+
if (message.previousSettlementPrice) {
4284+
q.previousSettlementPrice = message.previousSettlementPrice;
4285+
}
4286+
42814287
q.openPrice = message.openPrice;
42824288
q.highPrice = message.highPrice;
42834289
q.lowPrice = message.lowPrice;
@@ -4799,87 +4805,118 @@ module.exports = (() => {
47994805
/**
48004806
* @property {string} symbol - Symbol of the quoted instrument.
48014807
* @public
4808+
* @readonly
48024809
*/
48034810
this.symbol = symbol || null;
4811+
/**
4812+
* @property {Profile|null} profile - Metadata regarding the quoted instrument.
4813+
* @public
4814+
* @readonly
4815+
*/
4816+
4817+
this.profile = null;
48044818
/**
48054819
* @property {string} message - Most recent DDF message to cause a this instance to mutate.
48064820
* @public
4821+
* @readonly
48074822
*/
48084823

48094824
this.message = null;
48104825
/**
48114826
* @property {string|undefined} flag - Market status, will have one of three values: "p", "s", or undefined.
48124827
* @public
4828+
* @readonly
48134829
*/
48144830

48154831
this.flag = null;
48164832
/**
48174833
* @property {string} - One of two values, "I" or "R" -- indicating delayed or realtime data, respectively.
4818-
* @type {null}
4834+
* @public
4835+
* @readonly
48194836
*/
48204837

48214838
this.mode = null;
48224839
/**
48234840
* @property {string} day - One character code indicating the day of the month of the current trading session.
48244841
* @public
4842+
* @readonly
48254843
*/
48264844

48274845
this.day = null;
48284846
/**
48294847
* @property {number} dayNum - Day of the month of the current trading session.
48304848
* @public
4849+
* @readonly
48314850
*/
48324851

48334852
this.dayNum = 0;
48344853
/**
48354854
* @property {string|null} session
48364855
* @public
4856+
* @readonly
48374857
*/
48384858

48394859
this.session = null;
48404860
/**
4841-
* @property {Date|null} lastUpdate - The most recent refresh date. Caution should be used. This date was created from hours, minutes, and seconds without regard for the current machine's timezone. As such, it is only safe to read time-related values (e.g. ```Date.getHours```, ```Date.getMinutes```, etc). Do not attempt to compare. Do not attempt to convert.
4861+
* @property {Date|null} lastUpdate - The most recent refresh date. Caution should be used. This date was created from hours, minutes, and seconds without regard for the client computer's timezone. As such, it is only safe to read time-related values (e.g. ```Date.getHours```, ```Date.getMinutes```, etc). Do not attempt to compare. Do not attempt to convert.
48424862
* @public
4863+
* @readonly
48434864
*/
48444865

48454866
this.lastUpdate = null;
48464867
/**
4847-
* @property {Date|null} lastUpdate - The most recent refresh date.
4868+
* @property {Date|null} time - A timezone-aware version of {@link Quote#lastUpdate}. This property will only have a value when both (a) the exchange timezone is known; and (b) the client computer's timezone is known.
4869+
* @public
4870+
* @readonly
48484871
*/
48494872

48504873
this.lastUpdateUtc = null;
48514874
/**
4852-
* @property {number} bidPrice - top-of-book price on the buy side.
4875+
* @property {number} bidPrice - The top-of-book price on the buy side.
4876+
* @public
4877+
* @readonly
48534878
*/
48544879

48554880
this.bidPrice = null;
48564881
/**
4857-
* @property {number} bidSize - top-of-book quantity on the buy side.
4882+
* @property {number} bidSize - The top-of-book quantity on the buy side.
4883+
* @public
4884+
* @readonly
48584885
*/
48594886

48604887
this.bidSize = null;
48614888
/**
4862-
* @property {number} askPrice - top-of-book price on the sell side.
4889+
* @property {number} askPrice - The top-of-book price on the sell side.
4890+
* @public
4891+
* @readonly
48634892
*/
48644893

48654894
this.askPrice = null;
48664895
/**
4867-
* @property {number} askSize - top-of-book quantity on the sell side.
4896+
* @property {number} askSize - The top-of-book quantity on the sell side.
4897+
* @public
4898+
* @readonly
48684899
*/
48694900

48704901
this.askSize = null;
48714902
/**
4872-
* @property {number} lastPrice - most recent price (not necessarily a trade).
4903+
* @property {number} lastPrice - Most recent price (not necessarily a trade).
4904+
* @public
4905+
* @readonly
48734906
*/
48744907

48754908
this.lastPrice = null;
48764909
/**
4877-
* @property {number} tradePrice - most recent trade price.
4910+
* @property {number} tradePrice - Most recent trade price.
4911+
* @public
4912+
* @readonly
48784913
*/
48794914

48804915
this.tradePrice = null;
48814916
/**
4882-
* @property {number} tradeSize - most recent trade quantity.
4917+
* @property {number} tradeSize - Most recent trade quantity.
4918+
* @public
4919+
* @readonly
48834920
*/
48844921

48854922
this.tradeSize = null;
@@ -4890,35 +4927,51 @@ module.exports = (() => {
48904927

48914928
/**
48924929
* @property {number} blockTrade - Most recent block trade price.
4930+
* @public
4931+
* @readonly
48934932
*/
48944933

48954934
this.blockTrade = null;
48964935
/**
4897-
* @property {number} settlementPrice
4936+
* @property {number} settlementPrice - Settlement price for current trading session.
4937+
* @public
4938+
* @readonly
48984939
*/
48994940

49004941
this.settlementPrice = null;
4942+
/**
4943+
* @property {number} previousSettlementPrice - Settlement price from previous trading session.
4944+
* @public
4945+
* @readonly
4946+
*/
4947+
4948+
this.previousSettlementPrice = null;
49014949
this.openPrice = null;
49024950
this.highPrice = null;
49034951
this.lowPrice = null;
49044952
this.volume = null;
49054953
this.openInterest = null;
49064954
/**
4907-
* @property {number} previousPrice - price from the previous session.
4955+
* @property {number} previousPrice - The last price from the previous trading session.
4956+
* @public
4957+
* @readonly
49084958
*/
49094959

49104960
this.previousPrice = null;
49114961
/**
4912-
* @property {Date|null} time - the most recent trade, quote, or refresh. this date instance stores the hours and minutes for the exchange time (without proper timezone adjustment). use caution.
4962+
* @property {Date|null} time - The most recent trade, quote, or refresh time. Caution should be used. This date was created from hours, minutes, and seconds without regard for the client computer's timezone. As such, it is only safe to read time-related values (e.g. ```Date.getHours```, ```Date.getMinutes```, etc). Do not attempt to compare. Do not attempt to convert.
4963+
* @public
4964+
* @readonly
49134965
*/
49144966

49154967
this.time = null;
4916-
this.timeUtc = null;
49174968
/**
4918-
* @property {Profile|null} profile - metadata regarding the quoted instrument.
4969+
* @property {Date|null} time - A timezone-aware version of {@link Quote#time}. This property will only have a value when both (a) the exchange timezone is known; and (b) the client computer's timezone is known.
4970+
* @public
4971+
* @readonly
49194972
*/
49204973

4921-
this.profile = null;
4974+
this.timeUtc = null;
49224975
this.ticks = [];
49234976
}
49244977

@@ -4942,7 +4995,7 @@ module.exports = (() => {
49424995
'use strict';
49434996

49444997
return {
4945-
version: '5.0.3'
4998+
version: '5.1.0'
49464999
};
49475000
})();
49485001

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

0 commit comments

Comments
 (0)