avee

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 20 Imported by: 0

README

avee DEX data API client for Go

c, _ := avee.New(avee.Options{})
page, err := c.Pairs(ctx, avee.PairsParams{Chains: []string{"base"}, Limit: avee.Ptr(int32(10))})
fmt.Println(page.Items[0].PairAddress, err)

Typed access to every operation of the avee client API (/api/v1): pairs, tokens, trades, candles, wallets, leaderboards, farms, perps and oracle prices across every chain avee indexes. No key is needed. Standard library only; Go 1.24.

go get github.com/aveetechapp/avee-go

The package name is avee. The default host is the preview host: avee.DefaultBaseURL equals avee.PreviewBaseURL.

Options

Field Default
BaseURL DefaultBaseURL a path prefix works
APIKey none sent as X-API-Key; only raises the limits
Timeout 30 s per attempt, inside the caller's ctx
MaxRetries / DisableRetries 2 GETs only
MaxRetryDelay 30 s a longer Retry-After is returned as the error
MaxResponseBytes 16 MiB a larger body is refused
HTTPClient, Header, UserAgent
Payer nil opts into x402, see below

A Client is safe for concurrent use.

Operations

Each method takes ctx, the path parameters as strings (a chain slug or its numeric id), and a …Params struct when the operation has query parameters: required ones are values, optional ones are pointers (avee.Ptr(v)), lists are slices. Input is checked against the specification's bounds before anything is sent (*ValidationError); a batch takes up to the maxItems of its request schema (pairs 50, tokens and wallet labels 200).

Every value set in the specification is a named string type with a constant per known value: avee.SortByVolume, avee.TimeFrame24h, avee.PairStatusScam, avee.FactoryTypeUniswapV3. The sets are open: an unknown value from the server decodes as it is, so compare against the constants and keep a default branch. An omitted parameter takes the server's default, listed per operation in the specification.

Method Route What it answers
meta
X402Discovery(ctx) GET /.well-known/x402 Operations payable with x402 and their prices
Status(ctx) GET /status Liveness and upstream health
Key(ctx) GET /key Plan and limits of the calling key
Config(ctx) GET /config Enumerations and defaults
Chains(ctx) GET /chains Chains served right now
dex
Search(ctx, params) GET /search Typeahead across tokens and pairs
Pairs(ctx, params), IterPairs GET /pairs Liquidity pair screener
Pair(ctx, chain, address) GET /chains/{chain}/pairs/{address} One liquidity pair
PairTrades(ctx, chain, address, params), IterPairTrades GET /chains/{chain}/pairs/{address}/trades Trade tape of a pair
PairCandles(ctx, chain, address, params) GET /chains/{chain}/pairs/{address}/candles OHLCV candles
Trending(ctx, params), IterTrending GET /trending Trending pairs right now
PairsNew(ctx, params), IterPairsNew GET /pairs/new Newest pairs on one chain
LaunchpadTokens(ctx, params), IterLaunchpadTokens GET /launchpads/tokens Launchpad launches by stage (new, bonding or graduated)
PairBatch(ctx, body) POST /pairs/batch Many pairs in one call
Perps(ctx, params), IterPerps GET /perps Perpetual markets
PerpHistory(ctx, market, params) GET /perps/{market}/history Open interest, funding and mark history of a perpetual
PerpStats(ctx, market, params) GET /perps/{market}/stats How positions on a perpetual opened, closed and were liquidated over the last day
PerpLiquidations(ctx, params) GET /perps/liquidations Daily liquidations of a perpetual or a whole venue
DeployerTokens(ctx, address, params), IterDeployerTokens GET /deployers/{address}/tokens Launches of one deployer, with its reputation card
token
TokenByAddress(ctx, chain, address, params) GET /chains/{chain}/tokens/{address} Canonical token by chain and address
TokenPairs(ctx, chain, address, params) GET /chains/{chain}/tokens/{address}/pairs Top pairs of a token by 24h volume
TokenVerdict(ctx, chain, address) GET /chains/{chain}/tokens/{address}/verdict Signed token verdict, submittable to the trust oracle
TokenVerdictProof(ctx, chain, address) GET /chains/{chain}/tokens/{address}/proof Merkle proof of a verdict at the last published epoch
TokenBrief(ctx, chain, address) GET /chains/{chain}/tokens/{address}/brief Everything needed to decide about a token, in one call
TokenByID(ctx, id, params) GET /tokens/{id} Canonical token by id
TokenBySlug(ctx, slug, params) GET /tokens/by-slug/{slug} Canonical token by slug
Tokens(ctx, params), IterTokens GET /tokens Token market list, ranked by market cap
TokenBatch(ctx, body) POST /tokens/batch Resolve many tokens at once
TokenHolders(ctx, chain, address, params), IterTokenHolders GET /chains/{chain}/tokens/{address}/holders Top holders of a token
TokenTraders(ctx, chain, address, params), IterTokenTraders GET /chains/{chain}/tokens/{address}/traders Wallets that traded a token, with their PNL on it
farm
Farms(ctx, params), IterFarms GET /farms Yield farm screener
Farm(ctx, chain, address) GET /chains/{chain}/farms/{address} One yield farm
wallet
Wallets(ctx, params), IterWallets GET /wallets Rank traders on one chain
WalletStats(ctx, params) GET /wallets/stats Trader population per chain
WalletLabelsBatch(ctx, body) POST /wallets/labels/batch Behaviour labels for many wallets
WalletOverview(ctx, address, params) GET /wallets/{address}/overview One wallet across every chain it traded
Leaderboard(ctx, params) GET /leaderboard Chain and DEX protocol boards
WalletProfile(ctx, chain, address) GET /chains/{chain}/wallets/{address} Trader profile with metrics for every window
WalletPositions(ctx, chain, address, params), IterWalletPositions GET /chains/{chain}/wallets/{address}/positions Open and closed positions of a wallet
WalletTrades(ctx, chain, address, params), IterWalletTrades GET /chains/{chain}/wallets/{address}/trades Raw trade history of a wallet
WalletChart(ctx, chain, address, params) GET /chains/{chain}/wallets/{address}/chart Wallet performance series — PNL and ROI
WalletBestTrades(ctx, chain, address, params) GET /chains/{chain}/wallets/{address}/best-trades Best and worst closed trades of a wallet
WalletRounds(ctx, chain, address, params), IterWalletRounds GET /chains/{chain}/wallets/{address}/rounds Position rounds — one entry and exit cycle per row
WalletFunding(ctx, chain, address) GET /chains/{chain}/wallets/{address}/funding Who funded a wallet
oracle
OraclePrices(ctx, params) GET /prices Latest oracle prices by feed id
OraclePricesAt(ctx, params) GET /prices/at Oracle prices at a past moment

Pagination

Each paged operation has an Iter… twin returning iter.Seq2[Item, error]; the next page is fetched only when the loop reaches it, and break stops it:

for trade, err := range c.IterPairTrades(ctx, "base", pair, avee.PairTradesParams{}) {
	if err != nil {
		return err
	}
	_ = trade
}

A repeated cursor ends the walk with a *ValidationError rather than looping. Prefer PairBatch, TokenBatch and WalletLabelsBatch to one call per address.

Errors

Error When
*APIError non-2xx: Status, Code (branch on it), Detail, Param, RequestID, RateLimit, RetryAfter, Retryable(), Paid, PaymentRequired, Payment
ErrTimeout (errors.Is) an attempt exceeded Timeout
*ValidationError bad input, or a response that does not decode or is too large
*PaymentError the x402 flow stopped before paying: an unreadable challenge or offer; wraps ErrNoPayableNetwork, ErrPaymentDeclined or the payer's error

GETs are retried on 408, 429, 5xx, timeouts and network errors with full-jitter backoff; a Retry-After (or, on a 429 without one, the RateLimit reset) is waited out when it fits MaxRetryDelay. POSTs are never retried. Redirects are not followed, whatever the HTTPClient's own policy: a 3xx is an *APIError, so the key and a payment signature never leave the host.

Rate limits

c.LastResponse() returns the latest Status, RequestID, RateLimit (Limit, Remaining, Reset, RetryAfter, Policy, Known) and the x402 Payment receipt. Under concurrency it is the last response to arrive; an *APIError carries its own RateLimit.

Paying past the keyless limit (x402)

Off by default: without a Payer the client never pays and a spent budget is an ordinary 429. With one it sends Accept-Payment: x402; a spent budget then answers 402, the client picks the first exact offer on a network from Networks() (in that order), calls Sign once, and repeats the request once with PAYMENT-SIGNATURE. A paid request is never retried; the receipt is LastResponse().Payment. Sign sees the amount, asset, network and PayTo in p.Requirement and declines by returning an error. An offer whose amount is not a positive integer (or exceeds MaxAmountRequired), or that lacks an asset or PayTo, is refused before Sign is called.

The SDK holds no key and imports no wallet library. With go-ethereum:

payer := avee.NewPayer([]string{"eip155:84532"}, func(ctx context.Context, p avee.PaymentContext) (avee.PaymentSignature, error) {
	r := p.Requirement
	now := time.Now().Unix()
	nonce := make([]byte, 32)
	_, _ = rand.Read(nonce)
	auth := map[string]any{
		"from": from.Hex(), "to": r.PayTo, "value": r.Amount,
		"validAfter": strconv.FormatInt(now-5, 10), "validBefore": strconv.FormatInt(now+int64(r.MaxTimeoutSeconds), 10),
		"nonce": hexutil.Encode(nonce),
	}
	typed := apitypes.TypedData{
		Types: apitypes.Types{
			"EIP712Domain": {{Name: "name", Type: "string"}, {Name: "version", Type: "string"}, {Name: "chainId", Type: "uint256"}, {Name: "verifyingContract", Type: "address"}},
			"TransferWithAuthorization": {{Name: "from", Type: "address"}, {Name: "to", Type: "address"}, {Name: "value", Type: "uint256"},
				{Name: "validAfter", Type: "uint256"}, {Name: "validBefore", Type: "uint256"}, {Name: "nonce", Type: "bytes32"}},
		},
		PrimaryType: "TransferWithAuthorization",
		Domain: apitypes.TypedDataDomain{Name: fmt.Sprint(r.Extra["name"]), Version: fmt.Sprint(r.Extra["version"]),
			ChainId: math.NewHexOrDecimal256(84532), VerifyingContract: r.Asset},
		Message: auth,
	}
	hash, _, err := apitypes.TypedDataAndHash(typed)
	if err != nil {
		return avee.PaymentSignature{}, err
	}
	sig, err := crypto.Sign(hash, key)
	if err != nil {
		return avee.PaymentSignature{}, err
	}
	sig[64] += 27
	return avee.PaymentSignature{Payload: map[string]any{"signature": hexutil.Encode(sig), "authorization": auth}}, nil
})
c, _ := avee.New(avee.Options{Payer: payer})

Sign may instead return PaymentSignature{Header: …}, a finished PAYMENT-SIGNATURE from any x402 client library.

Astra price oracle

The module also carries the client for Astra, avee's Hermes-compatible price oracle, as the package github.com/aveetechapp/avee-go/astra. It is the one package with a dependency (github.com/coder/websocket), compiled in only when imported.

c, _ := astra.New(astra.Options{})
prices, _ := c.LatestPrices(ctx, []string{"0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"}, astra.PriceQuery{})

REST, SSE and WebSocket, exact prices, reconnecting streams: astra/README.md.

Compatibility

Models are generated from the OpenAPI document: unknown fields are ignored, enums are string types that keep unknown values, and the one polymorphic field (Transaction.BlockInfo, EventData) keeps an unrecognised branch in Raw. Inside a major version the module is additive only.

Development

go test -race ./... runs against a local fake server; AVEE_LIVE=1 go test -run Live ./... checks the preview host; go test -bench DecodePairPage measures decoding a 100-pair page.

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL = "https://api.preview.avee.tech/api/v1"
	PreviewBaseURL = "https://api.preview.avee.tech/api/v1"
	Version        = "0.1.1"
)

Variables

View Source
var (
	ErrTimeout          = errors.New("avee: timeout")
	ErrPaymentDeclined  = errors.New("avee: the payer declined the payment")
	ErrNoPayableNetwork = errors.New("avee: no accepted network the payer supports")
)

Functions

func Ptr

func Ptr[T any](v T) *T

Types

type APIError

type APIError struct {
	Problem         *Problem
	PaymentRequired *PaymentRequired
	Payment         *PaymentReceipt
	Header          http.Header
	Operation       string
	Method          string
	URL             string
	Code            string
	Detail          string
	Param           string
	RequestID       string
	Body            string
	RateLimit       RateLimit
	Status          int
	RetryAfter      time.Duration
	Paid            bool
}

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) Retryable

func (e *APIError) Retryable() bool

type Address

type Address = string

type BriefDeployer

type BriefDeployer struct {
	Address  Address        `json:"address"`
	Launches uint32         `json:"launches"`
	Rugs     uint32         `json:"rugs"`
	Status   DeployerStatus `json:"status"`
}

type BriefHolders

type BriefHolders struct {
	Top10Pct float64 `json:"top10_pct"`
	Count    int32   `json:"count"`
}

