/**
 * Provider-agnostic trading data contracts.
 *
 * Every trading data source (CoinGecko today, Binance/CoinMarketCap/etc.
 * tomorrow) must produce these types. Downstream code — the trading engine,
 * the `trading-market` tool, the `trading-signal` tool — depends on these
 * types, not on provider-specific response shapes. That's the whole point:
 * swapping providers becomes a registry change, not a codebase change.
 *
 * Pattern: standard query params + standard data shape, both serializable,
 * both strictly typed. Providers are free to accept extra fields in their
 * own query shapes (time zone, cache bust, etc.) but their output must
 * coerce to the standard data type before returning.
 */
export function isProviderError(v) {
    return (typeof v === 'object' &&
        v !== null &&
        'kind' in v &&
        'message' in v &&
        typeof v.message === 'string');
}
