diff --git a/docs/source/whatsnew/v0.3.1.txt b/docs/source/whatsnew/v0.3.1.txt index c42e0d4..240303e 100644 --- a/docs/source/whatsnew/v0.3.1.txt +++ b/docs/source/whatsnew/v0.3.1.txt @@ -16,6 +16,8 @@ Enhancements Bug Fixes ~~~~~~~~~ +- Symbols with non-alphanumeric characters fail + `GH38 `__ - Some Stocks endpoints return incorrectly `GH34 `__ - Repaired CodeCov code coverage diff --git a/iexfinance/base.py b/iexfinance/base.py index 76c393b..e9c03e8 100644 --- a/iexfinance/base.py +++ b/iexfinance/base.py @@ -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) @@ -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):