Skip to content

Commit

Permalink
chore(quote): http responses
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Feb 8, 2021
1 parent 0ac9ec7 commit 3bc31bb
Show file tree
Hide file tree
Showing 5 changed files with 365 additions and 0 deletions.
73 changes: 73 additions & 0 deletions tests/http/quote-0P000071W8.TO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"request": {
"url": "https://query2.finance.yahoo.com/v7/finance/quote?symbols=0P000071W8.TO"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"content-type": [
"application/json"
],
"cache-control": [
"public, max-age=1, stale-while-revalidate=9"
],
"vary": [
"Origin,Accept-Encoding"
],
"y-rid": [
"2b0gpv1g21fju"
],
"x-yahoo-request-id": [
"2b0gpv1g21fju"
],
"x-request-id": [
"65bb3c37-d481-441e-8766-4bfb9e68bc6f"
],
"content-encoding": [
"gzip"
],
"content-length": [
"674"
],
"x-envoy-upstream-service-time": [
"2"
],
"date": [
"Mon, 08 Feb 2021 04:30:54 GMT"
],
"server": [
"ATS"
],
"x-envoy-decorator-operation": [
"finance-quote-api--mtls-production-ir2.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"
]
},
"body": "{\"quoteResponse\":{\"result\":[{\"language\":\"en-US\",\"region\":\"US\",\"quoteType\":\"MUTUALFUND\",\"quoteSourceName\":\"Delayed Quote\",\"triggerable\":true,\"currency\":\"CAD\",\"exchange\":\"TOR\",\"shortName\":\"TD Indiciel américain - e (C$)\",\"longName\":\"TD U.S. Index Fund - e\",\"exchangeTimezoneName\":\"America/Toronto\",\"exchangeTimezoneShortName\":\"EST\",\"gmtOffSetMilliseconds\":-18000000,\"market\":\"ca_market\",\"esgPopulated\":false,\"fiftyDayAverage\":86.08782,\"fiftyDayAverageChange\":2.7221756,\"fiftyDayAverageChangePercent\":0.031620912,\"twoHundredDayAverage\":82.08348,\"twoHundredDayAverageChange\":6.7265167,\"twoHundredDayAverageChangePercent\":0.08194727,\"sourceInterval\":15,\"exchangeDataDelayedBy\":15,\"tradeable\":false,\"firstTradeDateMilliseconds\":1344519000000,\"priceHint\":2,\"marketState\":\"CLOSED\",\"regularMarketChange\":1.2699966,\"regularMarketChangePercent\":1.4507616,\"regularMarketTime\":1612555200,\"regularMarketPrice\":88.81,\"regularMarketPreviousClose\":87.54,\"fullExchangeName\":\"Toronto\",\"averageDailyVolume3Month\":0,\"averageDailyVolume10Day\":0,\"fiftyTwoWeekLowChange\":31.629997,\"fiftyTwoWeekLowChangePercent\":0.5531654,\"fiftyTwoWeekRange\":\"57.18 - 88.81\",\"fiftyTwoWeekHighChange\":0.0,\"fiftyTwoWeekHighChangePercent\":0.0,\"fiftyTwoWeekLow\":57.18,\"fiftyTwoWeekHigh\":88.81,\"ytdReturn\":18.12,\"trailingThreeMonthReturns\":7.59,\"symbol\":\"0P000071W8.TO\"}],\"error\":null}}"
}
}
73 changes: 73 additions & 0 deletions tests/http/quote-AAPL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"request": {
"url": "https://query2.finance.yahoo.com/v7/finance/quote?symbols=AAPL"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"content-type": [
"application/json"
],
"cache-control": [
"public, max-age=1, stale-while-revalidate=9"
],
"vary": [
"Origin,Accept-Encoding"
],
"y-rid": [
"732cu7hg21fjr"
],
"x-yahoo-request-id": [
"732cu7hg21fjr"
],
"x-request-id": [
"b9a870a4-96b5-46b4-b6e5-791c30a25c53"
],
"content-encoding": [
"gzip"
],
"content-length": [
"1005"
],
"x-envoy-upstream-service-time": [
"1"
],
"date": [
"Mon, 08 Feb 2021 04:30:50 GMT"
],
"server": [
"ATS"
],
"x-envoy-decorator-operation": [
"finance-quote-api--mtls-production-ir2.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"
]
},
"body": "{\"quoteResponse\":{\"result\":[{\"language\":\"en-US\",\"region\":\"US\",\"quoteType\":\"EQUITY\",\"quoteSourceName\":\"Nasdaq Real Time Price\",\"triggerable\":true,\"currency\":\"USD\",\"firstTradeDateMilliseconds\":345479400000,\"priceHint\":2,\"postMarketChangePercent\":-0.058498,\"postMarketTime\":1612573198,\"postMarketPrice\":136.68,\"postMarketChange\":-0.0800018,\"regularMarketChange\":-0.42500305,\"regularMarketChangePercent\":-0.30980286,\"regularMarketTime\":1612558802,\"regularMarketPrice\":136.76,\"regularMarketDayHigh\":137.41,\"regularMarketDayRange\":\"135.86 - 137.41\",\"regularMarketDayLow\":135.86,\"regularMarketVolume\":75693830,\"regularMarketPreviousClose\":137.185,\"bid\":136.68,\"ask\":136.7,\"bidSize\":29,\"askSize\":11,\"fullExchangeName\":\"NasdaqGS\",\"financialCurrency\":\"USD\",\"regularMarketOpen\":137.35,\"averageDailyVolume3Month\":106825349,\"averageDailyVolume10Day\":108468300,\"fiftyTwoWeekLowChange\":83.6075,\"fiftyTwoWeekLowChangePercent\":1.572974,\"fiftyTwoWeekRange\":\"53.1525 - 145.09\",\"fiftyTwoWeekHighChange\":-8.330002,\"fiftyTwoWeekHighChangePercent\":-0.057412654,\"fiftyTwoWeekLow\":53.1525,\"marketState\":\"CLOSED\",\"fiftyTwoWeekHigh\":145.09,\"dividendDate\":1613001600,\"earningsTimestamp\":1611765000,\"earningsTimestampStart\":1619607540,\"earningsTimestampEnd\":1620043200,\"trailingAnnualDividendRate\":0.807,\"trailingPE\":37.092484,\"trailingAnnualDividendYield\":0.0058825673,\"epsTrailingTwelveMonths\":3.687,\"epsForward\":4.66,\"epsCurrentYear\":4.45,\"priceEpsCurrentYear\":30.732584,\"sharesOutstanding\":16788100096,\"bookValue\":3.936,\"fiftyDayAverage\":133.31032,\"fiftyDayAverageChange\":3.4496765,\"fiftyDayAverageChangePercent\":0.02587704,\"twoHundredDayAverage\":119.94297,\"twoHundredDayAverageChange\":16.817024,\"twoHundredDayAverageChangePercent\":0.1402085,\"marketCap\":2295940513792,\"forwardPE\":29.34764,\"priceToBook\":34.745934,\"sourceInterval\":15,\"exchangeDataDelayedBy\":0,\"tradeable\":false,\"exchange\":\"NMS\",\"shortName\":\"Apple Inc.\",\"longName\":\"Apple Inc.\",\"messageBoardId\":\"finmb_24937\",\"exchangeTimezoneName\":\"America/New_York\",\"exchangeTimezoneShortName\":\"EST\",\"gmtOffSetMilliseconds\":-18000000,\"market\":\"us_market\",\"esgPopulated\":false,\"displayName\":\"Apple\",\"symbol\":\"AAPL\"}],\"error\":null}}"
}
}
73 changes: 73 additions & 0 deletions tests/http/quote-BABA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"request": {
"url": "https://query2.finance.yahoo.com/v7/finance/quote?symbols=BABA"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"content-type": [
"application/json"
],
"cache-control": [
"public, max-age=1, stale-while-revalidate=9"
],
"vary": [
"Origin,Accept-Encoding"
],
"y-rid": [
"7vmkqs5g21fjs"
],
"x-yahoo-request-id": [
"7vmkqs5g21fjs"
],
"x-request-id": [
"b35816fc-5404-4543-b8b6-575babefb3c6"
],
"content-encoding": [
"gzip"
],
"content-length": [
"969"
],
"x-envoy-upstream-service-time": [
"2"
],
"date": [
"Mon, 08 Feb 2021 04:30:52 GMT"
],
"server": [
"ATS"
],
"x-envoy-decorator-operation": [
"finance-quote-api--mtls-production-ir2.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"
]
},
"body": "{\"quoteResponse\":{\"result\":[{\"language\":\"en-US\",\"region\":\"US\",\"quoteType\":\"EQUITY\",\"quoteSourceName\":\"Nasdaq Real Time Price\",\"triggerable\":true,\"currency\":\"USD\",\"marketState\":\"CLOSED\",\"tradeable\":false,\"exchange\":\"NYQ\",\"shortName\":\"Alibaba Group Holding Limited\",\"longName\":\"Alibaba Group Holding Limited\",\"messageBoardId\":\"finmb_42083601\",\"exchangeTimezoneName\":\"America/New_York\",\"exchangeTimezoneShortName\":\"EST\",\"gmtOffSetMilliseconds\":-18000000,\"market\":\"us_market\",\"esgPopulated\":false,\"fiftyTwoWeekLowChange\":95.72002,\"fiftyTwoWeekLowChangePercent\":0.5632246,\"fiftyTwoWeekRange\":\"169.95 - 319.32\",\"fiftyTwoWeekHighChange\":-53.649994,\"fiftyTwoWeekHighChangePercent\":-0.16801326,\"fiftyTwoWeekLow\":169.95,\"fiftyTwoWeekHigh\":319.32,\"earningsTimestamp\":1612249320,\"earningsTimestampStart\":1612249320,\"earningsTimestampEnd\":1612249320,\"trailingPE\":28.535982,\"epsTrailingTwelveMonths\":9.31,\"epsForward\":12.06,\"epsCurrentYear\":10.32,\"priceEpsCurrentYear\":25.74322,\"sharesOutstanding\":2705639936,\"bookValue\":24.798,\"fiftyDayAverage\":247.21844,\"fiftyDayAverageChange\":18.451569,\"fiftyDayAverageChangePercent\":0.0746367,\"twoHundredDayAverage\":269.34253,\"twoHundredDayAverageChange\":-3.6725159,\"twoHundredDayAverageChangePercent\":-0.013635113,\"marketCap\":722120278016,\"forwardPE\":22.029022,\"priceToBook\":10.713365,\"sourceInterval\":15,\"exchangeDataDelayedBy\":0,\"firstTradeDateMilliseconds\":1411133400000,\"priceHint\":2,\"postMarketChangePercent\":0.293597,\"postMarketTime\":1612573196,\"postMarketPrice\":266.45,\"postMarketChange\":0.779999,\"regularMarketChange\":-1.289978,\"regularMarketChangePercent\":-0.48321024,\"regularMarketTime\":1612558801,\"regularMarketPrice\":265.67,\"regularMarketDayHigh\":266.45,\"regularMarketDayRange\":\"263.21 - 266.45\",\"regularMarketDayLow\":263.21,\"regularMarketVolume\":11018671,\"regularMarketPreviousClose\":266.96,\"bid\":266.44,\"ask\":266.47,\"bidSize\":10,\"askSize\":8,\"fullExchangeName\":\"NYSE\",\"financialCurrency\":\"CNY\",\"regularMarketOpen\":264.61,\"averageDailyVolume3Month\":25947704,\"averageDailyVolume10Day\":18244085,\"displayName\":\"Alibaba\",\"symbol\":\"BABA\"}],\"error\":null}}"
}
}
73 changes: 73 additions & 0 deletions tests/http/quote-OCDO.L.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"request": {
"url": "https://query2.finance.yahoo.com/v7/finance/quote?symbols=OCDO.L"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"content-type": [
"application/json"
],
"cache-control": [
"public, max-age=1, stale-while-revalidate=9"
],
"vary": [
"Origin,Accept-Encoding"
],
"y-rid": [
"blqhcohg21fjr"
],
"x-yahoo-request-id": [
"blqhcohg21fjr"
],
"x-request-id": [
"d20377f6-33ae-482d-b652-f4aefa823e0b"
],
"content-encoding": [
"gzip"
],
"content-length": [
"851"
],
"x-envoy-upstream-service-time": [
"2"
],
"date": [
"Mon, 08 Feb 2021 04:30:51 GMT"
],
"server": [
"ATS"
],
"x-envoy-decorator-operation": [
"finance-quote-api--mtls-production-ir2.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"
]
},
"body": "{\"quoteResponse\":{\"result\":[{\"language\":\"en-US\",\"region\":\"US\",\"quoteType\":\"EQUITY\",\"quoteSourceName\":\"Delayed Quote\",\"triggerable\":false,\"currency\":\"GBp\",\"marketState\":\"PREPRE\",\"regularMarketChange\":-13.0,\"regularMarketChangePercent\":-0.4608295,\"regularMarketTime\":1612542901,\"regularMarketPrice\":2808.0,\"regularMarketDayHigh\":2845.0,\"regularMarketDayRange\":\"2776.0 - 2845.0\",\"regularMarketDayLow\":2776.0,\"regularMarketVolume\":796463,\"regularMarketPreviousClose\":2821.0,\"bid\":2805.0,\"ask\":2807.0,\"bidSize\":0,\"askSize\":0,\"fullExchangeName\":\"LSE\",\"financialCurrency\":\"GBP\",\"regularMarketOpen\":2836.0,\"averageDailyVolume3Month\":1813301,\"averageDailyVolume10Day\":1258670,\"fiftyTwoWeekLowChange\":1813.988,\"fiftyTwoWeekLowChangePercent\":1.8249156,\"fiftyTwoWeekRange\":\"994.012 - 2914.0\",\"fiftyTwoWeekHighChange\":-106.0,\"fiftyTwoWeekHighChangePercent\":-0.036376115,\"fiftyTwoWeekLow\":994.012,\"fiftyTwoWeekHigh\":2914.0,\"earningsTimestamp\":1612836000,\"earningsTimestampStart\":1612836000,\"earningsTimestampEnd\":1612836000,\"epsTrailingTwelveMonths\":-17.2,\"sharesOutstanding\":748801984,\"bookValue\":1.554,\"fiftyDayAverage\":2548.0303,\"fiftyDayAverageChange\":259.96973,\"fiftyDayAverageChangePercent\":0.10202772,\"twoHundredDayAverage\":2415.4285,\"twoHundredDayAverageChange\":392.57153,\"twoHundredDayAverageChangePercent\":0.16252667,\"marketCap\":21026359296,\"priceToBook\":1806.9498,\"sourceInterval\":15,\"exchangeDataDelayedBy\":20,\"firstTradeDateMilliseconds\":1279695600000,\"priceHint\":2,\"tradeable\":false,\"exchange\":\"LSE\",\"shortName\":\"OCADO GROUP PLC ORD 2P\",\"longName\":\"Ocado Group plc\",\"messageBoardId\":\"finmb_109303666\",\"exchangeTimezoneName\":\"Europe/London\",\"exchangeTimezoneShortName\":\"GMT\",\"gmtOffSetMilliseconds\":0,\"market\":\"gb_market\",\"esgPopulated\":false,\"symbol\":\"OCDO.L\"}],\"error\":null}}"
}
}
73 changes: 73 additions & 0 deletions tests/http/quote-QQQ.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"request": {
"url": "https://query2.finance.yahoo.com/v7/finance/quote?symbols=QQQ"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"content-type": [
"application/json"
],
"cache-control": [
"public, max-age=1, stale-while-revalidate=9"
],
"vary": [
"Origin,Accept-Encoding"
],
"y-rid": [
"bhta46dg21fjt"
],
"x-yahoo-request-id": [
"bhta46dg21fjt"
],
"x-request-id": [
"4fbb659c-a25b-4cc3-ab1b-94da44ff009d"
],
"content-encoding": [
"gzip"
],
"content-length": [
"931"
],
"x-envoy-upstream-service-time": [
"2"
],
"date": [
"Mon, 08 Feb 2021 04:30:53 GMT"
],
"server": [
"ATS"
],
"x-envoy-decorator-operation": [
"finance-quote-api--mtls-production-ir2.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"
]
},
"body": "{\"quoteResponse\":{\"result\":[{\"language\":\"en-US\",\"region\":\"US\",\"quoteType\":\"ETF\",\"quoteSourceName\":\"Delayed Quote\",\"triggerable\":true,\"currency\":\"USD\",\"exchange\":\"NMS\",\"shortName\":\"Invesco QQQ Trust, Series 1\",\"longName\":\"Invesco QQQ Trust\",\"messageBoardId\":\"finmb_8108558\",\"exchangeTimezoneName\":\"America/New_York\",\"exchangeTimezoneShortName\":\"EST\",\"gmtOffSetMilliseconds\":-18000000,\"market\":\"us_market\",\"esgPopulated\":false,\"sharesOutstanding\":393100000,\"bookValue\":188.775,\"fiftyDayAverage\":317.6297,\"fiftyDayAverageChange\":13.730286,\"fiftyDayAverageChangePercent\":0.043227337,\"twoHundredDayAverage\":291.22202,\"twoHundredDayAverageChange\":40.13797,\"twoHundredDayAverageChangePercent\":0.13782601,\"marketCap\":130257608704,\"priceToBook\":1.7553172,\"sourceInterval\":15,\"exchangeDataDelayedBy\":0,\"tradeable\":false,\"firstTradeDateMilliseconds\":921076200000,\"priceHint\":2,\"marketState\":\"CLOSED\",\"postMarketChangePercent\":0.060361,\"postMarketTime\":1612573184,\"postMarketPrice\":331.56,\"postMarketChange\":0.2000122,\"regularMarketChange\":1.1199951,\"regularMarketChangePercent\":0.3391458,\"regularMarketTime\":1612558801,\"regularMarketPrice\":331.36,\"regularMarketDayHigh\":332.4025,\"regularMarketDayRange\":\"329.53 - 332.4025\",\"regularMarketDayLow\":329.53,\"regularMarketVolume\":22731960,\"regularMarketPreviousClose\":330.24,\"bid\":331.56,\"ask\":331.8,\"bidSize\":11,\"askSize\":9,\"fullExchangeName\":\"NasdaqGS\",\"financialCurrency\":\"USD\",\"regularMarketOpen\":331.22,\"averageDailyVolume3Month\":30559437,\"averageDailyVolume10Day\":33936885,\"fiftyTwoWeekLowChange\":166.43,\"fiftyTwoWeekLowChangePercent\":1.0090947,\"fiftyTwoWeekRange\":\"164.93 - 332.4025\",\"fiftyTwoWeekHighChange\":-1.042511,\"fiftyTwoWeekHighChangePercent\":-0.0031362912,\"fiftyTwoWeekLow\":164.93,\"fiftyTwoWeekHigh\":332.4025,\"trailingAnnualDividendRate\":1.54,\"trailingPE\":85.073166,\"trailingAnnualDividendYield\":0.004663275,\"ytdReturn\":0.31,\"trailingThreeMonthReturns\":16.98,\"trailingThreeMonthNavReturns\":17.08,\"epsTrailingTwelveMonths\":3.895,\"symbol\":\"QQQ\"}],\"error\":null}}"
}
}

0 comments on commit 3bc31bb

Please sign in to comment.