type BriefLiquidity

type BriefLiquidity struct {
	USD              float64 `json:"usd"`
	OnchainUSD       float64 `json:"onchain_usd"`
	LockedPct        float64 `json:"locked_pct"`
	BurnedPct        float64 `json:"burned_pct"`
	EarliestUnlockAt *string `json:"earliest_unlock_at,omitempty"`
}

type BriefMarket

type BriefMarket struct {
	PriceUSD  float64 `json:"price_usd"`
	Volume24h float64 `json:"volume_24h"`
	Trades24h uint32  `json:"trades_24h"`
	Change24h float64 `json:"change_24h"`
	BestPair  Address `json:"best_pair"`
	Dex       string  `json:"dex"`
}

type BriefScore

type BriefScore struct {
	Value   uint32        `json:"value"`
	Title   string        `json:"title"`
	Signals []BriefSignal `json:"signals"`
}

type BriefSignal

type BriefSignal struct {
	Kind   RiskSignalKind `json:"kind"`
	Weight float64        `json:"weight"`
}

type CanonicalTokenStatus

type CanonicalTokenStatus string
const (
	CanonicalTokenStatusUnknown   CanonicalTokenStatus = "unknown"
	CanonicalTokenStatusCommunity CanonicalTokenStatus = "community"
	CanonicalTokenStatusVerified  CanonicalTokenStatus = "verified"
	CanonicalTokenStatusScam      CanonicalTokenStatus = "scam"
	CanonicalTokenStatusHoneypot  CanonicalTokenStatus = "honeypot"
	CanonicalTokenStatusDelisted  CanonicalTokenStatus = "delisted"
)

type ChainInfo

type ChainInfo struct {
	Slug                ChainSlug     `json:"slug"`
	ChainID             uint32        `json:"chain_id"`
	LatestBlock         uint64        `json:"latest_block"`
	BlockLagSeconds     uint32        `json:"block_lag_seconds"`
	Syncing             *bool         `json:"syncing,omitempty"`
	Protocols           []FactoryType `json:"protocols"`
	DexNames            []string      `json:"dex_names,omitempty"`
	Pairs               *int64        `json:"pairs,omitempty"`
	LiquidityUSD        *float64      `json:"liquidity_usd,omitempty"`
	Volume24hUSD        *float64      `json:"volume_24h_usd,omitempty"`
	MinLiquidityUSD     *float64      `json:"min_liquidity_usd,omitempty"`
	DisplayName         *string       `json:"display_name,omitempty"`
	HeadBlock           *uint64       `json:"head_block,omitempty"`
	MetricsStale        *bool         `json:"metrics_stale,omitempty"`
	QualityLiquidityUSD *float64      `json:"quality_liquidity_usd,omitempty"`
	Txns24h             *int64        `json:"txns_24h,omitempty"`
	PerpVolume24h       *float64      `json:"perp_volume_24h,omitempty"`
	PerpTxns24h         *int64        `json:"perp_txns_24h,omitempty"`
	NewPairs24h         *int64        `json:"new_pairs_24h,omitempty"`
	NewPairs24hTotal    *int64        `json:"new_pairs_24h_total,omitempty"`
	ScamsTotal          *int64        `json:"scams_total,omitempty"`
	ScamsOnPool         *int64        `json:"scams_on_pool,omitempty"`
	ScamsInherited      *int64        `json:"scams_inherited,omitempty"`
	Scams24h            *int64        `json:"scams_24h,omitempty"`
	DeployersTotal      *int64        `json:"deployers_total,omitempty"`
	NewDeployers24h     *int64        `json:"new_deployers_24h,omitempty"`
	DeployerAbusers     *int64        `json:"deployer_abusers,omitempty"`
	Gainer              *ChainMover   `json:"gainer,omitempty"`
	Loser               *ChainMover   `json:"loser,omitempty"`
	ExplorerURL         *string       `json:"explorer_url,omitempty"`
	NativeAddressFormat *string       `json:"native_address_format,omitempty"`
}

type ChainList

type ChainList struct {
	Items []ChainInfo `json:"items"`
}

type ChainMover

type ChainMover struct {
	PairAddress Address `json:"pair_address"`
	Ticker      string  `json:"ticker"`
	Value       float64 `json:"value"`
}

type ChainRef

type ChainRef struct {
	Slug    ChainSlug `json:"slug"`
	ChainID uint32    `json:"chain_id"`
}

type ChainSlug

type ChainSlug = string

type ChainWalletStats

type ChainWalletStats struct {
	Chain                ChainRef     `json:"chain"`
	WalletsTotal         *int64       `json:"wallets_total,omitempty"`
	NewWallets24h        *int64       `json:"new_wallets_24h,omitempty"`
	ActiveWallets24h     *int64       `json:"active_wallets_24h,omitempty"`
	HumanWallets         *int64       `json:"human_wallets,omitempty"`
	BotWallets           *int64       `json:"bot_wallets,omitempty"`
	WashTraders          *int64       `json:"wash_traders,omitempty"`
	Snipers              *int64       `json:"snipers,omitempty"`
	CopyEligible         *int64       `json:"copy_eligible,omitempty"`
	ScammersTotal        *int64       `json:"scammers_total,omitempty"`
	Scammers24h          *int64       `json:"scammers_24h,omitempty"`
	ProfitableWallets24h *int64       `json:"profitable_wallets_24h,omitempty"`
	LosingWallets24h     *int64       `json:"losing_wallets_24h,omitempty"`
	RealizedPnl24h       *float64     `json:"realized_pnl_24h,omitempty"`
	Volume24h            *float64     `json:"volume_24h,omitempty"`
	Trades24h            *int64       `json:"trades_24h,omitempty"`
	TopGainer24h         *WalletMover `json:"top_gainer_24h,omitempty"`
	TopLoser24h          *WalletMover `json:"top_loser_24h,omitempty"`
	FavoriteToken24h     *TokenMover  `json:"favorite_token_24h,omitempty"`
}

type ChartCandles

type ChartCandles struct {
	S      string    `json:"s"`
	T      []uint64  `json:"t"`
	O      []float64 `json:"o"`
	H      []float64 `json:"h"`
	L      []float64 `json:"l"`
	C      []float64 `json:"c"`
	V      []float64 `json:"v"`
	ErrMsg *string   `json:"err_msg,omitempty"`
}

type Client

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

func New

func New(opts Options) (*Client, error)

func (*Client) Chains

func (c *Client) Chains(ctx context.Context) (*ChainList, error)

func (*Client) Config

func (c *Client) Config(ctx context.Context) (*Config, error)

func (*Client) DeployerTokens

func (c *Client) DeployerTokens(ctx context.Context, address string, params DeployerTokensParams) (*DeployerLaunchPage, error)

func (*Client) Farm

func (c *Client) Farm(ctx context.Context, chain, address string) (*FarmInfo, error)

func (*Client) Farms

func (c *Client) Farms(ctx context.Context, params FarmsParams) (*FarmPage, error)

func (*Client) IterDeployerTokens

func (c *Client) IterDeployerTokens(ctx context.Context, address string, params DeployerTokensParams) iter.Seq2[PairInfo, error]

func (*Client) IterFarms

func (c *Client) IterFarms(ctx context.Context, params FarmsParams) iter.Seq2[FarmInfo, error]

func (*Client) IterLaunchpadTokens

func (c *Client) IterLaunchpadTokens(ctx context.Context, params LaunchpadTokensParams) iter.Seq2[PairInfo, error]

func (*Client) IterPairTrades

func (c *Client) IterPairTrades(ctx context.Context, chain, address string, params PairTradesParams) iter.Seq2[Transaction, error]

func (*Client) IterPairs

func (c *Client) IterPairs(ctx context.Context, params PairsParams) iter.Seq2[PairInfo, error]

func (*Client) IterPairsNew

func (c *Client) IterPairsNew(ctx context.Context, params PairsNewParams) iter.Seq2[PairInfo, error]

func (*Client) IterPerps

func (c *Client) IterPerps(ctx context.Context, params PerpsParams) iter.Seq2[PairInfo, error]

func (*Client) IterTokenHolders

func (c *Client) IterTokenHolders(ctx context.Context, chain, address string, params TokenHoldersParams) iter.Seq2[TokenHolder, error]

func (*Client) IterTokenTraders

func (c *Client) IterTokenTraders(ctx context.Context, chain, address string, params TokenTradersParams) iter.Seq2[TokenTrader, error]

func (*Client) IterTokens

func (c *Client) IterTokens(ctx context.Context, params TokensParams) iter.Seq2[TokenInfo, error]

func (*Client) IterTrending

func (c *Client) IterTrending(ctx context.Context, params TrendingParams) iter.Seq2[PairInfo, error]

func (*Client) IterWalletPositions

func (c *Client) IterWalletPositions(ctx context.Context, chain, address string, params WalletPositionsParams) iter.Seq2[WalletPosition, error]

func (*Client) IterWalletRounds

func (c *Client) IterWalletRounds(ctx context.Context, chain, address string, params WalletRoundsParams) iter.Seq2[WalletPositionRound, error]

func (*Client) IterWalletTrades

func (c *Client) IterWalletTrades(ctx context.Context, chain, address string, params WalletTradesParams) iter.Seq2[WalletTrade, error]

func (*Client) IterWallets

func (c *Client) IterWallets(ctx context.Context, params WalletsParams) iter.Seq2[WalletListItem, error]

func (*Client) Key

func (c *Client) Key(ctx context.Context) (*KeyInfo, error)

func (*Client) LastResponse

func (c *Client) LastResponse() ResponseInfo

func (*Client) LaunchpadTokens

func (c *Client) LaunchpadTokens(ctx context.Context, params LaunchpadTokensParams) (*PairPage, error)

func (*Client) Leaderboard

func (c *Client) Leaderboard(ctx context.Context, params LeaderboardParams) (*Leaderboard, error)

func (*Client) OraclePrices

func (c *Client) OraclePrices(ctx context.Context, params OraclePricesParams) (*OraclePriceList, error)

func (*Client) OraclePricesAt

func (c *Client) OraclePricesAt(ctx context.Context, params OraclePricesAtParams) (*OraclePriceList, error)

func (*Client) Pair

func (c *Client) Pair(ctx context.Context, chain, address string) (*PairInfo, error)

func (*Client) PairBatch

func (c *Client) PairBatch(ctx context.Context, body PairBatchRequest) (*PairBatchResponse, error)

func (*Client) PairCandles

func (c *Client) PairCandles(ctx context.Context, chain, address string, params PairCandlesParams) (*ChartCandles, error)

func (*Client) PairTrades

func (c *Client) PairTrades(ctx context.Context, chain, address string, params PairTradesParams) (*TradePage, error)

func (*Client) Pairs

func (c *Client) Pairs(ctx context.Context, params PairsParams) (*PairPage, error)

func (*Client) PairsNew

func (c *Client) PairsNew(ctx context.Context, params PairsNewParams) (*PairPage, error)

func (*Client) PerpHistory

func (c *Client) PerpHistory(ctx context.Context, market string, params PerpHistoryParams) (*PerpHistory, error)

func (*Client) PerpLiquidations

func (c *Client) PerpLiquidations(ctx context.Context, params PerpLiquidationsParams) (*PerpLiquidations, error)

func (*Client) PerpStats added in v0.1.1

func (c *Client) PerpStats(ctx context.Context, market string, params PerpStatsParams) (*PerpStats, error)

func (*Client) Perps

func (c *Client) Perps(ctx context.Context, params PerpsParams) (*PairPage, error)

func (*Client) Search

func (c *Client) Search(ctx context.Context, params SearchParams) (*SearchResponse, error)

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*StatusResponse, error)

func (*Client) TokenBatch

func (c *Client) TokenBatch(ctx context.Context, body TokenBatchRequest) (*TokenBatchResponse, error)

func (*Client) TokenBrief

func (c *Client) TokenBrief(ctx context.Context, chain, address string) (*TokenBrief, error)

func (*Client) TokenByAddress

func (c *Client) TokenByAddress(ctx context.Context, chain, address string, params TokenByAddressParams) (*TokenInfo, error)

func (*Client) TokenByID

func (c *Client) TokenByID(ctx context.Context, id string, params TokenByIDParams) (*TokenInfo, error)

func (*Client) TokenBySlug

func (c *Client) TokenBySlug(ctx context.Context, slug string, params TokenBySlugParams) (*TokenInfo, error)

func (*Client) TokenHolders

func (c *Client) TokenHolders(ctx context.Context, chain, address string, params TokenHoldersParams) (*TokenHolderPage, error)

func (*Client) TokenPairs

func (c *Client) TokenPairs(ctx context.Context, chain, address string, params TokenPairsParams) (*PairPage, error)

func (*Client) TokenTraders

func (c *Client) TokenTraders(ctx context.Context, chain, address string, params TokenTradersParams) (*TokenTraderPage, error)

func (*Client) TokenVerdict

func (c *Client) TokenVerdict(ctx context.Context, chain, address string) (*TokenVerdict, error)

func (*Client) TokenVerdictProof

