# Generate cash profit and loss

Generate a date-bounded, currency-specific cash P&L from categorized watched-account transactions. Group by day, week or month. Loan principal, transfers, equity, capital assets, uncategorized activity and provider changes awaiting review are excluded from profit and reported separately. Read-only; does not trigger a Plaid refresh. Use from and to dates, interval and currency. Review coverage and classification before using for financing. Takes the brokerage's books: an owner or admin, or a seat holding an accounting grant (`get_accounting_me_access`); anyone else is refused with 403.

Access class: `workspace:books`.

## Endpoint

`GET /v1/accounting/profit-loss`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| currency | query | string | No |
| from | query | string | No |
| interval | query | string | No |
| to | query | string | No |

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "basis": "string",
    "currency": "string",
    "excludedCount": 1.5,
    "expenseMinor": 1.5,
    "firstTransaction": "2026-01-01T00:00:00Z",
    "from": "string",
    "generatedAt": "2026-01-01T00:00:00Z",
    "incomeMinor": 1.5,
    "interval": "string",
    "lastTransaction": "2026-01-01T00:00:00Z",
    "lines": [
      {
        "amountMinor": 1.5,
        "categoryId": "",
        "kind": "string",
        "name": "string",
        "period": "string",
        "transactions": 1.5
      }
    ],
    "profitMinor": 1.5,
    "reviewCount": 1.5,
    "supporting": [
      {
        "amountMinor": 1.5,
        "count": 1.5,
        "kind": "string",
        "period": "string"
      }
    ],
    "to": "string",
    "transactionCount": 1.5,
    "uncategorizedCount": 1.5,
    "uncategorizedInMinor": 1.5,
    "uncategorizedOutMinor": 1.5
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
