Skip to content

Response Schema

Each response has been mapped into a pydantic schema in a way that makes it easy to read and write codes that use them.

The classes identifying the response schema of an endpoint are the only ones ending with Response word, all other sub-schemes are used to identify the structures obtained from the responses.

cyhole.dex_screener.schema

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerTokenProfileLink[DexScreenerTokenProfileLink]

              

              click cyhole.dex_screener.schema.DexScreenerTokenProfileLink href "" "cyhole.dex_screener.schema.DexScreenerTokenProfileLink"
            

A single link entry attached to a token profile.

type class-attribute instance-attribute

type: str | None = None

label class-attribute instance-attribute

label: str | None = None

url instance-attribute

url: str

DexScreenerTokenProfile

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerTokenProfile[DexScreenerTokenProfile]

              

              click cyhole.dex_screener.schema.DexScreenerTokenProfile href "" "cyhole.dex_screener.schema.DexScreenerTokenProfile"
            

Token profile metadata returned by the token-profiles endpoints.

url instance-attribute

url: str

chain_id class-attribute instance-attribute

chain_id: str = Field(alias='chainId')

token_address class-attribute instance-attribute

token_address: str = Field(alias='tokenAddress')

icon instance-attribute

icon: str

header class-attribute instance-attribute

header: str | None = None

description class-attribute instance-attribute

description: str | None = None
links: list[DexScreenerTokenProfileLink] | None = None

DexScreenerCommunityTakeover

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerCommunityTakeover[DexScreenerCommunityTakeover]

              

              click cyhole.dex_screener.schema.DexScreenerCommunityTakeover href "" "cyhole.dex_screener.schema.DexScreenerCommunityTakeover"
            

Community takeover record, extending token profile with a claim date.

url instance-attribute

url: str

chain_id class-attribute instance-attribute

chain_id: str = Field(alias='chainId')

token_address class-attribute instance-attribute

token_address: str = Field(alias='tokenAddress')

icon instance-attribute

icon: str

header class-attribute instance-attribute

header: str | None = None

description class-attribute instance-attribute

description: str | None = None
links: list[DexScreenerTokenProfileLink] | None = None

claim_date class-attribute instance-attribute

claim_date: str = Field(alias='claimDate')

DexScreenerAd

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerAd[DexScreenerAd]

              

              click cyhole.dex_screener.schema.DexScreenerAd href "" "cyhole.dex_screener.schema.DexScreenerAd"
            

Advertisement record from the ads endpoint.

url instance-attribute

url: str

chain_id class-attribute instance-attribute

chain_id: str = Field(alias='chainId')

token_address class-attribute instance-attribute

token_address: str = Field(alias='tokenAddress')

date instance-attribute

date: str

type instance-attribute

type: str

duration_hours class-attribute instance-attribute

duration_hours: float | None = Field(
    default=None, alias="durationHours"
)

impressions class-attribute instance-attribute

impressions: float | None = None

DexScreenerTokenBoost

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerTokenBoost[DexScreenerTokenBoost]

              

              click cyhole.dex_screener.schema.DexScreenerTokenBoost href "" "cyhole.dex_screener.schema.DexScreenerTokenBoost"
            

Token boost record from the token-boosts endpoints.

url instance-attribute

url: str

chain_id class-attribute instance-attribute

chain_id: str = Field(alias='chainId')

token_address class-attribute instance-attribute

token_address: str = Field(alias='tokenAddress')

amount instance-attribute

amount: float

total_amount class-attribute instance-attribute

total_amount: float = Field(alias='totalAmount')

icon class-attribute instance-attribute

icon: str | None = None

header class-attribute instance-attribute

header: str | None = None

description class-attribute instance-attribute

description: str | None = None
links: list[DexScreenerTokenProfileLink] | None = None

DexScreenerOrder

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerOrder[DexScreenerOrder]

              

              click cyhole.dex_screener.schema.DexScreenerOrder href "" "cyhole.dex_screener.schema.DexScreenerOrder"
            

Paid order record for a token.

type instance-attribute

type: str

status instance-attribute

status: str

payment_timestamp class-attribute instance-attribute

payment_timestamp: float = Field(alias='paymentTimestamp')

DexScreenerBaseToken

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerBaseToken[DexScreenerBaseToken]

              

              click cyhole.dex_screener.schema.DexScreenerBaseToken href "" "cyhole.dex_screener.schema.DexScreenerBaseToken"
            

Base token in a trading pair.

address instance-attribute

address: str

name instance-attribute

name: str

symbol instance-attribute

symbol: str

