Summary
Functions
Cancel a pending order in an account.
Cancel a pending order in an account, raising an exception on error.
Create an order for an account.
Create an order for an account, raising an exception on error.
Get details for a single order in an account.
Get details for a single order in an account, raising an exception on error.
Get a list of orders for an account.
Get a list of orders for an account, raising an exception on error.
Get a list of pending orders for an account.
Get a list of pending orders for an account, raising an exception on error.
Update the Client Extensions for an Order in an Account. Do not set, modify, or delete clientExtensions if your account is associated with MT4.
Update the Client Extensions for an Order in an Account. Do not set, modify, or delete clientExtensions if your account is associated with MT4, raising an exception on error.
Replace an order in an account by simultaneously cancelling it and creating a replacement order.
Replace an order in an account by simultaneously cancelling it and creating a replacement order, raising an exception on error.
Functions
@spec cancel(ExOanda.Connection.t(), String.t(), String.t(), Keyword.t()) :: {:ok, ExOanda.Response.t(ExOanda.Response.CancelOrder.t())} | {:error, ExOanda.Response.t() | ExOanda.ValidationError.t() | ExOanda.TransportError.t() | ExOanda.DecodeError.t()}
Cancel a pending order in an account.
Examples
iex> {:ok, res} = ExOanda.Orders.cancel(conn, account_id, order_id)Docs
@spec cancel!(ExOanda.Connection.t(), String.t(), String.t(), Keyword.t()) :: ExOanda.Response.t(ExOanda.Response.CancelOrder.t())
Cancel a pending order in an account, raising an exception on error.
Examples
iex> res = ExOanda.Orders.cancel!(conn, account_id, order_id)Docs
@spec create(ExOanda.Connection.t(), String.t(), map(), Keyword.t()) :: {:ok, ExOanda.Response.t(ExOanda.Response.CreateOrder.t())} | {:error, ExOanda.Response.t() | ExOanda.ValidationError.t() | ExOanda.TransportError.t() | ExOanda.DecodeError.t()}
Create an order for an account.
Examples
iex> {:ok, res} = ExOanda.Orders.create(conn, account_id, body)Docs
@spec create!(ExOanda.Connection.t(), String.t(), map(), Keyword.t()) :: ExOanda.Response.t(ExOanda.Response.CreateOrder.t())
Create an order for an account, raising an exception on error.
Examples
iex> res = ExOanda.Orders.create!(conn, account_id, body)Docs
@spec find(ExOanda.Connection.t(), String.t(), String.t(), Keyword.t()) :: {:ok, ExOanda.Response.t(ExOanda.Response.FindOrder.t())} | {:error, ExOanda.Response.t() | ExOanda.ValidationError.t() | ExOanda.TransportError.t() | ExOanda.DecodeError.t()}
Get details for a single order in an account.
Examples
iex> {:ok, res} = ExOanda.Orders.find(conn, account_id, order_id)Docs
@spec find!(ExOanda.Connection.t(), String.t(), String.t(), Keyword.t()) :: ExOanda.Response.t(ExOanda.Response.FindOrder.t())
Get details for a single order in an account, raising an exception on error.
Examples
iex> res = ExOanda.Orders.find!(conn, account_id, order_id)Docs
@spec list(ExOanda.Connection.t(), String.t(), Keyword.t()) :: {:ok, ExOanda.Response.t(ExOanda.Response.ListOrders.t())} | {:error, ExOanda.Response.t() | ExOanda.ValidationError.t() | ExOanda.TransportError.t() | ExOanda.DecodeError.t()}
Get a list of orders for an account.
Examples
iex> {:ok, res} = ExOanda.Orders.list(conn, account_id)Supported parameters
:before_id(String.t/0) - The maximum Order ID to return. If not provided the most recent Orders in the Account are returned.:count(non_neg_integer/0) - The maximum number of Orders to return.:instrument(String.t/0) - The instrument to filter the requested orders by.:state(String.t/0) - The state to filter the requested Orders by.:ids(String.t/0) - List of Order IDs to retrieve.
Docs
@spec list!(ExOanda.Connection.t(), String.t(), Keyword.t()) :: ExOanda.Response.t(ExOanda.Response.ListOrders.t())
Get a list of orders for an account, raising an exception on error.
Examples
iex> res = ExOanda.Orders.list!(conn, account_id)Supported parameters
:before_id(String.t/0) - The maximum Order ID to return. If not provided the most recent Orders in the Account are returned.:count(non_neg_integer/0) - The maximum number of Orders to return.:instrument(String.t/0) - The instrument to filter the requested orders by.:state(String.t/0) - The state to filter the requested Orders by.:ids(String.t/0) - List of Order IDs to retrieve.
Docs
@spec list_pending(ExOanda.Connection.t(), String.t(), Keyword.t()) :: {:ok, ExOanda.Response.t(ExOanda.Response.ListPendingOrders.t())} | {:error, ExOanda.Response.t() | ExOanda.ValidationError.t() | ExOanda.TransportError.t() | ExOanda.DecodeError.t()}
Get a list of pending orders for an account.
Examples
iex> {:ok, res} = ExOanda.Orders.list_pending(conn, account_id)Docs
@spec list_pending!(ExOanda.Connection.t(), String.t(), Keyword.t()) :: ExOanda.Response.t(ExOanda.Response.ListPendingOrders.t())
Get a list of pending orders for an account, raising an exception on error.
Examples
iex> res = ExOanda.Orders.list_pending!(conn, account_id)Docs
@spec modify_client_extensions( ExOanda.Connection.t(), String.t(), String.t(), map(), Keyword.t() ) :: {:ok, ExOanda.Response.t(ExOanda.Response.OrderModifyClientExtensions.t())} | {:error, ExOanda.Response.t() | ExOanda.ValidationError.t() | ExOanda.TransportError.t() | ExOanda.DecodeError.t()}
Update the Client Extensions for an Order in an Account. Do not set, modify, or delete clientExtensions if your account is associated with MT4.
Examples
iex> {:ok, res} = ExOanda.Orders.modify_client_extensions(conn, account_id, order_id, body)Docs
@spec modify_client_extensions!( ExOanda.Connection.t(), String.t(), String.t(), map(), Keyword.t() ) :: ExOanda.Response.t(ExOanda.Response.OrderModifyClientExtensions.t())
Update the Client Extensions for an Order in an Account. Do not set, modify, or delete clientExtensions if your account is associated with MT4, raising an exception on error.
Examples
iex> res = ExOanda.Orders.modify_client_extensions!(conn, account_id, order_id, body)Docs
@spec replace(ExOanda.Connection.t(), String.t(), String.t(), map(), Keyword.t()) :: {:ok, ExOanda.Response.t(ExOanda.Response.ReplaceOrder.t())} | {:error, ExOanda.Response.t() | ExOanda.ValidationError.t() | ExOanda.TransportError.t() | ExOanda.DecodeError.t()}
Replace an order in an account by simultaneously cancelling it and creating a replacement order.
Examples
iex> {:ok, res} = ExOanda.Orders.replace(conn, account_id, order_id, body)Docs
@spec replace!(ExOanda.Connection.t(), String.t(), String.t(), map(), Keyword.t()) :: ExOanda.Response.t(ExOanda.Response.ReplaceOrder.t())
Replace an order in an account by simultaneously cancelling it and creating a replacement order, raising an exception on error.
Examples
iex> res = ExOanda.Orders.replace!(conn, account_id, order_id, body)