func (c *Client) TokenVerdictProof(ctx context.Context, chain, address string) (*TokenVerdictProof, error)

func (*Client) Tokens

func (c *Client) Tokens(ctx context.Context, params TokensParams) (*TokenPage, error)

func (*Client) Trending

func (c *Client) Trending(ctx context.Context, params TrendingParams) (*PairPage, error)

func (*Client) WalletBestTrades

func (c *Client) WalletBestTrades(ctx context.Context, chain, address string, params WalletBestTradesParams) (*WalletBestTrades, error)

func (*Client) WalletChart

func (c *Client) WalletChart(ctx context.Context, chain, address string, params WalletChartParams) (*WalletChart, error)

func (*Client) WalletFunding

func (c *Client) WalletFunding(ctx context.Context, chain, address string) (*WalletFunding, error)

func (*Client) WalletLabelsBatch

func (c *Client) WalletLabelsBatch(ctx context.Context, body WalletLabelsRequest) (*WalletLabelList, error)

func (*Client) WalletOverview

func (c *Client) WalletOverview(ctx context.Context, address string, params WalletOverviewParams) (*WalletOverview, error)

func (*Client) WalletPositions

func (c *Client) WalletPositions(ctx context.Context, chain, address string, params WalletPositionsParams) (*WalletPositionPage, error)

func (*Client) WalletProfile

func (c *Client) WalletProfile(ctx context.Context, chain, address string) (*WalletProfile, error)

func (*Client) WalletRounds

func (c *Client) WalletRounds(ctx context.Context, chain, address string, params WalletRoundsParams) (*WalletRoundPage, error)

func (*Client) WalletStats

func (c *Client) WalletStats(ctx context.Context, params WalletStatsParams) (*WalletStats, error)

func (*Client) WalletTrades

func (c *Client) WalletTrades(ctx context.Context, chain, address string, params WalletTradesParams) (*WalletTradePage, error)

func (*Client) Wallets

func (c *Client) Wallets(ctx context.Context, params WalletsParams) (*WalletPage, error)

func (*Client) X402Discovery

func (c *Client) X402Discovery(ctx context.Context) (*X402Discovery, error)

type Config

type Config struct {
	Chains          []ChainInfo      `json:"chains"`
	Resolutions     []ResolutionType `json:"resolutions"`
	TxTypes         []TxType         `json:"tx_types"`
	SortOptions     []SortBy         `json:"sort_options"`
	Timeframes      []TimeFrame      `json:"timeframes"`
	MinLiquidityUSD float64          `json:"min_liquidity_usd"`
}

type DecimalString

type DecimalString = string

type DeployerCard

type DeployerCard struct {
	Address       Address             `json:"address"`
	Chains        []ChainSlug         `json:"chains"`
	Reputation    *DeployerReputation `json:"reputation,omitempty"`
	PairsTotal    uint32              `json:"pairs_total"`
	PairsScam     uint32              `json:"pairs_scam"`
	PairsRugged   uint32              `json:"pairs_rugged"`
	PairsHoneypot uint32              `json:"pairs_honeypot"`
	FirstLaunchAt *string             `json:"first_launch_at,omitempty"`
	LastLaunchAt  *string             `json:"last_launch_at,omitempty"`
}

type DeployerLaunchPage

type DeployerLaunchPage struct {
	Items      []PairInfo    `json:"items"`
	NextCursor *string       `json:"next_cursor,omitempty"`
	PrevCursor *string       `json:"prev_cursor,omitempty"`
	Deployer   *DeployerCard `json:"deployer,omitempty"`
}

type DeployerReputation

type DeployerReputation struct {
	Score          uint32         `json:"score"`
	Status         DeployerStatus `json:"status"`
	PairsCreated   *uint32        `json:"pairs_created,omitempty"`
	AbusedLaunches *uint32        `json:"abused_launches,omitempty"`
	FirstSeenAt    *string        `json:"first_seen_at,omitempty"`
}

type DeployerStatus

type DeployerStatus = string

type DeployerTokensParams

type DeployerTokensParams struct {
	Chains []ChainSlug
	Limit  *int32
	Cursor *string
}

type Dex

type Dex struct {
	Name          string       `json:"name"`
	Factory       Address      `json:"factory"`
	FactoryType   *FactoryType `json:"factory_type,omitempty"`
	ChainID       uint32       `json:"chain_id"`
	LPTokenSymbol string       `json:"lp_token_symbol"`
}

type ErrorCode

type ErrorCode string
const (
	ErrorCodeInvalidAPIKey       ErrorCode = "invalid_api_key"
	ErrorCodeKeyInQuery          ErrorCode = "key_in_query"
	ErrorCodePlanRequired        ErrorCode = "plan_required"
	ErrorCodeRateLimited         ErrorCode = "rate_limited"
	ErrorCodeChainNotFound       ErrorCode = "chain_not_found"
	ErrorCodeNotFound            ErrorCode = "not_found"
	ErrorCodeInvalidParam        ErrorCode = "invalid_param"
	ErrorCodeUpstreamUnavailable ErrorCode = "upstream_unavailable"
	ErrorCodeUpstreamTimeout     ErrorCode = "upstream_timeout"
	ErrorCodeInternal            ErrorCode = "internal"
)

type EthereumTxData

type EthereumTxData struct {
	BlockNumber int64   `json:"block_number"`
	LogIndex    int64   `json:"log_index"`
	GasUsed     int64   `json:"gas_used"`
	FeeUSD      float64 `json:"fee_usd"`
}

type FactoryType

type FactoryType string
const (
	FactoryTypeCurveV2     FactoryType = "curveV2"
	FactoryTypeStonfiV1    FactoryType = "stonfiV1"
	FactoryTypeStonfiV2    FactoryType = "stonfiV2"
	FactoryTypeDedustV1    FactoryType = "dedustV1"
	FactoryTypeDedustV2    FactoryType = "dedustV2"
	FactoryTypeUranusV1    FactoryType = "uranusV1"
	FactoryTypeBalancerV2  FactoryType = "balancerV2"
	FactoryTypeUniswapV2   FactoryType = "uniswapV2"
	FactoryTypeUniswapV3   FactoryType = "uniswapV3"
	FactoryTypeUniswapV4   FactoryType = "uniswapV4"
	FactoryTypeHyperliquid FactoryType = "hyperliquid"
)

type FarmApr

type FarmApr struct {
	BaseAPR     DecimalString `json:"base_apr"`
	LPRewardAPR DecimalString `json:"lp_reward_apr"`
}

type FarmFactory

type FarmFactory struct {
	Address Address `json:"address"`
	Name    string  `json:"name"`
}

type FarmInfo

type FarmInfo struct {
	Network          ChainRef           `json:"network"`
	Address          Address            `json:"address"`
	Pid              int64              `json:"pid"`
	Ticker           string             `json:"ticker"`
	TVL              DecimalString      `json:"tvl"`
	RewardToken      FarmRewardToken    `json:"reward_token"`
	APRYear          FarmApr            `json:"apr_year"`
	APRDaily         FarmApr            `json:"apr_daily"`
	Factory          *FarmFactory       `json:"factory,omitempty"`
	UpdatedAt        string             `json:"updated_at"`
	Status           FarmStatus         `json:"status"`
	LifecycleState   *string            `json:"lifecycle_state,omitempty"`
	DataQualityFlags []string           `json:"data_quality_flags,omitempty"`
	Family           *string            `json:"family,omitempty"`
	FarmKey          *string            `json:"farm_key,omitempty"`
	Venue            *string            `json:"venue,omitempty"`
	Verified         *bool              `json:"verified,omitempty"`
	APRDiagnostic    *DecimalString     `json:"apr_diagnostic,omitempty"`
	APRMax           *DecimalString     `json:"apr_max,omitempty"`
	RewardStreams    []FarmRewardStream `json:"reward_streams,omitempty"`
}

type FarmPage

type FarmPage struct {
	Items      []FarmInfo `json:"items"`
	NextCursor *string    `json:"next_cursor,omitempty"`
	PrevCursor *string    `json:"prev_cursor,omitempty"`
}

type FarmRewardStream added in v0.1.1

type FarmRewardStream struct {
	Token    Address        `json:"token"`
	Symbol   string         `json:"symbol"`
	Decimals uint32         `json:"decimals"`
	APR      *DecimalString `json:"apr,omitempty"`
	PriceUSD *DecimalString `json:"price_usd,omitempty"`
	EndAt    *string        `json:"end_at,omitempty"`
	Status   string         `json:"status"`
}

type FarmRewardToken

type FarmRewardToken struct {
	Address Address `json:"address"`
	Name    string  `json:"name"`
	Symbol  string  `json:"symbol"`
	ChainID uint32  `json:"chain_id"`
}

type FarmSortBy

type FarmSortBy string
const (
	FarmSortByTVL       FarmSortBy = "tvl"
	FarmSortByAPR       FarmSortBy = "apr"
	FarmSortByUpdatedAt FarmSortBy = "updated_at"
)

type FarmStatus

type FarmStatus string
const (
	FarmStatusUnverified FarmStatus = "unverified"
	FarmStatusVerified   FarmStatus = "verified"
)

type FarmsParams

type FarmsParams struct {
	Chains    []ChainSlug
	Q         *string
	Factories []Address
	Sort      *FarmSortBy
	Order     *OrderBy
	Limit     *int32
	Cursor    *string
}

type FloatTimeframes

type FloatTimeframes struct {
	M5  float64 `json:"m5"`
	H1  float64 `json:"h1"`
	H6  float64 `json:"h6"`
	H24 float64 `json:"h24"`
}

type HumanScore added in v0.1.1

type HumanScore struct {
	Value  uint32 `json:"value"`
	Status string `json:"status"`
}

type KeyInfo

type KeyInfo struct {
	Name      string           `json:"name"`
	Plan      Plan             `json:"plan"`
	RateLimit KeyInfoRateLimit `json:"rate_limit"`
	MaxLimit  *int32           `json:"max_limit,omitempty"`
}

type KeyInfoRateLimit

type KeyInfoRateLimit struct {
	RequestsPerSecond     int32  `json:"requests_per_second"`
	Burst                 int32  `json:"burst"`
	MaxConcurrentRequests *int32 `json:"max_concurrent_requests,omitempty"`
}

type LaunchStatus

type LaunchStatus string
const (
	LaunchStatusNew       LaunchStatus = "new"
	LaunchStatusBonding   LaunchStatus = "bonding"
	LaunchStatusGraduated LaunchStatus = "graduated"
)

type LaunchpadTokensParams

type LaunchpadTokensParams struct {
	Chain        string
	LaunchStatus *LaunchStatus
	Launchpads   []string
	Limit        *int32
	Cursor       *string
}

type Leaderboard

type Leaderboard struct {
	Scope              LeaderboardScope    `json:"scope"`
	SnapshotAt         *string             `json:"snapshot_at,omitempty"`
	MethodologyVersion *int32              `json:"methodology_version,omitempty"`
	Population         *int32              `json:"population,omitempty"`
	Season             *LeaderboardSeason  `json:"season,omitempty"`
	Items              []LeaderboardEntity `json:"items"`
	Excluded           []LeaderboardEntity `json:"excluded,omitempty"`
}

type LeaderboardEntity

type LeaderboardEntity struct {
	Key             string                    `json:"key"`
	DisplayName     *string                   `json:"display_name,omitempty"`
	Category        *string                   `json:"category,omitempty"`
	Infra           []string                  `json:"infra,omitempty"`
	Chain           *ChainRef                 `json:"chain,omitempty"`
	Rank            *int32                    `json:"rank,omitempty"`
	RankChange24h   *int32                    `json:"rank_change_24h,omitempty"`
	DataState       *string                   `json:"data_state,omitempty"`
	ExclusionReason *string                   `json:"exclusion_reason,omitempty"`
	Badges          []string                  `json:"badges,omitempty"`
	Dimensions      map[string]float64        `json:"dimensions,omitempty"`
	Metrics         *LeaderboardMetrics       `json:"metrics,omitempty"`
	SeasonMetrics   *LeaderboardSeasonMetrics `json:"season_metrics,omitempty"`
}

type LeaderboardGrowth

type LeaderboardGrowth struct {
	Available *bool    `json:"available,omitempty"`
	Volume    *float64 `json:"volume,omitempty"`
	Liquidity *float64 `json:"liquidity,omitempty"`
	Reason    *string  `json:"reason,omitempty"`
}

type LeaderboardMetrics

