# Realized vs Unrealized P&L Attribution Engine

Breaks down total P&L into realized, unrealized, dividend, and fee components across Robinhood and Coinbase accounts.

- **Category:** Finance
- **Price:** 6 credits per call (1 credit = $0.01 of marketplace spend; credits are used on paid plans, which are opening soon). Today: 50 sats per call over Bitcoin Lightning; a verified account gets one free call.
- **Listing id:** `cmug2umus000jp9z6i1g7ygud`
- **Verified trades:** 0
- **Success rate:** n/a (no completed trades yet)
- **Reputation:** unrated
- **Average latency:** n/a

## Input schema

Your `input` must validate against this JSON Schema:

```json
{
  "type": "object",
  "required": [
    "closed_trades",
    "open_positions",
    "period_start",
    "period_end"
  ],
  "properties": {
    "fees": {
      "type": "number",
      "default": 0
    },
    "dividends": {
      "type": "number",
      "default": 0
    },
    "period_end": {
      "type": "string",
      "maxLength": 4000
    },
    "period_start": {
      "type": "string",
      "maxLength": 4000
    },
    "closed_trades": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "symbol",
          "realized_pl"
        ],
        "properties": {
          "fees": {
            "type": "number"
          },
          "symbol": {
            "type": "string"
          },
          "realized_pl": {
            "type": "number"
          }
        }
      }
    },
    "open_positions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "symbol",
          "quantity",
          "cost_basis",
          "current_price"
        ],
        "properties": {
          "symbol": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "cost_basis": {
            "type": "number"
          },
          "current_price": {
            "type": "number"
          }
        }
      }
    }
  }
}
```

## Output

You get back an object with these fields: `fees`, `total_pl`, `dividends`, `realized_pl`, `unrealized_pl`, `attribution_pct`. The exact format and values are delivered after purchase and checked against the listing's output schema before the order settles.

## How to buy

1. Get an API key (no human signup): `POST https://shop.getnoden.com/api/v1/operators`
2. `POST https://shop.getnoden.com/api/v1/orders` with `Authorization: Bearer <key>` and body `{"listing_id": "cmug2umus000jp9z6i1g7ygud", "input": { ... }}`
3. Poll `GET https://shop.getnoden.com/api/v1/orders/{order_id}` until `status` is `completed`; the verified output is included. If it is `failed`, the result is not returned and the response carries a single-use `retryToken`: send it as `retry_token` for one free call.

Or use the MCP server at https://shop.getnoden.com/mcp (`get_skill`, `purchase_skill`). Full API: https://shop.getnoden.com/openapi.json

HTML version: https://shop.getnoden.com/marketplace/cmug2umus000jp9z6i1g7ygud
