From 4603232698e168c8893a275828b860fece748f1f Mon Sep 17 00:00:00 2001 From: Advaiya Lad <67528879+PythonCreator27@users.noreply.github.com> Date: Sat, 15 May 2021 03:23:52 -0500 Subject: [PATCH] feat: add insights module (#169) * feat: add insights module * fix(schema): fix insights schema * fix(schema): make a few props optional * fix(schema): make a few props optional * fix(schema): make more props optional * docs(insights): add docs for insights mod * fix: use js extension in tests Use .js extension in tests and also fix quoteCombine.spec.ts (unintended) --- README.md | 3 +- docs/README.md | 1 + docs/modules/insights.md | 143 ++++++++++ schema.json | 366 +++++++++++++++++++++++++ src/index-common.ts | 4 +- src/modules/insights.spec.ts | 22 ++ src/modules/insights.ts | 156 +++++++++++ src/other/quoteCombine.spec.ts | 4 +- tests/http/insights-0P000071W8.TO.json | 78 ++++++ tests/http/insights-AAPL.json | 194 +++++++++++++ tests/http/insights-ABBV.json | 194 +++++++++++++ tests/http/insights-ADH.json | 78 ++++++ tests/http/insights-AFRAF.json | 104 +++++++ tests/http/insights-AMZN.json | 192 +++++++++++++ tests/http/insights-AZT.OL.json | 83 ++++++ tests/http/insights-BABA.json | 191 +++++++++++++ tests/http/insights-BEKE.json | 168 ++++++++++++ tests/http/insights-BFLY.json | 179 ++++++++++++ tests/http/insights-BRKS.json | 193 +++++++++++++ tests/http/insights-BTC-USD.json | 78 ++++++ tests/http/insights-CRON.json | 185 +++++++++++++ tests/http/insights-EPAC.json | 192 +++++++++++++ tests/http/insights-EURUSD=X.json | 78 ++++++ tests/http/insights-GOOG.json | 186 +++++++++++++ tests/http/insights-MDLY.json | 186 +++++++++++++ tests/http/insights-OCDO.L.json | 83 ++++++ tests/http/insights-QQQ.json | 151 ++++++++++ tests/http/insights-SI.json | 183 +++++++++++++ tests/http/insights-SIMP.json | 120 ++++++++ tests/http/insights-SIX.json | 192 +++++++++++++ tests/http/insights-SPOT.json | 183 +++++++++++++ tests/http/insights-UNIR.MI.json | 83 ++++++ tests/http/insights-WSKT.JK.json | 83 ++++++ 33 files changed, 4331 insertions(+), 5 deletions(-) create mode 100644 docs/modules/insights.md create mode 100644 src/modules/insights.spec.ts create mode 100644 src/modules/insights.ts create mode 100644 tests/http/insights-0P000071W8.TO.json create mode 100644 tests/http/insights-AAPL.json create mode 100644 tests/http/insights-ABBV.json create mode 100644 tests/http/insights-ADH.json create mode 100644 tests/http/insights-AFRAF.json create mode 100644 tests/http/insights-AMZN.json create mode 100644 tests/http/insights-AZT.OL.json create mode 100644 tests/http/insights-BABA.json create mode 100644 tests/http/insights-BEKE.json create mode 100644 tests/http/insights-BFLY.json create mode 100644 tests/http/insights-BRKS.json create mode 100644 tests/http/insights-BTC-USD.json create mode 100644 tests/http/insights-CRON.json create mode 100644 tests/http/insights-EPAC.json create mode 100644 tests/http/insights-EURUSD=X.json create mode 100644 tests/http/insights-GOOG.json create mode 100644 tests/http/insights-MDLY.json create mode 100644 tests/http/insights-OCDO.L.json create mode 100644 tests/http/insights-QQQ.json create mode 100644 tests/http/insights-SI.json create mode 100644 tests/http/insights-SIMP.json create mode 100644 tests/http/insights-SIX.json create mode 100644 tests/http/insights-SPOT.json create mode 100644 tests/http/insights-UNIR.MI.json create mode 100644 tests/http/insights-WSKT.JK.json diff --git a/README.md b/README.md index 323450c5..64d188ca 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,8 @@ symbol, topHoldings, upgradeDowngradeHistory), [`search`](./docs/modules/search.md), [`recommendationsBySymbol`](./docs/modules/recommendationsBySymbol.md), [`trendingSymbols`](./docs/modules/trendingSymbols.md), -[`options`](./docs/modules/options.md), with more +[`options`](./docs/modules/options.md), +[`insights`](./docs/modules/insights.md), with more [coming soon](https://github.com/gadicc/node-yahoo-finance2/issues/8). Extras: [`quoteCombine`](./docs/other/quoteCombine.md). diff --git a/docs/README.md b/docs/README.md index 1a8ac5ad..2469250e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -39,6 +39,7 @@ const result = await yahooFinance.module(query, queryOpts, moduleOpts); 1. [recommendationsBySymbol](./modules/recommendationsBySymbol.md) - similar symbols. 1. [trendingSymbols](./modules/trendingSymbols.md) - symbols trending in a country. 1. [options](./modules/options.md) - options trading (call/put). +1. [insights](./modules/insights.md) - insights and scores. ## Other Methods diff --git a/docs/modules/insights.md b/docs/modules/insights.md new file mode 100644 index 00000000..c456168d --- /dev/null +++ b/docs/modules/insights.md @@ -0,0 +1,143 @@ +# insights + +## Usage: + +```js +import yahooFinance from 'yahoo-finance2'; +const queryOptions = { lang: 'en-US', reportsCount: 2, region: 'US' }; +const result = await yahooFinance.insights('AYX', queryOptions); +``` +Example Result (Arrays are shortened so the docs aren't long): +```js +{ + symbol: 'AMD', + instrumentInfo: { + technicalEvents: { + provider: 'Trading Central', + sector: 'Technology', + shortTermOutlook: { + stateDescription: 'Recent bearish events outweigh bullish events.', + direction: 'Bearish', + score: 4, + scoreDescription: 'Very Strong Bearish Evidence', + sectorDirection: 'Bearish', + sectorScore: 3, + sectorScoreDescription: 'Strong Bearish Evidence', + indexDirection: 'Bearish', + indexScore: 1, + indexScoreDescription: 'Weak Bearish Evidence' + }, + intermediateTermOutlook: { + stateDescription: 'Recent bearish events outweigh bullish events.', + direction: 'Bearish', + score: 3, + scoreDescription: 'Strong Bearish Evidence', + sectorDirection: 'Bearish', + sectorScore: 3, + sectorScoreDescription: 'Strong Bearish Evidence', + indexDirection: 'Bearish', + indexScore: 2, + indexScoreDescription: 'Bearish Evidence' + }, + longTermOutlook: { + stateDescription: 'All events are bearish.', + direction: 'Bearish', + score: 3, + scoreDescription: 'Strong Bearish Evidence', + sectorDirection: 'Neutral', + sectorScore: 0, + sectorScoreDescription: 'No Evidence', + indexDirection: 'Bullish', + indexScore: 1, + indexScoreDescription: 'Weak Bullish Evidence' + } + }, + keyTechnicals: { + provider: 'Trading Central', + support: 78.69, + resistance: 79.3221, + stopLoss: 72.206776 + }, + valuation: { + color: 0.5, + description: 'Near Fair Value', + discount: '8%', + provider: 'Trading Central' + } + }, + companySnapshot: { + sectorInfo: 'Technology', + company: { + innovativeness: 0.7504000000000001, + hiring: 0.8876999999999999, + insiderSentiments: 0.19949999999999998, + earningsReports: 0.8223 + }, + sector: { + innovativeness: 0.5, + hiring: 0.5, + sustainability: 0.5, + insiderSentiments: 0.5, + earningsReports: 0.5, + dividends: 0.5 + } + }, + recommendation: { targetPrice: 106, provider: 'Argus Research', rating: 'BUY' }, + events: [ + { + eventType: 'Short-term KST', + pricePeriod: 'D', + tradingHorizon: 'S', + tradeType: 'S', + imageUrl: 'https://s.yimg.com/uc/fin/img/assets/generic.svg', + startDate: new Date('2021-05-06T13:30:00.000Z'), + endDate: new Date('2021-05-06T13:30:00.000Z') + } + ], + reports: [ + { + id: 'MS_0P0000006A_AnalystReport_1619733948000', + headHtml: 'Analyst Report: Advanced Micro Devices, Inc.', + provider: 'Morningstar', + reportDate: '2021-04-29T22:05:48Z', + reportTitle: "Advanced Micro Devices designs microprocessors for the computer and consumer electronics industries. The majority of the firm's sales are in the personal computer and data center markets via CPUs and GPUs. Additionally, the firm supplies the chips found in prominent game consoles such as the Sony PlayStation and Microsoft Xbox. AMD acquired graphics processor and chipset maker ATI in 2006 in an effort to improve its positioning in the PC food chain. In 2009, the firm +spun out its manufacturing operations to form the foundry GlobalFoundries. In 2020, the firm agreed to acquire FPGA-leader +Xilinx to diversify its business and augment its opportunities in key end markets such as the data center.", + reportType: 'Analyst Report' + }, + { + id: 'ARGUS_29751_ThematicPortfolio_1619622483000', + headHtml: 'The Argus ESG Model Portfolio', + provider: 'Argus Research', + reportDate: '2021-04-28T15:08:03Z', + reportTitle: `Sustainable Impact Investing is gaining traction with the global investment community. In January 2020, BlackRock CEO Lawrence Fink, who oversees approximately $9 trillion in assets, announced that his firm would be investing +in companies that are making progress on sustainability. He doubled down in his January 2021 letter, calling on company managements to disclose their plans for making their businesses "compatible with a net-zero economy" by 2050. As assets have flowed in over the past 40 years, Sustainable Impact Investing has evolved. The discipline, originally known as Socially Responsible Investing, focused at first on excluding companies that conducted business in South Africa, or participated in industries such as tobacco, alcohol, and firearms. But the performance of these initial strategies lagged, and the approach has been modified. Now, instead of merely identifying industries to avoid, the discipline promotes "sustainable" business practices across all industries that can have an "impact" on global issues such as the climate, hunger, poverty, disease, shelter, and workers' rights.`, + reportType: 'Thematic Portfolio' + } + ], + sigDevs: [ + { + headline: 'AMD Reports Q1 EPS $0.45', + date: new Date('2021-04-27T00:00:00.000Z') + } + ] +} +``` + +## API + +```js +await yahooFinance.insights(query, queryOptions, moduleOptions); +``` + +### Query Options + +| Name | Type | Default | Description | +| ----------- | ------ | ------- | ----------------------------------------------------------------- | +| `reportsCount` | number | 5 | The max amount of reports that can be returned. | +| `lang` | string | "en-US" | | +| `region` | string | "US" | | + +### Module Options + +See [Common Options](../README.md#common-options). \ No newline at end of file diff --git a/schema.json b/schema.json index ea6e7446..2b99a850 100644 --- a/schema.json +++ b/schema.json @@ -1990,6 +1990,372 @@ ], "type": "object" }, + "InsightsCompanySnapshot": { + "additionalProperties": false, + "properties": { + "company": { + "additionalProperties": false, + "properties": { + "dividends": { + "yahooFinanceType": "number" + }, + "earningsReports": { + "yahooFinanceType": "number" + }, + "hiring": { + "yahooFinanceType": "number" + }, + "innovativeness": { + "yahooFinanceType": "number" + }, + "insiderSentiments": { + "yahooFinanceType": "number" + }, + "sustainability": { + "yahooFinanceType": "number" + } + }, + "type": "object" + }, + "sector": { + "additionalProperties": false, + "properties": { + "dividends": { + "yahooFinanceType": "number" + }, + "earningsReports": { + "yahooFinanceType": "number" + }, + "hiring": { + "yahooFinanceType": "number" + }, + "innovativeness": { + "yahooFinanceType": "number" + }, + "insiderSentiments": { + "yahooFinanceType": "number" + }, + "sustainability": { + "yahooFinanceType": "number" + } + }, + "required": [ + "innovativeness", + "hiring", + "insiderSentiments", + "dividends" + ], + "type": "object" + }, + "sectorInfo": { + "type": "string" + } + }, + "required": [ + "sectorInfo", + "company", + "sector" + ], + "type": "object" + }, + "InsightsDirection": { + "enum": [ + "Bearish", + "Bullish", + "Neutral" + ], + "type": "string" + }, + "InsightsEvent": { + "additionalProperties": false, + "properties": { + "endDate": { + "yahooFinanceType": "date" + }, + "eventType": { + "type": "string" + }, + "imageUrl": { + "type": "string" + }, + "pricePeriod": { + "type": "string" + }, + "startDate": { + "yahooFinanceType": "date" + }, + "tradeType": { + "type": "string" + }, + "tradingHorizon": { + "type": "string" + } + }, + "required": [ + "eventType", + "pricePeriod", + "tradingHorizon", + "tradeType", + "imageUrl", + "startDate", + "endDate" + ], + "type": "object" + }, + "InsightsInstrumentInfo": { + "additionalProperties": false, + "properties": { + "keyTechnicals": { + "additionalProperties": false, + "properties": { + "provider": { + "type": "string" + }, + "resistance": { + "yahooFinanceType": "number" + }, + "stopLoss": { + "yahooFinanceType": "number" + }, + "support": { + "yahooFinanceType": "number" + } + }, + "required": [ + "provider", + "stopLoss" + ], + "type": "object" + }, + "technicalEvents": { + "additionalProperties": false, + "properties": { + "intermediateTermOutlook": { + "$ref": "#/definitions/InsightsOutlook" + }, + "longTermOutlook": { + "$ref": "#/definitions/InsightsOutlook" + }, + "provider": { + "type": "string" + }, + "sector": { + "type": "string" + }, + "shortTermOutlook": { + "$ref": "#/definitions/InsightsOutlook" + } + }, + "required": [ + "provider", + "shortTermOutlook", + "intermediateTermOutlook", + "longTermOutlook" + ], + "type": "object" + }, + "valuation": { + "additionalProperties": false, + "properties": { + "color": { + "yahooFinanceType": "number" + }, + "description": { + "type": "string" + }, + "discount": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "relativeValue": { + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + } + }, + "required": [ + "keyTechnicals", + "technicalEvents", + "valuation" + ], + "type": "object" + }, + "InsightsOptions": { + "additionalProperties": false, + "properties": { + "lang": { + "type": "string" + }, + "region": { + "type": "string" + }, + "reportsCount": { + "yahooFinanceType": "number" + } + }, + "type": "object" + }, + "InsightsOutlook": { + "additionalProperties": false, + "properties": { + "direction": { + "$ref": "#/definitions/InsightsDirection" + }, + "indexDirection": { + "$ref": "#/definitions/InsightsDirection" + }, + "indexScore": { + "yahooFinanceType": "number" + }, + "indexScoreDescription": { + "type": "string" + }, + "score": { + "yahooFinanceType": "number" + }, + "scoreDescription": { + "type": "string" + }, + "sectorDirection": { + "$ref": "#/definitions/InsightsDirection" + }, + "sectorScore": { + "yahooFinanceType": "number" + }, + "sectorScoreDescription": { + "type": "string" + }, + "stateDescription": { + "type": "string" + } + }, + "required": [ + "stateDescription", + "direction", + "score", + "scoreDescription", + "indexDirection", + "indexScore", + "indexScoreDescription" + ], + "type": "object" + }, + "InsightsReport": { + "additionalProperties": false, + "properties": { + "headHtml": { + "type": "string" + }, + "id": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "reportDate": { + "type": "string" + }, + "reportTitle": { + "type": "string" + }, + "reportType": { + "type": "string" + } + }, + "required": [ + "id", + "headHtml", + "provider", + "reportDate", + "reportTitle", + "reportType" + ], + "type": "object" + }, + "InsightsResult": { + "additionalProperties": false, + "properties": { + "companySnapshot": { + "$ref": "#/definitions/InsightsCompanySnapshot" + }, + "events": { + "items": { + "$ref": "#/definitions/InsightsEvent" + }, + "type": "array" + }, + "instrumentInfo": { + "$ref": "#/definitions/InsightsInstrumentInfo" + }, + "recommendation": { + "additionalProperties": false, + "properties": { + "provider": { + "type": "string" + }, + "rating": { + "enum": [ + "BUY", + "SELL", + "HOLD" + ], + "type": "string" + }, + "targetPrice": { + "yahooFinanceType": "number" + } + }, + "required": [ + "targetPrice", + "provider", + "rating" + ], + "type": "object" + }, + "reports": { + "items": { + "$ref": "#/definitions/InsightsReport" + }, + "type": "array" + }, + "sigDevs": { + "items": { + "$ref": "#/definitions/InsightsSigDev" + }, + "type": "array" + }, + "symbol": { + "type": "string" + } + }, + "required": [ + "symbol", + "sigDevs" + ], + "type": "object" + }, + "InsightsSigDev": { + "additionalProperties": false, + "properties": { + "date": { + "yahooFinanceType": "date" + }, + "headline": { + "type": "string" + } + }, + "required": [ + "headline", + "date" + ], + "type": "object" + }, "MajorHoldersBreakdown": { "additionalProperties": false, "properties": { diff --git a/src/index-common.ts b/src/index-common.ts index 10f75539..02285972 100644 --- a/src/index-common.ts +++ b/src/index-common.ts @@ -5,7 +5,6 @@ import options from "./lib/options.js"; // modules import autoc from "./modules/autoc.js"; -import historical from "./modules/historical.js"; import quote from "./modules/quote.js"; import quoteSummary from "./modules/quoteSummary.js"; import search from "./modules/search.js"; @@ -15,6 +14,7 @@ import optionsModule from "./modules/options.js"; // other import quoteCombine from "./other/quoteCombine.js"; +import insights from "./modules/insights.js"; export default { // internal @@ -25,13 +25,13 @@ export default { // modules, autoc, - historical, quote, quoteSummary, search, recommendationsBySymbol, trendingSymbols, options: optionsModule, + insights, // other quoteCombine, diff --git a/src/modules/insights.spec.ts b/src/modules/insights.spec.ts new file mode 100644 index 00000000..b41fc277 --- /dev/null +++ b/src/modules/insights.spec.ts @@ -0,0 +1,22 @@ +import insights from "./insights.js"; +import { testSymbols } from "../../tests/symbols.js"; + +import testYf from "../../tests/testYf.js"; + +const yf = testYf({ insights }); + +describe("insights", () => { + it.each(testSymbols)("passes validation for symbol '%s'", async (symbol) => { + await yf.insights(symbol, undefined, { + devel: `insights-${symbol}.json`, + }); + }); + + if (process.env.FETCH_DEVEL !== "nocache") + it("throws on weird result", () => { + const devel = "weirdJsonResult.fake.json"; + return expect(yf.insights("A", {}, { devel })).rejects.toThrow( + /^Unexpected result/ + ); + }); +}); diff --git a/src/modules/insights.ts b/src/modules/insights.ts new file mode 100644 index 00000000..9ff2bc92 --- /dev/null +++ b/src/modules/insights.ts @@ -0,0 +1,156 @@ +import type { + ModuleOptions, + ModuleOptionsWithValidateTrue, + ModuleOptionsWithValidateFalse, + ModuleThis, +} from "../lib/moduleCommon.js"; + +export interface InsightsResult { + symbol: string; + instrumentInfo?: InsightsInstrumentInfo; + companySnapshot?: InsightsCompanySnapshot; + recommendation?: { + targetPrice: number; + provider: string; + rating: "BUY" | "SELL" | "HOLD"; + }; + events?: InsightsEvent[]; + reports?: InsightsReport[]; + sigDevs: InsightsSigDev[]; +} + +export interface InsightsSigDev { + headline: string; + date: Date; +} + +export interface InsightsReport { + id: string; + headHtml: string; + provider: string; + reportDate: string; + reportTitle: string; + reportType: string; +} + +export interface InsightsEvent { + eventType: string; + pricePeriod: string; + tradingHorizon: string; + tradeType: string; + imageUrl: string; + startDate: Date; + endDate: Date; +} + +export interface InsightsInstrumentInfo { + keyTechnicals: { + provider: string; + support?: number; + resistance?: number; + stopLoss: number; + }; + technicalEvents: { + provider: string; + sector?: string; + shortTermOutlook: InsightsOutlook; + intermediateTermOutlook: InsightsOutlook; + longTermOutlook: InsightsOutlook; + }; + valuation: { + color?: number; + description?: string; + discount?: string; + provider: string; + relativeValue?: string; + }; +} + +export interface InsightsCompanySnapshot { + sectorInfo: string; + company: { + innovativeness?: number; + hiring?: number; + sustainability?: number; + insiderSentiments?: number; + earningsReports?: number; + dividends?: number; + }; + sector: { + innovativeness: number; + hiring: number; + sustainability?: number; + insiderSentiments: number; + earningsReports?: number; + dividends: number; + }; +} + +export type InsightsDirection = "Bearish" | "Bullish" | "Neutral"; + +export interface InsightsOutlook { + stateDescription: string; + direction: InsightsDirection; + score: number; + scoreDescription: string; + sectorDirection?: InsightsDirection; + sectorScore?: number; + sectorScoreDescription?: string; + indexDirection: InsightsDirection; + indexScore: number; + indexScoreDescription: string; +} + +export interface InsightsOptions { + lang?: string; + region?: string; + reportsCount?: number; +} + +const queryOptionsDefaults = { + lang: "en-US", + region: "US", + getAllResearchReports: true, + reportsCount: 2, +}; + +export default function trendingSymbols( + this: ModuleThis, + query: string, + queryOptionsOverrides?: InsightsOptions, + moduleOptions?: ModuleOptionsWithValidateTrue +): Promise; + +export default function trendingSymbols( + this: ModuleThis, + query: string, + queryOptionsOverrides?: InsightsOptions, + moduleOptions?: ModuleOptionsWithValidateFalse +): Promise; + +export default function trendingSymbols( + this: ModuleThis, + query: string, + queryOptionsOverrides?: InsightsOptions, + moduleOptions?: ModuleOptions +): Promise { + return this._moduleExec({ + moduleName: "insights", + query: { + url: "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights", + schemaKey: "#/definitions/InsightsOptions", + defaults: queryOptionsDefaults, + overrides: queryOptionsOverrides, + runtime: { symbol: query }, + }, + result: { + schemaKey: "#/definitions/InsightsResult", + transformWith(result: any) { + if (!result.finance) + throw new Error("Unexpected result: " + JSON.stringify(result)); + return result.finance.result; + }, + }, + moduleOptions, + }); +} diff --git a/src/other/quoteCombine.spec.ts b/src/other/quoteCombine.spec.ts index 5a885330..053eccc3 100644 --- a/src/other/quoteCombine.spec.ts +++ b/src/other/quoteCombine.spec.ts @@ -1,7 +1,7 @@ import { jest } from "@jest/globals"; -import quoteCombine from "./quoteCombine.js"; -import testYf from "../../tests/testYf.js"; +import quoteCombine from "./quoteCombine"; +import testYf from "../../tests/testYf"; const yf = testYf({ quoteCombine }); diff --git a/tests/http/insights-0P000071W8.TO.json b/tests/http/insights-0P000071W8.TO.json new file mode 100644 index 00000000..7cedf5b5 --- /dev/null +++ b/tests/http/insights-0P000071W8.TO.json @@ -0,0 +1,78 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=0P000071W8.TO" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "6a5m2c1g9tcb7" + ], + "x-yahoo-request-id": [ + "6a5m2c1g9tcb7" + ], + "x-request-id": [ + "c7f6cbb0-99ad-4802-965c-7cdbdef661b6" + ], + "content-length": [ + "75" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:39 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "0P000071W8.TO", + "sigDevs": [] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-AAPL.json b/tests/http/insights-AAPL.json new file mode 100644 index 00000000..db7d6d90 --- /dev/null +++ b/tests/http/insights-AAPL.json @@ -0,0 +1,194 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=AAPL" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "cga1ksdg9tcb4" + ], + "x-yahoo-request-id": [ + "cga1ksdg9tcb4" + ], + "x-request-id": [ + "d4981611-a4f4-4187-850b-7116f8515a37" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1349" + ], + "x-envoy-upstream-service-time": [ + "21" + ], + "date": [ + "Fri, 14 May 2021 17:20:35 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "1" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "AAPL", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Technology", + "shortTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 2, + "scoreDescription": "Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 2, + "sectorScoreDescription": "Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 2, + "scoreDescription": "Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 3, + "sectorScoreDescription": "Strong Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "There is one bullish event.", + "direction": "Bullish", + "score": 2, + "scoreDescription": "Bullish Evidence", + "sectorDirection": "Neutral", + "sectorScore": 0, + "sectorScoreDescription": "No Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 51.1225, + "resistance": 133.46, + "stopLoss": 118.193275 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "discount": "-12%", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Technology", + "company": { + "innovativeness": 0.9983, + "hiring": 0.9537, + "sustainability": 0.4472, + "insiderSentiments": 0.46009999999999995, + "earningsReports": 0.8111, + "dividends": 0.2274 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "recommendation": { + "targetPrice": 165, + "provider": "Argus Research", + "rating": "BUY" + }, + "events": [ + { + "eventType": "Price Crosses Moving Average", + "pricePeriod": "D", + "tradingHorizon": "L", + "tradeType": "L", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620912600, + "endDate": 1620912600 + } + ], + "reports": [ + { + "id": "MS_0P000000GY_AnalystReport_1620756425000", + "headHtml": "Analyst Report: Apple Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-11T18:07:05Z", + "reportTitle": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple’s total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.", + "reportType": "Analyst Report" + }, + { + "id": "MS_0P000000GY_AnalystReport_1620169366000", + "headHtml": "Analyst Report: Apple Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-04T23:02:46Z", + "reportTitle": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple’s total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "ACCC Seeks Leave To Appear In Epic Games Vs Apple Appeal", + "date": "2021-05-10" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-ABBV.json b/tests/http/insights-ABBV.json new file mode 100644 index 00000000..223abb34 --- /dev/null +++ b/tests/http/insights-ABBV.json @@ -0,0 +1,194 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=ABBV" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "3beq7ihg9tcb8" + ], + "x-yahoo-request-id": [ + "3beq7ihg9tcb8" + ], + "x-request-id": [ + "c3e5acd4-7ba6-48f9-b050-3beb80a138fb" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1195" + ], + "x-envoy-upstream-service-time": [ + "8" + ], + "date": [ + "Fri, 14 May 2021 17:20:39 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "1" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "ABBV", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Healthcare", + "shortTermOutlook": { + "stateDescription": "Bullish events outweigh bearish events.", + "direction": "Bullish", + "score": 1, + "scoreDescription": "Weak Bullish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "Recent bullish events outweigh bearish events.", + "direction": "Bullish", + "score": 2, + "scoreDescription": "Bullish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "All events are bullish.", + "direction": "Bullish", + "score": 1, + "scoreDescription": "Weak Bullish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 107.31, + "resistance": 116.93, + "stopLoss": 111.064383 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "discount": "-48%", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Healthcare", + "company": { + "innovativeness": 0.9392, + "hiring": 0.9244, + "sustainability": 0.7686, + "insiderSentiments": 0.1215, + "earningsReports": 0.9343, + "dividends": 0.9433 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "recommendation": { + "targetPrice": 130, + "provider": "Argus Research", + "rating": "BUY" + }, + "events": [ + { + "eventType": "Relative Strength Index (RSI)", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "S", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620739800, + "endDate": 1620739800 + } + ], + "reports": [ + { + "id": "MS_0P0000XPGW_AnalystReport_1620945331000", + "headHtml": "Analyst Report: AbbVie Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-13T22:35:31Z", + "reportTitle": "AbbVie is a drug company with a strong exposure to immunology and oncology. The company's top drug, Humira, represents close to half of the company's current profits. The company was spun off from Abbott in early 2013. The recent acquisition of Allergan adds several new drugs in aesthetics and women's health.", + "reportType": "Analyst Report" + }, + { + "id": "ARGUS_3610_AnalystReport_1620911988000", + "headHtml": "Analyst Report: AbbVie Inc", + "provider": "Argus Research", + "reportDate": "2021-05-13T13:19:48Z", + "reportTitle": "AbbVie, a research-based biopharmaceutical company, was spun off from Abbott Laboratories in January 2013. The company is based in suburban Chicago. The shares are a component of the S&P 500.", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "Inventiva: Cash, Cash Equivalents At EUR 107.8 Mln At End-March", + "date": "2021-05-12" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-ADH.json b/tests/http/insights-ADH.json new file mode 100644 index 00000000..0ee284ad --- /dev/null +++ b/tests/http/insights-ADH.json @@ -0,0 +1,78 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=ADH" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "eslrtftg9tcb4" + ], + "x-yahoo-request-id": [ + "eslrtftg9tcb4" + ], + "x-request-id": [ + "7edb36d9-bb7d-4f64-8ea1-9f08958d3bb3" + ], + "content-length": [ + "65" + ], + "x-envoy-upstream-service-time": [ + "3" + ], + "date": [ + "Fri, 14 May 2021 17:20:36 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "ADH", + "sigDevs": [] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-AFRAF.json b/tests/http/insights-AFRAF.json new file mode 100644 index 00000000..26896be5 --- /dev/null +++ b/tests/http/insights-AFRAF.json @@ -0,0 +1,104 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=AFRAF" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "6c1uq55g9tcb4" + ], + "x-yahoo-request-id": [ + "6c1uq55g9tcb4" + ], + "x-request-id": [ + "f647c243-4e4b-4eba-be2f-14bdaa5fe452" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "794" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:36 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "2" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "AFRAF", + "reports": [ + { + "id": "MS_1015646_StockPicks_1608329712000", + "headHtml": "Morningstar | A Weekly Summary of Stock Ideas and Developments in the Companies We Cover", + "provider": "Morningstar", + "reportDate": "2020-12-18T22:15:12Z", + "reportTitle": "This edition features new coverage of six European airlines; merger creating cannabis giant; Google antitrust suit; and notes from Lennar, Bed Bath & Beyond, and REA Group.", + "reportType": "Stock Picks" + }, + { + "id": "MS_0P00008O9A_AnalystReport_1604964481000", + "headHtml": "Analyst Report: Delta Air Lines, Inc.", + "provider": "Morningstar", + "reportDate": "2020-11-09T23:28:01Z", + "reportTitle": "Atlanta-based Delta Air Lines is one of the world's largest airlines, with a network of over 300 destinations in more than 50 countries. Delta operates a hub-and-spoke system network, where it gathers and distributes passengers across the globe through key locations in Atlanta, New York, Salt Lake City, Detroit, Seattle, and Minneapolis-St. Paul. Delta’s sale of frequent flyer miles, particularly to American Express, is a major driver of the firm’s profits. ", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "Air France KLM: CFO Gagey to be succeeded by Steven Zaat, current Air France Chief Financial Officer", + "date": "2021-05-06" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-AMZN.json b/tests/http/insights-AMZN.json new file mode 100644 index 00000000..68e5b432 --- /dev/null +++ b/tests/http/insights-AMZN.json @@ -0,0 +1,192 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=AMZN" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "74e6jvlg9tcb5" + ], + "x-yahoo-request-id": [ + "74e6jvlg9tcb5" + ], + "x-request-id": [ + "9387d95c-ce01-456f-aada-c84e047bed45" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1624" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:37 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "AMZN", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Consumer Cyclical", + "shortTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 4, + "sectorScoreDescription": "Very Strong Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "Recent bullish events outweigh bearish events.", + "direction": "Bullish", + "score": 2, + "scoreDescription": "Bullish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 2, + "scoreDescription": "Bearish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 3135.7, + "resistance": 3182.63, + "stopLoss": 3012.689805 + }, + "valuation": { + "color": 0.5, + "description": "Near Fair Value", + "discount": "22%", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Consumer Cyclical", + "company": { + "innovativeness": 0.9978, + "hiring": 0.9745, + "sustainability": 0.8632, + "insiderSentiments": 0.0424, + "earningsReports": 0.9262 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "recommendation": { + "targetPrice": 4000, + "provider": "Argus Research", + "rating": "BUY" + }, + "events": [ + { + "eventType": "Price Crosses Moving Average", + "pricePeriod": "D", + "tradingHorizon": "L", + "tradeType": "S", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620826200, + "endDate": 1620826200 + } + ], + "reports": [ + { + "id": "ARGUS_2710_AnalystReport_1619792462000", + "headHtml": "Analyst Report: Amazon.com Inc.", + "provider": "Argus Research", + "reportDate": "2021-04-30T14:21:02Z", + "reportTitle": "Amazon.com is the leading U.S. e-commerce retailer and among the top e-commerce sites globally. Amazon.com also provides Amazon Web Services (AWS), which is the global leader in cloud-based Infrastructure-as-a-Service (IaaS) platforms. The company's Prime membership platform is a key online retail differentiator, providing customers with free shipping (after an annual fee) along with exclusive media content (music, video, audible books, etc.). The company's Kindle reader and Alexa-based Echo and Dot digital voice assistants are category leaders. Amazon acquired Whole Foods Market in August 2017.", + "reportType": "Analyst Report" + }, + { + "id": "ARGUS_29773_MarketUpdate_1619791562000", + "headHtml": "Market Update: AMZN, AVY, FHI, HOLX, IPG, NOK, RJF, TROW, UTHR", + "provider": "Argus Research", + "reportDate": "2021-04-30T14:06:02Z", + "reportTitle": "Stocks fell on Friday morning following a new round of first-quarter earnings reports from major companies along with March consumer spending data. The Commerce Department said that U.S. consumer spending rose a strong 4.2% last month after a decline of 1.0% in February. The reading came in slightly ahead of the Reuters consensus forecast of 4.1%. The Dow fell 0.6%, the S&P 0.5%, and the Nasdaq 0.2%. Crude oil traded near $64 per barrel, while gold fell slightly to $1769 per ounce.", + "reportType": "Market Update" + } + ], + "sigDevs": [ + { + "headline": "Amazon Hiring 75,000 Employees Across Fulfillment And Transportation, With Average Starting Pay Of Over $17 Per Hour And Sign-On Bonuses Of Up To $1,000", + "date": "2021-05-13" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-AZT.OL.json b/tests/http/insights-AZT.OL.json new file mode 100644 index 00000000..1ee76d34 --- /dev/null +++ b/tests/http/insights-AZT.OL.json @@ -0,0 +1,83 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=AZT.OL" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "1t55m35g9tcb5" + ], + "x-yahoo-request-id": [ + "1t55m35g9tcb5" + ], + "x-request-id": [ + "f4ac9f64-40fc-4d6f-8a28-25457800209c" + ], + "content-length": [ + "166" + ], + "x-envoy-upstream-service-time": [ + "4" + ], + "date": [ + "Fri, 14 May 2021 17:20:37 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-canary-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "AZT.OL", + "sigDevs": [ + { + "headline": "ArcticZymes Technologies Q1 Gross Profit Up At NOK 39.9 Million", + "date": "2021-04-22" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-BABA.json b/tests/http/insights-BABA.json new file mode 100644 index 00000000..81c36265 --- /dev/null +++ b/tests/http/insights-BABA.json @@ -0,0 +1,191 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=BABA" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "9f24pd9g9tcb7" + ], + "x-yahoo-request-id": [ + "9f24pd9g9tcb7" + ], + "x-request-id": [ + "697d8b51-cecf-4133-a3e6-2b1914854f6a" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1354" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:39 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "BABA", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Consumer Cyclical", + "shortTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 1, + "scoreDescription": "Weak Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 4, + "sectorScoreDescription": "Very Strong Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 2, + "scoreDescription": "Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 176.9382, + "resistance": 224.88, + "stopLoss": 193.384108 + }, + "valuation": { + "color": 1, + "description": "Undervalued", + "discount": "52%", + "relativeValue": "Discount", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Consumer Cyclical", + "company": { + "innovativeness": 0.9381999999999999, + "hiring": 0.1387, + "sustainability": 0.7027 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "recommendation": { + "targetPrice": 330, + "provider": "Argus Research", + "rating": "BUY" + }, + "events": [ + { + "eventType": "Gap Down", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "U", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620826200, + "endDate": 1620912600 + } + ], + "reports": [ + { + "id": "MS_0P00013K81_AnalystReport_1620999270000", + "headHtml": "Analyst Report: Alibaba Group Holding Limited", + "provider": "Morningstar", + "reportDate": "2021-05-14T13:34:30Z", + "reportTitle": "Alibaba is the world’s largest online and mobile commerce company, measured by GMV (CNY 6.6 trillion/$1 trillion for the fiscal year ended March 2020). It operates China’s most-visited online marketplaces, including Taobao (consumer-to-consumer) and Tmall (business-to-consumer). Alibaba's China commerce retail division accounted for 69% of revenue in the December 2020 quarter, with Taobao generating revenue through advertising and other merchant data services and Tmall deriving revenue from commission fees. Additional revenue sources include China commerce wholesales (2%), international retail/wholesale marketplaces (5%/2%), cloud computing (7%), digital media and entertainment platforms (4%), Cainiao logistics services (5%), and innovation initiatives/other (2%). ", + "reportType": "Analyst Report" + }, + { + "id": "MS_0P00013K81_AnalystReport_1619155485000", + "headHtml": "Analyst Report: Alibaba Group Holding Limited", + "provider": "Morningstar", + "reportDate": "2021-04-23T05:24:45Z", + "reportTitle": "Alibaba is the world’s largest online and mobile commerce company, measured by GMV (CNY 6.6 trillion/$1 trillion for the fiscal year ended March 2020). It operates China’s most-visited online marketplaces, including Taobao (consumer-to-consumer) and Tmall (business-to-consumer). Alibaba's China commerce retail division accounted for 69% of revenue in the December 2020 quarter, with Taobao generating revenue through advertising and other merchant data services and Tmall deriving revenue from commission fees. Additional revenue sources include China commerce wholesales (2%), international retail/wholesale marketplaces (5%/2%), cloud computing (7%), digital media and entertainment platforms (4%), Cainiao logistics services (5%), and innovation initiatives/other (2%). ", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "Alibaba Group Says Expect To Generate Over RMB930 Bln In Revenue In FY22", + "date": "2021-05-13" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-BEKE.json b/tests/http/insights-BEKE.json new file mode 100644 index 00000000..5503fca3 --- /dev/null +++ b/tests/http/insights-BEKE.json @@ -0,0 +1,168 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=BEKE" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "26lri15g9tcb5" + ], + "x-yahoo-request-id": [ + "26lri15g9tcb5" + ], + "x-request-id": [ + "5b26f13d-e966-469e-b34e-5418e5e61037" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "873" + ], + "x-envoy-upstream-service-time": [ + "12" + ], + "date": [ + "Fri, 14 May 2021 17:20:37 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-baseline-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "BEKE", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Real Estate", + "shortTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 4, + "sectorScoreDescription": "Very Strong Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "There is one bearish event.", + "direction": "Bearish", + "score": 1, + "scoreDescription": "Weak Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 2, + "sectorScoreDescription": "Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "There are no events.", + "direction": "Neutral", + "score": 0, + "scoreDescription": "No Evidence", + "sectorDirection": "Bullish", + "sectorScore": 2, + "sectorScoreDescription": "Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "stopLoss": 39.690261 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "discount": "-50%", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "events": [ + { + "eventType": "Commodity Channel Index", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "S", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620912600, + "endDate": 1620912600 + } + ], + "reports": [ + { + "id": "ARGUS_5956_QuantitativeReport_1614124800000", + "headHtml": "CELH: Lowering target price to $57.00", + "provider": "Argus Research", + "reportDate": "2021-02-24T00:00:00Z", + "reportTitle": "CELSIUS HOLDINGS INC has an Investment Rating of HOLD; a target price of $57.000000; an Industry Subrating of Medium; a Management Subrating of Medium; a Safety Subrating of Medium; a Financial Strength Subrating of High; a Growth Subrating of High; and a Value Subrating of Low.", + "reportType": "Quantitative Report" + }, + { + "id": "ARGUS_5956_QuantitativeReport_1612396800000", + "headHtml": "CELH: Lowering target price to $62.00", + "provider": "Argus Research", + "reportDate": "2021-02-04T00:00:00Z", + "reportTitle": "CELSIUS HOLDINGS INC has an Investment Rating of HOLD; a target price of $62.000000; an Industry Subrating of Medium; a Management Subrating of Medium; a Safety Subrating of Medium; a Financial Strength Subrating of High; a Growth Subrating of High; and a Value Subrating of Low.", + "reportType": "Quantitative Report" + } + ], + "sigDevs": [ + { + "headline": "KE Holdings Says Q4 Revenue Up 57.6%", + "date": "2021-03-15" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-BFLY.json b/tests/http/insights-BFLY.json new file mode 100644 index 00000000..8d8186ff --- /dev/null +++ b/tests/http/insights-BFLY.json @@ -0,0 +1,179 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=BFLY" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "epdqjc1g9tcb5" + ], + "x-yahoo-request-id": [ + "epdqjc1g9tcb5" + ], + "x-request-id": [ + "7f18c596-38dc-4c7f-a8de-b5763997df5a" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1245" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:37 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "BFLY", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Healthcare", + "shortTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 2, + "scoreDescription": "Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "There is one bearish event.", + "direction": "Bearish", + "score": 2, + "scoreDescription": "Bearish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "stopLoss": 7.069115 + }, + "valuation": { + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Healthcare", + "company": { + "insiderSentiments": 0.8144, + "earningsReports": 0.7182999999999999 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "events": [ + { + "eventType": "MACD", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "S", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620307800, + "endDate": 1620307800 + } + ], + "reports": [ + { + "id": "ARGUS_3853_QuantitativeReport_1620777600000", + "headHtml": "WWE: Lowering target price to $56.00", + "provider": "Argus Research", + "reportDate": "2021-05-12T00:00:00Z", + "reportTitle": "WORLD WRESTLING ENTERTAIN-A has an Investment Rating of HOLD; a target price of $56.000000; an Industry Subrating of High; a Management Subrating of Medium; a Safety Subrating of Medium; a Financial Strength Subrating of Medium; a Growth Subrating of Medium; and a Value Subrating of Medium.", + "reportType": "Quantitative Report" + }, + { + "id": "MS_0P0001KOSE_AnalystReport_1620758488000", + "headHtml": "Analyst Report: Palantir Technologies Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-11T18:41:28Z", + "reportTitle": "Palantir Technologies provides organizations with solutions to manage large disparate data sets in an attempt to gain insight and drive operational outcomes. Founded in 2003, Palantir released its Gotham software platform in 2008, which focuses on the government intelligence and defense sectors. Palantir expanded into various commercial markets with its Foundry software platform in 2016 with the intent of becoming the data operating system for companies and industries. The Denver, Colorado company had 125 customers as of its IPO and roughly splits its revenue between commercial and government customers.", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "Butterfly Network Reports Q1 2021 Financial Results", + "date": "2021-05-13" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-BRKS.json b/tests/http/insights-BRKS.json new file mode 100644 index 00000000..255957ca --- /dev/null +++ b/tests/http/insights-BRKS.json @@ -0,0 +1,193 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=BRKS" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "6ik96r1g9tcb8" + ], + "x-yahoo-request-id": [ + "6ik96r1g9tcb8" + ], + "x-request-id": [ + "f53648f8-51f2-4f05-a281-8bb0436d7c23" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1063" + ], + "x-envoy-upstream-service-time": [ + "6" + ], + "date": [ + "Fri, 14 May 2021 17:20:40 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "BRKS", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Technology", + "shortTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 2, + "sectorScoreDescription": "Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 2, + "scoreDescription": "Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 3, + "sectorScoreDescription": "Strong Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "All events are bullish.", + "direction": "Bullish", + "score": 1, + "scoreDescription": "Weak Bullish Evidence", + "sectorDirection": "Neutral", + "sectorScore": 0, + "sectorScoreDescription": "No Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 39.725, + "resistance": 94.61, + "stopLoss": 73.220238 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "discount": "-24%", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Technology", + "company": { + "innovativeness": 0.8190999999999999, + "hiring": 0.5765, + "insiderSentiments": 0.6236999999999999, + "earningsReports": 0.9228000000000001, + "dividends": 0.1246 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "recommendation": { + "targetPrice": 93, + "provider": "Argus Research", + "rating": "HOLD" + }, + "events": [ + { + "eventType": "Inside Bar (Bullish)", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "L", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620912600, + "endDate": 1620912600 + } + ], + "reports": [ + { + "id": "ARGUS_3917_QuantitativeReport_1620777600000", + "headHtml": "BRKS: Lowering target price to $93.00", + "provider": "Argus Research", + "reportDate": "2021-05-12T00:00:00Z", + "reportTitle": "BROOKS AUTOMATION INC has an Investment Rating of HOLD; a target price of $93.000000; an Industry Subrating of High; a Management Subrating of Medium; a Safety Subrating of Medium; a Financial Strength Subrating of Medium; a Growth Subrating of Medium; and a Value Subrating of Medium.", + "reportType": "Quantitative Report" + }, + { + "id": "ARGUS_3917_QuantitativeReport_1620172800000", + "headHtml": "BRKS: Lowering target price to $99.00", + "provider": "Argus Research", + "reportDate": "2021-05-05T00:00:00Z", + "reportTitle": "BROOKS AUTOMATION INC has an Investment Rating of HOLD; a target price of $99.000000; an Industry Subrating of High; a Management Subrating of Medium; a Safety Subrating of Medium; a Financial Strength Subrating of Medium; a Growth Subrating of Medium; and a Value Subrating of Medium.", + "reportType": "Quantitative Report" + } + ], + "sigDevs": [ + { + "headline": "Brooks Automation Reports Q2 Earnings Per Share of $0.32 From Continuing Operations", + "date": "2021-05-10" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-BTC-USD.json b/tests/http/insights-BTC-USD.json new file mode 100644 index 00000000..dee864e7 --- /dev/null +++ b/tests/http/insights-BTC-USD.json @@ -0,0 +1,78 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=BTC-USD" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "a5lo881g9tcb9" + ], + "x-yahoo-request-id": [ + "a5lo881g9tcb9" + ], + "x-request-id": [ + "1367031d-ca83-4763-a203-37ac2e68f4c1" + ], + "content-length": [ + "69" + ], + "x-envoy-upstream-service-time": [ + "3" + ], + "date": [ + "Fri, 14 May 2021 17:20:41 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "BTC-USD", + "sigDevs": [] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-CRON.json b/tests/http/insights-CRON.json new file mode 100644 index 00000000..4280a0f6 --- /dev/null +++ b/tests/http/insights-CRON.json @@ -0,0 +1,185 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=CRON" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "96ggd95g9tcb8" + ], + "x-yahoo-request-id": [ + "96ggd95g9tcb8" + ], + "x-request-id": [ + "dd16502c-6323-414e-bdcb-bf5cad67855e" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1079" + ], + "x-envoy-upstream-service-time": [ + "4" + ], + "date": [ + "Fri, 14 May 2021 17:20:40 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "CRON", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Healthcare", + "shortTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 5.56, + "resistance": 7.695, + "stopLoss": 5.993321 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Healthcare", + "company": { + "innovativeness": 0.15710000000000002, + "insiderSentiments": 0.1656, + "earningsReports": 0.2621 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "events": [ + { + "eventType": "Short-term KST", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "S", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620826200, + "endDate": 1620826200 + } + ], + "reports": [ + { + "id": "MS_0P00018572_AnalystReport_1620426294000", + "headHtml": "Analyst Report: Cronos Group Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-07T22:24:54Z", + "reportTitle": "Cronos Group, headquartered in Toronto, Canada cultivates and sells medicinal and recreational cannabis through its medicinal brand, Peace Naturals, and its two recreational brands, Cove and Spinach. Although it primarily operates in Canada, Cronos exports medical cannabis to Poland and Germany. In addition, it has entered joint ventures in Israel, Colombia, and Australia to drive further international cultivation and distribution growth and acquired Redwood Holdings to sell CBD in the U.S.", + "reportType": "Analyst Report" + }, + { + "id": "MS_0P00018572_AnalystReport_1618266884000", + "headHtml": "Analyst Report: Cronos Group Inc.", + "provider": "Morningstar", + "reportDate": "2021-04-12T22:34:44Z", + "reportTitle": "Cronos Group, headquartered in Toronto, Canada cultivates and sells medicinal and recreational cannabis through its medicinal brand, Peace Naturals, and its two recreational brands, Cove and Spinach. Although it primarily operates in Canada, Cronos exports medical cannabis to Poland and Germany. In addition, it has entered joint ventures in Israel, Colombia, and Australia to drive further international cultivation and distribution growth and acquired Redwood Holdings to sell CBD in the U.S.", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "Cronos Group Reports 2021 First Quarter Results", + "date": "2021-05-07" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-EPAC.json b/tests/http/insights-EPAC.json new file mode 100644 index 00000000..35f8f8c7 --- /dev/null +++ b/tests/http/insights-EPAC.json @@ -0,0 +1,192 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=EPAC" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "fhmlhdlg9tcb8" + ], + "x-yahoo-request-id": [ + "fhmlhdlg9tcb8" + ], + "x-request-id": [ + "02617a03-29da-4d20-bb0d-f6203a5cf4e5" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1061" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:40 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "EPAC", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Industrials", + "shortTermOutlook": { + "stateDescription": "Recent bullish events outweigh bearish events.", + "direction": "Bullish", + "score": 2, + "scoreDescription": "Bullish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 2, + "sectorScoreDescription": "Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "All events are bullish.", + "direction": "Bullish", + "score": 2, + "scoreDescription": "Bullish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "Bullish events outweigh bearish events.", + "direction": "Bullish", + "score": 1, + "scoreDescription": "Weak Bullish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 21.875, + "resistance": 27.8, + "stopLoss": 23.69803 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "discount": "-49%", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Industrials", + "company": { + "innovativeness": 0.8090999999999999, + "insiderSentiments": 0.7852, + "earningsReports": 0.9913, + "dividends": 0.012 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "recommendation": { + "targetPrice": 22, + "provider": "Argus Research", + "rating": "SELL" + }, + "events": [ + { + "eventType": "Price Crosses Moving Average", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "L", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620912600, + "endDate": 1620912600 + } + ], + "reports": [ + { + "id": "ARGUS_3767_QuantitativeReport_1620777600000", + "headHtml": "EPAC: What does Argus have to say about EPAC?", + "provider": "Argus Research", + "reportDate": "2021-05-12T00:00:00Z", + "reportTitle": "ENERPAC TOOL GROUP CORP has an Investment Rating of SELL; a target price of $22.000000; an Industry Subrating of High; a Management Subrating of Low; a Safety Subrating of Medium; a Financial Strength Subrating of Medium; a Growth Subrating of Low; and a Value Subrating of Low.", + "reportType": "Quantitative Report" + }, + { + "id": "ARGUS_3767_QuantitativeReport_1620172800000", + "headHtml": "EPAC: Raising target price to $22.00", + "provider": "Argus Research", + "reportDate": "2021-05-05T00:00:00Z", + "reportTitle": "ENERPAC TOOL GROUP CORP has an Investment Rating of SELL; a target price of $22.000000; an Industry Subrating of High; a Management Subrating of Low; a Safety Subrating of Medium; a Financial Strength Subrating of Medium; a Growth Subrating of Low; and a Value Subrating of Low.", + "reportType": "Quantitative Report" + } + ], + "sigDevs": [ + { + "headline": "Enerpac Tool Group Reports Second Quarter Fiscal 2021 Results", + "date": "2021-03-24" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-EURUSD=X.json b/tests/http/insights-EURUSD=X.json new file mode 100644 index 00000000..e7b6b532 --- /dev/null +++ b/tests/http/insights-EURUSD=X.json @@ -0,0 +1,78 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=EURUSD%3DX" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "d5n6qk1g9tcb9" + ], + "x-yahoo-request-id": [ + "d5n6qk1g9tcb9" + ], + "x-request-id": [ + "2ea81fa9-cb84-9796-8ded-9d8191193d4e" + ], + "content-length": [ + "70" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:41 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "EURUSD=X", + "sigDevs": [] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-GOOG.json b/tests/http/insights-GOOG.json new file mode 100644 index 00000000..4e030cd8 --- /dev/null +++ b/tests/http/insights-GOOG.json @@ -0,0 +1,186 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=GOOG" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "09gabs5g9tcb6" + ], + "x-yahoo-request-id": [ + "09gabs5g9tcb6" + ], + "x-request-id": [ + "e8d6aaac-db97-4f6d-b565-820b2390c304" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1477" + ], + "x-envoy-upstream-service-time": [ + "4" + ], + "date": [ + "Fri, 14 May 2021 17:20:38 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "GOOG", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Communication Services", + "shortTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 4, + "scoreDescription": "Very Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 3, + "sectorScoreDescription": "Strong Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "There is one bullish event.", + "direction": "Bullish", + "score": 1, + "scoreDescription": "Weak Bullish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 2, + "sectorScoreDescription": "Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "There is one bullish event.", + "direction": "Bullish", + "score": 1, + "scoreDescription": "Weak Bullish Evidence", + "sectorDirection": "Neutral", + "sectorScore": 0, + "sectorScoreDescription": "No Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 1518.27, + "resistance": 2306.5965, + "stopLoss": 2120.144404 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "discount": "-2%", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Communication Services", + "company": { + "innovativeness": 0.9926, + "insiderSentiments": 0.0959, + "earningsReports": 0.8844 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "events": [ + { + "eventType": "Inside Bar (Bullish)", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "L", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620912600, + "endDate": 1620912600 + } + ], + "reports": [ + { + "id": "ARGUS_29860_TopBottomInsiderActivity_1620803931000", + "headHtml": "Daily – Vickers Top Buyers & Sellers for 05/12/2021", + "provider": "Argus Research", + "reportDate": "2021-05-12T07:18:51Z", + "reportTitle": "The Vickers Top Buyers & Sellers is a daily report that identifies the five companies the largest insider purchase transactions based on the dollar value of the transactions as well as the five companies the largest insider sales transactions based on the dollar value of the transactions.", + "reportType": "Top/Bottom Insider Activity" + }, + { + "id": "MS_0P00012BBI_AnalystReport_1620742413000", + "headHtml": "Analyst Report: Alphabet Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-11T14:13:33Z", + "reportTitle": "Alphabet is a holding company, with Google, the Internet media giant, as a wholly owned subsidiary. Google generates 99% of Alphabet revenue, of which more than 85% is from online ads. Google’s other revenue is from sales of apps and content on Google Play and YouTube, as well as cloud service fees and other licensing revenue. Sales of hardware such as Chromebooks, the Pixel smartphone, and smart homes products, which include Nest and Google Home, also contribute to other revenue. Alphabet’s moonshot investments are in its other bets segment, where it bets on technology to enhance health (Verily), faster Internet access to homes (Google Fiber), self-driving cars (Waymo), and more. Alphabet’s operating margin has been 25%-30%, with Google at 30% and other bets operating at a loss.", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "Google Cloud And Spacex's Starlink To Deliver Secure, Global Connectivity", + "date": "2021-05-13" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-MDLY.json b/tests/http/insights-MDLY.json new file mode 100644 index 00000000..298c824a --- /dev/null +++ b/tests/http/insights-MDLY.json @@ -0,0 +1,186 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=MDLY" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "7nht49tg9tcb8" + ], + "x-yahoo-request-id": [ + "7nht49tg9tcb8" + ], + "x-request-id": [ + "6883fe5d-db56-4904-92c6-4f7e69dd025a" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1332" + ], + "x-envoy-upstream-service-time": [ + "4" + ], + "date": [ + "Fri, 14 May 2021 17:20:39 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "1" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "MDLY", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Financial Services", + "shortTermOutlook": { + "stateDescription": "Recent bullish events outweigh bearish events.", + "direction": "Bullish", + "score": 1, + "scoreDescription": "Weak Bullish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 2, + "sectorScoreDescription": "Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 5.503, + "resistance": 7.202, + "stopLoss": 4.165683 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Financial Services", + "company": { + "innovativeness": 0.15439999999999998, + "insiderSentiments": 0.30920000000000003, + "earningsReports": 0.25920000000000004, + "dividends": 0.9990000000000001 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "events": [ + { + "eventType": "Price Crosses Moving Average", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "S", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620826200, + "endDate": 1620826200 + } + ], + "reports": [ + { + "id": "MS_0P000000RD_AnalystReport_1620001438000", + "headHtml": "Analyst Report: Berkshire Hathaway Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-03T00:23:58Z", + "reportTitle": "Berkshire Hathaway is a holding company with a wide array of subsidiaries engaged in diverse activities. The firm's core business segment is insurance, run primarily through Geico, Berkshire Hathaway Reinsurance Group and Berkshire Hathaway Primary Group. Berkshire has used the excess cash thrown off from these and its other operations over the years to acquire Burlington Northern Santa Fe (railroad), Berkshire Hathaway Energy (utilities and energy distributors), and the firms that make up its manufacturing, service, and retailing operations (which include five of Berkshire's largest noninsurance pretax earnings generators: Precision Castparts, Lubrizol, Clayton Homes, Marmon and IMC/ISCAR). The conglomerate is unique in that it is run on a completely decentralized basis. ", + "reportType": "Analyst Report" + }, + { + "id": "MS_0P0000063T_AnalystReport_1620001429000", + "headHtml": "Analyst Report: Berkshire Hathaway Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-03T00:23:49Z", + "reportTitle": "Berkshire Hathaway is a holding company with a wide array of subsidiaries engaged in diverse activities. The firm's core business segment is insurance, run primarily through Geico, Berkshire Hathaway Reinsurance Group and Berkshire Hathaway Primary Group. Berkshire has used the excess cash thrown off from these and its other operations over the years to acquire Burlington Northern Santa Fe (railroad), Berkshire Hathaway Energy (utilities and energy distributors), and the firms that make up its manufacturing, service, and retailing operations (which include five of Berkshire's largest noninsurance pretax earnings generators: Precision Castparts, Lubrizol, Clayton Homes, Marmon and IMC/ISCAR). The conglomerate is unique in that it is run on a completely decentralized basis. ", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "Medley Management Inc - Announced Promotions Of Howard Liao To Chief Executive Officer", + "date": "2021-04-16" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-OCDO.L.json b/tests/http/insights-OCDO.L.json new file mode 100644 index 00000000..28f0b1d0 --- /dev/null +++ b/tests/http/insights-OCDO.L.json @@ -0,0 +1,83 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=OCDO.L" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "4avfubtg9tcb7" + ], + "x-yahoo-request-id": [ + "4avfubtg9tcb7" + ], + "x-request-id": [ + "cb4133b8-25cb-4ff5-af98-f5c0d254fca4" + ], + "content-length": [ + "187" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:39 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "OCDO.L", + "sigDevs": [ + { + "headline": "Ocado Says Stephen Daintith Will Become CFO And Join Board With Effect From March 22", + "date": "2021-02-15" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-QQQ.json b/tests/http/insights-QQQ.json new file mode 100644 index 00000000..73456a23 --- /dev/null +++ b/tests/http/insights-QQQ.json @@ -0,0 +1,151 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=QQQ" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "96bim0tg9tcb7" + ], + "x-yahoo-request-id": [ + "96bim0tg9tcb7" + ], + "x-request-id": [ + "66923f8d-21a5-4103-88cd-774284a316e7" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1425" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:39 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "QQQ", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "shortTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 1, + "scoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "There are no events.", + "direction": "Neutral", + "score": 0, + "scoreDescription": "No Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 193.09, + "resistance": 336.45, + "stopLoss": 302.682223 + }, + "valuation": { + "provider": "Trading Central" + } + }, + "events": [ + { + "eventType": "Commodity Channel Index", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "S", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620653400, + "endDate": 1620653400 + } + ], + "reports": [ + { + "id": "MS_0P000003IJ_AnalystReport_1620756397000", + "headHtml": "Analyst Report: McDonald's Corporation", + "provider": "Morningstar", + "reportDate": "2021-05-11T18:06:37Z", + "reportTitle": "McDonald’s Corporation is the largest restaurant owner-operator in the world, with 2020 systemwide sales of $93 billion across 39,000 stores and 119 countries. McDonald’s revolutionized the restaurant industry with a cheap and fast core menu, building its impressive footprint through partnerships with independent restaurant franchisees. The firm earns 57% of its revenue from franchise royalty fees and lease payments, with the remainder coming from company-operated stores across its three core segments: the United States, internationally operated markets, and international developmental/licensed. McDonald’s owns 55% of the real estate and 80% of the buildings in its franchise system, offering it substantial leverage in maintaining quality standards and consistency across markets.", + "reportType": "Analyst Report" + }, + { + "id": "MS_0P00000031_AnalystReport_1620169311000", + "headHtml": "Analyst Report: AT&T Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-04T23:01:51Z", + "reportTitle": "Wireless is AT&T’s largest business, contributing about 40% of revenue. The firm is the third-largest U.S. wireless carrier, connecting 64 million postpaid and 17 million prepaid phone customers. WarnerMedia contributes a bit less than 20% of revenue with media assets that include HBO, the Turner cable networks, and the Warner Brothers studios. Fixed-line business communications services, provided to a wide range of entities, provide about 15% of revenue. The consumer broadband segment (about 7% of revenue) primarily provides broadband service to 15 million households. The firm recently sold a stake in its traditional television business, which serves 17 million customers and generates about 17% of sales. This business will be removed from AT&T's financials going forward.", + "reportType": "Analyst Report" + } + ], + "sigDevs": [] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-SI.json b/tests/http/insights-SI.json new file mode 100644 index 00000000..05a9dedb --- /dev/null +++ b/tests/http/insights-SI.json @@ -0,0 +1,183 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=SI" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "3oa2ul5g9tcb7" + ], + "x-yahoo-request-id": [ + "3oa2ul5g9tcb7" + ], + "x-request-id": [ + "7aa122f8-9d5b-47f1-ba7c-f135c7730931" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1121" + ], + "x-envoy-upstream-service-time": [ + "6" + ], + "date": [ + "Fri, 14 May 2021 17:20:39 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "3" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "SI", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Financial Services", + "shortTermOutlook": { + "stateDescription": "Bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 4, + "scoreDescription": "Very Strong Bearish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "There are no events.", + "direction": "Neutral", + "score": 0, + "scoreDescription": "No Evidence", + "sectorDirection": "Bullish", + "sectorScore": 2, + "sectorScoreDescription": "Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "stopLoss": 45.097755 + }, + "valuation": { + "color": 0.5, + "description": "Near Fair Value", + "discount": "24%", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Financial Services", + "company": { + "innovativeness": 0.3667, + "insiderSentiments": 0.064, + "earningsReports": 0.9464 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "events": [ + { + "eventType": "Commodity Channel Index", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "U", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620912600, + "endDate": 1620912600 + } + ], + "reports": [ + { + "id": "MS_0P00000016_AnalystReport_1620664161000", + "headHtml": "Analyst Report: ABB Ltd", + "provider": "Morningstar", + "reportDate": "2021-05-10T16:29:21Z", + "reportTitle": "ABB is a global supplier of electrical equipment and automation products. Founded in the late 19th century, the company was created out of the merger of two old industrial companies--ASEA and BBC--and is now called Asea Brown Boveri Group, or ABB. The company is the number-one or number-two supplier in all of its core markets and the number-two robotic arm supplier globally. In automation, it offers a full suite of products for both discrete and process automation as well as industrial robotics.", + "reportType": "Analyst Report" + }, + { + "id": "MS_0P00000016_AnalystReport_1619527788000", + "headHtml": "Analyst Report: ABB Ltd", + "provider": "Morningstar", + "reportDate": "2021-04-27T12:49:48Z", + "reportTitle": "ABB is a global supplier of electrical equipment and automation products. Founded in the late 19th century, the company was created out of the merger of two old industrial companies--ASEA and BBC--and is now called Asea Brown Boveri Group, or ABB. The company is the number-one or number-two supplier in all of its core markets and the number-two robotic arm supplier globally. In automation, it offers a full suite of products for both discrete and process automation as well as robotics.", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "Silvergate Capital Corp Announces First Quarter 2021 Results", + "date": "2021-04-20" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-SIMP.json b/tests/http/insights-SIMP.json new file mode 100644 index 00000000..a943fc9d --- /dev/null +++ b/tests/http/insights-SIMP.json @@ -0,0 +1,120 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=SIMP" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "0udsj2lg9tcb9" + ], + "x-yahoo-request-id": [ + "0udsj2lg9tcb9" + ], + "x-request-id": [ + "b43c1f06-8e3a-4a5e-a06b-783b3cba3efc" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1066" + ], + "x-envoy-upstream-service-time": [ + "6" + ], + "date": [ + "Fri, 14 May 2021 17:20:41 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "SIMP", + "companySnapshot": { + "sectorInfo": "Consumer Cyclical", + "company": { + "innovativeness": 0.04190000000000001, + "insiderSentiments": 0.7315999999999999, + "earningsReports": 0.632 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "reports": [ + { + "id": "MS_0P000005UH_AnalystReport_1620756406000", + "headHtml": "Analyst Report: Walmart Inc.", + "provider": "Morningstar", + "reportDate": "2021-05-11T18:06:46Z", + "reportTitle": "America’s largest retailer by sales, Walmart operated over 11,400 stores under 54 banners at the end of fiscal 2021, selling a variety of general merchandise and grocery items. Its home market accounted for 78% of sales in fiscal 2021, with Mexico and Central America (6%) and Canada (4%) its largest external markets. In the United States, around 56% of sales come from grocery, 32% from general merchandise, and 10% from health and wellness items. The company operates several e-commerce properties apart from its eponymous site, including Flipkart and shoes.com (it also owns a roughly 10% stake in Chinese online retailer JD.com). Combined, e-commerce accounted for about 12% of fiscal 2021 sales.", + "reportType": "Analyst Report" + }, + { + "id": "ARGUS_29810_TechnicalAnalysis_1620285236000", + "headHtml": "Technical Assessment: Bullish in the Intermediate-Term", + "provider": "Argus Research", + "reportDate": "2021-05-06T07:13:56Z", + "reportTitle": "While the year-to-date winners in 2021 were the big losers in 2020, the winners in 2020 are hanging in there so far in 2021. There is always some degree of reversion to the mean, be that in the stock market, sports, politics, the economy, consumer confidence, etc. Still, one thing that has remained consistently bullish for the overall stock market going back to 2009 is market breadth.", + "reportType": "Technical Analysis" + } + ], + "sigDevs": [ + { + "headline": "Carlos Felipe Rezk Reports A Stake Of 8.26% In Cool Holdings As Of Sept 11", + "date": "2019-10-09" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-SIX.json b/tests/http/insights-SIX.json new file mode 100644 index 00000000..6b3b06db --- /dev/null +++ b/tests/http/insights-SIX.json @@ -0,0 +1,192 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=SIX" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "f17kgjtg9tcb6" + ], + "x-yahoo-request-id": [ + "f17kgjtg9tcb6" + ], + "x-request-id": [ + "3451f8f6-1327-437c-9681-d47656a82717" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1017" + ], + "x-envoy-upstream-service-time": [ + "4" + ], + "date": [ + "Fri, 14 May 2021 17:20:37 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "1" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "SIX", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Consumer Cyclical", + "shortTermOutlook": { + "stateDescription": "Bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 4, + "scoreDescription": "Very Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 4, + "sectorScoreDescription": "Very Strong Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "Recent bearish events outweigh bullish events.", + "direction": "Bearish", + "score": 4, + "scoreDescription": "Very Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 2, + "scoreDescription": "Bearish Evidence", + "sectorDirection": "Bullish", + "sectorScore": 1, + "sectorScoreDescription": "Weak Bullish Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 19.95, + "resistance": 45.56, + "stopLoss": 36.390413 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Consumer Cyclical", + "company": { + "innovativeness": 0.5011, + "sustainability": 0.9316, + "insiderSentiments": 0.3785, + "earningsReports": 0.24780000000000002, + "dividends": 0.8269 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "recommendation": { + "targetPrice": 34, + "provider": "Argus Research", + "rating": "SELL" + }, + "events": [ + { + "eventType": "Fast Stochastic", + "pricePeriod": "D", + "tradingHorizon": "S", + "tradeType": "L", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620653400, + "endDate": 1620653400 + } + ], + "reports": [ + { + "id": "ARGUS_4574_QuantitativeReport_1620777600000", + "headHtml": "SIX: Lowering target price to $34.00", + "provider": "Argus Research", + "reportDate": "2021-05-12T00:00:00Z", + "reportTitle": "SIX FLAGS ENTERTAINMENT CORP has an Investment Rating of SELL; a target price of $34.000000; an Industry Subrating of Medium; a Management Subrating of Low; a Safety Subrating of Low; a Financial Strength Subrating of Medium; a Growth Subrating of Medium; and a Value Subrating of Low.", + "reportType": "Quantitative Report" + }, + { + "id": "ARGUS_4574_QuantitativeReport_1620172800000", + "headHtml": "SIX: Lowering target price to $35.00", + "provider": "Argus Research", + "reportDate": "2021-05-05T00:00:00Z", + "reportTitle": "SIX FLAGS ENTERTAINMENT CORP has an Investment Rating of SELL; a target price of $35.000000; an Industry Subrating of Medium; a Management Subrating of Low; a Safety Subrating of Low; a Financial Strength Subrating of Medium; a Growth Subrating of Medium; and a Value Subrating of Low.", + "reportType": "Quantitative Report" + } + ], + "sigDevs": [ + { + "headline": "Six Flags Announces First Quarter 2021 Performance", + "date": "2021-04-28" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-SPOT.json b/tests/http/insights-SPOT.json new file mode 100644 index 00000000..8bb249b0 --- /dev/null +++ b/tests/http/insights-SPOT.json @@ -0,0 +1,183 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=SPOT" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "fgmf449g9tcb6" + ], + "x-yahoo-request-id": [ + "fgmf449g9tcb6" + ], + "x-request-id": [ + "e0f69d95-af10-4142-b321-a70b75dafa7e" + ], + "content-encoding": [ + "gzip" + ], + "content-length": [ + "1085" + ], + "x-envoy-upstream-service-time": [ + "5" + ], + "date": [ + "Fri, 14 May 2021 17:20:38 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-baseline-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "0" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "SPOT", + "instrumentInfo": { + "technicalEvents": { + "provider": "Trading Central", + "sector": "Communication Services", + "shortTermOutlook": { + "stateDescription": "Bullish events outweigh bearish events.", + "direction": "Bullish", + "score": 1, + "scoreDescription": "Weak Bullish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 3, + "sectorScoreDescription": "Strong Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 4, + "indexScoreDescription": "Very Strong Bearish Evidence" + }, + "intermediateTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 3, + "scoreDescription": "Strong Bearish Evidence", + "sectorDirection": "Bearish", + "sectorScore": 2, + "sectorScoreDescription": "Bearish Evidence", + "indexDirection": "Bearish", + "indexScore": 2, + "indexScoreDescription": "Bearish Evidence" + }, + "longTermOutlook": { + "stateDescription": "All events are bearish.", + "direction": "Bearish", + "score": 2, + "scoreDescription": "Bearish Evidence", + "sectorDirection": "Neutral", + "sectorScore": 0, + "sectorScoreDescription": "No Evidence", + "indexDirection": "Bullish", + "indexScore": 1, + "indexScoreDescription": "Weak Bullish Evidence" + } + }, + "keyTechnicals": { + "provider": "Trading Central", + "support": 146.87, + "resistance": 271.71, + "stopLoss": 194.681466 + }, + "valuation": { + "color": 0, + "description": "Overvalued", + "relativeValue": "Premium", + "provider": "Trading Central" + } + }, + "companySnapshot": { + "sectorInfo": "Communication Services", + "company": { + "innovativeness": 0.9225 + }, + "sector": { + "innovativeness": 0.5, + "hiring": 0.5, + "sustainability": 0.5, + "insiderSentiments": 0.5, + "earningsReports": 0.5, + "dividends": 0.5 + } + }, + "events": [ + { + "eventType": "Commodity Channel Index", + "pricePeriod": "W", + "tradingHorizon": "S", + "tradeType": "S", + "imageUrl": "https://s.yimg.com/uc/fin/img/assets/generic.svg", + "startDate": 1620394200, + "endDate": 1620394200 + } + ], + "reports": [ + { + "id": "MS_0P0001CX12_AnalystReport_1619823044000", + "headHtml": "Analyst Report: Spotify Technology S.A.", + "provider": "Morningstar", + "reportDate": "2021-04-30T22:50:44Z", + "reportTitle": "Spotify, headquartered in Stockholm, Sweden, is one of the world’s largest music streaming service providers, with over 150 million total listeners. The firm monetizes its users through both a paid subscription model, referred to as its premium service, and an ad-based model, referred to as its ad-supported service. Revenue from premium and ad-supported services represented 90% and 10% of Spotify’s 2017 total revenue, respectively.", + "reportType": "Analyst Report" + }, + { + "id": "MS_0P0001CX12_AnalystReport_1619738747000", + "headHtml": "Analyst Report: Spotify Technology S.A.", + "provider": "Morningstar", + "reportDate": "2021-04-29T23:25:47Z", + "reportTitle": "Spotify, headquartered in Stockholm, Sweden, is one of the world’s largest music streaming service providers, with over 150 million total listeners. The firm monetizes its users through both a paid subscription model, referred to as its premium service, and an ad-based model, referred to as its ad-supported service. Revenue from premium and ad-supported services represented 90% and 10% of Spotify’s 2017 total revenue, respectively.", + "reportType": "Analyst Report" + } + ], + "sigDevs": [ + { + "headline": "Spotify Technology Qtrly Loss Per Share EUR 0.25", + "date": "2021-04-28" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-UNIR.MI.json b/tests/http/insights-UNIR.MI.json new file mode 100644 index 00000000..6dac3a45 --- /dev/null +++ b/tests/http/insights-UNIR.MI.json @@ -0,0 +1,83 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=UNIR.MI" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "dm4rg3hg9tcb6" + ], + "x-yahoo-request-id": [ + "dm4rg3hg9tcb6" + ], + "x-request-id": [ + "fd30b86b-2350-4e2c-ab3b-3d810225e0fa" + ], + "content-length": [ + "144" + ], + "x-envoy-upstream-service-time": [ + "4" + ], + "date": [ + "Fri, 14 May 2021 17:20:38 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-canary-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "3" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "UNIR.MI", + "sigDevs": [ + { + "headline": "Unieuro FY Net Profit Up At EUR 53.6 Mln", + "date": "2021-05-07" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file diff --git a/tests/http/insights-WSKT.JK.json b/tests/http/insights-WSKT.JK.json new file mode 100644 index 00000000..53167a19 --- /dev/null +++ b/tests/http/insights-WSKT.JK.json @@ -0,0 +1,83 @@ +{ + "request": { + "url": "https://query2.finance.yahoo.com/ws/insights/v2/finance/insights?lang=en-US®ion=US&getAllResearchReports=true&reportsCount=2&symbol=WSKT.JK" + }, + "response": { + "ok": true, + "status": 200, + "statusText": "OK", + "headers": { + "content-type": [ + "application/json" + ], + "cache-control": [ + "public, max-age=300, stale-while-revalidate=120" + ], + "vary": [ + "Origin,Accept-Encoding" + ], + "y-rid": [ + "be36185g9tcb5" + ], + "x-yahoo-request-id": [ + "be36185g9tcb5" + ], + "x-request-id": [ + "6bc5eb70-085d-4ffb-80ac-ed243ebc068b" + ], + "content-length": [ + "166" + ], + "x-envoy-upstream-service-time": [ + "3" + ], + "date": [ + "Fri, 14 May 2021 17:20:37 GMT" + ], + "server": [ + "ATS" + ], + "x-envoy-decorator-operation": [ + "finance-market-analytics-api--mtls-canary-production-bf1.finance-k8s.svc.yahoo.local:4080/*" + ], + "age": [ + "3" + ], + "strict-transport-security": [ + "max-age=15552000" + ], + "referrer-policy": [ + "no-referrer-when-downgrade" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "connection": [ + "close" + ], + "expect-ct": [ + "max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\"" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ] + }, + "bodyJson": { + "finance": { + "result": { + "symbol": "WSKT.JK", + "sigDevs": [ + { + "headline": "PT Waskita Karya (Persero) Tbk announces FY 2015 cash dividend", + "date": "2016-04-04" + } + ] + }, + "error": null + } + } + } +} \ No newline at end of file