Three data sources, anchor-based outlier detection, and a weighted median — all computed in under 200ms.
No single commodity price source is reliable for all products in all countries. Comtrade data is 3–6 months lagged. Scraper prices depend on a website staying online. Hardware pricing APIs cover electronics but not agricultural goods.
Our consensus engine queries Comtrade average unit values, Apify web scrapers, and Nexar hardware APIs in parallel. Results go through anchor-based outlier detection: any price more than 2.5 standard deviations from the median is flagged and downweighted. The final consensus is a weighted median computed with Decimal.js at 20-digit precision.
Financial math demands precision. We use Decimal.js with ROUND_HALF_UP across every calculation in the platform — no floating-point surprises.
Users see a single, trustworthy price with a confidence score. The consensus result is cached in price_history with a 24-hour TTL, feeding both the price ticker and the landed-cost calculator.
Was this update useful?