Tradehub.Stream.balances

You're seeing just the function balances, go back to Tradehub.Stream module for more information.

Specs

balances(String.t()) :: :ok | {:error, reason :: any()}

Subscribes to the balances.[account] channel of the given account to request latest balance updates.

A topic named balances.[account] in the Tradehub.PubSub will automatically created to handle incomming messages of this subscription.

Examples

iex> alias Phoenix.PubSub
iex> PubSub.subscribe Tradehub.PubSub, "balances.swth1gdm8rvlfxjapvh2paswx7td9fcrq3r7cavkd2a"
iex> Tradehub.Stream.balances("swth1gdm8rvlfxjapvh2paswx7td9fcrq3r7cavkd2a")
iex> Process.info(self(), :messages)
iex> Tradehub.Stream.unsubscribe "balances.swth1gdm8rvlfxjapvh2paswx7td9fcrq3r7cavkd2a"