type LeaderboardMetrics struct {
	Volume24h            *float64           `json:"volume_24h,omitempty"`
	BuyVolume24h         *float64           `json:"buy_volume_24h,omitempty"`
	Liquidity            *float64           `json:"liquidity,omitempty"`
	QualityLiquidity     *float64           `json:"quality_liquidity,omitempty"`
	Pairs                *int64             `json:"pairs,omitempty"`
	TradablePairs        *int64             `json:"tradable_pairs,omitempty"`
	ActivePairs          *int64             `json:"active_pairs,omitempty"`
	PricedPairs          *int64             `json:"priced_pairs,omitempty"`
	NewPairs24h          *int64             `json:"new_pairs_24h,omitempty"`
	ScamPairs            *int64             `json:"scam_pairs,omitempty"`
	Txns24h              *int64             `json:"txns_24h,omitempty"`
	Buyers24h            *int64             `json:"buyers_24h,omitempty"`
	VolumeShare          *float64           `json:"volume_share,omitempty"`
	LiquidityShare       *float64           `json:"liquidity_share,omitempty"`
	CapitalEfficiency    *float64           `json:"capital_efficiency,omitempty"`
	HasCapitalEfficiency *bool              `json:"has_capital_efficiency,omitempty"`
	RiskRate             *float64           `json:"risk_rate,omitempty"`
	SmoothedRisk         *float64           `json:"smoothed_risk,omitempty"`
	WashRate             *float64           `json:"wash_rate,omitempty"`
	LiquidityCoverage    *float64           `json:"liquidity_coverage,omitempty"`
	Growth24h            *LeaderboardGrowth `json:"growth_24h,omitempty"`
	Growth7d             *LeaderboardGrowth `json:"growth_7d,omitempty"`
	HostedVolume24h      *float64           `json:"hosted_volume_24h,omitempty"`
}

type LeaderboardParams

type LeaderboardParams struct {
	Scope    LeaderboardScope
	Chain    *string
	Chains   []ChainSlug
	Seasonal *bool
	Season   *int32
	Limit    *int32
}

type LeaderboardScope

type LeaderboardScope string
const (
	LeaderboardScopeChains    LeaderboardScope = "chains"
	LeaderboardScopeProtocols LeaderboardScope = "protocols"
)

type LeaderboardSeason

type LeaderboardSeason struct {
	Number     *int32  `json:"number,omitempty"`
	StartsAt   *string `json:"starts_at,omitempty"`
	EndsAt     *string `json:"ends_at,omitempty"`
	Live       *bool   `json:"live,omitempty"`
	LengthDays *int32  `json:"length_days,omitempty"`
	Latest     *int32  `json:"latest,omitempty"`
}

type LeaderboardSeasonMetrics

type LeaderboardSeasonMetrics struct {
	Volume           *float64 `json:"volume,omitempty"`
	BuyVolume        *float64 `json:"buy_volume,omitempty"`
	LiquidityLast    *float64 `json:"liquidity_last,omitempty"`
	LiquidityPeak    *float64 `json:"liquidity_peak,omitempty"`
	QualityLiquidity *float64 `json:"quality_liquidity,omitempty"`
	Txns             *int64   `json:"txns,omitempty"`
	Buyers           *int64   `json:"buyers,omitempty"`
	NewPairs         *int64   `json:"new_pairs,omitempty"`
}

type LiquidationDay

type LiquidationDay struct {
	Day                string  `json:"day"`
	LiquidatedLongUSD  float64 `json:"liquidated_long_usd"`
	LiquidatedShortUSD float64 `json:"liquidated_short_usd"`
	LongCount          uint32  `json:"long_count"`
	ShortCount         uint32  `json:"short_count"`
	MaxLiquidationUSD  float64 `json:"max_liquidation_usd"`
}

type LiquidityEventData

type LiquidityEventData struct {
	Tokens       []LiquidityTokenChange `json:"tokens"`
	LiquidityUSD *float64               `json:"liquidity_usd,omitempty"`
}

type LiquidityTokenChange

type LiquidityTokenChange struct {
	Address  Address `json:"address"`
	Symbol   *string `json:"symbol,omitempty"`
	Amount   float64 `json:"amount"`
	PriceUSD float64 `json:"price_usd"`
}

type MarketType

type MarketType string
const (
	MarketTypeAny  MarketType = "any"
	MarketTypeSpot MarketType = "spot"
	MarketTypePerp MarketType = "perp"
)

type NonNegativeDecimalString

type NonNegativeDecimalString = string

type Options

type Options struct {
	HTTPClient       *http.Client
	Header           http.Header
	Payer            Payer
	BaseURL          string
	APIKey           string
	UserAgent        string
	Timeout          time.Duration
	MaxRetryDelay    time.Duration
	MaxRetries       int
	MaxResponseBytes int64
	DisableRetries   bool
}

type OraclePrice

type OraclePrice struct {
	ID          string         `json:"id"`
	Price       DecimalString  `json:"price"`
	Conf        DecimalString  `json:"conf"`
	EmaPrice    *DecimalString `json:"ema_price,omitempty"`
	PublishTime string         `json:"publish_time"`
}

type OraclePriceList

type OraclePriceList struct {
	Items []OraclePrice `json:"items"`
}

type OraclePricesAtParams

type OraclePricesAtParams struct {
	Ids []string
	Ts  int64
}

type OraclePricesParams

type OraclePricesParams struct {
	Ids []string
}

type OrderBy

type OrderBy string
const (
	OrderByAsc  OrderBy = "asc"
	OrderByDesc OrderBy = "desc"
)

type PairBatchItem

type PairBatchItem struct {
	Chain   ChainSlug `json:"chain"`
	Address Address   `json:"address"`
	Found   bool      `json:"found"`
	Pair    *PairInfo `json:"pair,omitempty"`
}

type PairBatchRef

type PairBatchRef struct {
	Chain   ChainSlug `json:"chain"`
	Address Address   `json:"address"`
}

type PairBatchRequest

type PairBatchRequest struct {
	Items []PairBatchRef `json:"items"`
}

type PairBatchResponse

type PairBatchResponse struct {
	Items []PairBatchItem `json:"items"`
}

type PairCandlesParams

type PairCandlesParams struct {
	Res             ResolutionType
	From            int64
	To              int64
	Countback       *int64
	Currency        *string
	PriceFromQuote  *bool
	VolumeFromQuote *bool
}

type PairDeployer

type PairDeployer struct {
	Address     Address             `json:"address"`
	TxHash      *string             `json:"tx_hash,omitempty"`
	BlockNumber *uint32             `json:"block_number,omitempty"`
	LogIndex    *uint32             `json:"log_index,omitempty"`
	Reputation  *DeployerReputation `json:"reputation,omitempty"`
}

type PairInfo

type PairInfo struct {
	Network             ChainRef        `json:"network"`
	Dex                 Dex             `json:"dex"`
	PairAddress         Address         `json:"pair_address"`
	PropData            *PairPropData   `json:"prop_data,omitempty"`
	Status              *PairStatus     `json:"status,omitempty"`
	Score               *PairScore      `json:"score,omitempty"`
	Deployer            *PairDeployer   `json:"deployer,omitempty"`
	Security            *PairSecurity   `json:"security,omitempty"`
	Verdict             *PairVerdict    `json:"verdict,omitempty"`
	Ticker              string          `json:"ticker"`
	PairFee             float64         `json:"pair_fee"`
	Tokens              []Token         `json:"tokens"`
	Txn                 TxnTimeframes   `json:"txn"`
	Volume              FloatTimeframes `json:"volume"`
	PriceChange         FloatTimeframes `json:"price_change"`
	LiquidityUSD        float64         `json:"liquidity_usd"`
	LiquidityOnchainUSD *float64        `json:"liquidity_onchain_usd,omitempty"`
	APR                 *float64        `json:"apr,omitempty"`
	FeesUSD24h          *float64        `json:"fees_usd_24h,omitempty"`
	LastUpdatedAt       string          `json:"last_updated_at"`
	CreatedAt           string          `json:"created_at"`
	LastTradeAt         *string         `json:"last_trade_at,omitempty"`
	PriceNative         *float64        `json:"price_native,omitempty"`
	Windows             *PairWindows    `json:"windows,omitempty"`
	Launchpad           *PairLaunchpad  `json:"launchpad,omitempty"`
	Safety              *PairSafety     `json:"safety,omitempty"`
}

type PairLaunchpad

type PairLaunchpad struct {
	Name         string   `json:"name"`
	Protocol     *string  `json:"protocol,omitempty"`
	Stage        string   `json:"stage"`
	CompletedAt  *string  `json:"completed_at,omitempty"`
	MigratedPool *Address `json:"migrated_pool,omitempty"`
}

type PairPage

type PairPage struct {
	Items            []PairInfo  `json:"items"`
	NextCursor       *string     `json:"next_cursor,omitempty"`
	PrevCursor       *string     `json:"prev_cursor,omitempty"`
	AppliedSort      *SortBy     `json:"applied_sort,omitempty"`
	AppliedTimeframe *TimeFrame  `json:"applied_timeframe,omitempty"`
	ExcludedChains   []ChainSlug `json:"excluded_chains,omitempty"`
}

type PairPropData

type PairPropData struct {
	IsPerp         *bool       `json:"is_perp,omitempty"`
	IsHoneypot     *bool       `json:"is_honeypot,omitempty"`
	SpotDisabled   *bool       `json:"spot_disabled,omitempty"`
	PerpDisabled   *bool       `json:"perp_disabled,omitempty"`
	BuyTax         *float64    `json:"buy_tax,omitempty"`
	SellTax        *float64    `json:"sell_tax,omitempty"`
	LiquidityRange *ValueRange `json:"liquidity_range,omitempty"`
	Perp           *PerpMarket `json:"perp,omitempty"`
}

type PairSafety

type PairSafety struct {
	IsHoneypot  bool             `json:"is_honeypot"`
	BuyTax      *float64         `json:"buy_tax,omitempty"`
	SellTax     *float64         `json:"sell_tax,omitempty"`
	LPLockedPct *float64         `json:"lp_locked_pct,omitempty"`
	LPBurnedPct *float64         `json:"lp_burned_pct,omitempty"`
	Score       uint32           `json:"score"`
	Labels      []RiskSignalKind `json:"labels"`
}

type PairScore

type PairScore struct {
	Value       uint32       `json:"value"`
	Title       string       `json:"title"`
	UpdatedAt   *string      `json:"updated_at,omitempty"`
	RiskSignals []RiskSignal `json:"risk_signals,omitempty"`
}

type PairSecurity

type PairSecurity struct {
	BurnedPct        float64 `json:"burned_pct"`
	LockedPct        float64 `json:"locked_pct"`
	TopLockProvider  *string `json:"top_lock_provider,omitempty"`
	EarliestUnlockAt *string `json:"earliest_unlock_at,omitempty"`
	CheckedAt        *string `json:"checked_at,omitempty"`
}

type PairStatus

type PairStatus string
const (
	PairStatusActive     PairStatus = "active"
	PairStatusVerified   PairStatus = "verified"
	PairStatusUnresolved PairStatus = "unresolved"
	PairStatusScam       PairStatus = "scam"
)

type PairTradesParams

type PairTradesParams struct {
	TxType []TxType
	Maker  *Address
	From   *int64
	To     *int64
	Order  *OrderBy
	Limit  *int32
	Cursor *string
}

type PairVerdict

type PairVerdict struct {
	Status VerdictStatus `json:"status"`
}

type PairWindow

type PairWindow struct {
	PriceChangePct *float64 `json:"price_change_pct,omitempty"`
	VolumeUSD      float64  `json:"volume_usd"`
	BuyVolumeUSD   float64  `json:"buy_volume_usd"`
	SellVolumeUSD  float64  `json:"sell_volume_usd"`
	Txns           TxnCount `json:"txns"`
	Buyers         uint32   `json:"buyers"`
	Sellers        uint32   `json:"sellers"`
}

type PairWindows

type PairWindows struct {
	M5  *PairWindow `json:"m5,omitempty"`
	H1  *PairWindow `json:"h1,omitempty"`
	H6  *PairWindow `json:"h6,omitempty"`
	H24 *PairWindow `json:"h24,omitempty"`
}

type PairsNewParams

type PairsNewParams struct {
	Chain           string
	MinLiquidityUSD *float64
	MaxAgeSeconds   *uint32
	Limit           *int32
	Cursor          *string
}

type PairsParams

type PairsParams struct {
	Chains           []ChainSlug
	Q                *string
	Protocols        []FactoryType
	DexNames         []string
	MinLiquidityUSD  *float64
	MaxLiquidityUSD  *float64
	MinAPR           *float64
	MaxAPR           *float64
	MinScore         *uint32
	MaxScore         *uint32
	MinAgeSeconds    *uint32
	MaxAgeSeconds    *uint32
	MarketType       *MarketType
	OnlyTrustable    *bool
	MaxDeployedPairs *uint32
	Sort             *SortBy
	Order            *OrderBy
	Timeframe        *TimeFrame
	Limit            *int32
	Cursor           *string
}

type Payer

type Payer interface {
	Networks() []string
	Sign(ctx context.Context, p PaymentContext) (PaymentSignature, error)
}

func NewPayer

func NewPayer(networks []string, sign func(context.Context, PaymentContext) (PaymentSignature, error)) Payer

type PaymentContext

type PaymentContext struct {
	Required    PaymentRequired
	Requirement PaymentRequirements
	Operation   string
	Method      string
	URL         string
	PaymentID   string
}

type PaymentError

type PaymentError struct {
	Err       error
	Required  *PaymentRequired
	Operation string
	Reason    string
}

func (*PaymentError) Error

func (e *PaymentError) Error() string

func (*PaymentError) Unwrap

func (e *PaymentError) Unwrap() error

