Sha256: 3f617d44ae1f7b0bc97962eecad42e6cec2b224e3d36c812e47f001facfdd1a5

Contents?: true

Size: 679 Bytes

Versions: 3

Compression:

Stored size: 679 Bytes

Contents

#!/usr/bin/env ruby
#
# This script receives Financial Adviser and Managed Accounts info

require 'bundler/setup'
require 'ib-api'

# First, connect to IB TWS.
ib = IB::Connection.new client_id: 1114,  port: 4002 #, :port => 7496 # TWS

# Subscribe to TWS alerts/errors and FA/managed account info
ib.subscribe(:Alert, :ManagedAccounts, :ReceiveFA) { |msg| puts msg.to_human }

##
## type of Financial Advisor configuration data
 #                    being received from TWS. Valid values include:
 #                    1 = GROUPS, 2 = PROFILE, 3 = ACCOUNT ALIASES

ib.send_message :RequestFA, fa_data_type: 3  
ib.send_message :RequestManagedAccounts

ib.wait_for :ReceiveFA



Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ib-api-972.2 example/fa_accounts
ib-api-972.1 example/fa_accounts
ib-api-972.0 example/fa_accounts