DefiLlamaOracle
Current USD prices from DefiLlama's keyless coins.llama.fi.
client is REQUIRED and injected: the oracle never constructs a
transport of its own, never retries, never rate-limits. Structurally a
prices.inquirer.PriceOracle; does not import it.
__init__
__init__(self, client: httpx.Client, base_url: str = https://coins.llama.fi) -> None
Bind the injected client and base URL. Performs no I/O.
Parameters
clientrequired, httpx.Clientnone
base_urloptional, str, default 'https://coins.llama.fi'none
usd_prices
usd_prices(self, caip19s: Sequence[str]) -> dict[str, Money]
Current USD price for each priceable input CAIP-19.
Unmapped ids contribute no request key and are absent from the
result; if NO input maps, returns {} with zero HTTP. Keys
absent from the response's coins object are unpriced and
absent from the result. Response keys are reverse-mapped onto the
caller's ids (ids sharing one key each receive its price).
Amounts are Decimal(str(price)) wrapped in Money(…, 'USD').
A non-2xx response or a malformed body raises SourceError.
Parameters
caip19srequired, Sequence[str]none