DexScreenerQuoteToken

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerQuoteToken[DexScreenerQuoteToken]

              

              click cyhole.dex_screener.schema.DexScreenerQuoteToken href "" "cyhole.dex_screener.schema.DexScreenerQuoteToken"
            

Quote token in a trading pair (fields may be absent for some pairs).

address class-attribute instance-attribute

address: str | None = None

name class-attribute instance-attribute

name: str | None = None

symbol class-attribute instance-attribute

symbol: str | None = None

DexScreenerPairTxns

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerPairTxns[DexScreenerPairTxns]

              

              click cyhole.dex_screener.schema.DexScreenerPairTxns href "" "cyhole.dex_screener.schema.DexScreenerPairTxns"
            

Buy/sell transaction counts for a time window.

buys instance-attribute

buys: int

sells instance-attribute

sells: int

DexScreenerPairLiquidity

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerPairLiquidity[DexScreenerPairLiquidity]

              

              click cyhole.dex_screener.schema.DexScreenerPairLiquidity href "" "cyhole.dex_screener.schema.DexScreenerPairLiquidity"
            

Liquidity values for a trading pair.

usd class-attribute instance-attribute

usd: float | None = None

base instance-attribute

base: float

quote instance-attribute

quote: float

DexScreenerPairWebsite

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerPairWebsite[DexScreenerPairWebsite]

              

              click cyhole.dex_screener.schema.DexScreenerPairWebsite href "" "cyhole.dex_screener.schema.DexScreenerPairWebsite"
            

Website URL associated with a pair's token.

url instance-attribute

url: str

DexScreenerPairSocial

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerPairSocial[DexScreenerPairSocial]

              

              click cyhole.dex_screener.schema.DexScreenerPairSocial href "" "cyhole.dex_screener.schema.DexScreenerPairSocial"
            

Social media handle associated with a pair's token.

platform instance-attribute

platform: str

handle instance-attribute

handle: str

DexScreenerPairInfo

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerPairInfo[DexScreenerPairInfo]

              

              click cyhole.dex_screener.schema.DexScreenerPairInfo href "" "cyhole.dex_screener.schema.DexScreenerPairInfo"
            

Extended info (image, websites, socials) attached to a pair.

image_url class-attribute instance-attribute

image_url: str | None = Field(
    default=None, alias="imageUrl"
)

websites class-attribute instance-attribute

websites: list[DexScreenerPairWebsite] | None = None

socials class-attribute instance-attribute

socials: list[DexScreenerPairSocial] | None = None

DexScreenerPairBoosts

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerPairBoosts[DexScreenerPairBoosts]

              

              click cyhole.dex_screener.schema.DexScreenerPairBoosts href "" "cyhole.dex_screener.schema.DexScreenerPairBoosts"
            

Active boost count for a pair.

active instance-attribute

active: int

DexScreenerPair

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.DexScreenerPair[DexScreenerPair]

              

              click cyhole.dex_screener.schema.DexScreenerPair href "" "cyhole.dex_screener.schema.DexScreenerPair"
            

Full trading pair object returned by multiple DEX endpoints.

txns and volume keys are time-window labels (e.g. "m5", "h1", "h6", "h24").

chain_id class-attribute instance-attribute

chain_id: str = Field(alias='chainId')

dex_id class-attribute instance-attribute

dex_id: str = Field(alias='dexId')

url instance-attribute

url: str

pair_address class-attribute instance-attribute

pair_address: str = Field(alias='pairAddress')

labels class-attribute instance-attribute

labels: list[str] | None = None

base_token class-attribute instance-attribute

base_token: DexScreenerBaseToken = Field(alias='baseToken')

quote_token class-attribute instance-attribute

quote_token: DexScreenerQuoteToken = Field(
    alias="quoteToken"
)

price_native class-attribute instance-attribute

price_native: str = Field(alias='priceNative')

price_usd class-attribute instance-attribute

price_usd: str | None = Field(
    default=None, alias="priceUsd"
)

txns instance-attribute

txns: dict[str, DexScreenerPairTxns]

volume instance-attribute

volume: dict[str, float]

price_change class-attribute instance-attribute

price_change: dict[str, float] | None = Field(
    default=None, alias="priceChange"
)

liquidity class-attribute instance-attribute

liquidity: DexScreenerPairLiquidity | None = None

fdv class-attribute instance-attribute

fdv: float | None = None

market_cap class-attribute instance-attribute

market_cap: float | None = Field(
    default=None, alias="marketCap"
)

pair_created_at class-attribute instance-attribute

pair_created_at: int | None = Field(
    default=None, alias="pairCreatedAt"
)

info class-attribute instance-attribute

