Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
areed1192 committed Jun 18, 2020
1 parent aa0a457 commit 67b9ff2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions samples/api_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
append_mode=True
)

# Account Activity
TDStreamingClient.account_activity()

# Actives
TDStreamingClient.actives(service='ACTIVES_NASDAQ', venue='NASDAQ', duration='ALL')

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

# Account Activity
TDStreamingClient.account_activity()

# Level Two Quotes
TDStreamingClient.level_two_quotes(symbols = ['IBM'], fields = [0,1,2])

Expand Down
7 changes: 0 additions & 7 deletions td/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
from typing import Union
from typing import Optional

# if sys.version_info >= (3, 5):
# home_dir = str(pathlib.Path.home())
# else:
# home_dir = os.path.expanduser('~')

# default_dir = os.path.join(home_dir, '.tdunofficial')

class StatePath(type(pathlib.Path())):

def __init__(self, credentials_file: str = None):
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/test_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ def test_create_stream_session(self):

self.assertIsInstance(self.stream_session, TDStreamerClient)

def test_create_account_activity(self):
"""Test subscribing to account activity."""

self.stream_session.account_activity()
self.assertIn('ACCT_ACTIVITY', self.stream_session.data_requests['requests'][0]['service'])

def test_subscribe_level_one_quotes(self):
"""Test subscribing to Level One Quotes."""

Expand Down

0 comments on commit 67b9ff2

Please sign in to comment.