These schemas provide information and statistics about protocols, including protocol key, name, supported chains, image, URL, recipes, integration types, category, tags, description, Twitter and Telegram URLs, TVL (Total Value Locked), TVL for each supported chain, the date the protocol was created, and timeseries of TVL for a specific time range. They can be used to track the performance of protocols and make data-driven decisions.
ProtocolData
export class ProtocolData {
key: string;
name: string;
chains: Array<string>;
image: string;
url: string;
recipes: Record<string, Array<RecipeData>>;
integration_types: Array<string>;
categories: Array<string> | undefined;
tags: Array<string>;
description: string | undefined;
twitter_url: string | undefined;
telegram_url: string | undefined;
}
@dataclass
class ProtocolData:
key: str
name: str
chains: list[str]
image: str
url: str
recipes: dict[str, list[RecipeData]]
integration_types: list[str]
categories: list[str] | None
tags: list[str]
description: str | None
twitter_url: str | None
telegram_url: str | None
The ProtocolData
dataclass holds information about a protocol. It includes the protocol's key, name, supported chains, image, URL, recipes, integration types, category, tags, description, Twitter and Telegram URLs. The recipes
attribute holds a dictionary of RecipeData
objects, which are used to represent the various actions a user can perform on a protocol.
ProtocolStats
export class ProtocolStats {
total_tvl: string;
chain_tvl: Record<string, string>;
created_date: string | undefined;
}
@dataclass
class ProtocolStats:
total_tvl: str
chain_tvl: dict[str, str]
created_date: str | None
The ProtocolStats
dataclass holds statistical information about a protocol. It includes the protocol's total TVL (Total Value Locked), TVL for each supported chain, and the date the protocol was created.
ProtocolWithStats
export class ProtocolWithStats {
protocol: ProtocolData;
stats: ProtocolStats;
}
@dataclass
class ProtocolWithStats:
protocol: ProtocolData
stats: ProtocolStats
The ProtocolWithStats
dataclass combines ProtocolData
and ProtocolStats
to provide a full representation of a protocol, including both its information and statistics.
PaginatedProtocolWithStats
export class PaginatedProtocolWithStats {
response: Array<ProtocolWithStats>;
total: number;
}
@dataclass
class PaginatedProtocolWithStats:
response: list[ProtocolWithStats]
total: int
The PaginatedProtocolWithStats
dataclass holds a paginated list of ProtocolWithStats
objects along with a total count of the protocols. The response
attribute holds a list of ProtocolWithStats
objects, each of which represents a protocol along with its statistics. The total
attribute holds the total count of ProtocolWithStats
objects.
ProtocolTimeseries
export class ProtocolTimeseries {
tier: string;
tvl_timeseries: Record<number, number | undefined>;
chain_tvl_timeseries: Record<string, Record<number, number | undefined>>;
}
@dataclass
class ProtocolTimeseries:
tier: str
tvl_timeseries: dict[str, float | None]
chain_tvl_timeseries: dict[str, dict[str, float | None]]
The ProtocolTimeseries
dataclass holds a timeseries of TVL (Total Value Locked) for a specific time range. It includes a tier
attribute, which specifies the time range, a tvl_timeseries
attribute, which is a dictionary that maps timestamps to the total TVL of the protocol at that time, and a chain_tvl_timeseries
attribute, which is a dictionary that maps chain IDs to dictionaries of timestamps and the TVL of the protocol on that chain at that time. The timestamps are Unix timestamps in seconds, and the TVL values are represented as floats or None
if the value is not available.