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

Safe HaskellNone
LanguageHaskell2010

OANDA.Environment

Description

Definition of types used to set up the 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.

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

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

data Side Source #

Used when reporting a position in the API

Constructors

Buy 
Sell 

Instances

Show Side Source # 

Methods

showsPrec :: Int -> Side -> ShowS #

show :: Side -> String #

showList :: [Side] -> ShowS #

Generic Side Source # 

Associated Types

type Rep Side :: * -> * #

Methods

from :: Side -> Rep Side x #

to :: Rep Side x -> Side #

FromJSON Side Source # 
type Rep Side Source # 
type Rep Side = D1 (MetaData "Side" "OANDA.Internal.Types" "oanda-rest-api-0.3.0.0-2QW5QOWynH85EIyagYeyg1" False) ((:+:) (C1 (MetaCons "Buy" PrefixI False) U1) (C1 (MetaCons "Sell" PrefixI False) U1))