Rust program to extract the full order history, backtrace and synthesize the portfolio history from it, and calculate unrealized PnL, APR, average daily return and Sharpe ratio using the buggy Trading212 API.
T212 allows 6x50 requests per minute => time delay for portfolio histories with more than 300 orders.
main => {t212, yahoo, plotter, dividends, stats}
Thank you to loony-bean for textplots
(you should add x_tick customisation).
Place a .txt
file with your valid Trading212 API key (no spaces) into the same folder as t212.exe
and launch executable (ideally via PowerShell or any other terminal that supports colour and UTF-8).
Alternatively, download the full rust_version, insert api key into the existing .txt file and cargo run
.