jupag

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomClientHelloID

func RandomClientHelloID() utls.ClientHelloID

Types

type Client

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

func NewClient

func NewClient(proxy config.Sock5Proxy) *Client

func (*Client) FetchTokenCandles

func (c *Client) FetchTokenCandles(ctx context.Context, token string, to time.Time, period string, limit int) ([]charts.Ohlc, error)

type JupagSubscriber

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

func NewJupagSubscriber

func NewJupagSubscriber(proxy config.Sock5Proxy) *JupagSubscriber

func (*JupagSubscriber) GetTradeChan

func (subscriber *JupagSubscriber) GetTradeChan() <-chan []Trade

func (*JupagSubscriber) Start

func (subscriber *JupagSubscriber) Start()

func (*JupagSubscriber) Stop

func (subscriber *JupagSubscriber) Stop()

func (*JupagSubscriber) SubscribeTrades

func (subscriber *JupagSubscriber) SubscribeTrades(assets []string) error

func (*JupagSubscriber) UnsubscribeTrades

func (subscriber *JupagSubscriber) UnsubscribeTrades(assets []string) error

func (*JupagSubscriber) WaitUntilConnected

func (subscriber *JupagSubscriber) WaitUntilConnected()

type KlineManager

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

func NewKlineManager

func NewKlineManager(client *Client, subscriber *JupagSubscriber, resolution string, candles int) *KlineManager

func (*KlineManager) GetOhlcsChan

func (m *KlineManager) GetOhlcsChan() <-chan charts.TokenOhlcs

func (*KlineManager) Start

func (m *KlineManager) Start()

func (*KlineManager) Stop

func (m *KlineManager) Stop()

func (*KlineManager) Subscribe

func (m *KlineManager) Subscribe(assets []string) error

func (*KlineManager) Unsubscribe

func (m *KlineManager) Unsubscribe(assets []string) error

type Message

type Message struct {
	Type string          `json:"type"`
	Data json.RawMessage `json:"data"`
}

type Trade

type Trade struct {
	Timestamp     time.Time       `json:"timestamp"`
	Asset         string          `json:"asset"`
	Type          string          `json:"type"`
	UsdPrice      decimal.Decimal `json:"usdPrice"`
	UsdVolume     decimal.Decimal `json:"usdVolume"`
	NativeVolume  decimal.Decimal `json:"nativeVolume"`
	TraderAddress string          `json:"traderAddress"`
	TxHash        string          `json:"txHash"`
	Amount        decimal.Decimal `json:"amount"`
	IsMev         bool            `json:"isMev"`
	IsValidPrice  bool            `json:"isValidPrice"`
	PoolId        string          `json:"poolId"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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