Skip to content

Commit

Permalink
Repairs request mechanism for non-alphanum tickers (#43)
Browse files Browse the repository at this point in the history
* Repaired request mechanism for non-alphanum tickers

* CLN: Prepare for 0.3.1
  • Loading branch information
addisonlynch authored Mar 10, 2018
1 parent 6fe93e9 commit f0eb27a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit f0eb27a

Please sign in to comment.