sgns::PriceQuote¶
Provider-independent price quote (QUOTE-01). More...
#include <PriceQuote.hpp>
Public Functions¶
| Name | |
|---|---|
| int64_t | FetchedAtEpochSeconds() const Interop accessor: the fetch time as seconds since the Unix epoch. |
Public Attributes¶
| Name | |
|---|---|
| std::string | asset CoinGecko asset id, e.g. "genius-ai". |
| std::string | currency Target currency, e.g. "usd". |
| double | price Price in the target currency. |
| std::chrono::system_clock::time_point | timestamp D-14: fetch time (not local-store time). Freshness = now - timestamp. |
| PriceSource | source Which tier produced this quote. |
| bool | stale Whether the serving tier marked the value as stale. |
Detailed Description¶
Provider-independent price quote (QUOTE-01).
The timestamp is FETCH time per D-14: the moment the price was fetched from the source, aligned with the Phase-1 envelope's per-id fetchedAt semantics. Freshness is computed as now - timestamp; the quote is never re-based on local-store time.
Public Functions Documentation¶
function FetchedAtEpochSeconds¶
Interop accessor: the fetch time as seconds since the Unix epoch.
Return: timestamp converted to whole seconds since epoch
Note: Consumers that exchange epoch-seconds (e.g. the Phase-1 envelope fetchedAt field) use this instead of poking the time_point directly.
Public Attributes Documentation¶
variable asset¶
CoinGecko asset id, e.g. "genius-ai".
variable currency¶
Target currency, e.g. "usd".
variable price¶
Price in the target currency.
variable timestamp¶
D-14: fetch time (not local-store time). Freshness = now - timestamp.
variable source¶
Which tier produced this quote.
variable stale¶
Whether the serving tier marked the value as stale.
Updated on 2026-10-09 at 04:02:48 +0000