Skip to content

Commit

Permalink
add search function
Browse files Browse the repository at this point in the history
  • Loading branch information
james-yun committed Jan 30, 2021
1 parent 803f278 commit 646fa78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions robinhood/robinhood.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,9 @@ def orders(price, symbol, instrument=None, quantity=1, type='market', side='buy'
url = 'https://api.robinhood.com/orders/'
r = session.post(url, json=locals())
return r.json()


def search(query: str):
url = 'https://api.robinhood.com/midlands/search/'
r = session.get(url, params={'query': query})
return r.json()
2 changes: 1 addition & 1 deletion setup.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
description="the unofficial Robinhood API",
long_description=long_description,
long_description_content_type="text/markdown",
version="0.1.0",
version="0.1.1",
url="https://github.com/james-yun/robinhood",
author="James Yun",
author_email="jameswyun99@gmail.com",
Expand Down

0 comments on commit 646fa78

Please sign in to comment.