app

package module
v0.0.0-...-5d22213 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(w http.ResponseWriter, r *http.Request)

func StartPairsTicker

func StartPairsTicker(c *Config)

Types

type AssetPrice

type AssetPrice struct{}

func (*AssetPrice) Opts

func (ap *AssetPrice) Opts() *bridges.Opts

func (*AssetPrice) Run

func (ap *AssetPrice) Run(h *bridges.Helper) (interface{}, error)

type Config

type Config struct {
	Port           int
	TickerInterval time.Duration
}

func NewConfig

func NewConfig() *Config

type Output

type Output struct {
	ID        string      `json:"id"`
	Result    float64     `json:"result"`
	Price     string      `json:"price"`
	Volume    string      `json:"volume"`
	USDPrice  null.String `json:"usdPrice"`
	Exchanges []string    `json:"exchanges"`
	Warnings  []error     `json:"warnings,omitempty"`
}

func GetPrice

func GetPrice(base, quote string) (*Output, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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