Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repairs request mechanism for non-alphanum tickers #43

Merged
merged 2 commits into from
Mar 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/whatsnew/v0.3.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Enhancements
Bug Fixes
~~~~~~~~~

- Symbols with non-alphanumeric characters fail
`GH38 <https://github.com/addisonlynch/iexfinance/issues/38>`__
- Some Stocks endpoints return incorrectly
`GH34 <https://github.com/addisonlynch/iexfinance/issues/34>`__
- Repaired CodeCov code coverage
Expand Down
6 changes: 2 additions & 4 deletions iexfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _execute_iex_query(self, url):
"""
pause = self.pause
for i in range(self.retry_count+1):
response = self.session.get(url=url)
response = self.session.get(url=url, params=self.params)
if response.status_code == requests.codes.ok:
return self._validate_response(response)
time.sleep(pause)
Expand All @@ -116,9 +116,7 @@ def _prepare_query(self):
url: str
A formatted URL
"""
params = "?" + "&".join(
"{}={}".format(*i) for i in self.params.items())
url = self._IEX_API_URL + self.url + params
url = self._IEX_API_URL + self.url
return url

def fetch(self):
Expand Down