Skip to content

Commit 67b9ff2

Browse files
committed
clean up
1 parent aa0a457 commit 67b9ff2

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

samples/api_streaming.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
append_mode=True
2424
)
2525

26+
# Account Activity
27+
TDStreamingClient.account_activity()
28+
2629
# Actives
2730
TDStreamingClient.actives(service='ACTIVES_NASDAQ', venue='NASDAQ', duration='ALL')
2831

@@ -59,9 +62,6 @@
5962
# News Headline
6063
TDStreamingClient.news_headline(symbols=['AAPL', 'SPY'], fields=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
6164

62-
# Account Activity
63-
TDStreamingClient.account_activity()
64-
6565
# Level Two Quotes
6666
TDStreamingClient.level_two_quotes(symbols = ['IBM'], fields = [0,1,2])
6767

td/defaults.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
from typing import Union
1010
from typing import Optional
1111

12-
# if sys.version_info >= (3, 5):
13-
# home_dir = str(pathlib.Path.home())
14-
# else:
15-
# home_dir = os.path.expanduser('~')
16-
17-
# default_dir = os.path.join(home_dir, '.tdunofficial')
18-
1912
class StatePath(type(pathlib.Path())):
2013

2114
def __init__(self, credentials_file: str = None):

tests/unit/test_stream.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ def test_create_stream_session(self):
4343

4444
self.assertIsInstance(self.stream_session, TDStreamerClient)
4545

46+
def test_create_account_activity(self):
47+
"""Test subscribing to account activity."""
48+
49+
self.stream_session.account_activity()
50+
self.assertIn('ACCT_ACTIVITY', self.stream_session.data_requests['requests'][0]['service'])
51+
4652
def test_subscribe_level_one_quotes(self):
4753
"""Test subscribing to Level One Quotes."""
4854

0 commit comments

Comments
 (0)