core3.api
Documentation for eth_defi.core3.api Python module.
Fetch helpers for Core3 Projects Data API endpoints.
Thin wrappers around individual API endpoints that handle URL
construction, response unwrapping, and error propagation. Each
function takes a Core3Session
and returns the parsed JSON response.
See Core3 API documentation for endpoint details.
Functions
|
Fetch all-time index-level aggregate PoL history from |
|
Fetch ranged index-level aggregate PoL history from |
|
Fetch all-time PoL category breakdown history from |
Fetch ranged PoL category breakdown history from |
|
|
Fetch all-time PoL history chart from |
|
Fetch ranged PoL history from |
|
Fetch full project detail from |
|
Fetch the full project list from |
|
Fetch a project section endpoint (security, financial, etc.). |
- fetch_index_pol_history(session, timeout=60.0)
Fetch all-time index-level aggregate PoL history from
/v1/pol/history/chart.- Parameters
session (eth_defi.core3.session.Core3Session) – Core3 API session.
timeout (float) – HTTP request timeout in seconds.
- Returns
List of point dicts with
scoreandtimestampkeys.- Return type
- fetch_index_pol_history_incremental(session, from_ts, to_ts, timeout=60.0)
Fetch ranged index-level aggregate PoL history from
/v1/pol/history.- Parameters
session (eth_defi.core3.session.Core3Session) – Core3 API session.
from_ts (int) – Start unix timestamp (inclusive).
to_ts (int) – End unix timestamp (inclusive).
timeout (float) – HTTP request timeout in seconds.
- Returns
List of point dicts with
scoreandtimestampkeys.- Return type
- fetch_pol_category_history(session, slug, timeout=60.0)
Fetch all-time PoL category breakdown history from
/v1/{slug}/pol/by_category/history/chart.Returns a list of points, each containing a timestamp and per-category PoL scores (security, financial, operational, reputational, regulatory).
- Parameters
session (eth_defi.core3.session.Core3Session) – Core3 API session.
slug (str) – Project slug.
timeout (float) – HTTP request timeout in seconds.
- Returns
List of point dicts with category score breakdowns.
- Return type
- fetch_pol_category_history_incremental(session, slug, from_ts, to_ts, timeout=60.0)
Fetch ranged PoL category breakdown history from
/v1/{slug}/pol/by_category/history.- Parameters
session (eth_defi.core3.session.Core3Session) – Core3 API session.
slug (str) – Project slug.
from_ts (int) – Start unix timestamp (inclusive).
to_ts (int) – End unix timestamp (inclusive).
timeout (float) – HTTP request timeout in seconds.
- Returns
List of point dicts with category score breakdowns.
- Return type
- fetch_pol_history(session, slug, timeout=60.0)
Fetch all-time PoL history chart from
/v1/{slug}/pol/history/chart.Returns a list of
{score, timestamp}points, unwrapped from{"points": [...]}. Used for initial backfill.- Parameters
session (eth_defi.core3.session.Core3Session) – Core3 API session.
slug (str) – Project slug.
timeout (float) – HTTP request timeout in seconds.
- Returns
List of point dicts with
scoreandtimestampkeys.- Return type
- fetch_pol_history_incremental(session, slug, from_ts, to_ts, timeout=60.0)
Fetch ranged PoL history from
/v1/{slug}/pol/history.Uses the
fromandtoquery parameters (unix timestamps in seconds) to fetch only the requested range. Used for incremental updates after the initial backfill.- Parameters
session (eth_defi.core3.session.Core3Session) – Core3 API session.
slug (str) – Project slug.
from_ts (int) – Start unix timestamp (inclusive).
to_ts (int) – End unix timestamp (inclusive).
timeout (float) – HTTP request timeout in seconds.
- Returns
List of point dicts with
scoreandtimestampkeys.- Return type
- fetch_project_detail(session, slug, timeout=60.0)
Fetch full project detail from
/v1/{slug}.Returns the top-level project object including description, rank, PoL score, market cap, links, top_risks, and seals.
- Parameters
session (eth_defi.core3.session.Core3Session) – Core3 API session.
slug (str) – Project identifier (e.g.
'ethereum','aave').timeout (float) – HTTP request timeout in seconds.
- Returns
Project detail dict (raw JSON response).
- Return type
- fetch_project_list(session, timeout=60.0)
Fetch the full project list from
/v1/list.Returns the unwrapped list (the API wraps it as
{"list": [...]}) containing slug, name, coingecko_id, and PoL score per project.- Parameters
session (eth_defi.core3.session.Core3Session) – Core3 API session.
timeout (float) – HTTP request timeout in seconds.
- Returns
List of project dicts.
- Return type
- fetch_section_detail(session, slug, section, timeout=60.0)
Fetch a project section endpoint (security, financial, etc.).
- Parameters
session (eth_defi.core3.session.Core3Session) – Core3 API session.
slug (str) – Project slug.
section (str) – Section name:
'security','financial','operational','reputational', or'regulatory'.timeout (float) – HTTP request timeout in seconds.
- Returns
Section detail dict (raw JSON response).
- Return type