Environment
Language
Python
Alpaca SDK Version
latest
Other Environment Details
yaml variable set to “use_polygon: false”
Problem
Summary
While running the pyLiveTrader, it attempts to call Polygon which requires a different key/secret. Shoudl the use_polygon: false prevent this from happening? Looking at the code it appears in …\alpaca|trade|api\polygon\rest.py that polygon.io is specifically coded. Should this call to rest.py instead be to …\alpaca_trade_api\rest.api (note the difference is the polygon directory containing a copy of rest.py
Paper or Live Tradng?
paper
Example Code
def _request(self, method, path, params=None):
url = ‘https://api.polygon.io/v1’ + path
params = params or {}
params[‘apiKey’] = self._api_key
if self._staging:
params[‘staging’] = ‘true’
resp = self._session.request(method, url, params=params)
resp.raise_for_status()
return resp.json()