Documentation ¶
Index ¶
- func DayLineFastGet(requestParam DayLineRequestParam) ([]byte, error)
- func FastGet(urlStr string, requestParam interface{}) ([]byte, error)
- func FinanceFlowFastGet(requestParam DayLineRequestParam) ([]byte, error)
- func Get(url string, requestParam interface{}) ([]byte, error)
- func ReportFastGet(requestParam ReportRequestParam) ([]byte, error)
- func TodayFastGet(requestParam DayLineRequestParam) ([]byte, error)
- func TodayFfFastGet(requestParam DayLineRequestParam) ([]byte, error)
- type CurrentResponseData
- type DayLineRequestParam
- type DayLineResponseData
- type DayLineResponseResult
- type ReportRequestParam
- type ReportResponseData
- type ReportResponseResult
- type Time
- func (t *Time) FromDB(b []byte) error
- func (t Time) MarshalJSON() ([]byte, error)
- func (t Time) MarshalText() ([]byte, error)
- func (t Time) Now() Time
- func (t Time) ParseTime(tt time.Time) Time
- func (t Time) String() string
- func (t *Time) ToDB() ([]byte, error)
- func (t *Time) UnmarshalJSON(data []byte) (err error)
- func (t *Time) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DayLineFastGet ¶
func DayLineFastGet(requestParam DayLineRequestParam) ([]byte, error)
func FastGet ¶
* 空格 - %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 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 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