handler

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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) 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