client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBaseUrl

func WithBaseUrl(baseUrl string) func(*DexscreenerClient)

Types

type ClientOpt

type ClientOpt func(*DexscreenerClient)

type DexscreenerClient

type DexscreenerClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client *http.Client, opts ...ClientOpt) *DexscreenerClient

New Dexcreener http client with options

func (*DexscreenerClient) Pairs

func (d *DexscreenerClient) Pairs(chainId string, pairAddrs []string) (*types.PairsResponse, error)

Get one or multiple pairs by chain and pair address

One or multiple, comma-separated pair addresses (up to 30 addresses). Example: 0xAbc1 or 0xAbc1,0xAbc2,0xAbc3

func (*DexscreenerClient) Search

func (d *DexscreenerClient) Search(query string) (*types.PairsResponse, error)

Search for pairs matching query. Query may include pair address, token address, token name or token symbol.

Example: WBTC or WBTC/USDC or 0xAbc01

func (*DexscreenerClient) Tokens

func (d *DexscreenerClient) Tokens(tokenAddrs []string) (*types.PairsResponse, error)

Get one or multiple pairs by token address.

One or multiple, comma-separated token addresses (up to 30 addresses). Example: 0xAbc1 or 0xAbc1,0xAbc2,0xAbc3

Jump to

Keyboard shortcuts

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