From 646fa7882c06ec6b9ee54fb9070b2a4e3858f083 Mon Sep 17 00:00:00 2001 From: James Yun Date: Sat, 30 Jan 2021 13:17:09 -0500 Subject: [PATCH] add search function --- robinhood/robinhood.py | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 setup.py diff --git a/robinhood/robinhood.py b/robinhood/robinhood.py index f1a0c65..13a80a9 100644 --- a/robinhood/robinhood.py +++ b/robinhood/robinhood.py @@ -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() diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 9957a5b..f8df767 --- a/setup.py +++ b/setup.py @@ -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",