Safe Haskell | None |
---|
- data TradeKing = TradeKing {}
- data TradeKingApp = TradeKingApp {}
- data Format
- data Command
- data Asset
- newtype Stock = Stock {}
- newtype CUSIP = CUSIP Text
- newtype Exchange = Exchange {
- unExchange :: Text
- type Eps4 = EpsDiv10 (EpsDiv10 (EpsDiv10 (EpsDiv10 Eps1)))
- type Fixed4 = Fixed Eps4
- data Currency
- data Price = Price Currency Fixed4
- data Option = Option {}
- data OptionType = OptionType {}
- data ContractType
- data OptionStyle
- data Note = Note
- data Future = Future
- data Period
- = Annually
- | SemiAnnually
- | Quarterly
- | Monthly
- data HighLow a = HighLow {}
- data StockQuote = StockQuote {}
- data StockInfo = StockInfo {
- siStock :: Stock
- siTime :: UTCTime
- siCompanyName :: Text
- siPrevClose :: Price
- siPrevOpen :: Price
- siOpen :: Price
- siCusip :: CUSIP
- siDiv :: Maybe Price
- siDivExDate :: Maybe Day
- siDivFrequency :: Maybe Period
- siDivPayDate :: Maybe Day
- siShares :: Integer
- siEps :: Maybe Price
- siExchange :: Exchange
- siDailyHiLo :: HighLow Price
- siYearlyHiLo :: HighLow (Day, Price)
- siPE :: Maybe Double
- siBook :: Price
- siQuote :: StockQuote
- data StreamOutput
- = StreamStatus String
- | StreamQuote { }
- | StreamTrade { }
- | StreamJunk String
- defaultTk :: TradeKing
TradeKing specific
Data type that represents the URLs we need to connect to TradeKing
This could be useful if you wanted to host your own TradeKing-compatible testing server.
.
Most of the time, you'll use defaultTk
to get the default values.
data TradeKingApp Source
This data type holds the application information provided by TradeKing and is used to make requests.
TradeKingApp | |
|
Expected return format for API calls.
TradeKing API commmands that we support.
Common Financial Asset and Transaction Types
Assets
The different types of Assets available on TradeKing. Currently on Stocks and Options are supported.
Type to represent SEC CUSIP identifiers
Prices
type Eps4 = EpsDiv10 (EpsDiv10 (EpsDiv10 (EpsDiv10 Eps1)))Source
Exact way of representing prices, etc.
A price has both a currency component and a decimal. Currently we only denote prices in USD, but this is here for future compatibility.
Options
Describes an option. Option support is TBD.
data OptionType Source
data ContractType Source
data OptionStyle Source
Other Assets
Utility types
TradeKing API-specific data structures
data StockQuote Source
A stock quote
StockQuote | |
|
Stock information that may change day-to-day
StockInfo | |
|
data StreamOutput Source
This is the type of data that may be output by the streaming calls. We can't use other data types here, because the streaming data is limited in scope.
StreamStatus String | Stream status. This should be the first thing that comes out of the conduit
in |
StreamQuote | Represents updates to the quote of a symbol |
StreamTrade | Represents a trade that just took place |
StreamJunk String |
Default TradeKing URIs. Equivalent to
TradeKing { apiBase = "https://api.tradeking.com/v1/", streamBase = "https://stream.tradeking.com/v1/", authorizeURL = "https://developers.tradeking.com/oauth/authorize?oauth_token=", requestTokenResource = "https://developers.tradeking.com/oauth/request_token", accessTokenResource = "https://developers.tradeking.com/oauth/access_token" }