Portal Community

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.

  1. Ondo node: resource=limits, operation=getTradingLimits, symbol={{symbol}}, side=buy
  2. Condition node: isAssetTradingOpen == true AND tokenAmount <= maxTokens
  3. 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.

  1. Ondo node: resource=attestations, operation=createAttestationQuote, chainId={{chainId}}, symbol={{symbol}}, side=buy, tokenAmount={{amount}} → show price to the user
  2. User confirms
  3. Ondo node: resource=attestations, operation=createAttestation with the same parameters → get attestationId, signature, expiration
  4. 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.

  1. Ondo node: resource=assets, operation=getPrice, symbol={{symbol}}tokenPrice, underlyingPrice
  2. Ondo node: resource=assets, operation=getMarket, symbol={{symbol}}constituentTokens
  3. Ondo node: resource=assets, operation=getLatestDividend, symbol={{underlyingTicker}}dividendYield, lastPaymentDate
  4. 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.

  1. Ondo node: resource=status, operation=getAssetStatusassetStatuses[]
  2. Transform step: build a set of paused symbols from entries where status == "paused"
  3. 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

  1. Ondo node: resource=assets, operation=getAddresses, symbol={{symbol}} → pick the entry matching your target networkChainId
  2. Ondo node: resource=chains, operation=getBalances, chainId={{networkChainId}}, tokenAddress={{address}}, userAddress={{holder}}
  3. Read the matching entry in balances[]