type PaymentReceipt

type PaymentReceipt struct {
	Transaction string `json:"transaction"`
	Network     string `json:"network"`
	Payer       string `json:"payer,omitempty"`
	ErrorReason string `json:"errorReason,omitempty"`
	Success     bool   `json:"success"`
}

type PaymentRequired

type PaymentRequired struct {
	X402Version int32                 `json:"x402Version"`
	Error       *string               `json:"error,omitempty"`
	Accepts     []PaymentRequirements `json:"accepts"`
	Resource    *PaymentResource      `json:"resource,omitempty"`
	Extensions  map[string]any        `json:"extensions,omitempty"`
}

type PaymentRequirements

type PaymentRequirements struct {
	Scheme            string         `json:"scheme"`
	Network           string         `json:"network"`
	Amount            string         `json:"amount"`
	Asset             string         `json:"asset"`
	PayTo             string         `json:"payTo"`
	MaxAmountRequired string         `json:"maxAmountRequired"`
	Resource          *string        `json:"resource,omitempty"`
	Description       *string        `json:"description,omitempty"`
	MimeType          *string        `json:"mimeType,omitempty"`
	MaxTimeoutSeconds int32          `json:"maxTimeoutSeconds"`
	Extra             map[string]any `json:"extra,omitempty"`
}

type PaymentResource

type PaymentResource struct {
	URL         string  `json:"url"`
	Description *string `json:"description,omitempty"`
	MimeType    *string `json:"mimeType,omitempty"`
	ServiceName *string `json:"serviceName,omitempty"`
}

type PaymentSignature

type PaymentSignature struct {
	Payload map[string]any
	Header  string
}

type PerpAction added in v0.1.1

type PerpAction string
const (
	PerpActionOpenLong   PerpAction = "open_long"
	PerpActionCloseLong  PerpAction = "close_long"
	PerpActionOpenShort  PerpAction = "open_short"
	PerpActionCloseShort PerpAction = "close_short"
	PerpActionFlipLong   PerpAction = "flip_long"
	PerpActionFlipShort  PerpAction = "flip_short"
)

type PerpFlow added in v0.1.1

type PerpFlow struct {
	OpenLongUSD        float64 `json:"open_long_usd"`
	CloseLongUSD       float64 `json:"close_long_usd"`
	OpenShortUSD       float64 `json:"open_short_usd"`
	CloseShortUSD      float64 `json:"close_short_usd"`
	LiquidatedLongUSD  float64 `json:"liquidated_long_usd"`
	LiquidatedShortUSD float64 `json:"liquidated_short_usd"`
	Liquidations       uint32  `json:"liquidations"`
}

type PerpHistory

type PerpHistory struct {
	Chain    ChainRef    `json:"chain"`
	Market   Address     `json:"market"`
	Interval string      `json:"interval"`
	Items    []PerpPoint `json:"items"`
}

type PerpHistoryParams

type PerpHistoryParams struct {
	Chain    *string
	From     *int64
	To       *int64
	Interval *string
}

type PerpLiquidations

type PerpLiquidations struct {
	Chain  ChainRef         `json:"chain"`
	Market *Address         `json:"market,omitempty"`
	Stale  bool             `json:"stale"`
	Items  []LiquidationDay `json:"items"`
}

type PerpLiquidationsParams

type PerpLiquidationsParams struct {
	Chain  *string
	Market *Address
	From   *int64
	To     *int64
}

type PerpMarket

type PerpMarket struct {
	MaxLeverage       *uint32  `json:"max_leverage,omitempty"`
	OnlyIsolated      *bool    `json:"only_isolated,omitempty"`
	FundingRate       *float64 `json:"funding_rate,omitempty"`
	OpenInterest      *float64 `json:"open_interest,omitempty"`
	OpenInterestUSD   *float64 `json:"open_interest_usd,omitempty"`
	MarkPrice         *float64 `json:"mark_price,omitempty"`
	OraclePrice       *float64 `json:"oracle_price,omitempty"`
	Premium           *float64 `json:"premium,omitempty"`
	DayNotionalVolume *float64 `json:"day_notional_volume,omitempty"`
	FundingLong1h     *float64 `json:"funding_long_1h,omitempty"`
	FundingShort1h    *float64 `json:"funding_short_1h,omitempty"`
	BorrowLong1h      *float64 `json:"borrow_long_1h,omitempty"`
	BorrowShort1h     *float64 `json:"borrow_short_1h,omitempty"`
	OiLongUSD         *float64 `json:"oi_long_usd,omitempty"`
	OiShortUSD        *float64 `json:"oi_short_usd,omitempty"`
	SyncedAt          *string  `json:"synced_at,omitempty"`
}

type PerpPoint

type PerpPoint struct {
	Timestamp      string   `json:"timestamp"`
	MarkPrice      float64  `json:"mark_price"`
	OraclePrice    float64  `json:"oracle_price"`
	Premium        float64  `json:"premium"`
	OiUSD          float64  `json:"oi_usd"`
	OiLongUSD      float64  `json:"oi_long_usd"`
	OiShortUSD     float64  `json:"oi_short_usd"`
	FundingLong1h  float64  `json:"funding_long_1h"`
	FundingShort1h float64  `json:"funding_short_1h"`
	BorrowLong1h   *float64 `json:"borrow_long_1h,omitempty"`
	BorrowShort1h  *float64 `json:"borrow_short_1h,omitempty"`
	OiKnown        bool     `json:"oi_known"`
}

type PerpSortBy

type PerpSortBy string
const (
	PerpSortByVolume       PerpSortBy = "volume"
	PerpSortByTransactions PerpSortBy = "transactions"
	PerpSortByPriceChange  PerpSortBy = "price_change"
	PerpSortByTrending     PerpSortBy = "trending"
	PerpSortByCreatedAt    PerpSortBy = "created_at"
)

type PerpStats added in v0.1.1

type PerpStats struct {
	M5                    PerpFlow `json:"m5"`
	H1                    PerpFlow `json:"h1"`
	H6                    PerpFlow `json:"h6"`
	H24                   PerpFlow `json:"h24"`
	OpenInterestUSD24hAgo *float64 `json:"open_interest_usd_24h_ago,omitempty"`
	MaxLiquidationUSD24h  *float64 `json:"max_liquidation_usd_24h,omitempty"`
	LiquidationsStale     bool     `json:"liquidations_stale"`
}

type PerpStatsParams added in v0.1.1

type PerpStatsParams struct {
	Chain *string
}

type PerpsParams

type PerpsParams struct {
	Chains    []ChainSlug
	Q         *string
	Sort      *PerpSortBy
	Order     *OrderBy
	Timeframe *TimeFrame
	Limit     *int32
	Cursor    *string
}

type Plan

type Plan string
const (
	PlanFree       Plan = "free"
	PlanStartup    Plan = "startup"
	PlanUnicorn    Plan = "unicorn"
	PlanEnterprise Plan = "enterprise"
)

type PositionSortBy

type PositionSortBy string
const (
	PositionSortByToken         PositionSortBy = "token"
	PositionSortByRealizedPnl   PositionSortBy = "realized_pnl"
	PositionSortByUnrealizedPnl PositionSortBy = "unrealized_pnl"
	PositionSortByHold          PositionSortBy = "hold"
)

type PositionState

type PositionState string
const (
	PositionStateAny    PositionState = "any"
	PositionStateOpen   PositionState = "open"
	PositionStateClosed PositionState = "closed"
)

type Problem

type Problem struct {
	Type      string    `json:"type"`
	Title     string    `json:"title"`
	Status    int32     `json:"status"`
	Code      ErrorCode `json:"code"`
	Detail    *string   `json:"detail,omitempty"`
	Param     *string   `json:"param,omitempty"`
	RequestID string    `json:"request_id"`
}

type RateLimit

type RateLimit struct {
	Policy     string
	Limit      int
	Remaining  int
	Reset      time.Duration
	RetryAfter time.Duration
	Known      bool
}

type ReasonSlug

type ReasonSlug string
const (
	ReasonSlugHoneypot           ReasonSlug = "honeypot"
	ReasonSlugUnresolvedMetadata ReasonSlug = "unresolved_metadata"
	ReasonSlugDuplicateSymbol    ReasonSlug = "duplicate_symbol"
	ReasonSlugLPUnlocked         ReasonSlug = "lp_unlocked"
	ReasonSlugOwnerCanMint       ReasonSlug = "owner_can_mint"
	ReasonSlugSellBlocked        ReasonSlug = "sell_blocked"
	ReasonSlugHighTax            ReasonSlug = "high_tax"
	ReasonSlugDeployerRug        ReasonSlug = "deployer_rug"
)

type ResolutionType

type ResolutionType string
const (
	ResolutionType1   ResolutionType = "1"
	ResolutionType3   ResolutionType = "3"
	ResolutionType5   ResolutionType = "5"
	ResolutionType15  ResolutionType = "15"
	ResolutionType30  ResolutionType = "30"
	ResolutionType45  ResolutionType = "45"
	ResolutionType1H  ResolutionType = "1H"
	ResolutionType2H  ResolutionType = "2H"
	ResolutionType4H  ResolutionType = "4H"
	ResolutionType6H  ResolutionType = "6H"
	ResolutionType12H ResolutionType = "12H"
	ResolutionType1D  ResolutionType = "1D"
	ResolutionType1W  ResolutionType = "1W"
	ResolutionType1M  ResolutionType = "1M"
	ResolutionType6M  ResolutionType = "6M"
	ResolutionType1Y  ResolutionType = "1Y"
)

type ResponseInfo

type ResponseInfo struct {
	Payment   *PaymentReceipt
	Operation string
	RequestID string
	RateLimit RateLimit
	Status    int
}

type RiskSignal

type RiskSignal struct {
	Kind       RiskSignalKind     `json:"kind"`
	Weight     float64            `json:"weight"`
	Group      RiskSignalGroup    `json:"group"`
	Severity   RiskSignalSeverity `json:"severity"`
	ObservedAt *string            `json:"observed_at,omitempty"`
}

type RiskSignalGroup

type RiskSignalGroup string
const (
	RiskSignalGroupCannotExit        RiskSignalGroup = "cannot_exit"
	RiskSignalGroupCanBeSeized       RiskSignalGroup = "can_be_seized"
	RiskSignalGroupExitIsTaxed       RiskSignalGroup = "exit_is_taxed"
	RiskSignalGroupLiquidityCanLeave RiskSignalGroup = "liquidity_can_leave"
	RiskSignalGroupOperatorRecord    RiskSignalGroup = "operator_record"
	RiskSignalGroupUnverified        RiskSignalGroup = "unverified"
)

type RiskSignalKind

type RiskSignalKind = string

type RiskSignalSeverity

type RiskSignalSeverity string
const (
	RiskSignalSeverityCritical RiskSignalSeverity = "critical"
	RiskSignalSeverityWarning  RiskSignalSeverity = "warning"
	RiskSignalSeverityInfo     RiskSignalSeverity = "info"
)

type ScammerScore

type ScammerScore struct {
	Value uint32 `json:"value"`
	Band  string `json:"band"`
}

type SearchPair

type SearchPair struct {
	PairAddress    Address   `json:"pair_address"`
	Network        ChainSlug `json:"network"`
	Ticker         string    `json:"ticker"`
	BaseSymbol     *string   `json:"base_symbol,omitempty"`
	QuoteSymbol    *string   `json:"quote_symbol,omitempty"`
	DexName        *string   `json:"dex_name,omitempty"`
	LiquidityUSD   *float64  `json:"liquidity_usd,omitempty"`
	PriceUSD       *float64  `json:"price_usd,omitempty"`
	PriceChange24h *float64  `json:"price_change_24h,omitempty"`
}

type SearchParams

type SearchParams struct {
	Q      string
	Chains []ChainSlug
	Limit  *int32
}

type SearchResponse

type SearchResponse struct {
	Tokens []SearchToken `json:"tokens"`
	Pairs  []SearchPair  `json:"pairs"`
}

type SearchToken

type SearchToken struct {
	Address        Address   `json:"address"`
	Network        ChainSlug `json:"network"`
	Symbol         string    `json:"symbol"`
	Name           *string   `json:"name,omitempty"`
	PriceUSD       *float64  `json:"price_usd,omitempty"`
	PriceChange24h *float64  `json:"price_change_24h,omitempty"`
	LogoURL        *string   `json:"logo_url,omitempty"`
}

type SortBy

type SortBy string
const (
	SortByLiquidity    SortBy = "liquidity"
	SortByUpdatedAt    SortBy = "updated_at"
	SortByCreatedAt    SortBy = "created_at"
	SortByScore        SortBy = "score"
	SortByPopular      SortBy = "popular"
	SortByHottest      SortBy = "hottest"
	SortByTrending     SortBy = "trending"
	SortByVolume       SortBy = "volume"
	SortByTransactions SortBy = "transactions"
	SortByPriceChange  SortBy = "price_change"
	SortByAPR          SortBy = "apr"
)

type StatusResponse

type StatusResponse struct {
	Status   string   `json:"status"`
	Degraded []string `json:"degraded,omitempty"`
}

