Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cowprotocol/solver-rewards/llms.txt
Use this file to discover all available pages before exploring further.
AccountingPeriod encapsulates a contiguous date interval used to scope all solver reward queries. Every pipeline run targets exactly one period, and the period’s start and end dates are threaded through to Dune queries and CSV output filenames.
Defined in src/models/accounting_period.py.
Date format
YYYY-MM-DD (ISO 8601). The module-level constant DATE_FORMAT is used consistently for both parsing and formatting.
AccountingPeriod class
Constructor parameters
Start date of the accounting period as an ISO 8601 string (
YYYY-MM-DD). Parsed with datetime.strptime(start, "%Y-%m-%d") and stored as a datetime object.Number of days in the period. The
end date is computed as start + timedelta(days=length_days).Default: 7 (one calendar week)Attributes
datetime object for the first instant of the period (midnight on the start date).datetime object for the first instant after the period ends (midnight on start + length_days).Methods
__str__()
Returns the period as a human-readable range string used in CSV filenames and log messages.
YYYY-MM-DD-to-YYYY-MM-DD
__hash__()
Produces a stable integer hash from the concatenated date digits of start and end. This allows AccountingPeriod instances to be used as dictionary keys or in sets.
1985-03-10 to 1994-04-05 hashes to the integer 1985031019940405.
The hash is derived purely from the date values, so two
AccountingPeriod instances with identical start and length_days will always produce the same hash regardless of when they were constructed.as_query_params()
Converts the period into a pair of Dune QueryParameter objects for use in parametrised Dune queries.
| Parameter name | Value |
|---|---|
start_time | self.start as a Dune date parameter |
end_time | self.end as a Dune date parameter |
DuneFetcher when executing on-chain queries for solver performance within the period.
