A price can be correctly formatted and still be misleading. If the feed stopped ten minutes ago, an animated chart does not make that price current.
This is a NAGIREX-related developer note about presenting market data clearly. The TypeScript below is an illustrative design, not NAGIREX production code or an API specification. It does not report a funded trading test.
Keep two timestamps
A response arrival time answers “when did our application receive this?” A source timestamp answers “when did the provider say this observation was produced?” A cached response can arrive now while carrying an old observation.
Keep both fields if the source provides them. When it does not, say the source timestamp is unavailable rather than substituting the browser clock and labelling it “market updated.”
type Quote = { pair: string; price: string; source: string; observedAt: string | null; receivedAt: string; }; type Freshness = "current" | "stale" | "unknown"; function freshness( quote: Quote, nowMs: number, maxAgeMs: number ): Freshness { if (quote.observedAt === null) return "unknown"; const observedMs = Date.parse(quote.observedAt); const ageMs = nowMs - observedMs; if (!Number.isFinite(observedMs) || ageMs < 0) return "unknown"; return ageMs <= maxAgeMs ? "current" : "stale"; } The freshness threshold is a product decision based on the source's update cadence; there is no universal number that makes every feed “live.” This helper assumes the timestamp has already passed format validation. A production implementation also needs a policy for clock skew.
Treat a missing value as missing
Using zero when a request fails creates an apparently valid price. Keep the last successful observation if that is useful, but retain its original timestamp and show the failed refresh separately.
A simple display might read:
- Price: last successfully received value
- Source time: the provider's timestamp, or “unavailable”
- Refresh status: “Update failed; showing previous observation”
The price is stored as a string in the example to preserve the supplied decimal representation. That is not a calculation strategy: arithmetic needs an explicit precision and rounding policy.
Do not reuse quote status for order status
Market-data connectivity does not establish whether an order was accepted or filled. Order state belongs to an execution record, with its own identifier, quantities and timestamps. A withdrawal belongs to another workflow again.
For interface reviews, ask which record supports each label. A page saying “connected” is evidence about a connection. It is not evidence of a completed transaction.
Make the label understandable without colour
Use words such as “stale” or “update unavailable” alongside any colour change. Show the timezone when displaying timestamps. Screen-reader users should be able to find the same status, without having every market tick announced as an urgent alert.
These small choices make a data screen easier to interpret and debug. They also give support teams something more useful than a screenshot of a number without a time.
Brand context: NAGIREX website. This article is published by NAGIREX Platform Notes as brand-related educational content, not an independent endorsement.