Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines types used in the REST API
- data OandaEnv
- apiType :: OandaEnv -> APIType
- accessToken :: OandaEnv -> Maybe AccessToken
- sandboxAuth :: OandaEnv
- practiceAuth :: AccessToken -> OandaEnv
- liveAuth :: AccessToken -> OandaEnv
- data APIType
- apiEndpoint :: APIType -> String
- 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.
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/
apiEndpoint :: APIType -> String Source
Specifies the endpoints for each APIType
. These are the base URLs for
each API call.
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