ticker

package
v0.0.0-...-935a062 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIPath string = "/v1/getticker"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	ProductCode markets.ProductCode `json:"product_code" url:"product_code"`
}

func (*Request) Method

func (req *Request) Method() string

func (*Request) Payload

func (req *Request) Payload() []byte

func (*Request) Query

func (req *Request) Query() string

type Response

type Response struct {
	ProductCode markets.ProductCode `json:"product_code"`

	Timestamp       string  `json:"timestamp"` // TODO: Treat timestamp as time.Time
	TickID          int     `json:"tick_id"`
	BestBid         float64 `json:"best_bid"`
	BestAsk         float64 `json:"best_ask"`
	BestBidSize     float64 `json:"best_bid_size"`
	BestAskSize     float64 `json:"best_ask_size"`
	TotalBidDepth   float64 `json:"total_bid_depth"`
	TotalAskDepth   float64 `json:"total_ask_depth"`
	LTP             float64 `json:"ltp"`
	Volume          float64 `json:"volume"`
	VolumeByProduct float64 `json:"volume_by_product"`
}

Jump to

Keyboard shortcuts

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