magiceden

package
v0.0.0-...-472bc46 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TTL                = 30 * time.Second
	FloorPriceEndpoint = "https://api-mainnet.magiceden.dev/v2/collections/%s/stats"
	BuyEndpoint        = "" /* 232-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuyResponse

type BuyResponse struct {
	Tx struct {
		Type string `json:"type"`
		Data []byte `json:"data"`
	} `json:"tx"`
	TxSigned struct {
		Type string `json:"type"`
		Data []byte `json:"data"`
	} `json:"txSigned"`
}

type FloorResponse

type FloorResponse struct {
	Symbol       string  `json:"symbol"`
	FloorPrice   float64 `json:"floorPrice"`
	ListedCount  int     `json:"listedCount"`
	AvgPrice24Hr float64 `json:"avgPrice24hr"`
	VolumeAll    float64 `json:"volumeAll"`
}

type Service

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

func New

func New(ctx context.Context) *Service

func (*Service) Buy

func (s *Service) Buy(ctx context.Context, token *models.Token) (string, error)

func (*Service) GetFloor

func (s *Service) GetFloor(ctx context.Context, symbol string) (float64, error)

Jump to

Keyboard shortcuts

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