type SwapEventData

type SwapEventData struct {
	Amount0   float64 `json:"amount0"`
	Amount1   float64 `json:"amount1"`
	Price0    float64 `json:"price0"`
	Price1    float64 `json:"price1"`
	PriceUSD0 float64 `json:"price_usd0"`
	PriceUSD1 float64 `json:"price_usd1"`
}

type TimeFrame

type TimeFrame string
const (
	TimeFrame5m  TimeFrame = "5m"
	TimeFrame1h  TimeFrame = "1h"
	TimeFrame6h  TimeFrame = "6h"
	TimeFrame24h TimeFrame = "24h"
)

type Token

type Token struct {
	Name        string       `json:"name"`
	Symbol      string       `json:"symbol"`
	Address     Address      `json:"address"`
	Status      *TokenStatus `json:"status,omitempty"`
	ChainID     uint32       `json:"chain_id"`
	PriceUSD    float64      `json:"price_usd"`
	PriceNative float64      `json:"price_native"`
	Position    uint32       `json:"position"`
	Decimals    uint32       `json:"decimals"`
	Reserve     float64      `json:"reserve"`
	TotalSupply float64      `json:"total_supply"`
	PriceRange  *ValueRange  `json:"price_range,omitempty"`
}

type TokenAddress

type TokenAddress = string

type TokenBatchItem

type TokenBatchItem struct {
	Chain   ChainSlug    `json:"chain"`
	Address TokenAddress `json:"address"`
	Found   bool         `json:"found"`
	Token   *TokenInfo   `json:"token,omitempty"`
}

type TokenBatchRef

type TokenBatchRef struct {
	Chain   ChainSlug    `json:"chain"`
	Address TokenAddress `json:"address"`
}

type TokenBatchRequest

type TokenBatchRequest struct {
	Items []TokenBatchRef `json:"items"`
}

type TokenBatchResponse

type TokenBatchResponse struct {
	Items []TokenBatchItem `json:"items"`
}

type TokenBrief

type TokenBrief struct {
	Chain     ChainSlug      `json:"chain"`
	AsOf      string         `json:"as_of"`
	Source    string         `json:"source"`
	Verdict   TokenVerdict   `json:"verdict"`
	Score     BriefScore     `json:"score"`
	Liquidity BriefLiquidity `json:"liquidity"`
	Market    BriefMarket    `json:"market"`
	Holders   *BriefHolders  `json:"holders,omitempty"`
	Deployer  *BriefDeployer `json:"deployer,omitempty"`
	Flags     []string       `json:"flags"`
}

type TokenByAddressParams

type TokenByAddressParams struct {
	IncludeInstances *bool
	IncludeMarket    *bool
}

type TokenByIDParams

type TokenByIDParams struct {
	IncludeInstances *bool
	IncludeMarket    *bool
}

type TokenBySlugParams

type TokenBySlugParams struct {
	IncludeInstances *bool
	IncludeMarket    *bool
}

type TokenCategory

type TokenCategory string
const (
	TokenCategoryUnknown       TokenCategory = "unknown"
	TokenCategoryNative        TokenCategory = "native"
	TokenCategoryDefault       TokenCategory = "default"
	TokenCategoryStablecoinUSD TokenCategory = "stablecoin-usd"
	TokenCategoryWrapped       TokenCategory = "wrapped"
	TokenCategoryMeme          TokenCategory = "meme"
)

type TokenHolder

type TokenHolder struct {
	Address    Address       `json:"address"`
	Balance    float64       `json:"balance"`
	SharePct   *float64      `json:"share_pct,omitempty"`
	Tier       *WalletTier   `json:"tier,omitempty"`
	WalletType *WalletType   `json:"wallet_type,omitempty"`
	Labels     []WalletLabel `json:"labels"`
	FirstBuyAt *string       `json:"first_buy_at,omitempty"`
}

type TokenHolderPage

type TokenHolderPage struct {
	Items       []TokenHolder     `json:"items"`
	NextCursor  *string           `json:"next_cursor,omitempty"`
	PrevCursor  *string           `json:"prev_cursor,omitempty"`
	HolderStats *TokenHolderStats `json:"holder_stats,omitempty"`
}

type TokenHolderStats

type TokenHolderStats struct {
	Count     int32   `json:"count"`
	Top10Pct  float64 `json:"top10_pct"`
	UpdatedAt *string `json:"updated_at,omitempty"`
}

type TokenHoldersParams

type TokenHoldersParams struct {
	Limit  *int32
	Cursor *string
}

type TokenInfo

type TokenInfo struct {
	ID                 string                 `json:"id"`
	Slug               string                 `json:"slug"`
	Symbol             string                 `json:"symbol"`
	Name               string                 `json:"name"`
	Description        *string                `json:"description,omitempty"`
	Status             CanonicalTokenStatus   `json:"status"`
	Confidence         int32                  `json:"confidence"`
	Category           TokenCategory          `json:"category"`
	Rank               *int32                 `json:"rank,omitempty"`
	LogoURL            *string                `json:"logo_url,omitempty"`
	Market             *TokenMarketProjection `json:"market,omitempty"`
	Instances          []TokenInstance        `json:"instances,omitempty"`
	Chain              *ChainRef              `json:"chain,omitempty"`
	Address            *string                `json:"address,omitempty"`
	Decimals           *uint32                `json:"decimals,omitempty"`
	Score              *uint32                `json:"score,omitempty"`
	Categories         []string               `json:"categories,omitempty"`
	PriceUSD           *float64               `json:"price_usd,omitempty"`
	PriceChange1h      *float64               `json:"price_change_1h,omitempty"`
	PriceChange6h      *float64               `json:"price_change_6h,omitempty"`
	PriceChange24h     *float64               `json:"price_change_24h,omitempty"`
	Volume24h          *float64               `json:"volume_24h,omitempty"`
	Txns24h            *uint32                `json:"txns_24h,omitempty"`
	LiquidityUSD       *float64               `json:"liquidity_usd,omitempty"`
	PairsCount         *uint32                `json:"pairs_count,omitempty"`
	FDVUSD             *float64               `json:"fdv_usd,omitempty"`
	MarketCapUSD       *float64               `json:"market_cap_usd,omitempty"`
	MarketCapEstimated *bool                  `json:"market_cap_estimated,omitempty"`
	TotalSupply        *float64               `json:"total_supply,omitempty"`
	MaxSupply          *float64               `json:"max_supply,omitempty"`
	CirculatingSupply  *float64               `json:"circulating_supply,omitempty"`
	Holders            *uint32                `json:"holders,omitempty"`
	LaunchedAt         *string                `json:"launched_at,omitempty"`
	Rating             *TokenRating           `json:"rating,omitempty"`
	MainPair           *TokenMainPair         `json:"main_pair,omitempty"`
	Launch             *TokenLaunch           `json:"launch,omitempty"`
	Windows            *TokenWindows          `json:"windows,omitempty"`
	HolderStats        *TokenHolderStats      `json:"holder_stats,omitempty"`
	Profile            *TokenProfile          `json:"profile,omitempty"`
}

type TokenInstance

type TokenInstance struct {
	ID               string                 `json:"id"`
	ChainID          int32                  `json:"chain_id"`
	Address          string                 `json:"address"`
	Decimals         *int32                 `json:"decimals,omitempty"`
	Status           CanonicalTokenStatus   `json:"status"`
	RiskScore        *int32                 `json:"risk_score,omitempty"`
	ContractVerified *bool                  `json:"contract_verified,omitempty"`
	Market           *TokenMarketProjection `json:"market,omitempty"`
}

type TokenLaunch

type TokenLaunch struct {
	Deployer    string  `json:"deployer"`
	TxHash      string  `json:"tx_hash"`
	BlockNumber uint64  `json:"block_number"`
	DeployedAt  *string `json:"deployed_at,omitempty"`
}

type TokenListIncludes

type TokenListIncludes struct {
	Instances bool `json:"instances"`
	Market    bool `json:"market"`
}

type TokenMainPair

type TokenMainPair struct {
	Address string `json:"address"`
	Ticker  string `json:"ticker"`
}

type TokenMarketMetrics

type TokenMarketMetrics struct {
	PriceUSD          *NonNegativeDecimalString `json:"price_usd,omitempty"`
	LiquidityUSD      *NonNegativeDecimalString `json:"liquidity_usd,omitempty"`
	MarketCapUSD      *NonNegativeDecimalString `json:"market_cap_usd,omitempty"`
	FDVUSD            *NonNegativeDecimalString `json:"fdv_usd,omitempty"`
	CirculatingSupply *NonNegativeDecimalString `json:"circulating_supply,omitempty"`
	TotalSupply       *NonNegativeDecimalString `json:"total_supply,omitempty"`
	HoldersCount      *int64                    `json:"holders_count,omitempty"`
}

type TokenMarketProjection

type TokenMarketProjection struct {
	ObservedAt    string                       `json:"observed_at"`
	ExpiresAt     string                       `json:"expires_at"`
	Metrics       TokenMarketMetrics           `json:"metrics"`
	Windows       map[string]TokenMetricWindow `json:"windows"`
	PrimaryMarket *TokenPrimaryMarket          `json:"primary_market,omitempty"`
}

type TokenMetricWindow

type TokenMetricWindow struct {
	PriceChangePercent *DecimalString            `json:"price_change_percent,omitempty"`
	VolumeUSD          *NonNegativeDecimalString `json:"volume_usd,omitempty"`
	Buys               *int64                    `json:"buys,omitempty"`
	Sells              *int64                    `json:"sells,omitempty"`
	Transactions       *int64                    `json:"transactions,omitempty"`
}

type TokenMover

type TokenMover struct {
	TokenAddress Address  `json:"token_address"`
	Symbol       *string  `json:"symbol,omitempty"`
	Buys         *int64   `json:"buys,omitempty"`
	BuyUSD       *float64 `json:"buy_usd,omitempty"`
	Buyers       *int64   `json:"buyers,omitempty"`
}

type TokenPage

type TokenPage struct {
	Items      []TokenInfo       `json:"items"`
	NextCursor *string           `json:"next_cursor,omitempty"`
	PrevCursor *string           `json:"prev_cursor,omitempty"`
	Includes   TokenListIncludes `json:"includes"`
}

type TokenPairsParams

type TokenPairsParams struct {
	Limit *int32
}

type TokenPrimaryMarket

type TokenPrimaryMarket struct {
	ChainID      int32                     `json:"chain_id"`
	PairAddress  string                    `json:"pair_address"`
	DexID        string                    `json:"dex_id"`
	LiquidityUSD *NonNegativeDecimalString `json:"liquidity_usd,omitempty"`
}

type TokenProfile

type TokenProfile struct {
	ImageURL         *string       `json:"image_url,omitempty"`
	Websites         []string      `json:"websites"`
	Socials          *TokenSocials `json:"socials,omitempty"`
	Verified         bool          `json:"verified"`
	VerificationTier *string       `json:"verification_tier,omitempty"`
	VerifiedBy       []string      `json:"verified_by,omitempty"`
}

type TokenRating

type TokenRating struct {
	Score     uint32 `json:"score"`
	Safety    uint32 `json:"safety"`
	Liquidity uint32 `json:"liquidity"`
	Activity  uint32 `json:"activity"`
	Holders   uint32 `json:"holders"`
	AgeInfo   uint32 `json:"age_info"`
}

type TokenSocials

type TokenSocials struct {
	Twitter  []string `json:"twitter,omitempty"`
	Telegram []string `json:"telegram,omitempty"`
	Discord  []string `json:"discord,omitempty"`
	Github   []string `json:"github,omitempty"`
	Docs     []string `json:"docs,omitempty"`
}

type TokenSortBy

type TokenSortBy string
const (
	TokenSortByMarketCap   TokenSortBy = "market_cap"
	TokenSortByVolume      TokenSortBy = "volume"
	TokenSortByLiquidity   TokenSortBy = "liquidity"
	TokenSortByPriceChange TokenSortBy = "price_change"
	TokenSortByCreatedAt   TokenSortBy = "created_at"
	TokenSortByHolders     TokenSortBy = "holders"
	TokenSortByRating      TokenSortBy = "rating"
	TokenSortByFDV         TokenSortBy = "fdv"
	TokenSortByTxns        TokenSortBy = "txns"
)

type TokenStatus

type TokenStatus string
const (
	TokenStatusActive     TokenStatus = "active"
	TokenStatusVerified   TokenStatus = "verified"
	TokenStatusUnresolved TokenStatus = "unresolved"
	TokenStatusScam       TokenStatus = "scam"
)

type TokenTrader

type TokenTrader struct {
	Address          Address       `json:"address"`
	Tier             *WalletTier   `json:"tier,omitempty"`
	WalletType       *WalletType   `json:"wallet_type,omitempty"`
	Labels           []WalletLabel `json:"labels"`
	RealizedPnlUSD   float64       `json:"realized_pnl_usd"`
	UnrealizedPnlUSD float64       `json:"unrealized_pnl_usd"`
	BoughtUSD        float64       `json:"bought_usd"`
	SoldUSD          float64       `json:"sold_usd"`
	Balance          float64       `json:"balance"`
	Buys             uint32        `json:"buys"`
	Sells            uint32        `json:"sells"`
	AvgEntryPrice    *float64      `json:"avg_entry_price,omitempty"`
	AvgExitPrice     *float64      `json:"avg_exit_price,omitempty"`
	FirstBuyAt       *string       `json:"first_buy_at,omitempty"`
	LastSellAt       *string       `json:"last_sell_at,omitempty"`
	Exited           bool          `json:"exited"`
}

