FixAlchemy.Orders (FIXAlchemy v0.2.4)

View Source

Normalization of working orders from parsed ExecutionReports.

FixAlchemy.Portfolio keeps active orders as raw parsed messages keyed by order id; this module turns them into the backend-neutral order shape the platform renders and acts on. Unknown FIX codes pass through untouched.

Summary

Types

summary()

@type summary() :: %{
  order_id: String.t(),
  cl_ord_id: String.t() | nil,
  symbol: String.t() | nil,
  side: atom() | String.t() | nil,
  type: atom() | String.t() | nil,
  quantity: integer(),
  filled: integer(),
  price: String.t() | nil,
  stop_price: String.t() | nil,
  tif: atom() | String.t() | nil,
  status: atom() | String.t() | nil,
  time: String.t() | nil,
  account: String.t() | nil
}

Functions

summarize(order)

@spec summarize(map()) :: summary()

summarize_all(orders)

@spec summarize_all(%{required(String.t()) => map()}) :: [summary()]