FetchResult

Documentation for eth_defi.currency_api.client.FetchResult Python class.

class FetchResult

Bases: object

Classified result of fetching one date.

Variables
  • date – The date that was requested.

  • status – See FetchStatus.

  • rates – Parsed rates for the present quotes, or None when not ok.

  • missing_quotes – Requested quote currencies that were absent from an otherwise-200 body. Never fabricated — handed back so the scanner can grace/record them.

Attributes summary

date

The date that was requested.

status

Outcome classification.

rates

Parsed rates for present quotes, or None.

missing_quotes

Requested quotes absent from a 200 body.

Methods summary

__init__(date, status[, rates, missing_quotes])

date: datetime.date

The date that was requested.

status: Literal['ok', 'unavailable', 'transient_error']

Outcome classification.

rates: Optional[eth_defi.currency_api.client.DateRates]

Parsed rates for present quotes, or None.

missing_quotes: tuple[str, ...]

Requested quotes absent from a 200 body.

__init__(date, status, rates=None, missing_quotes=<factory>)
Parameters
Return type

None