Tradehub.Stream.orders

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

Specs

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

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

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