response

package
v0.0.0-...-1aeafd4 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const CNYXURL = "http://hq.cnindex.com.cn/market/market/getIndexRealTimeData?indexCode=CNYX"
View Source
const GCHN10URL = "https://datacenter-web.eastmoney.com/api/data/get?type=RPTA_WEB_TREASURYYIELD&sty=ALL&st=SOLAR_DATE&sr=-1&p=%d&ps=500"
View Source
const HT = "https://quote.fx678.com/symbol/%s"
View Source
const USLiborURL = "https://quote.fx678.com/rate/libor"

Variables

View Source
var AGMApi = "http://futsseapi.eastmoney.com/static/113_agm_qt"
View Source
var AUMApi = "http://futsseapi.eastmoney.com/static/113_aum_qt"
View Source
var CMApi = "http://futsseapi.eastmoney.com/static/114_cm_qt"
View Source
var CUMApi = "http://futsseapi.eastmoney.com/static/113_cum_qt"
View Source
var HkdCnyApi = "https://hq.sinajs.cn/rn=1639973901502list=fx_shkdcny"
View Source
var HsiAPI = "http://hq.sinajs.cn/rn=1639970108245&list=rt_hkHSI"
View Source
var ImApi = "http://futsseapi.eastmoney.com/static/114_im_qt"
View Source
var NIMApi = "http://futsseapi.eastmoney.com/static/113_nim_qt"
View Source
var SCMApi = "http://futsseapi.eastmoney.com/static/142_scm_qt"
View Source
var UsdCnyApi = "https://hq.sinajs.cn/rn=1639973351984list=fx_susdcny"
View Source
var YMApi = "http://futsseapi.eastmoney.com/static/114_ym_qt"

Functions

func GBKToUTF8

func GBKToUTF8(s []byte) ([]byte, error)

Types

type AGM

type AGM struct {
	QT Detail `json:"qt"`
}

type AUM

type AUM struct {
	QT Detail `json:"qt"`
}

type CM

type CM struct {
	QT Detail `json:"qt"`
}

type CNYX

type CNYX struct {
	Code int `json:"code"`
	Data struct {
		Data [][]interface{} `json:"data"`
	} `json:"data"`
}

type CPI

type CPI struct {
	Data [][]string `json:"data"`
}

CPI 新浪财经居民消费价格指数接口返回的结构体

type CUM

type CUM struct {
	QT Detail `json:"qt"`
}

type D

type D struct {
	ReportDate     string  `json:"REPORT_DATE"`
	IndicatorValue float64 `json:"INDICATOR_VALUE"`
}

type Detail

type Detail struct {
	P     float64 `json:"p"`     // 最新价
	ZDE   float64 `json:"zde"`   // 涨跌额
	ZDF   float64 `json:"zdf"`   // 涨跌幅
	H     float64 `json:"h"`     // 最高
	L     float64 `json:"l"`     // 最低
	QRSPJ float64 `json:"qrspj"` // 昨收
}

type GCHN10

type GCHN10 struct {
	Success bool `json:"success"`
	Result  struct {
		Data []struct {
			SOLAR_DATE  string  `json:"SOLAR_DATE"`
			EMM00166466 float64 `json:"EMM00166466"`
		} `json:"data"`
	} `json:"result"`
}

type IM

type IM struct {
	QT Detail `json:"qt"`
}

type LPR

type LPR struct {
	DateString string `json:"dateString"`
	LoanRate   string `json:"loanRate"`
}

type NIM

type NIM struct {
	QT Detail `json:"qt"`
}

type PostData

type PostData struct {
	HY    string `json:"hy"`
	Level string `json:"level"`
	Path1 string `json:"path1"`
	Path2 string `json:"path2"`
	Path3 string `json:"path3"`
	Path4 string `json:"path4"`
	Type  string `json:"type"`
}

PostData 卓创资讯接口的请求入参

type R

type R struct {
	Data []D `json:"data"`
}

type Record

type Record []RecordSt

func (Record) Len

func (r Record) Len() int

func (Record) Less

func (r Record) Less(i, j int) bool

func (Record) Swap

func (r Record) Swap(i, j int)

type RecordSt

