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

Safe HaskellNone
LanguageHaskell2010

OANDA.Accounts

Description

Defines the endpoints listed in the Accounts section of the API.

Synopsis

Documentation

data Account Source #

Wraps the JSON response for accounts

Instances

Show Account Source # 
Generic Account Source # 

Associated Types

type Rep Account :: * -> * #

Methods

from :: Account -> Rep Account x #

to :: Rep Account x -> Account #

FromJSON Account Source # 
type Rep Account Source # 
type Rep Account = D1 (MetaData "Account" "OANDA.Accounts" "oanda-rest-api-0.3.0.0-2QW5QOWynH85EIyagYeyg1" False) (C1 (MetaCons "Account" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "accountAccountId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "accountAccountName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "accountAccountCurrency") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) (S1 (MetaSel (Just Symbol "accountMarginRate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Decimal)))))

accounts :: OandaEnv -> IO (Vector Account) Source #

Get all accounts for given access token

data AccountInfo Source #

Instances

Show AccountInfo Source # 
Generic AccountInfo Source # 

Associated Types

type Rep AccountInfo :: * -> * #

FromJSON AccountInfo Source # 
type Rep AccountInfo Source # 
type Rep AccountInfo = D1 (MetaData "AccountInfo" "OANDA.Accounts" "oanda-rest-api-0.3.0.0-2QW5QOWynH85EIyagYeyg1" False) (C1 (MetaCons "AccountInfo" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "accountInfoAccountId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)) (S1 (MetaSel (Just Symbol "accountInfoAccountName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "accountInfoBalance") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Decimal)) ((:*:) (S1 (MetaSel (Just Symbol "accountInfoUnrealizedPl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Decimal)) (S1 (MetaSel (Just Symbol "accountInfoRealizedPl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Decimal))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "accountInfoMarginUsed") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Decimal)) ((:*:) (S1 (MetaSel (Just Symbol "accountInfoMarginAvail") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Decimal)) (S1 (MetaSel (Just Symbol "accountInfoOpenTrades") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)))) ((:*:) (S1 (MetaSel (Just Symbol "accountInfoOpenOrders") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)) ((:*:) (S1 (MetaSel (Just Symbol "accountInfoMarginRate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Decimal)) (S1 (MetaSel (Just Symbol "accountInfoAccountCurrency") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))))))

accountInfo :: OandaEnv -> AccountID -> IO AccountInfo Source #

Get all account info associated with an account ID.