View Source ExTwelveData.RealTimePrices (ExTwelveData v0.4.0)
WebSocket client to get real-time prices from Twelve Data.
Summary
Functions
Reset the subscription to all price updates.
Specify a list of symbols you're interested to.
Send a list of symbols that you're no longer interested to.
Types
@type option() :: WebSockex.option() | {:api_key, binary()} | {:handler, ExTwelveData.RealTimePrices.Handler}
@type options() :: [option()]
@type symbols_list() :: String.t() | [ExTwelveData.Symbol.t()]
Symbols passed to subscribe/unsubscribe.
It can either be an array of objects (extended format), or a comma-delimited string with multiple symbols.
Functions
Reset the subscription to all price updates.
@spec subscribe(pid(), symbols_list()) :: {:error, any()} | {:ok}
Specify a list of symbols you're interested to.
Subsequent calls will append new symbols to the list.
See unsubscribe/2
and reset/1
to remove
@spec unsubscribe(pid(), symbols_list()) :: {:error, any()} | {:ok}
Send a list of symbols that you're no longer interested to.
Twelve Data will stop sending updates.