DpExchange.Core.Types.Trade (DpExchangeCore v0.1.4)

Copy Markdown View Source

Normalised public trade — anyone's order match, from the venue's trade tape.

Distinct from DpExchange.Core.Types.Fill, which is the caller's own match. The two are easy to conflate and must not be: a tape trade is public market data, a fill is an account event.

:timestamp is the venue's own, used as-is.

Summary

Types

t()

@type t() :: %DpExchange.Core.Types.Trade{
  id: String.t(),
  price: Decimal.t(),
  provider: atom() | String.t(),
  quantity: Decimal.t(),
  side: :buy | :sell,
  symbol: String.t(),
  timestamp: DateTime.t()
}