Change order for the prices arrays (oldest first) and convert ts to ms (for JS).