Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines the endpoints listed in the Rates section of the API.
- data InstrumentsArgs = InstrumentsArgs {}
- instrumentsArgs :: InstrumentsArgs
- data Instrument = Instrument {
- instrumentInstrument :: Text
- instrumentPip :: Maybe Decimal
- instrumentMaxTradeUnits :: Maybe Integer
- instrumentDisplayName :: Maybe Text
- instrumentPrecision :: Maybe Decimal
- instrumentMaxTrailingStop :: Maybe Decimal
- instrumentMinTrailingStop :: Maybe Decimal
- instrumentMarginRate :: Maybe Decimal
- instrumentHalted :: Maybe Bool
- instrumentInterestRate :: Maybe Object
- instruments :: OandaEnv -> AccountID -> InstrumentsArgs -> IO (Vector Instrument)
- data Price = Price {}
- prices :: OandaEnv -> [InstrumentText] -> Maybe ZonedTime -> IO (Vector Price)
- data MidpointCandlestick = MidpointCandlestick {}
- midpointCandles :: OandaEnv -> InstrumentText -> CandlesArgs -> IO (Vector MidpointCandlestick)
- data BidAskCandlestick = BidAskCandlestick {
- bidaskCandlestickTime :: ZonedTime
- bidaskCandlestickOpenBid :: Decimal
- bidaskCandlestickOpenAsk :: Decimal
- bidaskCandlestickHighBid :: Decimal
- bidaskCandlestickHighAsk :: Decimal
- bidaskCandlestickLowBid :: Decimal
- bidaskCandlestickLowAsk :: Decimal
- bidaskCandlestickCloseBid :: Decimal
- bidaskCandlestickCloseAsk :: Decimal
- bidaskCandlestickVolume :: Int
- bidaskCandlestickComplete :: Bool
- bidaskCandles :: OandaEnv -> InstrumentText -> CandlesArgs -> IO (Vector BidAskCandlestick)
- data CandlesArgs = CandlesArgs {}
- candlesArgs :: CandlesArgs
- data CandlesCount
- data DayOfWeek
- data Granularity
- granularityToDiffTime :: Granularity -> NominalDiffTime
Documentation
data InstrumentsArgs Source #
data Instrument Source #
instruments :: OandaEnv -> AccountID -> InstrumentsArgs -> IO (Vector Instrument) Source #
Retrieve a list of instruments from OANDA
prices :: OandaEnv -> [InstrumentText] -> Maybe ZonedTime -> IO (Vector Price) Source #
Retrieve the current prices for a list of instruments.
midpointCandles :: OandaEnv -> InstrumentText -> CandlesArgs -> IO (Vector MidpointCandlestick) Source #
Retrieve the price history of a single instrument in midpoint candles
data BidAskCandlestick Source #
bidaskCandles :: OandaEnv -> InstrumentText -> CandlesArgs -> IO (Vector BidAskCandlestick) Source #
Retrieve the price history of a single instrument in bid/ask candles
data Granularity Source #
granularityToDiffTime :: Granularity -> NominalDiffTime Source #
Utility function to convert Granularity to NominalDiffTime. NOTE: The conversion from month to NominalDiffTime is not correct in general; we just assume 31 days in a month, which is obviously false for 5 months of the year.