01What
Computes statistics — mean, median, and trimmed mean — across up to 200 price oracles for one asset pair, in a single query.
02Why you'd use it
Never trust one price source. Aggregating many oracles and trimming the outliers gives you a manipulation-resistant number, and the ledger does the math for you.
03How
- 1Enter the pair: Base Asset (like XRP) and Quote Asset (like USD).
- 2Enter Oracles as JSON: an array of {"account", "oracle_document_id"} — the publishers you consider reputable.
- 3Optionally set Trim % (1-25) to discard the highest and lowest outliers before averaging.
- 4Run it and prefer the median or trimmed mean — both resist a single bad feed better than the plain average.
Watch out
- The aggregate is only as honest as the oracle list YOU provide — curating publishers is the real security decision.
- Check the response's time fields: an aggregate of stale feeds is a stale aggregate.
- If most listed oracles have no recent data for the pair, the query can fail with objectNotFound — verify your list.
- This is a free, read-only query.
For example
A lending app needs XRP/USD to check collateral. It aggregates five reputable oracles with a 20% trim: one feed glitches to a wild number, the trim discards it, and the median stays sane — no bad liquidations.