There appears to be an instability in the portfolio equity and P&L calculations. It shows up in the browser GUI as I note here: Equity vs graphed value in the browser GUI. But something is off about the output of the api.get_portfolio_history() call also:
Second and fourth rows in the table above seem to be calculated correctly but the 3rd row is not, i.e. 9.893342e+05 / 9.920640e+05 - 1 != -0.024411
Anyone else is experiencing this? Can it have something to do with how the trades are settled?