lib/ig_markets/dealing_platform/streaming_methods.rb
def build_trades_subscription(accounts = nil)
        accounts ||= @dealing_platform.client_account_summary.accounts

        items = Array(accounts).map { |account| "TRADE:#{account.account_id}" }
        fields = %i[confirms opu wou]

        build_subscription items: items, fields: fields, mode: :distinct
      end
# Creates a new Lightstreamer subscription for trade, position and working order updates on the specified
# account(s). The returned {Streaming::Subscription} must be passed to {#start_subscriptions} in order to
# actually start streaming its data.
#
# @param [Array<#account_id>, nil] accounts The accounts to create a subscription for. If this is `nil` then the
#        new subscription will apply to all the accounts for the active client.
#
# @return [Streaming::Subscription]
Creates a new Lightstreamer subscription for trade, position and working order updates on the specified
account(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 trade position and working order updates on the specified account ( s ) . The returned { Streaming :: Subscription } must be passed to { #start_subscriptions } in order to actually start streaming its data .
def build_trades_subscription(accounts = nil)
        accounts ||= @dealing_platform.client_account_summary.accounts
        items = Array(accounts).map { |account| "TRADE:#{account.account_id}" }
        fields = %i[confirms opu wou]
        build_subscription items: items, fields: fields, mode: :distinct
      end
def build_trades_subscription ( accounts = nil ) accounts ||= @dealing_platform . client_account_summary . accounts items = Array ( accounts ) . map { | account | "TRADE:#{account.account_id}" } fields = %i[ confirms opu wou ] build_subscription items : items , fields : fields , mode : :distinct end
Creates a new Lightstreamer subscription for trade, position and working order updates on the specified
account(s).
Creates a new Lightstreamer subscription for trade position and working order updates on the specified account ( s ) .
None
Streaming::Subscription
accounts
accounts The accounts to create a subscription for. If this is `nil` then the new subscription will apply to all the accounts for the active client.
accounts The accounts to create a subscription for . If this is ` nil ` then the new subscription will apply to all the accounts for the active client .