type TokenTraderPage

type TokenTraderPage struct {
	Items      []TokenTrader `json:"items"`
	NextCursor *string       `json:"next_cursor,omitempty"`
	PrevCursor *string       `json:"prev_cursor,omitempty"`
}

type TokenTraderSortBy

type TokenTraderSortBy string
const (
	TokenTraderSortByRealizedPnl TokenTraderSortBy = "realized_pnl"
	TokenTraderSortByBought      TokenTraderSortBy = "bought"
	TokenTraderSortByHolding     TokenTraderSortBy = "holding"
)

type TokenTradersParams

type TokenTradersParams struct {
	Sort   *TokenTraderSortBy
	State  *PositionState
	Limit  *int32
	Cursor *string
}

type TokenVerdict

type TokenVerdict struct {
	TokenAddress  Address       `json:"token_address"`
	Chain         ChainSlug     `json:"chain"`
	ChainID       uint32        `json:"chain_id"`
	Status        VerdictStatus `json:"status"`
	Reasons       []ReasonSlug  `json:"reasons"`
	ReasonBits    uint32        `json:"reason_bits"`
	VerdictAt     *string       `json:"verdict_at,omitempty"`
	SignedAt      *string       `json:"signed_at,omitempty"`
	ExpiresAt     *string       `json:"expires_at,omitempty"`
	Signature     *string       `json:"signature,omitempty"`
	Signer        *string       `json:"signer,omitempty"`
	OracleAddress *string       `json:"oracle_address,omitempty"`
}

type TokenVerdictProof

type TokenVerdictProof struct {
	TokenAddress Address       `json:"token_address"`
	Chain        ChainSlug     `json:"chain"`
	ChainID      uint32        `json:"chain_id"`
	Epoch        uint64        `json:"epoch"`
	Root         string        `json:"root"`
	Proof        []string      `json:"proof"`
	Status       VerdictStatus `json:"status"`
}

type TokenWindow

type TokenWindow struct {
	PriceChangePct     *float64 `json:"price_change_pct,omitempty"`
	VolumeUSD          float64  `json:"volume_usd"`
	BuyVolumeUSD       float64  `json:"buy_volume_usd"`
	SellVolumeUSD      float64  `json:"sell_volume_usd"`
	Txns               TxnCount `json:"txns"`
	Buyers             uint32   `json:"buyers"`
	Sellers            uint32   `json:"sellers"`
	Makers             uint32   `json:"makers"`
	MakersMainPairOnly bool     `json:"makers_main_pair_only"`
}

type TokenWindows

type TokenWindows struct {
	M5  *TokenWindow `json:"m5,omitempty"`
	H1  *TokenWindow `json:"h1,omitempty"`
	H6  *TokenWindow `json:"h6,omitempty"`
	H24 *TokenWindow `json:"h24,omitempty"`
}

type TokensParams

type TokensParams struct {
	Q                *string
	Chains           []ChainSlug
	Categories       []string
	Sort             *TokenSortBy
	Order            *OrderBy
	MinLiquidityUSD  *float64
	MaxLiquidityUSD  *float64
	MinVolumeUSD     *float64
	MaxVolumeUSD     *float64
	MinMarketCapUSD  *float64
	MaxMarketCapUSD  *float64
	MinFDVUSD        *float64
	MaxFDVUSD        *float64
	MinAgeSeconds    *uint32
	MaxAgeSeconds    *uint32
	MinScore         *uint32
	MaxScore         *uint32
	MinHolders       *uint32
	MaxHolders       *uint32
	IncludeInstances *bool
	IncludeMarket    *bool
	Limit            *int32
	Cursor           *string
}

type TonTxData

type TonTxData struct {
	SeqNo     int64 `json:"seq_no"`
	ShardID   int64 `json:"shard_id"`
	WorkChain int64 `json:"work_chain"`
}

type TradePage

type TradePage struct {
	Items      []Transaction `json:"items"`
	NextCursor *string       `json:"next_cursor,omitempty"`
	PrevCursor *string       `json:"prev_cursor,omitempty"`
}

type Transaction

type Transaction struct {
	Timestamp    string               `json:"timestamp"`
	Hash         string               `json:"hash"`
	ChainID      uint32               `json:"chain_id"`
	MakerAddress Address              `json:"maker_address"`
	FromAddress  Address              `json:"from_address"`
	ToAddress    Address              `json:"to_address"`
	TxType       TxType               `json:"tx_type"`
	PerpAction   *PerpAction          `json:"perp_action,omitempty"`
	BlockInfo    TransactionBlockInfo `json:"block_info"`
	EventData    TransactionEventData `json:"event_data"`
}

type TransactionBlockInfo

type TransactionBlockInfo struct {
	EthereumTxData *EthereumTxData
	TonTxData      *TonTxData
	Raw            json.RawMessage
}

func (TransactionBlockInfo) MarshalJSON

func (u TransactionBlockInfo) MarshalJSON() ([]byte, error)

func (*TransactionBlockInfo) UnmarshalJSON

func (u *TransactionBlockInfo) UnmarshalJSON(data []byte) error

type TransactionEventData

type TransactionEventData struct {
	SwapEventData      *SwapEventData
	LiquidityEventData *LiquidityEventData
	Raw                json.RawMessage
}

func (TransactionEventData) MarshalJSON

func (u TransactionEventData) MarshalJSON() ([]byte, error)

func (*TransactionEventData) UnmarshalJSON

func (u *TransactionEventData) UnmarshalJSON(data []byte) error

type TrendingParams

type TrendingParams struct {
	Chains []ChainSlug
	Limit  *int32
	Cursor *string
}

type TxType

type TxType string
const (
	TxTypeAll             TxType = "all"
	TxTypeBuy             TxType = "buy"
	TxTypeSell            TxType = "sell"
	TxTypeMint            TxType = "mint"
	TxTypeBurn            TxType = "burn"
	TxTypeAddLiquidity    TxType = "add_liquidity"
	TxTypeRemoveLiquidity TxType = "remove_liquidity"
)

type TxnCount

type TxnCount struct {
	Buys  uint32 `json:"buys"`
	Sells uint32 `json:"sells"`
}

type TxnPairStat

type TxnPairStat struct {
	Buys       uint32  `json:"buys"`
	Sells      uint32  `json:"sells"`
	BuyVolume  float64 `json:"buy_volume"`
	SellVolume float64 `json:"sell_volume"`
	Buyers     uint32  `json:"buyers"`
	Sellers    uint32  `json:"sellers"`
}

type TxnTimeframes

type TxnTimeframes struct {
	M5  TxnPairStat `json:"m5"`
	H1  TxnPairStat `json:"h1"`
	H6  TxnPairStat `json:"h6"`
	H24 TxnPairStat `json:"h24"`
}

type UserScore

type UserScore struct {
	Value  uint32 `json:"value"`
	Status string `json:"status"`
}

type ValidationError

type ValidationError struct {
	Reason string
}

func (*ValidationError) Error

func (e *ValidationError) Error() string

type ValueRange

type ValueRange struct {
	Low    float64 `json:"low"`
	High   float64 `json:"high"`
	LowAt  int64   `json:"low_at"`
	HighAt int64   `json:"high_at"`
}

type VerdictStatus

type VerdictStatus string
const (
	VerdictStatusOk      VerdictStatus = "ok"
	VerdictStatusWatch   VerdictStatus = "watch"
	VerdictStatusBlocked VerdictStatus = "blocked"
	VerdictStatusUnknown VerdictStatus = "unknown"
)

type WalletBestTrades

type WalletBestTrades struct {
	Winners              []WalletRankedPosition `json:"winners"`
	Losers               []WalletRankedPosition `json:"losers"`
	HiddenPositions      *uint32                `json:"hidden_positions,omitempty"`
	HiddenRealizedPnlUSD *float64               `json:"hidden_realized_pnl_usd,omitempty"`
}

type WalletBestTradesParams

type WalletBestTradesParams struct {
	Window *WalletWindow
	Limit  *int32
}

type WalletChainPnl

type WalletChainPnl struct {
	Chain          ChainRef `json:"chain"`
	RealizedPnlUSD *float64 `json:"realized_pnl_usd,omitempty"`
	TotalPnlUSD    *float64 `json:"total_pnl_usd,omitempty"`
	ShareOfTotal   *float64 `json:"share_of_total,omitempty"`
}

type WalletChart

type WalletChart struct {
	Points []WalletPnlPoint `json:"points"`
}

type WalletChartParams

type WalletChartParams struct {
	Window *WalletWindow
}

type WalletFunding

type WalletFunding struct {
	Chain    ChainRef `json:"chain"`
	Address  Address  `json:"address"`
	FundedBy *Address `json:"funded_by,omitempty"`
	FundedAt *string  `json:"funded_at,omitempty"`
}

type WalletLabel

type WalletLabel struct {
	Kind         uint32   `json:"kind"`
	Name         string   `json:"name"`
	Confidence   float64  `json:"confidence"`
	TokenAddress *Address `json:"token_address,omitempty"`
}

type WalletLabelList

type WalletLabelList struct {
	Items []WalletLabelSet `json:"items"`
}

type WalletLabelSet

type WalletLabelSet struct {
	Address      Address       `json:"address"`
	Tier         *WalletTier   `json:"tier,omitempty"`
	Labels       []WalletLabel `json:"labels,omitempty"`
	CopyEligible *bool         `json:"copy_eligible,omitempty"`
	UserScore    *uint32       `json:"user_score,omitempty"`
}

type WalletLabelsRequest

type WalletLabelsRequest struct {
	Chain     string    `json:"chain"`
	Addresses []Address `json:"addresses"`
}

type WalletLifetime

type WalletLifetime struct {
	DeployedUSD         *float64 `json:"deployed_usd,omitempty"`
	GrossBoughtUSD      *float64 `json:"gross_bought_usd,omitempty"`
	GrossSoldUSD        *float64 `json:"gross_sold_usd,omitempty"`
	RealizedPnlUSD      *float64 `json:"realized_pnl_usd,omitempty"`
	UnrealizedPnlUSD    *float64 `json:"unrealized_pnl_usd,omitempty"`
	TotalPnlUSD         *float64 `json:"total_pnl_usd,omitempty"`
	UnrealizedAvailable *bool    `json:"unrealized_available,omitempty"`
}

type WalletListItem

type WalletListItem struct {
	Address      Address       `json:"address"`
	Chain        ChainRef      `json:"chain"`
	Tier         *WalletTier   `json:"tier,omitempty"`
	Type         *WalletType   `json:"type,omitempty"`
	Labels       []WalletLabel `json:"labels,omitempty"`
	CopyEligible *bool         `json:"copy_eligible,omitempty"`
	UserScore    *UserScore    `json:"user_score,omitempty"`
	HumanScore   *HumanScore   `json:"human_score,omitempty"`
	ScammerScore *ScammerScore `json:"scammer_score,omitempty"`
	Metrics      WalletMetrics `json:"metrics"`
}

type WalletMetrics

type WalletMetrics struct {
	Window               WalletWindow `json:"window"`
	RealizedPnlUSD       *float64     `json:"realized_pnl_usd,omitempty"`
	UnrealizedPnlUSD     *float64     `json:"unrealized_pnl_usd,omitempty"`
	TotalPnlUSD          *float64     `json:"total_pnl_usd,omitempty"`
	RatedPnlUSD          *float64     `json:"rated_pnl_usd,omitempty"`
	GrossProfitUSD       *float64     `json:"gross_profit_usd,omitempty"`
	GrossLossUSD         *float64     `json:"gross_loss_usd,omitempty"`
	InvestedUSD          *float64     `json:"invested_usd,omitempty"`
	VolumeUSD            *float64     `json:"volume_usd,omitempty"`
	Roi                  *float64     `json:"roi,omitempty"`
	WinRate              *float64     `json:"win_rate,omitempty"`
	TradeWinRate         *float64     `json:"trade_win_rate,omitempty"`
	MedianRoi            *float64     `json:"median_roi,omitempty"`
	ProfitFactor         *float64     `json:"profit_factor,omitempty"`
	AvgTradeUSD          *float64     `json:"avg_trade_usd,omitempty"`
	AvgHoldSeconds       *int64       `json:"avg_hold_seconds,omitempty"`
	Trades               *uint32      `json:"trades,omitempty"`
	WinningTrades        *uint32      `json:"winning_trades,omitempty"`
	LosingTrades         *uint32      `json:"losing_trades,omitempty"`
	TokensTraded         *uint32      `json:"tokens_traded,omitempty"`
	ClosedPositions      *uint32      `json:"closed_positions,omitempty"`
	OpenPositions        *uint32      `json:"open_positions,omitempty"`
	RatedPositions       *uint32      `json:"rated_positions,omitempty"`
	ExcludedTransferOnly *uint32      `json:"excluded_transfer_only,omitempty"`
	ExcludedUntracked    *uint32      `json:"excluded_untracked,omitempty"`
	ExcludedNoOutcome    *uint32      `json:"excluded_no_outcome,omitempty"`
}

