"""DataProvider contract — anything that can deliver an adjusted-close PriceSeries for a Market."""
from __future__ import annotations

from typing import Protocol

from fxhnt.domain.models import Market, PriceSeries


class DataProvider(Protocol):
    name: str

    def fetch(self, market: Market, start: str | None = None, end: str | None = None) -> PriceSeries:
        """Return an ascending adjusted-close series. start/end are ISO dates (inclusive) or None."""
        ...
