package stock import "github.com/shopspring/decimal" // Stock List Information type StockShare struct { Code string `json:"Code"` Name string `json:"Name"` Country string `json:"Country"` Exchange string `json:"Exchange"` Currency string `json:"Currency"` Type string `json:"Type"` Isin interface{} `json:"Isin"` YesterdayClose string `json:"YesterdayClose"` // 昨天收盘价 BeforeClose string `json:"BeforeClose"` // 前天收盘价 } type StockPolygonParam struct { Results []StockPolygon `json:"results"` Status string `json:"status"` NextUrl string `json:"next_url"` } type StockPolygon struct { Code string `json:"ticker" bson:"Code"` Name string `json:"name" bson:"Name"` Locale string `json:"locale" bson:"Country" ` PrimaryExchange string `json:"primary_exchange" bson:"Exchange"` Symbol string `json:"symbol" bson:"Symbol"` Currency string `json:"currency_name"` Type string `json:"type"` CIK string `json:"cik"` CompositeFigi string `json:"composite_figi"` ShareClassFigi string `json:"share_class_figi"` YesterdayClose string `json:"yesterday_close" bson:"YesterdayClose"` // 昨天收盘价 BeforeClose string `json:"BeforeClose" bson:"BeforeClose"` // 前天收盘价 ClosePrice string `json:"ClosePrice" bson:"ClosePrice"` LogoUrl string `json:"logo_url" bson:"LogoUrl"` Desc string `json:"desc"` Intro string `json:"intro"` Tape int `bson:"Tape"` Vol int64 `bson:"Vol" json:"vol"` DateStr string `json:"date_str"` TapeStr string `json:"tape_str"` IsReal int `json:"is_real"` Source int `json:"source"` NumericCode string `json:"numeric_code" bson:"NumericCode"` IsSharia int `json:"is_sharia"` //1 、符合伊斯兰教法股票 2、不符合 DP float64 `json:"dp"` JapanName string `json:"JapanName" bson:"JapanName"` JapanIntro string `json:"JapanIntro" bson:"JapanIntro"` } type StockUpdatePolygon struct { OldCode string `json:"old_ticker"` NewCode string `json:"new_ticker"` Name string `json:"name" bson:"Name"` Locale string `json:"locale" bson:"Country" ` PrimaryExchange string `json:"primary_exchange" bson:"Exchange"` Currency string `json:"currency_name"` Source int `json:"source"` Type string `json:"type"` CIK string `json:"cik"` CompositeFigi string `json:"composite_figi"` ShareClassFigi string `json:"share_class_figi"` YesterdayClose string `json:"yesterday_close" bson:"YesterdayClose"` // 昨天收盘价 BeforeClose string `json:"BeforeClose" bson:"BeforeClose"` // 前天收盘价 ClosePrice string `json:"ClosePrice" bson:"ClosePrice"` LogoUrl string `json:"logo_url" bson:"LogoUrl"` Desc string `json:"desc"` Intro string `json:"intro"` Tape int `bson:"Tape"` Vol int64 `bson:"Vol" json:"vol"` DateStr string `json:"date_str"` TapeStr string `json:"tape_str"` IsReal int `json:"is_real"` Token string `json:"token"` NumericCode string `json:"numeric_code"` } type StockPolygonS struct { Code string `json:"ticker" bson:"Code"` Name string `json:"name" bson:"Name"` Locale string `json:"locale" bson:"Country" ` PrimaryExchange string `json:"primary_exchange" bson:"Exchange"` Currency string `json:"currency_name"` Type string `json:"type"` CIK string `json:"cik"` CompositeFigi string `json:"composite_figi"` ShareClassFigi string `json:"share_class_figi"` YesterdayClose string `json:"yesterday_close" bson:"YesterdayClose"` // 昨天收盘价 BeforeClose string `json:"BeforeClose" bson:"BeforeClose"` // 前天收盘价 ClosePrice string `json:"ClosePrice" bson:"ClosePrice"` LogoUrl string `json:"logo_url" bson:"LogoUrl"` Desc string `json:"desc"` Intro string `json:"intro"` Tape int `bson:"Tape"` Vol int64 `bson:"Vol" json:"vol"` TapeStr string `json:"tape_str"` State int `json:"State"` DateStr string `bson:"DateStr"` Sort int `json:"Sort"` NumericCode string `json:"numeric_code" bson:"NumericCode"` } type StockList struct { Results []StockPolygon `json:"results"` Token string `json:"token"` } type AggsTicke struct { Ticker string `json:"ticker" from:"ticker"` QueryCount int `json:"queryCount" from:"queryCount"` ResultsCount int `json:"resultsCount" from:"resultsCount"` Adjusted bool `json:"adjusted" from:"adjusted"` Results []Results `json:"results" from:"results"` Status string `json:"status" from:"status"` RequestId string `json:"request_id" from:"request_id"` Count int `json:"count" from:"count"` } type Results struct { Code string `json:"T"` V int64 `json:"v"` Vw decimal.Decimal `json:"vw"` O decimal.Decimal `json:"o"` C decimal.Decimal `json:"c"` H decimal.Decimal `json:"h"` L decimal.Decimal `json:"l"` T int64 `json:"t"` N int64 `json:"n"` } type MgoPageSize struct { PageSize int `json:"PageSize"` PageNumber int `json:"PageNumber"` Total int64 `json:"Total"` Data interface{} `json:"Data"` } type ClosePrice struct { Code string `json:"T"` ClosePrice float64 `json:"ClosePrice"` } type StockIndexPolygon struct { Code string `json:"ticker" bson:"Code"` Name string `json:"name" bson:"Name"` Locale string `json:"locale" bson:"Country" ` PrimaryExchange string `json:"primary_exchange" bson:"Exchange"` Currency string `json:"currency_name"` YesterdayClose string `json:"yesterday_close" bson:"YesterdayClose"` // 昨天收盘价 BeforeClose string `json:"BeforeClose" bson:"BeforeClose"` // 前天收盘价 ClosePrice string `json:"ClosePrice" bson:"ClosePrice"` Intro string `json:"intro"` DateStr string `json:"date_str"` State int `json:"state"` Sort int `json:"sort"` Vol int64 `bson:"Vol" json:"vol"` } type StockIndexList struct { Results []StockIndexPolygon `json:"results"` Token string `json:"token"` } // bak数据表数据备份 type StockListBak struct { Country string `json:"Country"` Code string `json:"Code"` BeforeClose string `json:"BeforeClose"` Cik string `json:"Cik"` CompositeFigi string `json:"CompositeFigi"` Currency string `json:"Currency"` Exchange string `json:"Exchange"` Name string `json:"Name"` ShareClassFigi string `json:"ShareClassFigi"` Type string `json:"Type"` YesterdayClose string `json:"YesterdayClose"` DP float64 `json:"DP"` DateStr string `json:"DateStr"` }