SavingsAPI¶
SavingsAPI(client: DogeAPIClient, api: DogeAPI)
¶
Access all endpoints under /savings including grants, contracts, and leases.
This class handles paginated retrieval of financial savings data via a shared DogeAPIClient. Supports both Pydantic model and dict export modes.
client : DogeAPIClient Shared HTTP client instance for making API calls. api : DogeAPI Reference to parent DogeAPI instance for runtime config flags.
| METHOD | DESCRIPTION |
|---|---|
get_grants |
Retrieve cancelled or reduced government grants. |
get_contracts |
Retrieve cancelled or optimized government contracts. |
get_leases |
Retrieve terminated or downsized government leases. |
Source code in src/pydoge_api/endpoints/savings.py
| Python | |
|---|---|
get_grants(*, sort_by: Optional[str] = None, sort_order: Optional[str] = None, page: int = 1, per_page: int = 100) -> Union[GrantResponse, dict, httpx.Response]
¶
Retrieve cancelled or reduced government grants.
| PARAMETER | DESCRIPTION |
|---|---|
|
Field to sort by. Options include 'savings', 'value', or 'date'.
TYPE:
|
|
Sort direction. One of 'asc' or 'desc'.
TYPE:
|
|
Starting page number for paginated results.
TYPE:
|
|
Number of records to retrieve per page.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
GrantResponse or dict or Response
|
Pydantic model if |
Source code in src/pydoge_api/endpoints/savings.py
get_contracts(*, sort_by: Optional[str] = None, sort_order: Optional[str] = None, page: int = 1, per_page: int = 100) -> Union[ContractResponse, dict, httpx.Response]
¶
Retrieve cancelled or optimized government contracts.
| PARAMETER | DESCRIPTION |
|---|---|
|
Field to sort by. Options include 'savings', 'value', or 'date'.
TYPE:
|
|
Sort direction. One of 'asc' or 'desc'.
TYPE:
|
|
Starting page number for paginated results.
TYPE:
|
|
Number of records to retrieve per page.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ContractResponse or dict or Response
|
Pydantic model if |
Source code in src/pydoge_api/endpoints/savings.py
get_leases(*, sort_by: Optional[str] = None, sort_order: Optional[str] = None, page: int = 1, per_page: int = 100) -> Union[LeaseResponse, dict, httpx.Response]
¶
Retrieve terminated or downsized government leases.
| PARAMETER | DESCRIPTION |
|---|---|
|
Field to sort by. Options include 'savings', 'value', or 'date'.
TYPE:
|
|
Sort direction. One of 'asc' or 'desc'.
TYPE:
|
|
Starting page number for paginated results.
TYPE:
|
|
Number of records to retrieve per page.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LeaseResponse or dict or Response
|
Pydantic model if |