Portfolio
Balances, available versus locked collateral, position value and profit and loss.
Portfolio answers three questions: what do I hold, what is it worth at the current market, and what is reserved by orders I have not cancelled.
Balances
- Total
- Everything you hold in an asset, whether or not an order has reserved it.
- Available
- The part you can spend on a new order or withdraw. Placing an order moves collateral out of Available.
- In orders
- Collateral locked by resting orders. A bid locks USDG; an ask locks the base asset. Cancelling or filling releases it.
Available plus In orders always equals Total. If a number looks wrong, the usual explanation is a resting order in Open orders.
Positions
- Quantity
- Units of the base asset you hold.
- Mark price
- The current mid price of that asset's market, used to value the position.
- Position value
- Quantity × mark price, in USDG.
- Average entry
- Size-weighted average price of the fills that built the position. Selling part of a position leaves the average entry of the remainder unchanged.
- Cost basis
- Quantity × average entry — what the position cost you.
- Allocation
- Share of total portfolio value held in that asset.
Profit and loss
Unrealised profit and loss is position value minus cost basis: what you would gain or lose by closing at the mark. It moves with the market and is shown both in USDG and as a percentage of cost basis.
Realised profit and loss is booked when you sell: the difference between the fill price and your average entry, for the quantity sold. Fees are included in the fills that produce it.
Demo account controls
Because this build has no deposits, Portfolio exposes three local actions: add USDG to the demo balance, withdraw from it, and reset the account to its starting state. All three are local bookkeeping, recorded in Activity so the ledger stays consistent.
Resetting asks for confirmation, then clears every order, fill and activity entry, releases the collateral those orders reserved, and restores the seeded balances and cost basis. Your watchlist and interface preferences are left alone.