Copyright | (c) Dennis Gosnell, 2016 |
---|---|
License | BSD3 |
Safe Haskell | None |
Language | Haskell2010 |
This module contians internal types and methods for accessing the Yahoo Finance webservice APIs.
- newtype QueryFormat = QueryFormat {}
- newtype ViewType = ViewType {
- unViewType :: Text
- data Quote = Quote {
- quoteChange :: Text
- quoteChangePercent :: Text
- quoteDayHigh :: Text
- quoteDayLow :: Text
- quoteIssuerName :: Text
- quoteIssuerNameLang :: Text
- quoteName :: Text
- quotePrice :: Text
- quoteSymbol :: Text
- quoteTS :: Text
- quoteType :: Text
- quoteUTCTime :: UTCTime
- quoteVolume :: Text
- quoteYearHigh :: Text
- quoteYearLow :: Text
- newtype QuoteList = QuoteList {
- unQuoteList :: [Quote]
- type YahooFinanceJsonApi = "webservice" :> ("v1" :> ("symbols" :> (Capture "symbol_list" [StockSymbol] :> ("quote" :> (QueryParam "format" QueryFormat :> (QueryParam "view" ViewType :> Get '[JSON] QuoteList))))))
- yahooFinanceJsonBaseUrl :: BaseUrl
- getQuoteLowLevel :: [StockSymbol] -> Maybe QueryFormat -> Maybe ViewType -> Manager -> BaseUrl -> ExceptT ServantError IO QuoteList
Documentation
newtype QueryFormat Source #
Query format query param for the Yahoo finance webservice APIs.
Normally should be the string json
.
View type query param for the Yahoo finance webservice APIs.
Normally should be the string detail
.
Real-time stock quote.
Quote | |
|
Newtype wrapper around a list of Quote
s.
QuoteList | |
|
type YahooFinanceJsonApi = "webservice" :> ("v1" :> ("symbols" :> (Capture "symbol_list" [StockSymbol] :> ("quote" :> (QueryParam "format" QueryFormat :> (QueryParam "view" ViewType :> Get '[JSON] QuoteList)))))) Source #
Low-level Servant definition of the Yahoo Finance webservice API.
yahooFinanceJsonBaseUrl :: BaseUrl Source #
BaseUrl
for the Yahoo Finance webservice API. This represents
https://finance.yahoo.com
.
getQuoteLowLevel :: [StockSymbol] -> Maybe QueryFormat -> Maybe ViewType -> Manager -> BaseUrl -> ExceptT ServantError IO QuoteList Source #