Tradehub.Stream.positions

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

Specs

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

Subscribes to the positions.[account] channel to request the latest positions of the given account.

A topic named positions.[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, "positions.swth1gdm8rvlfxjapvh2paswx7td9fcrq3r7cavkd2a"
iex> Tradehub.Stream.positions("swth1gdm8rvlfxjapvh2paswx7td9fcrq3r7cavkd2a")
iex> Process.info(self(), :messages)
iex> Tradehub.Stream.unsubscribe "positions.swth1gdm8rvlfxjapvh2paswx7td9fcrq3r7cavkd2a"