> ## Documentation Index
> Fetch the complete documentation index at: https://edgefinder.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# edgefinder portfolio — Polymarket portfolio tracking

> Track your Polymarket sports betting portfolio from the terminal. View summary stats, open positions, and trade history filtered by NFL, NBA, or all sports.

The `portfolio` command connects to your Polymarket wallet and surfaces your sports betting portfolio data directly in the terminal. You can view a high-level summary, inspect open positions with live prices and PnL, or browse your recent trade history. All views support league filtering and JSON output for scripting.

<Warning>
  This command requires a connected Polymarket wallet. Connect your wallet at [chat.edgefinder.io](https://chat.edgefinder.io) before using `portfolio` commands.
</Warning>

## Syntax

```bash theme={null}
edgefinder portfolio <summary|positions|trades> [--league nfl|nba|all] [--limit N] [--json]
```

## Arguments

<ParamField path="path.view" type="string" default="summary">
  The portfolio view to display. One of:

  * `summary` — overall portfolio value, PnL, and position count
  * `positions` — open positions with current prices and unrealized PnL
  * `trades` — recent trade history
</ParamField>

## Options

<ParamField path="query.--league" type="string" default="all">
  Filter results by league. Accepts `nfl`, `nba`, or `all`. Defaults to `all`, which returns data across every sport.
</ParamField>

<ParamField path="query.--limit" type="number">
  Maximum number of results to return. Only applies to the `trades` view. When omitted, returns the full trade history.
</ParamField>

<ParamField path="query.--json" type="boolean">
  Output raw JSON. Portfolio commands always output JSON; this flag is accepted for script consistency and pipeline compatibility.
</ParamField>

## Examples

<CodeGroup>
  ```bash Portfolio summary theme={null}
  edgefinder portfolio summary
  ```

  ```bash Open positions theme={null}
  edgefinder portfolio positions
  ```

  ```bash NBA positions only theme={null}
  edgefinder portfolio positions --league nba
  ```

  ```bash Recent trades theme={null}
  edgefinder portfolio trades
  ```

  ```bash Last 20 NFL trades theme={null}
  edgefinder portfolio trades --limit 20 --league nfl
  ```
</CodeGroup>

## Views

### summary

Returns high-level portfolio stats including total value, PnL, and position count.

```json theme={null}
{
  "connected": true,
  "wallet": "0xabc123...",
  "username": "yourname",
  "totalValue": 1240.50,
  "positionsValue": 980.00,
  "cashBalance": 260.50,
  "dayPnl": 42.10,
  "totalPnl": 315.75,
  "percentPnl": 34.2,
  "positionCount": 8,
  "lastSyncedAt": "2026-04-21T14:32:00Z"
}
```

### positions

Returns each open position with its current market price and unrealized PnL.

```json theme={null}
[
  {
    "id": "pos_001",
    "title": "Will the Kansas City Chiefs win the Super Bowl?",
    "slug": "chiefs-super-bowl-lxi",
    "outcome": "Yes",
    "size": 50,
    "avgPrice": 0.58,
    "currentPrice": 0.72,
    "currentValue": 36.00,
    "initialValue": 29.00,
    "cashPnl": 7.00,
    "isRedeemable": false
  }
]
```

### trades

Returns recent executed trades. Use `--limit` to cap the number of results.

```json theme={null}
[
  {
    "id": "trd_abc",
    "title": "Will the Los Angeles Lakers win the NBA Championship?",
    "slug": "lakers-nba-champ",
    "outcome": "Yes",
    "side": "BUY",
    "size": 100,
    "price": 0.34,
    "timestamp": "2026-04-10T09:15:00Z"
  }
]
```

<Tip>
  After reviewing your positions, use `ask` to get AI analysis on whether to hold or exit a specific bet:

  ```bash theme={null}
  edgefinder portfolio positions --league nfl
  edgefinder ask "Should I hold my Chiefs Super Bowl position at 72 cents?"
  ```
</Tip>

<Note>
  Portfolio data is synced from Polymarket when you run the command. If your wallet was recently connected, allow a few minutes for data to appear.
</Note>
