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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forex

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

func New

func New() *Forex

func (*Forex) History

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

func (*Forex) Price

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

func (*Forex) Quote

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

type History

type History struct {
	Open      float64 `json:"o"`
	High      float64 `json:"h"`
	Low       float64 `json:"l"`
	Close     float64 `json:"c"`
	Volume    float64 `json:"v"`
	Timestamp float64 `json:"t"`
}

type Previous

type Previous struct {
	Symbol       string
	TotalResults int32
	Results      []*History
}

type Quote

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

Jump to

Keyboard shortcuts

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