Portal Community
What an attestation is: Ondo requires a signed, time-limited price attestation before a mint/redeem transaction executes on-chain, so the price used matches what the API quoted. createAttestation produces that signed proof; createAttestationQuote gives you the same price without a signature, for previewing.

createAttestation

Creates a signed, priced, time-limited attestation for a prospective trade.

FieldTypeRequiredDescription
chainIdtext✓ YesTarget chain ID for the trade.
symboltext✓ YesGM asset symbol.
sideselect✓ Yesbuy or sell.
tokenAmounttextOne of these twoAmount in tokens. Mutually exclusive with notionalValue.
notionalValuetextOne of these twoAmount in notional (fiat) value. Mutually exclusive with tokenAmount.
durationtextNoRequested attestation TTL.
userAddresstextNoOn-chain address the attestation validates against.
Exactly one amount field: Specify either tokenAmount or notionalValue — never both, and never neither. The node rejects both cases with VAL_MISSING_AMOUNT or VAL_BOTH_AMOUNTS before calling the API.

Example response:

{
  "attestationId": "att_9f3c...",
  "signature": "MEUCIQ...base64...",
  "price": "150.250000000000000000",
  "expiration": 1785345600000
}

If the relevant market is closed, the operation returns status: "closed_market" with error code MARKET_CLOSED instead of a signed attestation.

createAttestationQuote

Same inputs as createAttestation, but returns a non-binding indicative price — no signature, no expiration, and no userAddress field (not part of the soft-quote contract). Use this for pricing/preview UI; use createAttestation only when you intend to execute on-chain.

FieldTypeRequiredDescription
chainIdtext✓ YesTarget chain ID.
symboltext✓ YesGM asset symbol.
sideselect✓ Yesbuy or sell.
tokenAmounttextOne of these twoMutually exclusive with notionalValue.
notionalValuetextOne of these twoMutually exclusive with tokenAmount.
durationtextNoIndicative quote TTL hint.

Example response:

{ "price": "150.250000000000000000" }
Tip: Check Limit Operations' getTradingLimits before calling createAttestation to confirm the trade size is within bounds — createAttestation can also be rejected outright if limits are exceeded or the API key lacks attestation scope.