lib/ig_markets/dealing_platform/streaming_methods.rb
def build_consolidated_chart_data_subscription(epic, scale)
        scale = { one_second: 'SECOND', one_minute: '1MINUTE', five_minutes: '5MINUTE', one_hour: 'HOUR' }.fetch scale
        items = ["CHART:#{epic}:#{scale}"]

        fields = %i[bid_close bid_high bid_low bid_open cons_end cons_tick_count day_high day_low
                    day_net_chg_mid day_open_mid day_perc_chg_mid ltp_close ltp_high ltp_low ltp_open ltv
                    ofr_close ofr_high ofr_low ofr_open ttv utm]

        build_subscription items: items, fields: fields, mode: :merge
      end
# Creates a new Lightstreamer subscription for consolidated chart data for the specified EPIC and scale. The
# returned {Streaming::Subscription} must be passed to {#start_subscriptions} in order to actually start streaming
# its data.
#
# @param [String] epic The EPIC of the market to create a consolidated chart data subscription for.
# @param [:one_second, :one_minute, :five_minutes, :one_hour] scale The scale of the consolidated data.
#
# @return [Streaming::Subscription]
Creates a new Lightstreamer subscription for consolidated chart data for the specified EPIC and scale. The
returned {Streaming::Subscription} must be passed to {#start_subscriptions} in order to actually start streaming
its data.
Creates a new Lightstreamer subscription for consolidated chart data for the specified EPIC and scale . The returned { Streaming :: Subscription } must be passed to { #start_subscriptions } in order to actually start streaming its data .
def build_consolidated_chart_data_subscription(epic, scale)
        scale = { one_second: 'SECOND', one_minute: '1MINUTE', five_minutes: '5MINUTE', one_hour: 'HOUR' }.fetch scale
        items = ["CHART:#{epic}:#{scale}"]
        fields = %i[bid_close bid_high bid_low bid_open cons_end cons_tick_count day_high day_low
                    day_net_chg_mid day_open_mid day_perc_chg_mid ltp_close ltp_high ltp_low ltp_open ltv
                    ofr_close ofr_high ofr_low ofr_open ttv utm]
        build_subscription items: items, fields: fields, mode: :merge
      end
def build_consolidated_chart_data_subscription ( epic , scale ) scale = { one_second : 'SECOND' , one_minute : '1MINUTE' , five_minutes : '5MINUTE' , one_hour : 'HOUR' } . fetch scale items = [ "CHART:#{epic}:#{scale}" ] fields = %i[ bid_close bid_high bid_low bid_open cons_end cons_tick_count day_high day_low day_net_chg_mid day_open_mid day_perc_chg_mid ltp_close ltp_high ltp_low ltp_open ltv ofr_close ofr_high ofr_low ofr_open ttv utm ] build_subscription items : items , fields : fields , mode : :merge end
Creates a new Lightstreamer subscription for consolidated chart data for the specified EPIC and scale.
Creates a new Lightstreamer subscription for consolidated chart data for the specified EPIC and scale .
None
Streaming::Subscription
epic
scale
scale The scale of the consolidated data.
scale The scale of the consolidated data .