# Submit updates

Source: https://docs.settlemint.com/docs/developer-guides/feeds/submit-updates
Submit signed feed updates via EIP-712 typed data. Manage nonces, read feed
configuration, and monitor staleness.




This guide covers submitting new values to issuer-signed scalar feeds, managing nonces, and monitoring feed staleness.

## How issuer-signed updates work [#how-issuer-signed-updates-work]

The platform signs an EIP-712 typed data message on behalf of the authenticated user, containing the new value, observation timestamp, and nonce. The signed message is submitted on-chain, where the feed contract verifies the signature against the user's OnchainID identity and the trusted issuers registry before storing the new round.

## Prerequisites [#prerequisites]

Before submitting feed updates, the authenticated user must:

1. **Have a registered OnchainID identity** -- the platform derives the issuer identity contract from the authenticated user automatically
2. **Be a trusted issuer** -- the user's identity must be added as a trusted issuer for the feed's claim topic via the trusted issuers registry

## Get the current nonce [#get-the-current-nonce]

Before submitting an update, retrieve the current nonce for the issuer's identity contract on the target feed:

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

The `issuerIdentity` path parameter is the OnchainID identity contract address, not the EOA wallet address. Nonces are tracked per identity contract on-chain.

Response:

```json
{
  "feedAddress": "0x...",
  "issuerIdentity": "0x...",
  "currentNonce": "5",
  "nextNonce": "6"
}
```

Use `nextNonce` when constructing your submission. The feed contract rejects updates with a nonce that does not match the expected next value.

## Submit an update [#submit-an-update]

```bash
curl -X POST "$DALP_API_URL/system/feeds/0xFeed/submit" \
  -H "X-Api-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "150000000",
    "observedAt": 1700000000,
    "deadline": 0
  }'
```

The feed address is specified in the URL path. The issuer identity is derived automatically from the authenticated user's OnchainID identity contract.

### Parameters [#parameters]

| Parameter            | Type   | Description                                                                                                    |
| -------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| `value`              | string | The new value as a string (scaled by the feed's `decimals`)                                                    |
| `observedAt`         | number | Unix timestamp when the value was observed                                                                     |
| `deadline`           | number | Optional. Unix timestamp after which the update is rejected. `0` means no deadline.                            |
| `walletVerification` | object | Optional for API key auth. Wallet verification for transaction signing — required for session-based auth only. |

Response:

```json
{
  "transactionHash": "0x...",
  "feedAddress": "0x...",
  "value": "150000000",
  "nonce": "6"
}
```

<Callout type="info" title="Value encoding">
  Values are encoded as strings scaled by the feed's decimal precision. For a feed with `decimals: 8`, a value of `1.50`
  is submitted as `"150000000"`.
</Callout>

## Submit flow [#submit-flow]

<Mermaid
  chart="`
sequenceDiagram
  participant Client
  participant API as DALP API
  participant Chain as On-chain Feed

  Client->>API: GET /feeds/{feedAddress}/nonce/{issuerIdentity}
  API-->>Client: currentNonce, nextNonce

  Client->>API: POST /feeds/{feedAddress}/submit (value, observedAt)
  API->>API: Resolve user identity contract
  API->>API: Construct EIP-712 typed data
  API->>API: Sign with user's managed wallet
  API->>Chain: Submit signed update
  Chain->>Chain: Verify signature + nonce
  Chain->>Chain: Store new round
  Chain-->>API: Transaction receipt
  API-->>Client: transactionHash, nonce

`"
/>

## Read feed configuration [#read-feed-configuration]

Query the immutable configuration of an issuer-signed feed to understand its parameters:

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

Response:

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

Key fields:

| Field             | Description                                              |
| ----------------- | -------------------------------------------------------- |
| `decimals`        | Decimal precision for scaling values                     |
| `description`     | Human-readable feed description                          |
| `historyMode`     | How historical rounds are stored                         |
| `historySize`     | Ring buffer size (for `BOUNDED` mode)                    |
| `requirePositive` | Whether non-positive values are rejected                 |
| `driftAllowance`  | Maximum seconds between `observedAt` and block timestamp |

## Check staleness [#check-staleness]

Determine whether a feed's latest value is fresh enough for a given use case:

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

Response:

```json
{
  "feedAddress": "0x...",
  "latestUpdatedAt": "1700000000",
  "currentTimestamp": "1700003500",
  "ageSeconds": 3500,
  "maxAgeSeconds": 3600,
  "isStale": false,
  "roundId": "6",
  "answer": "150000000"
}
```

| Field           | Description                            |
| --------------- | -------------------------------------- |
| `ageSeconds`    | Seconds since the last update          |
| `maxAgeSeconds` | The threshold you provided             |
| `isStale`       | `true` if `ageSeconds > maxAgeSeconds` |

Use staleness checks before consuming feed data in critical operations (e.g., collateral valuation, settlement pricing) to ensure the value is sufficiently recent.

![API request logs for tracking feed update submissions](/docs/screenshots/monitoring/api-monitoring-request-log.webp)

## Related [#related]

* [Data feeds overview](/docs/developer-guides/feeds/overview)
* [Read data feeds](/docs/developer-guides/feeds/read-data)
