Tai.Orders.Worker (tai v0.0.65)

Link to this section Summary

Link to this section Types

Link to this type

amend_attrs()

Specs

amend_attrs() :: %{
  optional(:price) => Decimal.t(),
  optional(:qty) => Decimal.t()
}
Link to this type

amend_bulk_reject_reason()

Specs

amend_bulk_reject_reason() ::
  {:invalid_status, was :: status(), status_required(), transition()}
Link to this type

amend_bulk_response()

Specs

amend_bulk_response() :: [
  ok: updated :: order(),
  error: amend_bulk_reject_reason()
]
Link to this type

amend_response()

Specs

amend_response() ::
  {:ok, updated :: order()}
  | {:error,
     {:invalid_status, was :: status(), status_required(), transition()}}
Link to this type

cancel_error_reason()

Specs

cancel_error_reason() ::
  {:invalid_status, was :: status(), status_required(), transition()}
Link to this type

cancel_response()

Specs

cancel_response() :: {:ok, updated :: order()} | {:error, cancel_error_reason()}
Link to this type

create_response()

Specs

create_response() :: {:ok, order()}

Specs

order() :: Tai.Orders.Order.t()

Specs

status() :: Tai.Orders.Order.status()
Link to this type

status_required()

Specs

status_required() :: status() | [status()]
Link to this type

submission()

Specs

Link to this type

transition()

Specs

transition() :: Tai.Orders.Transition.t()

Link to this section Functions

Link to this function

amend(pid, order, attrs, provider \\ Provider)

Specs

amend(pid(), order(), amend_attrs(), module()) :: amend_response()
Link to this function

amend_bulk(pid, amend_set, provider \\ Provider)

Specs

amend_bulk(pid(), [{order(), amend_attrs()}], module()) :: amend_response()
Link to this function

cancel(pid, order, provider \\ Provider)

Specs

cancel(pid(), order(), module()) :: create_response()
Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

create(pid, submission)

Specs

create(pid(), submission()) :: create_response()
Link to this function

send_amend_bulk_orders(orders)

See Tai.Venues.Client.amend_bulk_orders/1.

Link to this function

send_amend_order(order, attrs)