hledger-stockquotes-0.1.1.0: Generate HLedger Price Directives From Daily Stock Quotes.
Safe HaskellNone
LanguageHaskell2010

Web.AlphaVantage

Description

A minimal client for the AlphaVantage API.

Currently only supports the Daily Time Series endpoint.

Synopsis

Documentation

newtype Config Source #

Configuration for the AlphaVantage API Client.

Constructors

Config 

Fields

Instances

Instances details
Eq Config Source # 
Instance details

Defined in Web.AlphaVantage

Methods

(==) :: Config -> Config -> Bool #

(/=) :: Config -> Config -> Bool #

Read Config Source # 
Instance details

Defined in Web.AlphaVantage

Show Config Source # 
Instance details

Defined in Web.AlphaVantage

Generic Config Source # 
Instance details

Defined in Web.AlphaVantage

Associated Types

type Rep Config :: Type -> Type #

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

type Rep Config Source # 
Instance details

Defined in Web.AlphaVantage

type Rep Config = D1 ('MetaData "Config" "Web.AlphaVantage" "hledger-stockquotes-0.1.1.0-CLbdEym9gsHHcm6pbs3sy" 'True) (C1 ('MetaCons "Config" 'PrefixI 'True) (S1 ('MetaSel ('Just "cApiKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data AlphaVantageResponse a Source #

Wrapper type enumerating between successful responses and error responses with notes.

Constructors

ApiResponse a 
ApiError Text 

Instances

Instances details
Functor AlphaVantageResponse Source # 
Instance details

Defined in Web.AlphaVantage

Eq a => Eq (AlphaVantageResponse a) Source # 
Instance details

Defined in Web.AlphaVantage

Read a => Read (AlphaVantageResponse a) Source # 
Instance details

Defined in Web.AlphaVantage

Show a => Show (AlphaVantageResponse a) Source # 
Instance details

Defined in Web.AlphaVantage

Generic (AlphaVantageResponse a) Source # 
Instance details

Defined in Web.AlphaVantage

Associated Types

type Rep (AlphaVantageResponse a) :: Type -> Type #

FromJSON a => FromJSON (AlphaVantageResponse a) Source #

Check for errors by attempting to parse a Note field. If one does not exist, parse the inner type.

Instance details

Defined in Web.AlphaVantage

type Rep (AlphaVantageResponse a) Source # 
Instance details

Defined in Web.AlphaVantage

type Rep (AlphaVantageResponse a) = D1 ('MetaData "AlphaVantageResponse" "Web.AlphaVantage" "hledger-stockquotes-0.1.1.0-CLbdEym9gsHHcm6pbs3sy" 'False) (C1 ('MetaCons "ApiResponse" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "ApiError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Prices Source #

The Single-Day Price Quotes & Volume for a Stock,.

Instances

Instances details
Eq Prices Source # 
Instance details

Defined in Web.AlphaVantage

Methods

(==) :: Prices -> Prices -> Bool #

(/=) :: Prices -> Prices -> Bool #

Read Prices Source # 
Instance details

Defined in Web.AlphaVantage

Show Prices Source # 
Instance details

Defined in Web.AlphaVantage

Generic Prices Source # 
Instance details

Defined in Web.AlphaVantage

Associated Types

type Rep Prices :: Type -> Type #

Methods

from :: Prices -> Rep Prices x #

to :: Rep Prices x -> Prices #

FromJSON Prices Source # 
Instance details

Defined in Web.AlphaVantage

type Rep Prices Source # 
Instance details

Defined in Web.AlphaVantage

getDailyPrices :: Config -> Text -> Day -> Day -> IO (AlphaVantageResponse [(Day, Prices)]) Source #

Fetch the Daily Prices for a Stock, returning only the prices between the two given dates.