oanda-rest-api-0.1.0.0: Client to the OANDA REST API

Safe HaskellNone
LanguageHaskell2010

OANDA.Types

Description

Defines types used in the REST API

Synopsis

Documentation

data OandaEnv Source

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.

Instances

sandboxAuth :: OandaEnv Source

Use the sandbox API.

practiceAuth :: AccessToken -> OandaEnv Source

Use the practice API.

liveAuth :: AccessToken -> OandaEnv Source

Use the live API.

data APIType Source

The three endpoint types used in the REST API. See the following link for details: http://developer.oanda.com/rest-live/development-guide/

Constructors

Sandbox 
Practice 
Live 

Instances

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

Constructors

AccessToken 

newtype AccountID Source

Integer representing the Account ID of an account

Constructors

AccountID 

Fields

unAccountID :: Int
 

Instances

data Side Source

Used when reporting a position in the API

Constructors

Buy 
Sell