paraswap

package
v0.0.0-...-a5ca7c1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 16 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 {
	ChainId int64
	// contains filtered or unexported fields
}

func ReadOnly

func ReadOnly() (*Client, error)

func ReadWrite

func ReadWrite() (*Client, error)

func (*Client) GetOrders

func (client *Client) GetOrders(owner string) ([]Order, error)

func (*Client) PlaceOrder

func (client *Client) PlaceOrder(order *Order) error

func (*Client) PublicAddress

func (client *Client) PublicAddress() (string, error)

type Order

type Order struct {
	Expiry       int64      `json:"expiry"`
	NonceAndMeta string     `json:"nonceAndMeta"`
	Maker        string     `json:"maker"`
	Taker        string     `json:"taker"`
	MakerAsset   string     `json:"makerAsset"`
	TakerAsset   string     `json:"takerAsset"`
	MakerAmount  string     `json:"makerAmount"`
	TakerAmount  string     `json:"takerAmount"`
	Signature    string     `json:"signature"`
	Type         OrderType  `json:"type,omitempty"`
	State        OrderState `json:"state,omitempty"`
}

func (*Order) GetMakerAmount

func (order *Order) GetMakerAmount() (*big.Int, error)

func (*Order) GetTakerAmount

func (order *Order) GetTakerAmount() (*big.Int, error)

type OrderState

type OrderState string
const (
	PENDING   OrderState = "PENDING"
	FULFILLED OrderState = "FULFILLED"
	CANCELLED OrderState = "CANCELLED"
	EXPIRED   OrderState = "EXPIRED"
)

type OrderType

type OrderType string
const (
	LIMIT OrderType = "LIMIT"
	P2P   OrderType = "P2P"
)

Jump to

Keyboard shortcuts

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