tai v0.0.13 Tai.Exchanges.Account behaviour
Uniform interface for private exchange actions
Link to this section Summary
Link to this section Types
Link to this type
create_order_error_reason()
create_order_error_reason()
create_order_error_reason() ::
:not_implemented
| shared_error_reason()
| Tai.Trading.InsufficientBalanceError.t()
create_order_error_reason() :: :not_implemented | shared_error_reason() | Tai.Trading.InsufficientBalanceError.t()
Link to this type
credentials()
credentials()
credentials() :: map()
credentials() :: map()
Link to this type
insufficient_balance_error()
insufficient_balance_error()
insufficient_balance_error() :: Tai.Trading.InsufficientBalanceError.t()
insufficient_balance_error() :: Tai.Trading.InsufficientBalanceError.t()
Link to this type
order()
order()
order() :: Tai.Trading.Order.t()
order() :: Tai.Trading.Order.t()
Link to this type
order_response()
order_response()
order_response() :: Tai.Trading.OrderResponse.t()
order_response() :: Tai.Trading.OrderResponse.t()
Link to this type
order_status()
order_status()
order_status() :: Tai.Trading.Order.status()
order_status() :: Tai.Trading.Order.status()
Link to this type
time_in_force()
time_in_force()
time_in_force() :: Tai.Trading.Order.time_in_force()
time_in_force() :: Tai.Trading.Order.time_in_force()
Link to this type
venue_order_id()
venue_order_id()
venue_order_id() :: Tai.Trading.Order.venue_order_id()
venue_order_id() :: Tai.Trading.Order.venue_order_id()
Link to this section Functions
Link to this function
amend_order(order, attrs)
Link to this function
cancel_order(venue_id, account_id, venue_order_id)
cancel_order(venue_id, account_id, venue_order_id)
cancel_order(atom(), atom(), venue_order_id()) ::
{:ok, venue_order_id()} | {:error, reason :: term()}
cancel_order(atom(), atom(), venue_order_id()) :: {:ok, venue_order_id()} | {:error, reason :: term()}
Link to this function
create_order(order)
create_order(order)
create_order(order()) ::
{:ok, order_response()} | {:error, create_order_error_reason()}
create_order(order()) :: {:ok, order_response()} | {:error, create_order_error_reason()}
Link to this function
order_status(venue_id, account_id, venue_order_id)
order_status(venue_id, account_id, venue_order_id)
order_status(atom(), atom(), venue_order_id()) ::
{:ok, order_status()} | {:error, reason :: term()}
order_status(atom(), atom(), venue_order_id()) :: {:ok, order_status()} | {:error, reason :: term()}
Link to this function
to_name(exchange_id, account_id)
Link to this section Callbacks
Link to this callback
cancel_order(venue_order_id, credentials)
cancel_order(venue_order_id, credentials)
cancel_order(venue_order_id(), credentials()) ::
{:ok, venue_order_id()} | {:error, :not_implemented | (reason :: term())}
cancel_order(venue_order_id(), credentials()) :: {:ok, venue_order_id()} | {:error, :not_implemented | (reason :: term())}
Link to this callback
create_order(order, credentials)
create_order(order, credentials)
create_order(order(), credentials()) ::
{:ok, order_response()} | {:error, create_order_error_reason()}
create_order(order(), credentials()) :: {:ok, order_response()} | {:error, create_order_error_reason()}
Link to this callback
order_status(venue_order_id, credentials)
order_status(venue_order_id, credentials)
order_status(venue_order_id(), credentials()) ::
{:ok, order_status()} | {:error, :not_implemented | (reason :: term())}
order_status(venue_order_id(), credentials()) :: {:ok, order_status()} | {:error, :not_implemented | (reason :: term())}