Tradehub.Stream.candlesticks
You're seeing just the function
candlesticks
, go back to Tradehub.Stream module for more information.
Specs
Subscribes to the candlesticks.[market].[resolution]
channel to request latest candlesticks of the market in the resolution timeframe.
A topic named candlesticks.[market].[resolution]
in the Tradehub.PubSub
will automatically created to
handle incomming messages of this subscription.
Examples
iex> alias Phoenix.PubSub
iex> PubSub.subscribe Tradehub.PubSub, "candlesticks.swth_eth1.30"
iex> Tradehub.Stream.candlesticks("swth_eth1", 30)
iex> Process.info(self(), :messages)
iex> Tradehub.Stream.unsubscribe "candlesticks.swth_eth1.30"