Getting pyLiveTrader to work without calling Polygon



Alpaca SDK Version

Other Environment Details
yaml variable set to “use_polygon: false”


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\ that is specifically coded. Should this call to instead be to …\alpaca_trade_api\rest.api (note the difference is the polygon directory containing a copy of

Paper or Live Tradng?

Example Code
def _request(self, method, path, params=None):
url = ‘’ + path
params = params or {}
params[‘apiKey’] = self._api_key
if self._staging:
params[‘staging’] = ‘true’
resp = self._session.request(method, url, params=params)
return resp.json()

Update: This problem is in the portfolio_management example

Hi, not sure I understand your issue.
but when you specify use_polygon false, you are using the alpaca data module.
there’s another which calls the alpaca api.
is that what you meant?

Yes, there is a “polygon” folder with a different that is being called. That has polygon coded in the url.

I pulled the source from github and assume it is all the latest.

Found there is a difference in the codebase. If you install according to the instructions (using Anaconda, etc) you get an “older” version as compared to what I get from gitHub (the download zip).

Should pyLIveTrader install and work with Python 3.8.5?

the recommended python is 3.6 ( this is a limitation by zipline)

Thanks - will try Python 3.6 as when I try to install there are numerous “builds” that are attempt and it is failing somewhere in the middle.

1 Like