alpacahq / samplealgo01

Sample algo
69 stars 85 forks source link

key_id='REPLACEME' #22

Open jabowery opened 5 years ago

jabowery commented 5 years ago

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'
)