Portfolio - Rugplay

Portfolio

View your holdings and portfolio performance

{#if loading}
Loading portfolio...
{:else if !portfolioData}
Failed to load portfolio
{:else}
Total

{formatValue(totalPortfolioValue)}

Cash Balance

{formatValue(portfolioData.baseCurrencyBalance)}

{totalPortfolioValue > 0 ? `${((portfolioData.baseCurrencyBalance / totalPortfolioValue) * 100).toFixed(1)}% of portfolio` : '100% of portfolio'}

Coin Holdings

{formatValue(portfolioData.totalCoinValue)}

{portfolioData.coinHoldings.length} positions

{#if !hasHoldings}

No coin holdings

You haven't invested in any coins yet. Start by buying existing coins.

{:else} Your Holdings Current positions in your portfolio Coin Quantity Price 24h Change Value {#each portfolioData.coinHoldings as holding} goto(`/coin/${holding.symbol}`)} >
*{holding.symbol}
{formatQuantity(holding.quantity)} ${formatPrice(holding.currentPrice)} = 0 ? 'success' : 'destructive'}> {holding.change24h >= 0 ? '+' : ''}{holding.change24h.toFixed(2)}% {formatValue(holding.value)}
{/each}
{/if}
Recent Transactions Your latest trading activity
{#if hasTransactions} {/if}
{#if !hasTransactions}

No transactions yet

You haven't made any trades yet. Start by buying or selling coins.

{:else} Type Coin Quantity Price Total {#each transactions as tx} goto(`/coin/${tx.coin.symbol}`)} >
{#if tx.type === 'BUY'} Buy {:else} Sell {/if}
*{tx.coin.symbol}
{formatQuantity(tx.quantity)} ${formatPrice(tx.pricePerCoin)} {formatValue(tx.totalBaseCurrencyAmount)}
{/each}
{/if}
{/if}