exchange

package
v0.0.0-...-e7ea114 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

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

func New

func New(logger *logger.Logger) *Exchange

func (*Exchange) Get

func (c *Exchange) Get(symbol string) (*Symbol, error)

func (*Exchange) Set

func (c *Exchange) Set(symbols []*Symbol)

func (*Exchange) Symbols

func (c *Exchange) Symbols() []string

type Filter

type Filter struct {
	MinPrice          string                   `json:"minPrice,omitempty"`
	MaxPrice          string                   `json:"maxPrice,omitempty"`
	FilterType        futures.SymbolFilterType `json:"filterType,omitempty"`
	TickSize          string                   `json:"tickSize,omitempty"`
	StepSize          string                   `json:"stepSize,omitempty"`
	Limit             string                   `json:"limit,omitempty"`
	Notional          string                   `json:"notional,omitempty"`
	MultiplierDown    string                   `json:"multiplierDown,omitempty"`
	MultiplierUp      string                   `json:"multiplierUp,omitempty"`
	MultiplierDecimal string                   `json:"ultiplierDecimal,omitempty"`
}

type FilterType

type FilterType string

type Filters

type Filters []*Filter

func (*Filters) Parse

func (f *Filters) Parse(data []map[string]interface{})

type Symbol

type Symbol struct {
	Symbol      string   `json:"symbol,omitempty"`
	Pair        string   `json:"pair,omitempty"`
	Filters     *Filters `json:"filters,omitempty"`
	MarginAsset string   `json:"marginAsset,omitempty"`
	BaseAsset   string   `json:"baseAsset,omitempty"`
}

func (*Symbol) GetLotSizeFilter

func (s *Symbol) GetLotSizeFilter() (*Filter, error)

func (*Symbol) GetPriceFilter

func (s *Symbol) GetPriceFilter() (*Filter, error)

Jump to

Keyboard shortcuts

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