# Read data

Source: https://docs.settlemint.com/docs/developers/feeds/read-data
Query feed data: latest values, historical rounds, resolve feeds by subject and
topic, list feeds with filtering, and check staleness.




Feed read endpoints return current values, historical rounds, directory resolution, configuration, and paginated feed lists. They help an integration find the feed for a subject and topic, inspect indexed metadata, and decide whether a value is fresh enough to use.

This page is reference material for developers who already have a feed address or `(subject, topic)` pair.

If you need to create or update feeds first, start with [Create feeds](/docs/developers/feeds/create-feeds) or [Submit updates](/docs/developers/feeds/submit-updates).

## Choose the read endpoint [#choose-the-read-endpoint]

| Goal                                                       | Endpoint                                                                             |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| Read the current value from a known feed address           | `GET /system/feeds/{feedAddress}/latest`                                             |
| Read a historical round from a known feed address          | `GET /system/feeds/{feedAddress}/round/{roundId}`                                    |
| Find the registered feed for a subject and topic           | `GET /system/feeds/resolve`                                                          |
| Inspect the indexed feed record for a known feed address   | `GET /system/feeds/{feedAddress}`                                                    |
| Read issuer-signed feed configuration                      | `GET /system/feeds/{feedAddress}/config`                                             |
| List registered feeds or factory-created feeds             | `GET /system/feeds`, `GET /system/feeds/issuer-signed`, `GET /system/feeds/adapters` |
| Check whether the latest value is stale for your threshold | `GET /system/feeds/{feedAddress}/staleness`                                          |

## CLI equivalents [#cli-equivalents]

Use the DALP CLI when you are checking feeds from an operator shell or wiring a runbook step. The CLI calls the same feed read surfaces as the API.

| Goal                                      | CLI command                                                                |
| ----------------------------------------- | -------------------------------------------------------------------------- |
| List feed capabilities                    | `dalp system feeds capabilities`                                           |
| List registered feeds                     | `dalp system feeds list`                                                   |
| Read the indexed feed record              | `dalp system feeds read 0xFeed`                                            |
| Read the latest value                     | `dalp system feeds latest 0xFeed`                                          |
| Read one historical round                 | `dalp system feeds round --address 0xFeed --roundId 42`                    |
| Read issuer-signed feed configuration     | `dalp system feeds config 0xFeed`                                          |
| Check staleness for a threshold           | `dalp system feeds staleness --address 0xFeed --maxAgeSeconds 3600`        |
| List issuer-signed feeds or feed adapters | `dalp system feeds issuer-signed-list` or `dalp system feeds adapter-list` |

The CLI is a read convenience for these operations. It does not change feed freshness, valuation policy, or whether a dependent workflow should accept the value.

## Latest value [#latest-value]

Get the most recent round from a feed:

```bash
curl "$DALP_API_URL/system/feeds/0xFeed/latest" \
  -H "X-Api-Key: $API_KEY"
```

Response:

```json
{
  "feedAddress": "0x...",
  "roundId": "42",
  "answer": "150000000",
  "decimals": 8,
  "formattedAnswer": "1.50000000",
  "startedAt": "1700000000",
  "updatedAt": "1700000000",
  "answeredInRound": "42",
  "description": "USD price feed",
  "version": "1"
}
```

| Field             | Description                                     |
| ----------------- | ----------------------------------------------- |
| `roundId`         | Incrementing identifier for this data point     |
| `answer`          | Raw value scaled by `decimals`                  |
| `formattedAnswer` | Human-readable value with decimal point applied |
| `startedAt`       | Timestamp when this round was initiated         |
| `updatedAt`       | Timestamp when this round was last updated      |
| `description`     | Feed description from the contract              |
| `version`         | Feed contract version                           |

### What the latest read means [#what-the-latest-read-means]

The latest-value endpoint reads the feed contract directly through the AggregatorV3-compatible interface. DALP calls `latestRoundData`, `decimals`, `description`, and `version`. The response includes the raw signed integer in `answer` and the decimal-scaled `formattedAnswer`.

Use this endpoint when you already know which feed address you want to inspect. The endpoint does not approve a price for valuation, NAV, redemption, or reporting.

