ExOanda.Accounts (ExOanda v0.2.3)

Copy Markdown View Source

Interface for Oanda accounts.

Docs

Summary

Functions

Fetch an account, raising an exception on error.

Get a list of accounts.

Get a list of accounts, raising an exception on error.

Get a list of changes to an account.

Get a list of changes to an account, raising an exception on error.

Get a list of tradeable instruments for the given account.

Get a list of tradeable instruments for the given account, raising an exception on error.

Get a summary of an account.

Get a summary of an account, raising an exception on error.

Update an account, raising an exception on error.

Functions

find(conn, account_id, params \\ [])

Fetch an account.

Examples

iex> {:ok, res} = ExOanda.Accounts.find(conn, account_id)

Docs

find!(conn, account_id, params \\ [])

Fetch an account, raising an exception on error.

Examples

iex> res = ExOanda.Accounts.find!(conn, account_id)

Docs

list(conn, params \\ [])

Get a list of accounts.

Examples

iex> {:ok, res} = ExOanda.Accounts.list(conn, )

Docs

list!(conn, params \\ [])

Get a list of accounts, raising an exception on error.

Examples

iex> res = ExOanda.Accounts.list!(conn, )

Docs

list_changes(conn, account_id, params \\ [])

Get a list of changes to an account.

Examples

iex> {:ok, res} = ExOanda.Accounts.list_changes(conn, account_id)

Supported parameters

  • :since_transaction_id (String.t/0) - Required. ID of the Transaction to get Account changes since.

Docs

list_changes!(conn, account_id, params \\ [])

Get a list of changes to an account, raising an exception on error.

Examples

iex> res = ExOanda.Accounts.list_changes!(conn, account_id)

Supported parameters

  • :since_transaction_id (String.t/0) - Required. ID of the Transaction to get Account changes since.

Docs

list_instruments(conn, account_id, params \\ [])

Get a list of tradeable instruments for the given account.

Examples

iex> {:ok, res} = ExOanda.Accounts.list_instruments(conn, account_id)

Supported parameters

  • :instruments (String.t/0) - A comma separated list of instrument names.

Docs

list_instruments!(conn, account_id, params \\ [])

Get a list of tradeable instruments for the given account, raising an exception on error.

Examples

iex> res = ExOanda.Accounts.list_instruments!(conn, account_id)

Supported parameters

  • :instruments (String.t/0) - A comma separated list of instrument names.

Docs

summary(conn, account_id, params \\ [])

Get a summary of an account.

Examples

iex> {:ok, res} = ExOanda.Accounts.summary(conn, account_id)

Docs

summary!(conn, account_id, params \\ [])

Get a summary of an account, raising an exception on error.

Examples

iex> res = ExOanda.Accounts.summary!(conn, account_id)

Docs

update(conn, account_id, body, params \\ [])

Update an account.

Examples

iex> {:ok, res} = ExOanda.Accounts.update(conn, account_id, body)

Docs

update!(conn, account_id, body, params \\ [])

Update an account, raising an exception on error.

Examples

iex> res = ExOanda.Accounts.update!(conn, account_id, body)

Docs