Skip to content

Commit

Permalink
chore(tests): add "BTC-USD" to testSymbols
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Feb 26, 2021
1 parent edfa9ea commit d0e06ef
Show file tree
Hide file tree
Showing 36 changed files with 3,149 additions and 0 deletions.
66 changes: 66 additions & 0 deletions tests/http/autoc-BTC-USD.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"request": {
"url": "https://autoc.finance.yahoo.com/autoc?region=1&lang=en&query=BTC-USD"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"x-content-type-options": [
"nosniff"
],
"x-yahoo-request-id": [
"1569dl9g3h9vg"
],
"cache-control": [
"public, max-age=300, stale-while-revalidate=30, stale-if-error=3600"
],
"content-encoding": [
"gzip"
],
"content-type": [
"application/json;charset=utf-8"
],
"content-length": [
"60"
],
"date": [
"Fri, 26 Feb 2021 07:49:04 GMT"
],
"age": [
"0"
],
"strict-transport-security": [
"max-age=31536000"
],
"server": [
"ATS"
],
"expect-ct": [
"max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\""
],
"public-key-pins-report-only": [
"max-age=2592000; pin-sha256=\"2fRAUXyxl4A1/XHrKNBmc8bTkzA7y4FB/GLJuNAzCqY=\"; pin-sha256=\"I/Lt/z7ekCWanjD0Cvj5EqXls2lOaThEA0H2Bg4BT/o=\"; pin-sha256=\"K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q=\"; pin-sha256=\"Wd8xe/qfTwq3ylFNd3IpaqLHZbh2ZNCLluVzmeNkcpw=\"; pin-sha256=\"WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=\"; pin-sha256=\"cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A=\"; pin-sha256=\"dolnbtzEBnELx/9lOEQ22e6OZO/QNb6VSSX2XHA3E7A=\"; pin-sha256=\"i7WTqTvh0OioIruIfFR4kMPnBqrS2rdiVPl/s2uC/CY=\"; pin-sha256=\"r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=\"; pin-sha256=\"uUwZgwDOxcBXrQcntwu+kYFpkiVkOaezL0WYEZ3anJc=\"; includeSubdomains; report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-hpkp-report-only\""
],
"x-frame-options": [
"SAMEORIGIN"
],
"x-xss-protection": [
"1; mode=block"
],
"referrer-policy": [
"no-referrer-when-downgrade"
],
"connection": [
"close"
]
},
"bodyJson": {
"ResultSet": {
"Query": "BTC-USD",
"Result": []
}
}
}
}
73 changes: 73 additions & 0 deletions tests/http/historical-BTC-USD-2020-01-01-to-2020-01-03.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"request": {
"url": "https://query1.finance.yahoo.com/v7/finance/download/BTC-USD?interval=1d&events=history&includeAdjustedClose=true&period1=1577836800&period2=1578009600"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"content-disposition": [
"attachment; filename=BTC-USD.csv"
],
"content-type": [
"text/csv"
],
"cache-control": [
"private, max-age=10, stale-while-revalidate=20"
],
"vary": [
"Origin"
],
"y-rid": [
"76ordd1g3h9vg"
],
"x-yahoo-request-id": [
"76ordd1g3h9vg"
],
"x-request-id": [
"f8501cfc-82f6-44fa-9180-2164f5e7f6a8"
],
"content-length": [
"290"
],
"x-envoy-upstream-service-time": [
"3"
],
"date": [
"Fri, 26 Feb 2021 07:49:04 GMT"
],
"server": [
"ATS"
],
"x-envoy-decorator-operation": [
"finance-chart-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": "Date,Open,High,Low,Close,Adj Close,Volume\n2020-01-01,7194.892090,7254.330566,7174.944336,7200.174316,7200.174316,18565664997\n2020-01-02,7202.551270,7212.155273,6935.270020,6985.470215,6985.470215,20802083465\n2020-01-03,6984.428711,7413.715332,6914.996094,7344.884277,7344.884277,28111481032"
}
}
137 changes: 137 additions & 0 deletions tests/http/quote-BTC-USD.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"request": {
"url": "https://query2.finance.yahoo.com/v7/finance/quote?symbols=BTC-USD"
},
"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": [
"3rugpk9g3h9vg"
],
"x-yahoo-request-id": [
"3rugpk9g3h9vg"
],
"x-request-id": [
"2bb57bbd-0c5e-42cd-bfa1-6c2b1461317c"
],
"content-encoding": [
"gzip"
],
"content-length": [
"853"
],
"x-envoy-upstream-service-time": [
"1"
],
"date": [
"Fri, 26 Feb 2021 07:49:04 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"
]
},
"bodyJson": {
"quoteResponse": {
"result": [
{
"language": "en-US",
"region": "US",
"quoteType": "CRYPTOCURRENCY",
"quoteSourceName": "CoinMarketCap",
"triggerable": true,
"currency": "USD",
"priceHint": 2,
"circulatingSupply": 18638932,
"lastMarket": "CoinMarketCap",
"volume24Hr": 62631043072,
"volumeAllCurrencies": 62631043072,
"fromCurrency": "BTC",
"toCurrency": "USD=X",
"regularMarketChange": -6024.1562,
"regularMarketChangePercent": -11.930983,
"regularMarketTime": 1614325622,
"regularMarketPrice": 44467.547,
"regularMarketDayHigh": 47677.535,
"regularMarketDayRange": "44467.547 - 47677.535",
"regularMarketDayLow": 44467.547,
"regularMarketVolume": 62631043072,
"regularMarketPreviousClose": 46756.99,
"fullExchangeName": "CCC",
"regularMarketOpen": 46756.99,
"averageDailyVolume3Month": 58705874184,
"averageDailyVolume10Day": 72812647616,
"startDate": 1367103600,
"coinImageUrl": "https://s.yimg.com/uc/fin/img/reports-thumbnails/1.png",
"fiftyTwoWeekLowChange": 40360.566,
"fiftyTwoWeekLowChangePercent": 9.827308,
"fiftyTwoWeekRange": "4106.981 - 58330.57",
"fiftyTwoWeekHighChange": -13863.023,
"fiftyTwoWeekHighChangePercent": -0.23766309,
"fiftyTwoWeekLow": 4106.981,
"fiftyTwoWeekHigh": 58330.57,
"fiftyDayAverage": 40623.53,
"fiftyDayAverageChange": 3844.0156,
"fiftyDayAverageChangePercent": 0.09462535,
"twoHundredDayAverage": 21837.865,
"twoHundredDayAverageChange": 22629.682,
"twoHundredDayAverageChangePercent": 1.0362588,
"marketCap": 828827500544,
"sourceInterval": 15,
"exchangeDataDelayedBy": 0,
"tradeable": false,
"firstTradeDateMilliseconds": 1410908400000,
"marketState": "REGULAR",
"exchangeTimezoneShortName": "GMT",
"gmtOffSetMilliseconds": 0,
"market": "ccc_market",
"esgPopulated": false,
"exchange": "CCC",
"shortName": "Bitcoin USD",
"messageBoardId": "finmb_BTC_CCC",
"exchangeTimezoneName": "Europe/London",
"symbol": "BTC-USD"
}
],
"error": null
}
}
}
}
Loading

0 comments on commit d0e06ef

Please sign in to comment.