# CoinStats Shared Portfolio Total Value & PnL

> CoinStats Shared Portfolio Total Value & PnL is a paid API for AI agents from x402.coinstats.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the total portfolio value, DeFi value, and unrealized/realized profit and loss for a CoinStats shared portfolio identified by a sharetoken.

## Facts

- Endpoint: GET https://x402.coinstats.app/portfolio/value
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-coinstats-app-c9841ebe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TGNPlFr21ru4K9CIz1UhX

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-coinstats-app-c9841ebe
```

Example prompt: Can you pull up my CoinStats portfolio summary and tell me the total value, how much is in DeFi, and my unrealized and realized profit and loss?

## When to prefer this

Use this endpoint when you need a high-level financial snapshot of a CoinStats user's entire crypto portfolio — total value, DeFi exposure, and PnL metrics — rather than granular coin-by-coin breakdowns. Prefer this over the value chart endpoint when you want current point-in-time numbers rather than historical time-series data. Best suited for dashboards, alerts, or agent workflows that need a quick portfolio health check.

## Known failure modes

- Missing or invalid sharetoken header returns unauthorized/error response
- Sharetoken from a non-Degen-plan CoinStats user may be rejected or return empty data
- Portfolio with no assets returns all zero values
- Network or upstream CoinStats API outage returns a 5xx error
- Payment failure (insufficient USDC balance) blocks the request via x402 protocol

## How this service works

CoinStats shared portfolio total value and PnL — total value, DeFi value, unrealized + realized profit/loss. Requires sharetoken header

## Output

Returns a JSON object with the portfolio's total USD value, DeFi-specific value, total cost basis, all-time profit/loss (absolute and percent), realized profit/loss (absolute and percent), and unrealized profit/loss (absolute and percent). All values are numeric and expressed in USD.

## Example request

```json
{
 "method": "GET"
}
```

## Request schema (JSON Schema)

```json
{
 "properties": {
  "input": {
   "required": [
    "method"
   ],
   "properties": {
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-coinstats-app-c9841ebe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.coinstats.app](https://www.zero.xyz/host/x402.coinstats.app/llms.txt)
