Binance TR Accounts Sync, and Excursions Read the Right Market
Binance TR syncs run to completion instead of failing partway, excursion stats for perp trades use perp prices, and a dashboard left open after an account is deleted stops erroring.
Three fixes, one of which had been failing every single run.
Binance TR syncs never finished. A first sync walks back to 2021 across every TRY pair, and when Binance throttled it partway the run gave up and failed the account instead of easing off and carrying on. It now backs off and continues, so a Binance TR account imports its history.
Excursion stats used spot prices for perp trades. Binance spot and perps share a symbol, so maximum favourable and adverse excursion on a perp position was measured against the spot chart. Wrong numbers, with nothing to show they were wrong. Excursions now ask for the market the trade was actually on. The demo account's excursion panel works now too.
A dashboard left open after deleting an account. Open positions, holdings and the portfolio summary kept retrying for an account that no longer existed, sitting there on an error. They now stop when the answer cannot change, and keep retrying when it can.