dex

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client handles interactions with decentralized exchanges

func NewClient

func NewClient(contractAddress string, chainID int64) *Client

NewClient creates a new DEX client

func (*Client) ExecuteOrder

func (c *Client) ExecuteOrder(ctx context.Context, order types.Order) error

ExecuteOrder executes an order on the DEX

func (*Client) GetAverageFees

func (c *Client) GetAverageFees() int64

GetAverageFees returns the average trading fees on the DEX

func (*Client) GetTotalLiquidity

func (c *Client) GetTotalLiquidity() int64

GetTotalLiquidity returns the total available liquidity on the DEX

func (*Client) QuoteBestPrice

func (c *Client) QuoteBestPrice(ctx context.Context, order types.Order) (int64, error)

QuoteBestPrice returns the best price for the given order on the DEX

Jump to

Keyboard shortcuts

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