handler

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History struct {
	Symbol string
	Open   float64
	High   float64
	Low    float64
	Close  float64
	Volume int32
	From   string
}

type Order

type Order struct {
	Symbol string
	Ask    float64
	Bid    float64
	Asize  int32
	Bsize  int32
	T      int64
}

type OrderBook

type OrderBook struct {
	Symbol  string
	Results []*Order
}

type Quote

type Quote struct {
	Symbol    string
	Ask       float64
	Bid       float64
	Asize     int32
	Bsize     int32
	Timestamp int64
}

type Stock

type Stock struct {
	Api   string
	Key   string
	Cache *cache.Cache
}

func (*Stock) History

func (s *Stock) History(ctx context.Context, req *pb.HistoryRequest, rsp *pb.HistoryResponse) error

func (*Stock) OrderBook

func (s *Stock) OrderBook(ctx context.Context, req *pb.OrderBookRequest, rsp *pb.OrderBookResponse) error

func (*Stock) Price

func (s *Stock) Price(ctx context.Context, req *pb.PriceRequest, rsp *pb.PriceResponse) error

func (*Stock) Quote

func (s *Stock) Quote(ctx context.Context, req *pb.QuoteRequest, rsp *pb.QuoteResponse) error

Jump to

Keyboard shortcuts

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