datafetch

package
v0.0.0-...-d3a2b2a Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchData

func FetchData(getter Getter) ([]byte, error)

Types

type Getter

type Getter interface {
	Get(url string) (resp *http.Response, err error)
}

type TickerData

type TickerData struct {
	Id            int
	Last          string
	LowestAsk     string
	HighestBid    string
	PercentChange string
	BaseVolume    string
	QuoteVolume   string
	IsFrozen      string
	High24hr      string
	Low24hr       string
}

type TickerDatum

type TickerDatum struct {
	Timestamp     int64
	CurrencyPair  string
	Last          string
	LowestAsk     string
	HighestBid    string
	PercentChange string
	BaseVolume    string
	QuoteVolume   string
	IsFrozen      string
	High24hr      string
	Low24hr       string
}

func Fetch

func Fetch(client *http.Client) ([]*TickerDatum, error)

func ParseResponse

func ParseResponse(input []byte) ([]*TickerDatum, error)

Jump to

Keyboard shortcuts

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