ExOanda.Transactions (ExOanda v0.2.3)

Copy Markdown View Source

Interface for Oanda transactions.

Docs

Summary

Functions

Get the details of a single transaction in an account.

Get the details of a single transaction in an account, raising an exception on error.

Get a list of transactions for an account.

Get a list of transactions for an account, raising an exception on error.

Get a list of transactions for an account within a specific TransactionID range.

Get a list of transactions for an account within a specific TransactionID range, raising an exception on error.

Get a list of transactions for an account since a specific TransactionID.

Get a list of transactions for an account since a specific TransactionID, raising an exception on error.

Functions

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

Get the details of a single transaction in an account.

Examples

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

Docs

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

Get the details of a single transaction in an account, raising an exception on error.

Examples

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

Docs

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

Get a list of transactions for an account.

Examples

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

Supported parameters

  • :type (String.t/0) - A filter for restricting the types of Transactions to retrieve.

  • :page_size (non_neg_integer/0) - The number of Transactions to include in each page. [default=100, maximum=1000].

  • :to (String.t/0) - The ending time (inclusive) of the time range for the Transactions being queried. Defaults to current time.

  • :from (String.t/0) - The starting time (inclusive) of the time range for the Transactions being queried. Defaults to account creation time.

Docs

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

Get a list of transactions for an account, raising an exception on error.

Examples

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

Supported parameters

  • :type (String.t/0) - A filter for restricting the types of Transactions to retrieve.

  • :page_size (non_neg_integer/0) - The number of Transactions to include in each page. [default=100, maximum=1000].

  • :to (String.t/0) - The ending time (inclusive) of the time range for the Transactions being queried. Defaults to current time.

  • :from (String.t/0) - The starting time (inclusive) of the time range for the Transactions being queried. Defaults to account creation time.

Docs

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

Get a list of transactions for an account within a specific TransactionID range.

Examples

iex> {:ok, res} = ExOanda.Transactions.list_id_range(conn, account_id)

Supported parameters

  • :type (String.t/0) - A filter for restricting the types of Transactions to retrieve.

  • :to (String.t/0) - The ending TransactionID (inclusive) to fetch.

  • :from (String.t/0) - The starting TransactionID (inclusive) to fetch.

Docs

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

Get a list of transactions for an account within a specific TransactionID range, raising an exception on error.

Examples

iex> res = ExOanda.Transactions.list_id_range!(conn, account_id)

Supported parameters

  • :type (String.t/0) - A filter for restricting the types of Transactions to retrieve.

  • :to (String.t/0) - The ending TransactionID (inclusive) to fetch.

  • :from (String.t/0) - The starting TransactionID (inclusive) to fetch.

Docs

list_since_id(conn, account_id, transaction_id, params \\ [])

Get a list of transactions for an account since a specific TransactionID.

Examples

iex> {:ok, res} = ExOanda.Transactions.list_since_id(conn, account_id, transaction_id)

Supported parameters

  • :type (String.t/0) - A filter for restricting the types of Transactions to retrieve.

Docs

list_since_id!(conn, account_id, transaction_id, params \\ [])

Get a list of transactions for an account since a specific TransactionID, raising an exception on error.

Examples

iex> res = ExOanda.Transactions.list_since_id!(conn, account_id, transaction_id)

Supported parameters

  • :type (String.t/0) - A filter for restricting the types of Transactions to retrieve.

Docs