For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Live feed alpaca-backtrader-api - KeyError: ‘bidprice’

  • I understand that this is not bug by backtrader, but anyway maybe someone had the same.

    When stock is hold by exchange or sometimes after overnight I see that type of error. How I can catch this?

    File "/home/x777/anaconda3/envs/env_backtrader/lib/python3.6/site-packages/backtrader/", line 1130, in run
        runstrat = self.runstrategies(iterstrat)
      File "/home/x777/anaconda3/envs/env_backtrader/lib/python3.6/site-packages/backtrader/", line 1301, in runstrategies
      File "/home/x777/anaconda3/envs/env_backtrader/lib/python3.6/site-packages/backtrader/", line 1545, in _runnext
      File "/home/x777/anaconda3/envs/env_backtrader/lib/python3.6/site-packages/backtrader/", line 407, in next
        ret = self.load()
      File "/home/x777/anaconda3/envs/env_backtrader/lib/python3.6/site-packages/backtrader/", line 479, in load
        _loadret = self._load()
      File "/home/x777/anaconda3/envs/env_backtrader/lib/python3.6/site-packages/alpaca_backtrader_api/", line 301, in _load
        ret = self._load_tick(msg)
      File "/home/x777/anaconda3/envs/env_backtrader/lib/python3.6/site-packages/alpaca_backtrader_api/", line 401, in _load_tick
    KeyError: 'bidprice'