info: DexScreenerPairInfo | None = None

boosts class-attribute instance-attribute

boosts: DexScreenerPairBoosts | None = None

GetTokenProfilesLatestResponse

Bases: RootModel[list[DexScreenerTokenProfile]]


              flowchart TD
              cyhole.dex_screener.schema.GetTokenProfilesLatestResponse[GetTokenProfilesLatestResponse]

              

              click cyhole.dex_screener.schema.GetTokenProfilesLatestResponse href "" "cyhole.dex_screener.schema.GetTokenProfilesLatestResponse"
            

Response for GET /token-profiles/latest/v1.

GetCommunityTakeoverResponse

Bases: RootModel[list[DexScreenerCommunityTakeover]]


              flowchart TD
              cyhole.dex_screener.schema.GetCommunityTakeoverResponse[GetCommunityTakeoverResponse]

              

              click cyhole.dex_screener.schema.GetCommunityTakeoverResponse href "" "cyhole.dex_screener.schema.GetCommunityTakeoverResponse"
            

Response for GET /community-takeovers/latest/v1.

GetAdsLatestResponse

Bases: RootModel[list[DexScreenerAd]]


              flowchart TD
              cyhole.dex_screener.schema.GetAdsLatestResponse[GetAdsLatestResponse]

              

              click cyhole.dex_screener.schema.GetAdsLatestResponse href "" "cyhole.dex_screener.schema.GetAdsLatestResponse"
            

Response for GET /ads/latest/v1.

GetTokenBoostsLatestResponse

Bases: RootModel[list[DexScreenerTokenBoost]]


              flowchart TD
              cyhole.dex_screener.schema.GetTokenBoostsLatestResponse[GetTokenBoostsLatestResponse]

              

              click cyhole.dex_screener.schema.GetTokenBoostsLatestResponse href "" "cyhole.dex_screener.schema.GetTokenBoostsLatestResponse"
            

Response for GET /token-boosts/latest/v1.

GetTokenBoostsTopResponse

Bases: RootModel[list[DexScreenerTokenBoost]]


              flowchart TD
              cyhole.dex_screener.schema.GetTokenBoostsTopResponse[GetTokenBoostsTopResponse]

              

              click cyhole.dex_screener.schema.GetTokenBoostsTopResponse href "" "cyhole.dex_screener.schema.GetTokenBoostsTopResponse"
            

Response for GET /token-boosts/top/v1.

GetOrdersResponse

Bases: RootModel[list[DexScreenerOrder]]


              flowchart TD
              cyhole.dex_screener.schema.GetOrdersResponse[GetOrdersResponse]

              

              click cyhole.dex_screener.schema.GetOrdersResponse href "" "cyhole.dex_screener.schema.GetOrdersResponse"
            

Response for GET /orders/v1/{chainId}/{tokenAddress}.

GetTokensResponse

Bases: RootModel[list[DexScreenerPair]]


              flowchart TD
              cyhole.dex_screener.schema.GetTokensResponse[GetTokensResponse]

              

              click cyhole.dex_screener.schema.GetTokensResponse href "" "cyhole.dex_screener.schema.GetTokensResponse"
            

Response for GET /tokens/v1/{chainId}/{tokenAddresses}.

GetTokenPairsResponse

Bases: RootModel[list[DexScreenerPair]]


              flowchart TD
              cyhole.dex_screener.schema.GetTokenPairsResponse[GetTokenPairsResponse]

              

              click cyhole.dex_screener.schema.GetTokenPairsResponse href "" "cyhole.dex_screener.schema.GetTokenPairsResponse"
            

Response for GET /token-pairs/v1/{chainId}/{tokenAddress}.

GetPairsResponse

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.GetPairsResponse[GetPairsResponse]

              

              click cyhole.dex_screener.schema.GetPairsResponse href "" "cyhole.dex_screener.schema.GetPairsResponse"
            

Response for GET /latest/dex/pairs/{chainId}/{pairId}.

schema_version class-attribute instance-attribute

schema_version: str = Field(alias='schemaVersion')

pairs class-attribute instance-attribute

pairs: list[DexScreenerPair] | None = None

GetSearchResponse

Bases: BaseModel


              flowchart TD
              cyhole.dex_screener.schema.GetSearchResponse[GetSearchResponse]

              

              click cyhole.dex_screener.schema.GetSearchResponse href "" "cyhole.dex_screener.schema.GetSearchResponse"
            

Response for GET /latest/dex/search.

schema_version class-attribute instance-attribute

schema_version: str = Field(alias='schemaVersion')

pairs instance-attribute

pairs: list[DexScreenerPair]