| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 11:55:43 GMT
X-Served-By: cache-dfw-ktki8620049-DFW, cache-bom-vanm7210032-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768650943.063809,VS0,VE292
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
yahoo-finance-api: Read quotes from Yahoo Finance API.
[Skip to Readme]
yahoo-finance-api: Read quotes from Yahoo Finance API.
Haskell wrapper for the stock APIs provided by Yahoo Finance.
UPDATE: It appears that yahoo disabled the quote API used by this pakcage. This package is no longer usable. See this issue.
[Skip to Readme]
Downloads
- yahoo-finance-api-0.2.0.3.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3 |
|---|---|
| Dependencies | aeson, base (>=4.7 && <5), either, http-api-data, http-client, mtl, servant (>=0.4), servant-client (>=0.4), text, time, transformers, vector [details] |
| License | BSD-3-Clause |
| Copyright | 2016 Dennis Gosnell |
| Author | Dennis Gosnell, James M.C. Haver II |
| Maintainer | cdep.illabout@gmail.com, mchaver@gmail.com |
| Uploaded | by cdepillabout at 2017-11-26T04:09:44Z |
| Category | Web |
| Home page | https://github.com/cdepillabout/yahoo-finance-api |
| Source repo | head: git clone https://github.com/cdepillabout/yahoo-finance-api |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 3583 total (19 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2017-11-26 [all 1 reports] |
Readme for yahoo-finance-api-0.2.0.3
[back to package description]Web.Yahoo.Finance
UPDATE: It appears that Yahoo disabled the quote API this package is using. This package is no longer usable. See this issue.
This Haskell module exports functions for reading stock quotes from the Yahoo Finance APIs.
Usage
Currently, only the Yahoo Finance YQL API is implemented. It can be accessed with methods in Web.Yahoo.Finance.YQL.
(Note: The following usage example only works when using servant-0.9.)
λ> :set -XOverloadedStrings
λ> import Network.HTTP.Client.TLS (getGlobalManager)
λ> import Servant.Client (ClientEnv(ClientEnv), runClientM)
λ> import Web.Yahoo.Finance.YQL (StockSymbol(StockSymbol), YQLQuery(YQLQuery), getQuotes, yahooFinanceJsonBaseUrl)
λ> manager <- getGlobalManager
λ> res <- runClientM (getQuotes (YQLQuery [StockSymbol "GOOG", StockSymbol "AA"]) ) (ClientEnv manager yahooFinanceJsonBaseUrl)
λ> print res
This produces output like the following:
Right
( YQLResponse
{ responseCount = 2
, responseCreated = 2016-10-09 13:44:49 UTC
, responseLang = "en-US"
, responseQuotes =
[ Just
( Quote
{ quoteAverageDailyVolume = "1296480"
, quoteChange = "-1.78"
, quoteDaysLow = "770.75"
, quoteDaysHigh = "779.66"
, quoteYearLow = "639.01"
, quoteYearHigh = "789.87"
, quoteMarketCapitalization = "532.69B"
, quoteLastTradePriceOnly = "775.08"
, quoteDaysRange = "770.75 - 779.66"
, quoteName = "Alphabet Inc."
, quoteSymbol = "GOOG"
, quoteVolume = "933158"
, quoteStockExchange = "NMS"
}
)
, Just
(Quote
{ quoteAverageDailyVolume = "5999180"
, quoteChange = "-0.41"
, quoteDaysLow = "31.03"
, quoteDaysHigh = "32.10"
, quoteYearLow = "18.42"
, quoteYearHigh = "34.50"
, quoteMarketCapitalization = "41.26B"
, quoteLastTradePriceOnly = "31.37"
, quoteDaysRange = "31.03 - 32.10"
, quoteName = "Alcoa Inc. Common Stock"
, quoteSymbol = "AA"
, quoteVolume = "7858603"
, quoteStockExchange = "NYQ"
}
)
]
}
)
For other examples refer to test/Web/Yahoo/FinanceSpec.hs.