import { AllocationPerCoin, DatabaseModel, ExchangeId, Order, StopLoss, Trade, UserId } from '..'; import { Balance, CurrencySymbol } from '../..'; import { PortfolioRecipe } from '../portfolio-recipe'; import { Milliseconds } from '../types'; import { PortfolioRebalanceStatus } from './PortfolioRebalanceStatus'; export interface Portfolio extends DatabaseModel { id: PortfolioId; exchangeId: ExchangeId; name: string; userId: UserId; tradeHistory: Trade[]; isActive: boolean; stopLosses: StopLoss[]; /** Total balance of each asset in the portfolio */ balance: Balance; /** Amount allocated per coin to each recipe */ allocation: AllocationPerCoin; baseCurrency: CurrencySymbol; openOrders: Order[]; /** List of recipes stored in a subcollection */ recipes?: PortfolioRecipe[]; /** Current status of the rebalance. */ rebalanceStatus: PortfolioRebalanceStatus; /** The cooldown, in milliseconds, before more trades can be executed. Off if nullish. */ cooldownMs?: Milliseconds; } export declare type PortfolioId = string;