I had to make these mods to samplealgo/algo.py to get it to work as described in the README:
import pandas as pd
import time
import logging
import os
from .universe import Universe
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
NY = 'America/New_York'
api = tradeapi.REST(
key_id=os.environ['APCA_API_KEY_ID'],
secret_key=os.environ['APCA_API_SECRET_KEY'],
base_url=os.environ['APCA_API_BASE_URL'] or 'https://paper-api.alpaca.markets'
)
I had to make these mods to samplealgo/algo.py to get it to work as described in the README: