Safe Haskell | None |
---|---|
Language | Haskell2010 |
Definition of types used to set up the API.
- data OandaEnv
- apiType :: OandaEnv -> APIType
- accessToken :: OandaEnv -> Maybe AccessToken
- sandboxAuth :: OandaEnv
- practiceAuth :: AccessToken -> OandaEnv
- liveAuth :: AccessToken -> OandaEnv
- data APIType
- newtype AccessToken = AccessToken {}
- newtype AccountID = AccountID {
- unAccountID :: Int
- data Side
- type InstrumentText = Text
Documentation
Wraps an APIType
and an AccessToken
. Mainly just a convenience wrapper
to make functions have fewer arguments. To instantiate this type, use the
sandboxAuth
, practiceAuth
, or liveAuth
functions.
accessToken :: OandaEnv -> Maybe AccessToken Source #
sandboxAuth :: OandaEnv Source #
Use the sandbox API.
practiceAuth :: AccessToken -> OandaEnv Source #
Use the practice API.
liveAuth :: AccessToken -> OandaEnv Source #
Use the live API.
The three endpoint types used in the REST API. See the following link for details: http://developer.oanda.com/rest-live/development-guide/
newtype AccessToken Source #
The token given by OANDA used to access the API
Integer representing the Account ID of an account
Used when reporting a position in the API
type InstrumentText = Text Source #