eastmoney

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DayLineFastGet

func DayLineFastGet(requestParam DayLineRequestParam) ([]byte, error)

func FastGet

func FastGet(urlStr string, requestParam interface{}) ([]byte, error)

* 空格 - %20 (URL中的空格可以用+号或者编码值表示) " - %22 # - %23 % - %25 & - %26 ( - %28 ) - %29 + - %2B , - %2C / - %2F : - %3A ; - %3B < - %3C = - %3D > - %3E ? - %3F @ - %40 \ - %5C | - %7C { - %7B } - %7D

func FinanceFlowFastGet

func FinanceFlowFastGet(requestParam DayLineRequestParam) ([]byte, error)

func Get

func Get(url string, requestParam interface{}) ([]byte, error)

func ReportFastGet

func ReportFastGet(requestParam ReportRequestParam) ([]byte, error)

func TodayFastGet

func TodayFastGet(requestParam DayLineRequestParam) ([]byte, error)

func TodayFfFastGet

func TodayFfFastGet(requestParam DayLineRequestParam) ([]byte, error)

Types

type CurrentResponseData

type CurrentResponseData struct {
	F43  float64 `json:"f43"`  //close
	F44  float64 `json:"f44"`  //high
	F45  float64 `json:"f45"`  //low
	F46  float64 `json:"f46"`  //open
	F47  int     `json:"f47"`  //vol
	F48  float64 `json:"f48"`  //amount
	F50  float64 `json:"f50"`  //qrr
	F57  string  `json:"f57"`  //ts_code
	F58  string  `json:"f58"`  //name
	F59  int     `json:"f59"`  //
	F60  float64 `json:"f60"`  //preclose
	F107 int     `json:"f107"` //
	F152 int     `json:"f152"`
	F162 float64 `json:"f162"` //pe
	F168 float64 `json:"f168"` //turnover
	F169 float64 `json:"f169"` //pct_chg
	F170 float64 `json:"f170"` //close_chg
	F171 float64 `json:"f171"` //
	F292 int     `json:"f292"`
}

* rt:4:获取某只股票当天的价格情况

type DayLineRequestParam

type DayLineRequestParam struct {
	Cb         string `json:"cb"`
	SecId      string `json:"secid"`            //股票代码
	Ut         string `json:"ut"`               //token
	Fields1    string `json:"fields1"`          //
	Fields2    string `json:"fields2"`          //
	Klt        int    `json:"klt"`              //每隔时长获取一次记录,1代表一分,5代表5分钟,101代表每天,102代表每周,103代表每月,104代表每季度,105代表每半年,106代表每年
	Fqt        int    `json:"fqt"`              //
	Smplmt     string `json:"smplmt,omitempty"` //
	Lmt        int    `json:"lmt"`              //获取记录数
	Beg        int    `json:"beg,omitempty"`    //开始日期
	End        int    `json:"end"`              //终止日期 20500101
	Underscore string `json:"_"`                //
	Fields     string `json:"fields,omitempty"` //
	Fltt       int    `json:"fltt,omitempty"`   //
	Invt       int    `json:"invt,omitempty"`   //
}

func CreateDayLineRequestParam

func CreateDayLineRequestParam() *DayLineRequestParam

func CreateFinanceFlowRequestParam

func CreateFinanceFlowRequestParam() *DayLineRequestParam

type DayLineResponseData

type DayLineResponseData struct {
	Code      string   `json:"code,omitempty"`
	Market    string   `json:"code,omitempty"`
	Name      string   `json:"code,omitempty"`
	Decimal   int      `json:"code,omitempty"`    //小数位
	Dktotal   int      `json:"dktotal,omitempty"` //总记录数
	PreKPrice float64  `json:"preKPrice,omitempty"`
	Klines    []string `json:"klines,omitempty"` //数据
}

* rt:17:获取某只股股票的过去的每天价格情况(日线) klines:"2021-12-03,17.64,17.65,17.70,17.41,707600,1242375056.00,1.65,0.34,0.06,0.36" "trade_date,open,close,high,low,vol,amount,nil,pct_chg%,change,turnover%"

rt:21:获取某只股股票的过去的每天资金流东情况(分钟线) "2021-12-03 15:00,-46770242.0,12655892.0,34114366.0,4332407.0,-51102649.0"

rt:22:获取某只股股票的过去的每天资金流动情况 klines:"2021-12-03,-46770255.0,12655888.0,34114368.0,4332400.0,-51102655.0,-3.76,1.02,2.75,0.35,-4.11,17.65,0.34,0.00,0.00" "trade_date,主力净流入/净额,小单净流入/净额,中单净流入/净额,大单净流入/净额,超大单净流入/净额,主力净流入/净占比%, 小单净流入/净占比%,中单净流入/净占比%,大单净流入/净占比%,超大单净流入/净占比%,close,pct_chg,,"

type DayLineResponseResult

type DayLineResponseResult struct {
	Rc   int                  `json:"rc,omitempty"`
	Rt   int                  `json:"rt,omitempty"`
	Svr  int                  `json:"svr,omitempty"`
	Lt   int                  `json:"lt,omitempty"`
	Full int                  `json:"full,omitempty"`
	Data *DayLineResponseData `json:"data,omitempty"`
}

type ReportRequestParam

type ReportRequestParam struct {
	Callback string `json:"callback"`
	St       string `json:"st"`   //排序的字段,逗号分隔
	Sr       string `json:"sr"`   //-1降序,1升序,逗号分隔
	Ps       string `json:"ps"`   //每页的记录数
	P        int    `json:"p"`    //页数
	Type     string `json:"type"` //获取的数据类型
	Sty      string `json:"sty"`  //获取的字段,ALL
	Token    string `json:"token"`
	Filter   string `json:"filter,omitempty"` //条件
}

func CreateRequestParam

func CreateRequestParam() *ReportRequestParam

type ReportResponseData

type ReportResponseData struct {
	Pages int `json:"pages,omitempty"`
	Count int `json:"count,omitempty"`
}

type ReportResponseResult

type ReportResponseResult struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Code    int    `json:"code,omitempty"`
	Version string `json:"version,omitempty"`
}

type Time

type Time time.Time

func (*Time) FromDB

func (t *Time) FromDB(b []byte) error

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (Time) MarshalText

func (t Time) MarshalText() ([]byte, error)

func (Time) Now

func (t Time) Now() Time

func (Time) ParseTime

func (t Time) ParseTime(tt time.Time) Time

func (Time) String

func (t Time) String() string

func (*Time) ToDB

func (t *Time) ToDB() ([]byte, error)

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) (err error)

func (*Time) Value

func (t *Time) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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