Skip to content

Commit

Permalink
fix(quote): {regular,pre}MarketTime is Date (like postMT)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Mar 29, 2021
1 parent 4bb00ae commit 524fed3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/modules/quote.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const result = await yahooFinance.quote('AAPL');
postMarketChange: -0.0800018,
regularMarketChange: -0.42500305,
regularMarketChangePercent: -0.30980286,
regularMarketTime: 1612558802,
regularMarketTime: new Date("2021-02-05T21:00:02.000Z"),
regularMarketPrice: 136.76,
regularMarketDayHigh: 137.41,
regularMarketDayRange: { low: 135.86, high: 137.41 },
Expand Down
24 changes: 12 additions & 12 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@
"yahooFinanceType": "number"
},
"preMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"priceEpsCurrentYear": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -2603,7 +2603,7 @@
"yahooFinanceType": "number"
},
"regularMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"regularMarketVolume": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -2852,7 +2852,7 @@
"yahooFinanceType": "number"
},
"preMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"priceEpsCurrentYear": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -2898,7 +2898,7 @@
"yahooFinanceType": "number"
},
"regularMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"regularMarketVolume": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -3155,7 +3155,7 @@
"yahooFinanceType": "number"
},
"preMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"priceEpsCurrentYear": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -3201,7 +3201,7 @@
"yahooFinanceType": "number"
},
"regularMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"regularMarketVolume": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -3438,7 +3438,7 @@
"yahooFinanceType": "number"
},
"preMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"priceEpsCurrentYear": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -3484,7 +3484,7 @@
"yahooFinanceType": "number"
},
"regularMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"regularMarketVolume": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -3721,7 +3721,7 @@
"yahooFinanceType": "number"
},
"preMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"priceEpsCurrentYear": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -3767,7 +3767,7 @@
"yahooFinanceType": "number"
},
"regularMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"regularMarketVolume": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -4100,7 +4100,7 @@
"yahooFinanceType": "number"
},
"preMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"priceEpsCurrentYear": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -4146,7 +4146,7 @@
"yahooFinanceType": "number"
},
"regularMarketTime": {
"yahooFinanceType": "number"
"yahooFinanceType": "date"
},
"regularMarketVolume": {
"yahooFinanceType": "number"
Expand Down
6 changes: 3 additions & 3 deletions src/modules/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ export interface QuoteBase {
firstTradeDateMilliseconds?: DateInMs; // 917015400000 -> Date
priceHint: number; // 2,
postMarketChangePercent?: number; // 0.093813874,
postMarketTime?: Date; // 1612573179,
postMarketTime?: Date; // 1612573179 -> new Date()
postMarketPrice?: number; // 544.15,
postMarketChange?: number; // 0.51000977,
regularMarketChange?: number; // -2.9299927,
regularMarketChangePercent?: number; // -0.53606904,
regularMarketTime?: number; // 1612558802,
regularMarketTime?: Date; // 1612558802 -> new Date()
regularMarketPrice?: number; // 543.64,
regularMarketDayHigh?: number; // 549.19,
regularMarketDayRange?: TwoNumberRange; // "541.867 - 549.19" -> { low, high }
Expand All @@ -74,7 +74,7 @@ export interface QuoteBase {
regularMarketPreviousClose?: number; // 546.57,
preMarketChange?: number; // -2.9299927,
preMarketChangePercent?: number; // -0.53606904,
preMarketTime?: number; // 1612558802,
preMarketTime?: Date; // 1612558802 -> new Date()
preMarketPrice?: number; // 543.64,
bid?: number; // 543.84,
ask?: number; // 544.15,
Expand Down

0 comments on commit 524fed3

Please sign in to comment.