Haskell library for the IEX trading API.
Example:
stack build && stack ghci
getQuote :: AuthAndSymbol -> IO (Maybe IEXQuote.Quote)
> getQuote ("pk_myAPItoken", "msft")
Just (Quote {symbol = "MSFT",
companyName = "Microsoft Corp.",
primaryExchange = Nothing,
sector = Nothing,
calculationPrice = "tops",
open = 128.9,
...
})
getCompany :: AuthAndSymbol -> IO (Maybe IEXCompany.Company)
> getCompany ("pk_myAPItoken", "aapl")
Just (Company {symbol = "AAPL",
companyName = "Apple Inc.",
exchange = "Nasdaq Global Select",
industry = "Computer Hardware",
website = "http://www.apple.com",
description = "Apple Inc is designs ...",
ceo = "Timothy D. Cook",
issueType = "cs",
sector = "Technology"})
getPrice :: AuthAndSymbol -> IO (Maybe Double)
> getPrice ("pk_myAPItoken", "msft")
Just 131.56
Please see the HUnit test for a complete example of all API calls.
stack test
For any problems, comments, or feedback please create an issue here on GitHub.
If you redistribute our API data:
cabal gen-bounds
to put PVP-compliant version bounds (lower AND upper) on ALL your unique dependencies so your package will still be buildable years down the road. One important thing to note is that you only need to include version bounds once. For example, if you depend on the same package in your library and your test suite, you only need to put the version bounds for that dependency in one place. This keeps the dependency bounds information DRY.