Error in live trading console with Alpaca API

Hi, I have and algorithm that is running fine when I backtest it, but when I publish it for live trading in my Alpaca API paper trading acocunt I am getting the same error over and over again. Does anyone know what this means and if it is something I can fix?



 

[ERROR | 2020/10/09, 05:29:52] BlueShift Alert[2020-10-08 15:59:52.868421-04:00] ERROR in get_bars:error fetching data: signature is invalid (Code = 40110000)
 
[ERROR | 2020/10/09, 05:29:52] BlueShift Alert[2020-10-08 15:59:52.867835-04:00] ERROR in _get_bars_iex:signature is invalid (Code = 40110000)
 
[USER | 2020/10/09, 05:29:52] Couldn't apply signals for AlpacaAsset(TEAM [-1]). Err: Error received from API: In module alpacadata, function current, error:something went wrong with data query. Error received from API: In module alpacadata, function current, error:something went wrong with data query.
 

Hi Graham,



It seems that the ticker code is inconsistent with the Alpaca API or a problem with the data query itself. 

Could you please share the part of code where you are making the function call for data query?



Thanks!

Hi Gaurav, 



The code where I setup the symbols…

    context.tickers = ['GOOG', 'AAPL', 'AMZN', 'NFLX', 'FB', 'BRK.B',
        'NVDA', 'ADBE', 'SBUX', 'MOS', 'MSFT', 'DIS', 'PYPL', 'DAL', 'V',
        'JNJ', 'BA', 'BAC', 'MMM', 'WM', 'TSLA', 'TRV', 'DLTR', 'PEP',
        'CAT', 'F', 'VFC', 'KHC', 'MU', 'DB', 'TEAM', 'FSLR', 'DOCU', 'QTS',
        'BIIB', 'SPCE']
    context.universe = []
    for ticker in context.tickers:
        try:
            security = symbol(ticker)
            context.universe.append(security)
        except BaseException as err:
            print("Couldn't add ticker {}. Err: {}".format(ticker, err))
 

And here is the code that gets the history...

    for security in context.universe:
        try:
            daily_history = data.history(security, 'close', 226, '1d')
        except BaseException as err:
            print("Couldn't apply history for {}. Err: {}".format(security,
                err), err)
            pass

Thanks,
Graham

Thx vm for reporting this error. It appears there is a recent break in IEX api which is causing this problem. We will investigate and fix it soon and give you a shout.