type WalletMover

type WalletMover struct {
	Address Address `json:"address"`
	Value   float64 `json:"value"`
}

type WalletOverview

type WalletOverview struct {
	Profiles            []WalletProfile  `json:"profiles"`
	PerChain            []WalletChainPnl `json:"per_chain,omitempty"`
	MostProfitableChain *ChainRef        `json:"most_profitable_chain,omitempty"`
	UnavailableChains   []ChainRef       `json:"unavailable_chains,omitempty"`
	Lifetime            *WalletLifetime  `json:"lifetime,omitempty"`
}

type WalletOverviewParams

type WalletOverviewParams struct {
	Chains []ChainSlug
	Window *WalletWindow
}

type WalletPage

type WalletPage struct {
	Items      []WalletListItem `json:"items"`
	NextCursor *string          `json:"next_cursor,omitempty"`
}

type WalletPnlPoint

type WalletPnlPoint struct {
	Timestamp     string   `json:"timestamp"`
	RealizedUSD   *float64 `json:"realized_usd,omitempty"`
	CumulativeUSD *float64 `json:"cumulative_usd,omitempty"`
	CostUSD       *float64 `json:"cost_usd,omitempty"`
	Roi           *float64 `json:"roi,omitempty"`
	CumulativeRoi *float64 `json:"cumulative_roi,omitempty"`
	Wins          *uint32  `json:"wins,omitempty"`
	Losses        *uint32  `json:"losses,omitempty"`
}

type WalletPosition

type WalletPosition struct {
	TokenAddress      Address              `json:"token_address"`
	TokenSymbol       *string              `json:"token_symbol,omitempty"`
	QtyHeld           *float64             `json:"qty_held,omitempty"`
	CostBasisUSD      *float64             `json:"cost_basis_usd,omitempty"`
	RealizedPnlUSD    *float64             `json:"realized_pnl_usd,omitempty"`
	RealizedPnlPct    *float64             `json:"realized_pnl_pct,omitempty"`
	UnrealizedPnlUSD  *float64             `json:"unrealized_pnl_usd,omitempty"`
	BoughtUSD         *float64             `json:"bought_usd,omitempty"`
	SoldUSD           *float64             `json:"sold_usd,omitempty"`
	BoughtQty         *float64             `json:"bought_qty,omitempty"`
	SoldQty           *float64             `json:"sold_qty,omitempty"`
	AvgEntryPrice     *float64             `json:"avg_entry_price,omitempty"`
	AvgExitPrice      *float64             `json:"avg_exit_price,omitempty"`
	FeesUSD           *float64             `json:"fees_usd,omitempty"`
	BuyTxs            *uint32              `json:"buy_txs,omitempty"`
	SellTxs           *uint32              `json:"sell_txs,omitempty"`
	HoldSeconds       *int64               `json:"hold_seconds,omitempty"`
	FirstTradeAt      *string              `json:"first_trade_at,omitempty"`
	LastTradeAt       *string              `json:"last_trade_at,omitempty"`
	ClosedAt          *string              `json:"closed_at,omitempty"`
	BasisIsIncomplete *bool                `json:"basis_is_incomplete,omitempty"`
	Unsellable        *bool                `json:"unsellable,omitempty"`
	TokenScore        *int32               `json:"token_score,omitempty"`
	TokenStatus       *int32               `json:"token_status,omitempty"`
	Pairs             []WalletPositionPair `json:"pairs,omitempty"`
}

type WalletPositionPage

type WalletPositionPage struct {
	Items      []WalletPosition `json:"items"`
	NextCursor *string          `json:"next_cursor,omitempty"`
}

type WalletPositionPair

type WalletPositionPair struct {
	Address      Address  `json:"address"`
	Ticker       *string  `json:"ticker,omitempty"`
	DexName      *string  `json:"dex_name,omitempty"`
	LiquidityUSD *float64 `json:"liquidity_usd,omitempty"`
	Status       *int32   `json:"status,omitempty"`
	Score        *int32   `json:"score,omitempty"`
	Unsellable   *bool    `json:"unsellable,omitempty"`
	Rugged       *bool    `json:"rugged,omitempty"`
}

type WalletPositionRound

type WalletPositionRound struct {
	TokenAddress      Address  `json:"token_address"`
	RoundNo           uint32   `json:"round_no"`
	OpenedByTrade     *string  `json:"opened_by_trade,omitempty"`
	ClosedByTrade     *string  `json:"closed_by_trade,omitempty"`
	QtyHeld           *float64 `json:"qty_held,omitempty"`
	BoughtQty         *float64 `json:"bought_qty,omitempty"`
	SoldQty           *float64 `json:"sold_qty,omitempty"`
	BoughtUSD         *float64 `json:"bought_usd,omitempty"`
	SoldUSD           *float64 `json:"sold_usd,omitempty"`
	AvgEntryPrice     *float64 `json:"avg_entry_price,omitempty"`
	AvgExitPrice      *float64 `json:"avg_exit_price,omitempty"`
	RealizedPnlUSD    *float64 `json:"realized_pnl_usd,omitempty"`
	FeesUSD           *float64 `json:"fees_usd,omitempty"`
	MaxQtyHeld        *float64 `json:"max_qty_held,omitempty"`
	RemainingRatio    *float64 `json:"remaining_ratio,omitempty"`
	RealizedShare     *float64 `json:"realized_share,omitempty"`
	BuyTxs            *uint32  `json:"buy_txs,omitempty"`
	SellTxs           *uint32  `json:"sell_txs,omitempty"`
	FirstTradeAt      *string  `json:"first_trade_at,omitempty"`
	FirstBuyAt        *string  `json:"first_buy_at,omitempty"`
	LastTradeAt       *string  `json:"last_trade_at,omitempty"`
	LastSellAt        *string  `json:"last_sell_at,omitempty"`
	ClosedAt          *string  `json:"closed_at,omitempty"`
	BasisIsIncomplete *bool    `json:"basis_is_incomplete,omitempty"`
	Exited            *bool    `json:"exited,omitempty"`
}

type WalletPositionsParams

type WalletPositionsParams struct {
	State  *PositionState
	Sort   *PositionSortBy
	Limit  *int32
	Cursor *string
}

type WalletProfile

type WalletProfile struct {
	Address           Address             `json:"address"`
	Chain             ChainRef            `json:"chain"`
	Tier              *WalletTier         `json:"tier,omitempty"`
	Type              *WalletType         `json:"type,omitempty"`
	Labels            []WalletLabel       `json:"labels,omitempty"`
	HumanKnown        *bool               `json:"human_known,omitempty"`
	RebuildSkipped    *bool               `json:"rebuild_skipped,omitempty"`
	RebuildSkipReason *string             `json:"rebuild_skip_reason,omitempty"`
	CopyEligible      *bool               `json:"copy_eligible,omitempty"`
	ClusterID         *uint64             `json:"cluster_id,omitempty"`
	FirstSeenAt       *string             `json:"first_seen_at,omitempty"`
	FirstOnchainAt    *string             `json:"first_onchain_at,omitempty"`
	LastActiveAt      *string             `json:"last_active_at,omitempty"`
	AgeIsEstimated    *bool               `json:"age_is_estimated,omitempty"`
	UserScore         *UserScore          `json:"user_score,omitempty"`
	HumanScore        *HumanScore         `json:"human_score,omitempty"`
	ScammerScore      *ScammerScore       `json:"scammer_score,omitempty"`
	Signals           []WalletScoreSignal `json:"signals,omitempty"`
	Metrics           []WalletMetrics     `json:"metrics,omitempty"`
}

type WalletRankedPosition

type WalletRankedPosition struct {
	TokenAddress      Address  `json:"token_address"`
	Symbol            *string  `json:"symbol,omitempty"`
	EntryMarketCapUSD *float64 `json:"entry_market_cap_usd,omitempty"`
	ExitMarketCapUSD  *float64 `json:"exit_market_cap_usd,omitempty"`
	RealizedPnlUSD    *float64 `json:"realized_pnl_usd,omitempty"`
	Roi               *float64 `json:"roi,omitempty"`
	Buys              *uint32  `json:"buys,omitempty"`
	Sells             *uint32  `json:"sells,omitempty"`
}

type WalletRoundPage

type WalletRoundPage struct {
	Items      []WalletPositionRound `json:"items"`
	NextCursor *string               `json:"next_cursor,omitempty"`
}

type WalletRoundsParams

type WalletRoundsParams struct {
	Token  *Address
	State  *PositionState
	Limit  *int32
	Cursor *string
}

type WalletScoreSignal

type WalletScoreSignal struct {
	Kind        string   `json:"kind"`
	Title       *string  `json:"title,omitempty"`
	Detail      *string  `json:"detail,omitempty"`
	Subject     *string  `json:"subject,omitempty"`
	Points      *float64 `json:"points,omitempty"`
	Occurrences *uint32  `json:"occurrences,omitempty"`
	LastSeen    *string  `json:"last_seen,omitempty"`
	Direction   string   `json:"direction"`
	Target      string   `json:"target"`
}

type WalletSortBy

type WalletSortBy string
const (
	WalletSortByTotalPnl    WalletSortBy = "total_pnl"
	WalletSortByRealizedPnl WalletSortBy = "realized_pnl"
	WalletSortByVolume      WalletSortBy = "volume"
	WalletSortByWinRate     WalletSortBy = "win_rate"
	WalletSortByTrades      WalletSortBy = "trades"
	WalletSortByUserScore   WalletSortBy = "user_score"
	WalletSortByHumanScore  WalletSortBy = "human_score"
)

type WalletStats

type WalletStats struct {
	Chains []ChainWalletStats `json:"chains"`
}

type WalletStatsParams

type WalletStatsParams struct {
	Chains []ChainSlug
}

type WalletTier

type WalletTier = string

type WalletTrade

type WalletTrade struct {
	TradeUID       string   `json:"trade_uid"`
	TokenAddress   *Address `json:"token_address,omitempty"`
	TokenSymbol    *string  `json:"token_symbol,omitempty"`
	PairAddress    *Address `json:"pair_address,omitempty"`
	Side           *string  `json:"side,omitempty"`
	Qty            *float64 `json:"qty,omitempty"`
	PriceUSD       *float64 `json:"price_usd,omitempty"`
	NotionalUSD    *float64 `json:"notional_usd,omitempty"`
	FeeUSD         *float64 `json:"fee_usd,omitempty"`
	FeeIsEstimated *bool    `json:"fee_is_estimated,omitempty"`
	Timestamp      *string  `json:"timestamp,omitempty"`
	BlockNumber    *uint64  `json:"block_number,omitempty"`
}

type WalletTradePage

type WalletTradePage struct {
	Items      []WalletTrade `json:"items"`
	NextCursor *string       `json:"next_cursor,omitempty"`
}

type WalletTradesParams

type WalletTradesParams struct {
	Limit  *int32
	Cursor *string
}

type WalletType

type WalletType string
const (
	WalletTypeUnknown WalletType = "unknown"
	WalletTypeHuman   WalletType = "human"
	WalletTypeRobot   WalletType = "robot"
)

type WalletWindow

type WalletWindow string
const (
	WalletWindow1d  WalletWindow = "1d"
	WalletWindow7d  WalletWindow = "7d"
	WalletWindow30d WalletWindow = "30d"
	WalletWindow1y  WalletWindow = "1y"
	WalletWindowAll WalletWindow = "all"
)

type WalletsParams

type WalletsParams struct {
	Chain             string
	Window            *WalletWindow
	Sort              *WalletSortBy
	Order             *OrderBy
	MinTotalPnlUSD    *float64
	MinRealizedPnlUSD *float64
	MinVolumeUSD      *float64
	MinWinRate        *float64
	MinTrades         *uint32
	MaxAvgHoldSeconds *int64
	MinUserScore      *uint32
	MinHumanScore     *uint32
	NoAbuseEvidence   *bool
	OnlyCopyEligible  *bool
	ExcludeBots       *bool
	Tiers             []WalletTier
	Limit             *int32
	Cursor            *string
}

type X402DiscoveredResource

type X402DiscoveredResource struct {
	Resource    string                `json:"resource"`
	Type        string                `json:"type"`
	X402Version int32                 `json:"x402Version"`
	Accepts     []PaymentRequirements `json:"accepts"`
	Extensions  map[string]any        `json:"extensions,omitempty"`
	LastUpdated string                `json:"lastUpdated"`
}

type X402Discovery

type X402Discovery struct {
	X402Version int32                    `json:"x402Version"`
	Resources   []string                 `json:"resources"`
	Items       []X402DiscoveredResource `json:"items"`
}

Directories

Path Synopsis
examples
astra-latest command
astra-stream command
pairs command

Jump to

Keyboard shortcuts

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