For token pricing and FX conversion, use the [token price resolution API](/docs/api-reference/tokens/token-price-resolution). That API applies the token's configured price resolver and conversion path.

If the address is not a deployed AggregatorV3-compatible feed, DALP rejects the request instead of returning a placeholder value.

## Historical rounds [#historical-rounds]

Fetch a specific round by its ID:

```bash
curl "$DALP_API_URL/system/feeds/0xFeed/round/40" \
  -H "X-Api-Key: $API_KEY"
```

Response:

```json
{
  "roundId": "40",
  "answer": "148500000",
  "startedAt": "1699900000",
  "updatedAt": "1699900000",
  "answeredInRound": "40"
}
```

<Callout type="info" title="History mode affects availability">
  Round availability depends on the feed's history mode. `LATEST_ONLY` keeps only the current round. `BOUNDED` keeps a
  fixed window. `FULL` retains all rounds.
</Callout>

## Resolve a feed [#resolve-a-feed]

Look up a feed by its `(subject, topic)` pair. Identify the topic by name or by ID:

```bash
# By topic name
curl "$DALP_API_URL/system/feeds/resolve?subject=0xToken&topicName=PRICE/USD" \
  -H "X-Api-Key: $API_KEY"

# By topic ID
curl "$DALP_API_URL/system/feeds/resolve?subject=0xToken&topicId=109530253..." \
  -H "X-Api-Key: $API_KEY"
```

| Parameter   | Type    | Required                                 | Description                          |
| ----------- | ------- | ---------------------------------------- | ------------------------------------ |
| `subject`   | address | Yes                                      | The asset or entity address          |
| `topicName` | string  | At least one of `topicName` or `topicId` | Human-readable topic name            |
| `topicId`   | string  | At least one of `topicName` or `topicId` | The keccak256 hash of the topic name |

Response:

```json
{
  "exists": true,
  "feedAddress": "0x...",
  "kind": "SCALAR",
  "schemaHash": "0x...",
  "adapterAddress": "0x...",
  "indexed": {
    "decimals": 8,
    "latestValue": {
      "roundId": 42,
      "answer": "150000000",
      "observedAt": "1700000000",
      "updatedAt": "1700000000",
      "issuer": "0x...",
      "signer": "0x..."
    },
    "registeredAt": "1699000000"
  }
}
```

The `indexed` field contains data from DALP indexing and may be `null` if the feed has not yet been indexed. In `latestValue`, `issuer` is the issuer identity that authorized a DALP-managed update, and `signer` is the EOA wallet that signed the EIP-712 typed data. For Chainlink-compatible updates, those two fields use the zero address because the external aggregator owns its own update model.

## Read a feed record [#read-a-feed-record]

Inspect the indexed feed record:

```bash
curl "$DALP_API_URL/system/feeds/0xFeed" \
  -H "X-Api-Key: $API_KEY"
```

The response uses the same feed item shape as the list endpoint: address, subject, topic ID, kind, schema hash, scope, factory, creator, adapter address, active status, registration timestamp, description, and latest indexed value when available.

## Read issuer-signed configuration [#read-issuer-signed-configuration]

Read immutable configuration for an issuer-signed scalar feed:

```bash
curl "$DALP_API_URL/system/feeds/0xFeed/config" \
  -H "X-Api-Key: $API_KEY"
```

Response:

```json
{
  "feedAddress": "0x...",
  "subject": "0x...",
  "topicId": "109530253...",
  "expectedSchemaHash": "0x...",
  "decimals": 8,
  "description": "USD price feed",
  "historyMode": "FULL",
  "historySize": 0,
  "requirePositive": true,
  "driftAllowance": 0,
  "domainSeparator": "0x...",
  "trustedIssuersRegistry": "0x...",
  "topicSchemeRegistry": "0x..."
}
```

Use the configuration endpoint before accepting updates from a feed. It lets a client verify the subject, topic, expected schema hash, decimal precision, history mode, positivity requirement, drift allowance, and registry addresses.

## List feeds [#list-feeds]

Query feeds with optional filters and pagination. Use `isActive=true` for the current directory view, or `isActive=false` for mappings retained after removal:

