handler

package
v0.0.0-...-684f6f0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 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 Article

type Article struct {
	Title       string
	Description string
	Url         string
	Source      string
	Date        string
}

type Crypto

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

func New

func New() *Crypto

func (*Crypto) History

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

func (*Crypto) News

func (c *Crypto) News(ctx context.Context, req *pb.NewsRequest, rsp *pb.NewsResponse) error

func (*Crypto) Price

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

func (*Crypto) Quote

func (s *Crypto) 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 News

type News struct {
	Ticker string
	Limit  int32
	News   []*Article
}

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