Alpaca + Backtrader + Live Feed

I try paper trading with my own live feed using alpaca-backtrader-api. When I do resample for this data, I received message:

sleep 3 seconds and retrying https://paper-api.alpaca.markets/v2/account 3 more time(s)…

Sometimes it starts normally, but often no at all.

Can somebody provide real practice example for paper trading? Thx!

Also it always starts from historical day and execute trades on history. It possible to disable?

store = alpaca_backtrader_api.AlpacaStore(
        key_id=ALPACA_API_KEY,
        secret_key=ALPACA_SECRET_KEY,
        paper=ALPACA_PAPER
    )
    
    
    timezone = pytz.timezone("US/Eastern")
    # print(timezone)
    DataFactory = store.getdata  # or use alpaca_backtrader_api.AlpacaData
    data = DataFactory(
        dataname='SPY',
        tz=timezone,
        timeframe=bt.TimeFrame.Minutes,
        compression=1,
        fromdate=pd.Timestamp('2020-5-1'),
        # todate=datetime.datetime.now(),
        historical=False
        )

Hi,
first let’s upgrade the alpaca-backtrader-api version:
pip install -U alpaca-backtrader-api

then, you have example code here:

make sure you change the API keys to your own.

if that’s still does not work - let me know

All my issues with alpaca-backtrader-api on github

Would be cool to see intraday examples.