"ValueError: Length of values (2) does not match length of index (1)"

Course Name: Trading in Milliseconds: MFT Strategies & Setup, Section No: 26, Unit No: 2, Unit type: ZipFiles

I'm trying the alpaca_paper_trade.py template the following error occurs "ValueError: Length of values ​​(2) does not match length of index (1)" generated by the following statement "latest_trade = pd.DataFrame(t, index=[0])", I tried to fix it but to no avail. Can you help me figure out how to do it? Thank you.

Hi Luca,



The error was due to some recent changes in the Alpaca API. It has been fixed now, and the template file has been updated. You can download the latest file from here.



Thanks,

Akshay