Examples
Worked workflow patterns using the Ondo node
1. Check Trading Limits Before Creating an Attestation
Guard a mint/redeem attempt by confirming the trade is within bounds before spending an attestation slot.
- Ondo node:
resource=limits,operation=getTradingLimits,symbol={{symbol}},side=buy - Condition node:
isAssetTradingOpen == true AND tokenAmount <= maxTokens - If true, continue to Ondo
attestations.createAttestation; if false, route to an alert/notification branch
Why here:
getTradingLimits is a read — it doesn't consume a
session slot or spend anything itself, so it's safe to call before every attestation attempt.
2. Preview a Price, Then Confirm It With a Signed Attestation
Show a user an indicative price before committing to the trade that actually needs a signature.
- Ondo node:
resource=attestations,operation=createAttestationQuote,chainId={{chainId}},symbol={{symbol}},side=buy,tokenAmount={{amount}}→ showpriceto the user - User confirms
- Ondo node:
resource=attestations,operation=createAttestationwith the same parameters → getattestationId,signature,expiration - Pass the signature and expiration into the downstream on-chain mint/redeem step
Tip: Keep the confirmation step short — the soft quote's price is indicative
only and can drift before the signed attestation is created.
3. Build a Portfolio Report With Price, Market, and Dividend Data
Combine three read-only calls into a single report row per asset.
- Ondo node:
resource=assets,operation=getPrice,symbol={{symbol}}→tokenPrice,underlyingPrice - Ondo node:
resource=assets,operation=getMarket,symbol={{symbol}}→constituentTokens - Ondo node:
resource=assets,operation=getLatestDividend,symbol={{underlyingTicker}}→dividendYield,lastPaymentDate - Transform step: assemble one row combining the three results
Watch the symbol switch: Steps 1–2 use the GM symbol (
AAPLon);
step 3 needs the underlying stock ticker (AAPL) — use
underlyingTicker from step 2's result, not the original symbol.
4. Skip Paused Assets in a Batch Job
Filter out assets that are currently paused before running per-asset logic in a loop.
- Ondo node:
resource=status,operation=getAssetStatus→assetStatuses[] - Transform step: build a set of paused symbols from entries where
status == "paused" - Loop over your asset list, skipping any symbol in the paused set
5. Resolve a Symbol to a Contract Address, Then Read Its On-Chain Balance
- Ondo node:
resource=assets,operation=getAddresses,symbol={{symbol}}→ pick the entry matching your targetnetworkChainId - Ondo node:
resource=chains,operation=getBalances,chainId={{networkChainId}},tokenAddress={{address}},userAddress={{holder}} - Read the matching entry in
balances[]