View Source ExTwelveData.RealTimePrices.Handler behaviour (ExTwelveData v0.2.1)

Implement the Handler behaviour to process real-time price updates coming from Twelve Data.

Link to this section Summary

Callbacks

Invoked when a price update is received.

Link to this section Types

@type price() :: %{
  price: integer(),
  currency: String.t(),
  symbol: String.t(),
  exchange: String.t(),
  timestamp: integer(),
  type: String.t(),
  day_volume: integer()
}

Link to this section Callbacks

Link to this callback

handle_price_update(price)

View Source
@callback handle_price_update(price()) :: :ok

Invoked when a price update is received.