# Your Tenant's Insights

Your tenant's users, wallets, operations and volume over the last 24 hours, 7 days and 30 days, each beside the period before. For the roles that read the tenant's transactions.

## Overview

- **Who may call.** The tenant roles `owner`, `tenantadmin`, `non_signing_admin`, `signer`, `approver`, `editor`, `viewer` and `auditor`, on their own tenant (`{id}`: your tenant's id). Another tenant's id answers `403`; a tenant that does not exist `404` `TENANT_NOT_FOUND`.
- `network` — `mainnet` (default) or `testnet` — picks the operations and the volume counted. An operation without a network counts as mainnet. Users and wallets are counted on both.
- **A period** is `{ current, previous, changePercent }`: the last 24 hours, 7 or 30 days, the same length just before, and the change in percent with one decimal — `null` when the period before had none.
- **`users`**: `total` (deleted accounts left out), `endUsers` (role `user`), `members` (every other role), and `created` over 7 and 30 days.
- **`wallets`**: `active` (not deactivated) now, `activeSevenDaysAgo` (created before then and not deactivated by then), `changePercent7d` between the two, and `created` over 7 and 30 days.
- **`operations`**: the operations created in each period on the network, every type and state. They come from operation records [Coming soon, upon request](https://docs.aureahub.com/docs/feature-availability.md) ([Operations & Fees](https://docs.aureahub.com/docs/guide-operations.md)): without them, operations and volume count zero. For a count with filters, use [Count Operations](https://docs.aureahub.com/docs/operations-count.md).
- Everything is read from what Aurea has recorded; nothing is read from a chain. `generatedAt` is when the answer was computed.

## Volume

- What counts: operations `COMPLETED`, of type `TRANSFER`, `PAYOUT` or `SWAP` (a swap counts what it spent), with an amount above zero and an asset, created in the period on the network asked for.
- `byAsset`: one entry per chain and asset — `chain`, `chainId`, `asset` (`native` or the token's address), `symbol`, `decimals` — with `amount`, the exact sum in the asset's smallest unit ([Amount Units](https://docs.aureahub.com/docs/amounts.md)).
- `eur`: valued in EUR at the asset's **current** price in the token registry — your tenant's token first, else Aurea's catalogue price for the same symbol — not at the price of each operation's time (`valuation` `"current_price"`). Sums are exact and rounded half up to two decimals, as strings.
- An asset the registry cannot price is never valued silently: its entry has `eur` `null` (or the priced part only) and the unpriced part in `unpricedAmount`; the period says `partial` `true`, and the asset is listed in `unpricedAssets`. A period's `eur` then leaves it out.

## Endpoint

### `GET /v1/admin/tenants/{id}/insights`

Authentication: bearer token required.

The tenant's users, wallets, operations and volume, each period beside the one before.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | yes | Your tenant's id |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `network` | string | no | `mainnet` (default) or `testnet` |

**Responses**

`200` OK

```json
{
  "tenantId": "3f1c9a52-6d1e-4c1b-9f0a-2a51e1c0b7d4",
  "network": "mainnet",
  "generatedAt": "2026-10-21T10:30:00.000Z",
  "users": {
    "total": 1840,
    "endUsers": 1832,
    "members": 8,
    "created": {
      "last7d": { "current": 64, "previous": 51, "changePercent": 25.5 },
      "last30d": { "current": 233, "previous": 240, "changePercent": -2.9 }
    }
  },
  "wallets": {
    "active": 398,
    "activeSevenDaysAgo": 371,
    "changePercent7d": 7.3,
    "created": {
      "last7d": { "current": 29, "previous": 22, "changePercent": 31.8 },
      "last30d": { "current": 104, "previous": 0, "changePercent": null }
    }
  },
  "operations": {
    "last24h": { "current": 37, "previous": 41, "changePercent": -9.8 },
    "last7d": { "current": 268, "previous": 230, "changePercent": 16.5 },
    "last30d": { "current": 1012, "previous": 954, "changePercent": 6.1 }
  },
  "volume": {
    "currency": "EUR",
    "valuation": "current_price",
    "last24h": {
      "current": {
        "eur": "4210.55",
        "partial": false,
        "byAsset": [
          { "chain": "base", "chainId": 8453, "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "symbol": "USDC", "decimals": 6, "amount": "4550000000", "eur": "4210.55", "unpricedAmount": "0" }
        ]
      },
      "previous": { "eur": "3890.10", "partial": false, "byAsset": [] },
      "changePercent": 8.2
    },
    "last7d": {
      "current": { "eur": "28102.40", "partial": true, "byAsset": [] },
      "previous": { "eur": "25530.00", "partial": false, "byAsset": [] },
      "changePercent": 10.1
    },
    "last30d": {
      "current": { "eur": "110455.92", "partial": true, "byAsset": [] },
      "previous": { "eur": "98710.37", "partial": false, "byAsset": [] },
      "changePercent": 11.9
    },
    "unpricedAssets": [
      { "chain": "polygon", "chainId": 137, "asset": "0x0000000000000000000000000000000000001010", "symbol": "XYZ" }
    ]
  }
}
```

`404` No tenant

```json
{
  "statusCode": 404,
  "error": "NotFoundError",
  "message": "Tenant not found",
  "details": { "code": "TENANT_NOT_FOUND" }
}
```

**Example request**

```bash
curl "https://api.aureahub.com/v1/admin/tenants/TENANT_ID/insights?network=mainnet" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

In the example, `byAsset` of the periods other than the last 24 hours is left empty for brevity; the API lists every asset of each period.

---

Web version: https://docs.aureahub.com/#tenant-insights
