Help us shape the future of Go! Take the 2026 Go Developer Survey

aktool

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL                 = os.Getenv("AKTOOL_BASE_URL")
	PublicAPIURI            = "/api/public/"
	GoldHandlerNameRealtime = "spot_quotations_sge"
	GoldHandlerNameHistory  = "spot_hist_sge"

	StockHandlerNameRealtime = "stock_individual_info_em"
)

Functions

This section is empty.

Types

type GoldPriceDataHS

type GoldPriceDataHS []struct {
	Date  string  `json:"date"`
	Open  float64 `json:"open"`
	Close float64 `json:"close"`
	Low   float64 `json:"low"`
	High  float64 `json:"high"`
}

func GetHistoryGoldPrice

func GetHistoryGoldPrice(ctx context.Context) (res GoldPriceDataHS, err error)

func GetStockPrice

func GetStockPrice(ctx context.Context, symbol string) (res GoldPriceDataHS, err error)

type GoldPriceDataRT

type GoldPriceDataRT struct {
	Kind       string  `json:"品种"`
	Time       string  `json:"时间"`
	Price      float64 `json:"现价"`
	UpdateTime string  `json:"更新时间"`
}

type GoldPriceDataRTList

type GoldPriceDataRTList []*GoldPriceDataRT

func GetRealtimeGoldPrice

func GetRealtimeGoldPrice(ctx context.Context) (res GoldPriceDataRTList, err error)

Jump to

Keyboard shortcuts

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