type RecordSt struct {
	Date  string
	Value float64
}

type RegionCPI

type RegionCPI struct {
	Data map[string][][]string `json:"data"`
}

type RegionGDP

type RegionGDP struct {
	Data [][]string `json:"data"`
}

RegionGDP 新浪财经地区生产总值接口返回的结构体

type Respond

type Respond struct {
	Date        string
	TargetValue string
	RegionCode  string
	RegionName  string
}

func RespondAGM

func RespondAGM() (row []Respond)

func RespondAUM

func RespondAUM() (row []Respond)

func RespondCM

func RespondCM() (row []Respond)

func RespondCNYX

func RespondCNYX() (row []Respond)

func RespondCUM

func RespondCUM() (row []Respond)

func RespondGCHN10

func RespondGCHN10() (row []Respond)

func RespondHKDCNY

func RespondHKDCNY() (row []Respond)

func RespondHSI

func RespondHSI() (row []Respond)

func RespondHT

func RespondHT(name, condition string) (row []Respond)

func RespondIM

func RespondIM() (row []Respond)

func RespondIndustryIndex

func RespondIndustryIndex(sourceTargetCode string) (row []Respond)

RespondIndustryIndex 返回东方财富行业指标数据 适用指标:中国大宗商品指数、物流业景气指数、波罗的海干散货指数

func RespondMacroIndex

func RespondMacroIndex(sourceTargetCode, targetCode string) (row []Respond)

RespondMacroIndex 返回东方财富宏观指标数据 适用指标:工业增加值增长、社会消费品零售总额、货币供应量、居民消费价格指数(CPI)、国内生产总值(GDP) 采购经理人指数(PMI)、工业品出厂价格指数(PPI)、贷款基准利率LPR、海关进出口

func RespondNIM

func RespondNIM() (row []Respond)

func RespondSCI

func RespondSCI(pd PostData) (row []Respond)

RespondSCI 返回卓创资讯响应数据

func RespondSCM

func RespondSCM() (row []Respond)

func RespondShiBor

func RespondShiBor(stopPage int) (row []Respond)

RespondShiBor 返回东方财富的数据 适用指标:上海银行间同业拆放利率

func RespondSina

func RespondSina(sourceTargetCode string) (row []Respond)

RespondSina 返回新浪财经的数据 适用指标:人民币汇率、美元指数

func RespondSinaCPI

func RespondSinaCPI() (row []Respond)

RespondSinaCPI 返回新浪财经的居民消费价格指数 // 适用指标:居民消费价格指数

func RespondSinaRegionCPI

func RespondSinaRegionCPI() (row []Respond)

RespondSinaRegionCPI 返回新浪财经的地区居民消费价格指数 TODO(IMPORTANT):因为地区居民消费价格指数有几百页,首次入库全量,后期每次5页 适用指标:地区居民消费价格指数

func RespondSinaRegionGDP

func RespondSinaRegionGDP() (row []Respond)

RespondSinaRegionGDP 返回新浪财经的地区生产总值数据 适用指标:地区生产总值

func RespondTBI

func RespondTBI() (row []Respond)

RespondTBI 返回凤凰网财经的国债指数数据

func RespondUSDCNY

func RespondUSDCNY() (row []Respond)

func RespondUSLibor

func RespondUSLibor(targetCode string) (row []Respond)

func RespondYM

func RespondYM() (row []Respond)

func RespondYinHang

func RespondYinHang() (row []Respond)

type SCIData

type SCIData struct {
	MDataValue float64 `json:"MDataValue"`
	DataDate   string  `json:"DataDate"`
}

type SCM

type SCM struct {
	QT Detail `json:"qt"`
}

type StructIndustryIndex

type StructIndustryIndex struct {
	Result  R    `json:"result"`
	Success bool `json:"success"`
}

StructIndustryIndex 东方财富行业指标接口返回的数据结构

type StructLPR

type StructLPR struct {
	Records []LPR `json:"records"`
}

type StructSCI

type StructSCI struct {
	List []SCIData `json:"List"`
}

StructSCI 卓创资讯接口返回的数据结构

type YM

type YM struct {
	QT Detail `json:"qt"`
}

Jump to

Keyboard shortcuts

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