lib/ig_markets/dealing_platform/streaming_methods.rb
# Creates a new Lightstreamer subscription for updates to the specified market(s). The returned
# {Streaming::Subscription} must be passed to {#start_subscriptions} in order to actually start streaming its
# data.
#
# @param [Array<String>] epics The EPICs of the markets to create a subscription for.
#
# @return [Streaming::Subscription]
Creates a new Lightstreamer subscription for updates to the specified market(s). The returned
{Streaming::Subscription} must be passed to {#start_subscriptions} in order to actually start streaming its
data.
Creates a new Lightstreamer subscription for updates to the specified market ( s ) . The returned { Streaming :: Subscription } must be passed to { #start_subscriptions } in order to actually start streaming its data .
def build_markets_subscription(epics)
        items = Array(epics).map { |epic| "MARKET:#{epic}" }
        fields = %i[bid change change_pct high low market_delay market_state mid_open odds offer
                    strike_price update_time]
        build_subscription items: items, fields: fields, mode: :merge
      end
def build_markets_subscription ( epics ) items = Array ( epics ) . map { | epic | "MARKET:#{epic}" } fields = %i[ bid change change_pct high low market_delay market_state mid_open odds offer strike_price update_time ] build_subscription items : items , fields : fields , mode : :merge end
Creates a new Lightstreamer subscription for updates to the specified market(s).
Creates a new Lightstreamer subscription for updates to the specified market ( s ) .
None
Streaming::Subscription
epics
epics The EPICs of the markets to create a subscription for.
epics The EPICs of the markets to create a subscription for .