🔌 Data Sources

Where Dalil's Data Comes From

Every number on Dalil ultimately comes from one of the providers listed below. This page is a reference for readers who want to know exactly which feed powers which panel, how often it refreshes, and what delay to expect. For the full pipeline description, validation rules, and missing-data handling, see the Methodology page.

Open the Dashboard →

Source Categories

Dalil separates its sources into four categories by trust and authority. The source hierarchy on the Methodology page explains how conflicts between them are resolved.

Data Pipeline Overview

Dalil operates a server-side data pipeline running on Cloudflare Workers at the edge. When a user opens the dashboard, the browser requests data from our API endpoint, which in turn fetches from upstream financial data providers, caches the results in Cloudflare KV storage, and returns a consolidated JSON response to the frontend.

This architecture means that multiple users benefit from the same cached API call - reducing costs and API rate limit consumption while ensuring consistent data across all visitors at any given moment.

Update Frequencies by Asset Class

The "maximum age" column is the honest worst case a reader can see: the upstream provider's own delay plus Dalil's server cache plus edge caching. It is deliberately conservative.

Asset ClassSourceDalil CacheMaximum Age ShownStatus Label
CryptocurrencyBinance / CoinGecko (Luzia backup)15 minutes~15 minutesDelayed
Forex / MADOpen Exchange Rates (open.er-api.com backup)4 hours~4 hoursDelayed
Global IndicesYahoo Finance (Twelve Data backup)30 minutes~1 hour incl. upstream delayDelayed
Morocco CSE Stocks & MASIDrahmi60 minutes~90 minutes incl. upstream delay and edge cacheDelayed
Bonds & RatesFRED / BAM publications60 minutesdaily reference valuesDelayed
Precious MetalsMetals.Dev8 hours~8 hoursDelayed
Energy & AgricultureTwelve Data8 hours~8 hoursDelayed
ETFsFMP24 hours~24 hoursIndicative
US/Europe/GCC/Asia StocksStaticStaticnot updated intradayIndicative
NewsRSS Feeds30 minutes~30 minutes after publicationHeadlines

What "Delayed" Means

"Delayed" means the price shown is not the current market price - it reflects a price from sometime in the past, within the maximum-age window shown above. For example, a forex rate marked "delayed" could be up to about 4 hours old, and a Casablanca stock quote up to about 90 minutes old. For most informational purposes this is acceptable, but it is not suitable for executing trades or making time-sensitive financial decisions.

The delay is a combination of the upstream provider's own data delay plus Dalil's own caching (server cache and edge cache), which adds additional time on top of that.

What "Indicative" Means

"Indicative" data is static or near-static data that serves as a reference rather than a live price. This applies to US, European, GCC, and Asian equity listings - which display representative prices from the most recent available data but are not updated in real time. ETF data falls into a similar category, updated once per day at most. These sections are useful for general reference and portfolio context, but should not be used for trading decisions.

No Data on Dalil Is Real-Time

Nothing on the platform is a real-time quote. Cryptocurrency (15-minute cache) is the freshest asset class, but even it can be up to about 15 minutes old. News headlines are aggregated from Moroccan and international RSS sources roughly every 30 minutes; the publication timestamp shown is the publisher's, not the time Dalil fetched it.

Fallback Data

When an upstream API call fails - due to rate limits, network errors, or provider outages - Dalil displays fallback data. Fallback data consists of recent static values embedded in the application code. It is clearly labeled as such where possible. Fallback data should be treated as indicative only.

The system automatically retries on the next user request and resumes fresh data once the upstream provider is available again. Cloudflare KV cache entries expire according to the TTL table above, at which point fresh data is fetched.

Precious Metals - 8-Hour Cache

Gold, silver, platinum, and palladium prices are sourced from Metals.Dev on a free tier that allows approximately 100 requests per month. To stay within this limit, we cache precious metals data for 8 hours - meaning the displayed price could be up to 8 hours old. This is clearly marked in the data source attribution. For fresher precious-metals prices, dedicated commodities platforms are more suitable.

Morocco CSE Data

Casablanca Stock Exchange data is sourced from Drahmi, a Moroccan financial data API. CSE stocks are cached for 60 minutes. Since the BVC only trades Monday to Friday from 09:30 to 15:30 Casablanca time (UTC+1, no daylight saving), data outside these hours reflects the previous session's closing prices.

Currency Calculation - Cross Rates

Some currency cross rates against the dirham (MAD) are calculated rather than directly quoted. For example, GBP/MAD is derived from USD/MAD and GBP/USD rates from Open Exchange Rates. The calculation is: GBP/MAD = USD/MAD ÷ GBP/USD. This introduces a small rounding difference compared to directly quoted rates.

Related