import { HistoricalValue, PercentageOutOfOne, PortfolioRecipe } from '..'; import { Milliseconds } from '../types'; export interface PortfolioRecipeStatus extends PortfolioRecipe { /** Name and emoji of recipe */ name: string; emoji: string; slug: string; /** Checks if recipe logic has changed to alert user */ logicHasChanged: boolean; /** Most up to date version number of recipe */ recipeVersion: number; /** Following fields will be calculated when recipe data is retrived. Can be calculated using historical value. */ currentValue: number; gainLoss: number; /** A percentage out of 1 */ percentageChange: PercentageOutOfOne; /** Based off current value of each coin in portfolio times amount of coin. */ percentOfPortfolio: PercentageOutOfOne; /** Historical values in the portfolio recipe. */ valueHistory: HistoricalValue[]; /** Timestamp for when the cooldown ends, if present */ cooldownEndsAt?: Milliseconds; } /** MultiplePortfolioRecipeStatuses maps IDs to portfolio recipe status objects. */ export interface MultiplePortfolioRecipeStatuses { perPortfolioRecipe: PortfolioRecipeStatus[]; }