Skip to content

Commit 428f57c

Browse files
committed
2 parents 95a0a60 + 1f7936e commit 428f57c

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,4 @@ MANIFEST.in
136136
clientportal.gw/
137137
clientportal.beta.gw/
138138
alex/
139-
config/
139+
config/

ibw/client.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,36 @@ def __init__(self, username: str, account: str, client_gateway_path: str = None)
112112
# Load the Server State.
113113
self.server_process = self._server_state(action='load')
114114

115+
# Log the response.
116+
logging.debug('''
117+
Server Prcoess Init: {serv_proc}
118+
'''.format(serv_proc=self.server_process)
119+
)
120+
121+
# See if it exists.
122+
if not self.client_portal_folder.exists():
123+
print("The Client Portal Gateway doesn't exist. You need to download it before using the Library.")
124+
print("Downloading the Client Portal file...")
125+
self.client_portal_client.download_and_extract()
126+
127+
else:
128+
self.client_portal_folder = client_gateway_path
129+
130+
# Log the initial Info.
131+
logging.info('''
132+
Operating System: {op_sys}
133+
Session State Path: {state_path}
134+
Client Portal Folder: {client_path}
135+
'''.format(
136+
op_sys=self._operating_system,
137+
state_path=self.session_state_path,
138+
client_path=self.client_portal_folder
139+
)
140+
)
141+
142+
# Load the Server State.
143+
self.server_process = self._server_state(action='load')
144+
115145
# Log the response.
116146
logging.debug('''
117147
Server Prcoess Init: {serv_proc}
@@ -314,6 +344,8 @@ def _check_authentication_user_input(self) -> bool:
314344
----
315345
bool: `True` if authenticated, `False` otherwise.
316346
"""
347+
348+
logging.debug('Running Client Folder at: {file_path}'.format(file_path=self.client_portal_folder))
317349

318350
max_retries = 0
319351

samples/api_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@
220220

221221
# Grab Fees and Objectives.
222222
mutual_fund_fees = ib_client.mutual_funds_portfolios_and_fees(
223-
conid=mutual_fund_conid)
223+
conid=mutual_fund_conid
224+
)
224225
pprint.pprint(mutual_fund_fees)
225226
pprint('')
226227

0 commit comments

Comments
 (0)