Submit updates
Submit issuer-signed feed updates through DALP. Resolve issuer identity, check nonces, send values, and verify freshness before consuming a feed.
A feed update publishes a new issuer-signed scalar value for a registered feed. Submit the value, let DALP resolve the issuer identity for the feed topic, then check the latest round before consumers depend on it.
How signed updates work
DALP signs and submits a feed update for the identity authorised for the feed topic. The feed contract validates the issuer identity, signer key purpose, nonce, timestamp, deadline, and feed value rules before storing a new round.
The submit route resolves authority differently by topic:
| Feed topic | Who can submit | Issuer identity used for signing |
|---|---|---|
| Price topic | A caller with the feedsManager system role | The organisation OnchainID identity |
| Other topics | A user whose OnchainID identity is registered as a trusted issuer for the feed's topic | The user's OnchainID identity |
issuerIdentity means the OnchainID identity contract address. It is not the EOA wallet address.
Prerequisites
Before submitting feed updates:
- Confirm the feed is registered and indexed.
- Confirm the caller is authorised for the feed topic.
- Know the feed's decimal precision so you can scale the value correctly.
- Read the current nonce for the issuer identity that DALP will use for the topic.
Get the current nonce
Read the current nonce for the issuer identity on the target feed. For price-topic feeds, use the organisation OnchainID identity. For other topics, use the trusted issuer user's OnchainID identity.
curl "$DALP_API_URL/system/feeds/0xFeed/nonce/0xIdentityContract" \
-H "X-Api-Key: $API_KEY"Response:
{
"feedAddress": "0x...",
"issuerIdentity": "0x...",
"currentNonce": "5",
"nextNonce": "6"
}Use nextNonce to understand the next strict sequential nonce the feed contract expects for that issuer identity. The nonce endpoint reads the feed contract directly and returns the current on-chain nonce plus the next expected nonce. DALP derives the nonce during submission, so the submit body does not include a nonce field.
Submit an update
Submit the scaled value and observation timestamp to the feed. When the transaction completes synchronously, the API returns the submitted value, nonce, transaction metadata, and response link:
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. DALP resolves the signing identity from the feed topic and the authenticated context. For price-topic feeds, DALP uses the organisation identity when the caller has the feedsManager system role. For non-price topics, DALP uses the authenticated user's OnchainID identity when that identity is a trusted issuer for the topic.
If you are updating a token price, prefer the token price endpoint. It applies the token-level setPrice permission, resolves or creates the price feed, and submits the update with the organisation issuer identity.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | New value as an integer string scaled by the feed's decimals. A feed with requirePositive: true rejects zero and negative values. |
observedAt | number | Unix timestamp when the value was observed. It must be non-zero and not older than the latest accepted observation. The feed also rejects observations that exceed its drift allowance. |
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 when session-based authentication requires it. |
Response:
{
"data": {
"transactionHash": "0x...",
"feedAddress": "0x...",
"value": "150000000",
"nonce": "6"
},
"meta": {
"txHashes": ["0x..."]
},
"links": {
"self": "/v2/system/feeds/0xFeed/submit"
}
}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".
Token prices use the token price route
To update a token price, use the token price endpoint unless you specifically need the generic feed submit route. The
token price route applies the token-level setPrice permission, resolves or creates the price feed, and submits the
update with the organisation issuer identity.
Submit flow
A successful submit stores one new round for the feed. If the contract rejects the issuer, signer, nonce, timestamp, deadline, or value, the API returns an error instead of recording a new round.
Read feed configuration
Query the immutable configuration of an issuer-signed feed to understand its parameters:
curl "$DALP_API_URL/system/feeds/0xFeed/config" \
-H "X-Api-Key: $API_KEY"Response:
{
"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 zero and negative values are rejected. |
driftAllowance | Feed validation setting used when the contract checks submitted values. |
Check staleness
Determine whether a feed's latest value is fresh enough for a given use case:
curl "$DALP_API_URL/system/feeds/0xFeed/staleness?maxAgeSeconds=3600" \
-H "X-Api-Key: $API_KEY"Response:
{
"feedAddress": "0x...",
"latestUpdatedAt": "1700000000",
"currentTimestamp": "1700003500",
"ageSeconds": 3500,
"maxAgeSeconds": 3600,
"isStale": false,
"roundId": "6",
"answer": "150000000"
}| Field | Description |
|---|---|
ageSeconds | Seconds since the last accepted update. |
maxAgeSeconds | The freshness threshold you provided. |
isStale | true when ageSeconds > maxAgeSeconds. |
The staleness endpoint reads the latest round from the feed contract and compares its update timestamp with the current chain timestamp. Use staleness checks before consuming feed data in critical operations such as collateral valuation, settlement pricing, reserve checks, or reporting.
CLI equivalents
The DALP CLI exposes the same operational steps:
dalp system feeds nonce --address 0xFeed --issuer-identity 0xIdentityContract
dalp system feeds submit --address 0xFeed --value 150000000 --observed-at 1700000000
dalp system feeds staleness --address 0xFeed --max-age-seconds 3600Related
Create feeds
Deploy issuer-signed scalar feeds via the factory, create aggregator adapters for stable consumer addresses, and register external feeds in the directory.
Read data
Query feed data: latest values, historical rounds, resolve feeds by subject and topic, list feeds with filtering, and check staleness.