```bash
curl "$DALP_API_URL/system/feeds?subject=0xToken&isActive=true&first=20&skip=0" \
  -H "X-Api-Key: $API_KEY"
```

### Filter parameters [#filter-parameters]

| Parameter      | Type    | Description                                                                                   |
| -------------- | ------- | --------------------------------------------------------------------------------------------- |
| `subject`      | address | Filter by the asset or entity address                                                         |
| `kind`         | enum    | Filter by feed kind (`SCALAR`)                                                                |
| `isActive`     | boolean | Filter by active/inactive status                                                              |
| `tokenAddress` | address | Filter by associated token address                                                            |
| `first`        | number  | Page size (max 1000)                                                                          |
| `skip`         | number  | Number of items to skip                                                                       |
| `orderBy`      | enum    | Sort field: `id`, `feedAddress`, `subject`, `topicId`, `decimals`, `isActive`, `registeredAt` |

Response:

```json
{
  "items": [
    {
      "id": "0x...",
      "feedAddress": "0x...",
      "subject": "0x...",
      "topicId": "0x...",
      "kind": "SCALAR",
      "schemaHash": "0x...",
      "decimals": 8,
      "token": { "id": "0x...", "name": "Token" },
      "factory": { "id": "0x...", "typeId": "0x..." },
      "creator": { "id": "0x..." },
      "adapterAddress": "0x...",
      "isActive": true,
      "registeredAt": "1699000000",
      "latestValue": {
        "roundId": 42,
        "answer": "150000000",
        "observedAt": "1700000000",
        "updatedAt": "1700000000",
        "issuer": "0x...",
        "signer": "0x..."
      }
    }
  ],
  "totalCount": 1
}
```

## List issuer-signed feeds [#list-issuer-signed-feeds]

List feeds created through the issuer-signed feed factory:

```bash
curl "$DALP_API_URL/system/feeds/issuer-signed?first=20&skip=0" \
  -H "X-Api-Key: $API_KEY"
```

Response:

```json
{
  "items": [
    {
      "feedAddress": "0x...",
      "subject": "0x...",
      "topicId": "0x...",
      "creator": "0x..."
    }
  ],
  "totalCount": 1
}
```

## List adapters [#list-adapters]

List aggregator adapters created through the feed adapter factory:

```bash
curl "$DALP_API_URL/system/feeds/adapters?first=20&skip=0" \
  -H "X-Api-Key: $API_KEY"
```

Response:

```json
{
  "items": [
    {
      "adapterAddress": "0x...",
      "subject": "0x...",
      "topicId": "0x..."
    }
  ],
  "totalCount": 1
}
```

## Check staleness [#check-staleness]

Compare the feed's latest `updatedAt` timestamp with a maximum age threshold:

```bash
curl "$DALP_API_URL/system/feeds/0xFeed/staleness?maxAgeSeconds=3600" \
  -H "X-Api-Key: $API_KEY"
```

Response:

```json
{
  "feedAddress": "0x...",
  "latestUpdatedAt": "2023-11-14T22:13:20.000Z",
  "currentTimestamp": "2023-11-14T22:43:20.000Z",
  "ageSeconds": 1800,
  "maxAgeSeconds": 3600,
  "isStale": false,
  "roundId": "42",
  "answer": "150000000"
}
```

| Field              | Description                                                         |
| ------------------ | ------------------------------------------------------------------- |
| `latestUpdatedAt`  | Timestamp from the latest feed round                                |
| `currentTimestamp` | Latest chain head block timestamp used for the staleness comparison |
| `ageSeconds`       | Difference between `currentTimestamp` and `latestUpdatedAt`         |
| `maxAgeSeconds`    | Positive integer threshold supplied by the caller                   |
| `isStale`          | `true` when `ageSeconds` is greater than the supplied threshold     |
| `roundId`          | Latest round used for the comparison                                |
| `answer`           | Raw latest answer from that round                                   |

Use the staleness result as an input to your own valuation, NAV, redemption, collateral, or reporting policy. DALP compares the feed age with the threshold you supplied. Your workflow still decides whether to accept that value.

See [Submit updates -- Check staleness](/docs/developers/feeds/submit-updates#check-staleness) when you need the same check while publishing issuer-signed updates.
