dexscreener

package
v0.0.0-...-bcad34f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DexScreenerAPI

type DexScreenerAPI struct {
	BaseURL string
}

func NewDexScreenerAPI

func NewDexScreenerAPI() *DexScreenerAPI

func (DexScreenerAPI) SearchPairs

func (m DexScreenerAPI) SearchPairs(tokenContractAddress string) (*PairsDetailResp, error)

type PairsDetailResp

type PairsDetailResp struct {
	NetworkID   uint64 `json:"network_id"`
	ChainId     string `json:"chainId"`
	Description string `json:"description"`
	DexId       string `json:"dexId"`
	Url         string `json:"url"`
	PairAddress string `json:"pairAddress"`
	PriceNative string `json:"priceNative"`
	PriceUsd    string `json:"priceUsd"`
	Volume      *struct {
		H24 float64 `json:"h24"`
		H6  float64 `json:"h6"`
		H1  float64 `json:"h1"`
		M5  float64 `json:"m5"`
	} `json:"volume"`
	PriceChange *struct {
		H24 float64 `json:"h24"`
		H6  float64 `json:"h6"`
		H1  float64 `json:"h1"`
		M5  float64 `json:"m5"`
	} `json:"priceChange"`
	Liquidity *struct {
		Usd float64 `json:"usd"`
	} `json:"liquidity"`
	QuoteToken *struct {
		Symbol  string `json:"symbol"`
		Name    string `json:"name"`
		Address string `json:"address"`
	} `json:"quoteToken"`
	BaseToken *struct {
		Symbol  string `json:"symbol"`
		Name    string `json:"name"`
		Address string `json:"address"`
	} `json:"baseToken"`
	Fdv       uint64 `json:"fdv"`
	MarketCap uint64 `json:"marketCap"`
	Info      *struct {
		ImageUrl  string `json:"imageUrl"`
		Header    string `json:"header"`
		OpenGraph string `json:"openGraph"`
		Websites  []struct {
			Label string `json:"label"`
			Url   string `json:"url"`
		} `json:"websites"`
		Socials []struct {
			Type string `json:"type"`
			Url  string `json:"url"`
		} `json:"socials"`
	} `json:"info"`
}

type PairsResp

type PairsResp struct {
	Pairs []*PairsDetailResp `json:"pairs"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL