models

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIConfig

type AIConfig struct {
	ID             string               `json:"id"`
	Name           string               `json:"name"`
	Provider       AIProvider           `json:"provider"`
	BaseURL        string               `json:"baseUrl"`
	APIKey         string               `json:"apiKey"`
	ModelName      string               `json:"modelName"`
	MaxTokens      int                  `json:"maxTokens"`
	TokenParamMode OpenAITokenParamMode `json:"tokenParamMode"`
	Temperature    float64              `json:"temperature"`
	Timeout        int                  `json:"timeout"`
	IsDefault      bool                 `json:"isDefault"`
	// OpenAI Responses API 开关
	UseResponses bool `json:"useResponses"`
	// 不支持 system role(自动检测,用户不可见)
	NoSystemRole bool `json:"noSystemRole"`
	// Vertex AI 专用字段
	Project         string `json:"project"`
	Location        string `json:"location"`
	CredentialsJSON string `json:"credentialsJson"`
}

AIConfig AI服务配置

type AIProvider

type AIProvider string

AIProvider AI服务提供商类型

const (
	AIProviderOpenAI    AIProvider = "openai"
	AIProviderGemini    AIProvider = "gemini"
	AIProviderVertexAI  AIProvider = "vertexai"
	AIProviderAnthropic AIProvider = "anthropic"
)

type AgentConfig

type AgentConfig struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Role        string   `json:"role"`
	Avatar      string   `json:"avatar"`
	Color       string   `json:"color"`
	Instruction string   `json:"instruction"`
	Tools       []string `json:"tools"`
	MCPServers  []string `json:"mcpServers"`
	Enabled     bool     `json:"enabled"`
	AIConfigID  string   `json:"aiConfigId"` // 可选,空则用默认AI
}

AgentConfig Agent配置(从策略转换而来)

type AgentSelectionStyle added in v0.3.4

type AgentSelectionStyle string

AgentSelectionStyle 小韭菜选人风格

const (
	AgentSelectionBalanced     AgentSelectionStyle = "balanced"
	AgentSelectionConservative AgentSelectionStyle = "conservative"
	AgentSelectionAggressive   AgentSelectionStyle = "aggressive"
)

type AppConfig

type AppConfig struct {
	Theme               string              `json:"theme"`           // 主题色: military, ocean, purple, orange, dark
	CandleColorMode     string              `json:"candleColorMode"` // 涨跌颜色模式: red-up(红涨绿跌) / green-up(绿涨红跌)
	AIConfigs           []AIConfig          `json:"aiConfigs"`
	DefaultAIID         string              `json:"defaultAiId"`
	StrategyAIID        string              `json:"strategyAiId"`  // 策略生成用AI
	ModeratorAIID       string              `json:"moderatorAiId"` // 意图分析(小韭菜)用AI
	AIRetryCount        int                 `json:"aiRetryCount"`
	VerboseAgentIO      bool                `json:"verboseAgentIO"`
	AgentSelectionStyle AgentSelectionStyle `json:"agentSelectionStyle"`
	EnableSecondReview  bool                `json:"enableSecondReview"`
	MCPServers          []MCPServerConfig   `json:"mcpServers"` // MCP服务器配置列表
	Memory              MemoryConfig        `json:"memory"`     // 记忆管理配置
	Proxy               ProxyConfig         `json:"proxy"`      // 代理配置
	Layout              LayoutConfig        `json:"layout"`     // 界面布局配置
	OpenClaw            OpenClawConfig      `json:"openClaw"`   // OpenClaw 服务配置
	Indicators          IndicatorConfig     `json:"indicators"` // 技术指标配置
}

AppConfig 应用配置

type BOLLConfig added in v0.3.3

type BOLLConfig struct {
	Enabled    bool    `json:"enabled"`
	Period     int     `json:"period"`     // 默认 20
	Multiplier float64 `json:"multiplier"` // 默认 2.0
}

type BoardFundFlowItem added in v0.3.4

type BoardFundFlowItem struct {
	Code                 string  `json:"code"`
	Name                 string  `json:"name"`
	Price                float64 `json:"price"`
	ChangePercent        float64 `json:"changePercent"`
	MainNetInflow        float64 `json:"mainNetInflow"`
	MainNetInflowRatio   float64 `json:"mainNetInflowRatio"`
	SuperNetInflow       float64 `json:"superNetInflow"`
	SuperNetInflowRatio  float64 `json:"superNetInflowRatio"`
	LargeNetInflow       float64 `json:"largeNetInflow"`
	LargeNetInflowRatio  float64 `json:"largeNetInflowRatio"`
	MediumNetInflow      float64 `json:"mediumNetInflow"`
	MediumNetInflowRatio float64 `json:"mediumNetInflowRatio"`
	SmallNetInflow       float64 `json:"smallNetInflow"`
	SmallNetInflowRatio  float64 `json:"smallNetInflowRatio"`
	UpdateTime           string  `json:"updateTime,omitempty"`
}

BoardFundFlowItem 板块资金流条目

type BoardFundFlowList added in v0.3.4

type BoardFundFlowList struct {
	Category   string              `json:"category"`
	Items      []BoardFundFlowItem `json:"items"`
	Total      int64               `json:"total,omitempty"`
	UpdateTime string              `json:"updateTime,omitempty"`
}

BoardFundFlowList 板块资金流列表

type BoardLeaderItem added in v0.3.4

type BoardLeaderItem struct {
	Rank               int     `json:"rank"`
	Code               string  `json:"code"`
	Name               string  `json:"name"`
	Price              float64 `json:"price"`
	ChangePercent      float64 `json:"changePercent"`
	TurnoverRate       float64 `json:"turnoverRate,omitempty"`
	MainNetInflow      float64 `json:"mainNetInflow"`
	MainNetInflowRatio float64 `json:"mainNetInflowRatio"`
	Score              float64 `json:"score"`
	UpdateTime         string  `json:"updateTime,omitempty"`
}

BoardLeaderItem 板块龙头候选

type BoardLeaderList added in v0.3.4

type BoardLeaderList struct {
	BoardCode  string            `json:"boardCode"`
	Items      []BoardLeaderItem `json:"items"`
	UpdateTime string            `json:"updateTime,omitempty"`
}

BoardLeaderList 板块龙头结果

type BonusFinancing added in v0.3.4

type BonusFinancing struct {
	Dividend  []map[string]any `json:"dividend,omitempty"`
	Annual    []map[string]any `json:"annual,omitempty"`
	Financing []map[string]any `json:"financing,omitempty"`
	Allotment []map[string]any `json:"allotment,omitempty"`
}

BonusFinancing 分红融资信息

type BusinessAnalysis added in v0.3.4

type BusinessAnalysis struct {
	Scope       []map[string]any `json:"scope,omitempty"`
	Composition []map[string]any `json:"composition,omitempty"`
	Review      []map[string]any `json:"review,omitempty"`
}

BusinessAnalysis 经营分析信息

type ChatMessage

type ChatMessage struct {
	ID          string   `json:"id"`
	AgentID     string   `json:"agentId"`
	AgentName   string   `json:"agentName"`
	Role        string   `json:"role"`
	Content     string   `json:"content"`
	Timestamp   int64    `json:"timestamp"`
	ReplyTo     string   `json:"replyTo,omitempty"`     // 引用的消息ID
	Mentions    []string `json:"mentions,omitempty"`    // @的成员ID列表
	Round       int      `json:"round,omitempty"`       // 讨论轮次
	MsgType     string   `json:"msgType,omitempty"`     // 消息类型: opening/opinion/summary
	Error       string   `json:"error,omitempty"`       // 失败时的错误信息
	MeetingMode string   `json:"meetingMode,omitempty"` // smart=串行, direct=独立
}

ChatMessage 聊天消息

type EMAConfig added in v0.3.3

type EMAConfig struct {
	Enabled bool  `json:"enabled"`
	Periods []int `json:"periods"` // 默认 [12, 26]
}

type EquityPledge added in v0.3.4

type EquityPledge struct {
	Records []map[string]any `json:"records,omitempty"`
	Latest  map[string]any   `json:"latest,omitempty"`
}

EquityPledge 股权质押概况

type F10CapitalOperation added in v0.3.4

type F10CapitalOperation struct {
	RaiseSources    []map[string]any `json:"raiseSources,omitempty"`
	ProjectProgress []map[string]any `json:"projectProgress,omitempty"`
}

F10CapitalOperation 资本运作信息

type F10CoreThemes added in v0.3.4

type F10CoreThemes struct {
	BoardTypes           []map[string]any `json:"boardTypes,omitempty"`
	Themes               []map[string]any `json:"themes,omitempty"`
	History              []map[string]any `json:"history,omitempty"`
	SelectedBoardReasons []map[string]any `json:"selectedBoardReasons,omitempty"`
	PopularLeaders       []map[string]any `json:"popularLeaders,omitempty"`
}

F10CoreThemes 核心题材

type F10EquityStructure added in v0.3.4

type F10EquityStructure struct {
	Latest      []map[string]any `json:"latest,omitempty"`
	History     []map[string]any `json:"history,omitempty"`
	Composition []map[string]any `json:"composition,omitempty"`
}

F10EquityStructure 股本结构

type F10IndustryCompareMetrics added in v0.3.4

type F10IndustryCompareMetrics struct {
	Valuation   []map[string]any `json:"valuation,omitempty"`
	Performance []map[string]any `json:"performance,omitempty"`
	Growth      []map[string]any `json:"growth,omitempty"`
}

F10IndustryCompareMetrics 行业对比指标

type F10MainIndicators added in v0.3.4

type F10MainIndicators struct {
	Latest    []map[string]any `json:"latest,omitempty"`
	Yearly    []map[string]any `json:"yearly,omitempty"`
	Quarterly []map[string]any `json:"quarterly,omitempty"`
}

F10MainIndicators 主要指标

type F10Management added in v0.3.4

type F10Management struct {
	ManagementList []map[string]any `json:"managementList,omitempty"`
	SalaryDetails  []map[string]any `json:"salaryDetails,omitempty"`
	HoldingChanges []map[string]any `json:"holdingChanges,omitempty"`
}

F10Management 公司高管信息

type F10OperationsRequired added in v0.3.4

type F10OperationsRequired struct {
	LatestIndicators      map[string]any   `json:"latestIndicators,omitempty"`
	LatestIndicatorsExtra map[string]any   `json:"latestIndicatorsExtra,omitempty"`
	LatestIndicatorsQuote map[string]any   `json:"latestIndicatorsQuote,omitempty"`
	EventReminders        []map[string]any `json:"eventReminders,omitempty"`
	News                  []map[string]any `json:"news,omitempty"`
	Announcements         []map[string]any `json:"announcements,omitempty"`
	ShareholderAnalysis   []map[string]any `json:"shareholderAnalysis,omitempty"`
	DragonTigerList       []map[string]any `json:"dragonTigerList,omitempty"`
	BlockTrades           []map[string]any `json:"blockTrades,omitempty"`
	MarginTrading         []map[string]any `json:"marginTrading,omitempty"`
	MainIndicators        []map[string]any `json:"mainIndicators,omitempty"`
	SectorTags            []map[string]any `json:"sectorTags,omitempty"`
	CoreThemes            []map[string]any `json:"coreThemes,omitempty"`
	InstitutionForecast   []map[string]any `json:"institutionForecast,omitempty"`
	ForecastChart         []map[string]any `json:"forecastChart,omitempty"`
	ReportSummary         []map[string]any `json:"reportSummary,omitempty"`
	ResearchReports       []map[string]any `json:"researchReports,omitempty"`
	ForecastRevisionTrack []map[string]any `json:"forecastRevisionTrack,omitempty"`
}

F10OperationsRequired 操盘必读数据

type F10Overview added in v0.3.4

type F10Overview struct {
	Code             string                    `json:"code"`
	UpdatedAt        string                    `json:"updatedAt,omitempty"`
	Source           string                    `json:"source,omitempty"`
	Company          map[string]any            `json:"company,omitempty"`
	Financials       FinancialStatements       `json:"financials,omitempty"`
	Performance      PerformanceEvents         `json:"performance,omitempty"`
	FundFlow         FundFlowSeries            `json:"fundFlow,omitempty"`
	Institutions     InstitutionalHoldings     `json:"institutions,omitempty"`
	Industry         IndustryCompare           `json:"industry,omitempty"`
	Bonus            BonusFinancing            `json:"bonus,omitempty"`
	Business         BusinessAnalysis          `json:"business,omitempty"`
	Shareholders     ShareholderNumbers        `json:"shareholders,omitempty"`
	Pledge           EquityPledge              `json:"pledge,omitempty"`
	Lockup           LockupRelease             `json:"lockup,omitempty"`
	HolderChange     ShareholderChanges        `json:"holderChange,omitempty"`
	Buyback          StockBuyback              `json:"buyback,omitempty"`
	Valuation        StockValuation            `json:"valuation,omitempty"`
	Operations       F10OperationsRequired     `json:"operations,omitempty"`
	CoreThemes       F10CoreThemes             `json:"coreThemes,omitempty"`
	IndustryMetrics  F10IndustryCompareMetrics `json:"industryMetrics,omitempty"`
	MainIndicators   F10MainIndicators         `json:"mainIndicators,omitempty"`
	Management       F10Management             `json:"management,omitempty"`
	CapitalOperation F10CapitalOperation       `json:"capitalOperation,omitempty"`
	EquityStructure  F10EquityStructure        `json:"equityStructure,omitempty"`
	RelatedStocks    F10RelatedStocks          `json:"relatedStocks,omitempty"`
	ValuationTrend   F10ValuationTrend         `json:"valuationTrend,omitempty"`
	Errors           map[string]string         `json:"errors,omitempty"`
}

F10Overview F10 综合数据

type F10RelatedStocks added in v0.3.4

type F10RelatedStocks struct {
	IndustryRankings []map[string]any `json:"industryRankings,omitempty"`
	ConceptRelations []map[string]any `json:"conceptRelations,omitempty"`
}

F10RelatedStocks 关联个股

type F10ValuationTrend added in v0.3.4

type F10ValuationTrend struct {
	Source         string            `json:"source,omitempty"`
	Range          string            `json:"range,omitempty"`
	RequestedRange string            `json:"requestedRange,omitempty"`
	Fallback       bool              `json:"fallback,omitempty"`
	DateType       int               `json:"dateType,omitempty"`
	Labels         map[string]string `json:"labels,omitempty"`
	PE             []map[string]any  `json:"pe,omitempty"`
	PB             []map[string]any  `json:"pb,omitempty"`
	PS             []map[string]any  `json:"ps,omitempty"`
	PCF            []map[string]any  `json:"pcf,omitempty"`
}

F10ValuationTrend 估值趋势

type FinancialStatements added in v0.3.4

type FinancialStatements struct {
	Income   []map[string]any `json:"income,omitempty"`
	Balance  []map[string]any `json:"balance,omitempty"`
	Cashflow []map[string]any `json:"cashflow,omitempty"`
}

FinancialStatements 财务报表集合

type FundFlowKLine added in v0.3.4

type FundFlowKLine struct {
	Time            string  `json:"time"`
	MainNetInflow   float64 `json:"mainNetInflow"`
	SuperNetInflow  float64 `json:"superNetInflow"`
	LargeNetInflow  float64 `json:"largeNetInflow"`
	MediumNetInflow float64 `json:"mediumNetInflow"`
	SmallNetInflow  float64 `json:"smallNetInflow"`
}

FundFlowKLine 资金流曲线单点

type FundFlowKLineSeries added in v0.3.4

type FundFlowKLineSeries struct {
	Code         string          `json:"code"`
	Name         string          `json:"name"`
	Market       int             `json:"market"`
	TradePeriods TradePeriods    `json:"tradePeriods,omitempty"`
	KLines       []FundFlowKLine `json:"klines"`
}

FundFlowKLineSeries 资金流曲线

type FundFlowSeries added in v0.3.4

type FundFlowSeries struct {
	Fields []string          `json:"fields,omitempty"`
	Lines  [][]string        `json:"lines,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
	Latest map[string]any    `json:"latest,omitempty"`
}

FundFlowSeries 资金流序列

type IndicatorConfig added in v0.3.3

type IndicatorConfig struct {
	MA   MAConfig   `json:"ma"`
	EMA  EMAConfig  `json:"ema"`
	BOLL BOLLConfig `json:"boll"`
	MACD MACDConfig `json:"macd"`
	RSI  RSIConfig  `json:"rsi"`
	KDJ  KDJConfig  `json:"kdj"`
}

IndicatorConfig 技术指标配置

type IndustryCompare added in v0.3.4

type IndustryCompare struct {
	Industry string      `json:"industry,omitempty"`
	Peers    []StockPeer `json:"peers,omitempty"`
}

IndustryCompare 行业对比信息

type InstitutionalHoldings added in v0.3.4

type InstitutionalHoldings struct {
	TopHolders []map[string]any `json:"topHolders,omitempty"`
	Controller map[string]any   `json:"controller,omitempty"`
}

InstitutionalHoldings 机构/股东数据

type KDJConfig added in v0.3.3

type KDJConfig struct {
	Enabled bool `json:"enabled"`
	Period  int  `json:"period"` // 默认 9
	K       int  `json:"k"`      // 默认 3
	D       int  `json:"d"`      // 默认 3
}

type KLineData

type KLineData struct {
	Time   string  `json:"time"`
	Open   float64 `json:"open"`
	High   float64 `json:"high"`
	Low    float64 `json:"low"`
	Close  float64 `json:"close"`
	Volume int64   `json:"volume"`
	Amount float64 `json:"amount,omitempty"`
	Avg    float64 `json:"avg,omitempty"` // 分时均价线
	// 均线数据
	MA5  float64 `json:"ma5,omitempty"`
	MA10 float64 `json:"ma10,omitempty"`
	MA20 float64 `json:"ma20,omitempty"`
}

KLineData K线数据

type LayoutConfig added in v0.2.0

type LayoutConfig struct {
	LeftPanelWidth    int `json:"leftPanelWidth"`    // 左侧面板宽度(px)
	RightPanelWidth   int `json:"rightPanelWidth"`   // 右侧面板宽度(px)
	BottomPanelHeight int `json:"bottomPanelHeight"` // 底部面板高度(px)
	WindowWidth       int `json:"windowWidth"`       // 窗口宽度(px)
	WindowHeight      int `json:"windowHeight"`      // 窗口高度(px)
}

LayoutConfig 界面布局配置

type LockupRelease added in v0.3.4

type LockupRelease struct {
	Records []map[string]any `json:"records,omitempty"`
	Latest  map[string]any   `json:"latest,omitempty"`
}

LockupRelease 限售解禁信息

type LongHuBangDetail

type LongHuBangDetail struct {
	Rank        int     `json:"rank"`        // 排名
	OperName    string  `json:"operName"`    // 营业部名称
	BuyAmt      float64 `json:"buyAmt"`      // 买入金额(元)
	BuyPercent  float64 `json:"buyPercent"`  // 买入占总成交比(%)
	SellAmt     float64 `json:"sellAmt"`     // 卖出金额(元)
	SellPercent float64 `json:"sellPercent"` // 卖出占总成交比(%)
	NetAmt      float64 `json:"netAmt"`      // 净买入(元)
	Direction   string  `json:"direction"`   // 方向: buy/sell
}

LongHuBangDetail 龙虎榜营业部明细

type LongHuBangItem

type LongHuBangItem struct {
	TradeDate     string  `json:"tradeDate"`     // 交易日期
	Code          string  `json:"code"`          // 股票代码
	SecuCode      string  `json:"secuCode"`      // 证券代码(含市场后缀,如000001.SZ)
	Name          string  `json:"name"`          // 股票名称
	ClosePrice    float64 `json:"closePrice"`    // 收盘价
	ChangePercent float64 `json:"changePercent"` // 涨跌幅(%)
	NetBuyAmt     float64 `json:"netBuyAmt"`     // 龙虎榜净买额(元)
	BuyAmt        float64 `json:"buyAmt"`        // 龙虎榜买入额(元)
	SellAmt       float64 `json:"sellAmt"`       // 龙虎榜卖出额(元)
	TotalAmt      float64 `json:"totalAmt"`      // 龙虎榜成交额(元)
	TurnoverRate  float64 `json:"turnoverRate"`  // 换手率(%)
	FreeCap       float64 `json:"freeCap"`       // 流通市值(元)
	Reason        string  `json:"reason"`        // 上榜原因
	ReasonDetail  string  `json:"reasonDetail"`  // 上榜原因详情
	AccumAmount   float64 `json:"accumAmount"`   // 当日总成交额(元)
	DealRatio     float64 `json:"dealRatio"`     // 龙虎榜成交占比(%)
	NetRatio      float64 `json:"netRatio"`      // 龙虎榜净买占比(%)
	D1Change      float64 `json:"d1Change"`      // 次日涨跌幅(%)
	D2Change      float64 `json:"d2Change"`      // 次2日涨跌幅(%)
	D5Change      float64 `json:"d5Change"`      // 5日涨跌幅(%)
	D10Change     float64 `json:"d10Change"`     // 10日涨跌幅(%)
	SecurityType  string  `json:"securityType"`  // 证券类型代码
}

LongHuBangItem 龙虎榜单条数据

type MACDConfig added in v0.3.3

type MACDConfig struct {
	Enabled bool `json:"enabled"`
	Fast    int  `json:"fast"`   // 默认 12
	Slow    int  `json:"slow"`   // 默认 26
	Signal  int  `json:"signal"` // 默认 9
}

type MAConfig added in v0.3.3

type MAConfig struct {
	Enabled bool  `json:"enabled"`
	Periods []int `json:"periods"` // 默认 [5, 10, 20]
}

type MCPServerConfig

type MCPServerConfig struct {
	ID            string           `json:"id"`
	Name          string           `json:"name"`
	TransportType MCPTransportType `json:"transportType"`
	Endpoint      string           `json:"endpoint"`   // HTTP/SSE 端点 URL
	Command       string           `json:"command"`    // 命令行传输的命令
	Args          []string         `json:"args"`       // 命令行参数
	ToolFilter    []string         `json:"toolFilter"` // 工具过滤列表(空则全部)
	Enabled       bool             `json:"enabled"`    // 是否启用
}

MCPServerConfig MCP服务器配置

type MCPTransportType

type MCPTransportType string

MCPTransportType MCP传输类型

const (
	MCPTransportHTTP    MCPTransportType = "http"    // StreamableHTTP 传输
	MCPTransportSSE     MCPTransportType = "sse"     // SSE 传输(已废弃)
	MCPTransportCommand MCPTransportType = "command" // 命令行传输
)

type MarketIndex

type MarketIndex struct {
	Code          string  `json:"code"`          // 指数代码,如 sh000001
	Name          string  `json:"name"`          // 指数名称,如 上证指数
	Price         float64 `json:"price"`         // 当前点位
	Change        float64 `json:"change"`        // 涨跌点数
	ChangePercent float64 `json:"changePercent"` // 涨跌幅(%)
	Volume        int64   `json:"volume"`        // 成交量(手)
	Amount        float64 `json:"amount"`        // 成交额(万元)
}

MarketIndex 大盘指数数据

type MemoryConfig

type MemoryConfig struct {
	Enabled           bool   `json:"enabled"`           // 是否启用记忆管理
	AIConfigID        string `json:"aiConfigId"`        // 使用的 LLM 配置 ID(空则使用默认)
	MaxRecentRounds   int    `json:"maxRecentRounds"`   // 保留最近几轮讨论
	MaxKeyFacts       int    `json:"maxKeyFacts"`       // 最大关键事实数
	MaxSummaryLength  int    `json:"maxSummaryLength"`  // 摘要最大字数
	CompressThreshold int    `json:"compressThreshold"` // 触发压缩的轮次数
}

MemoryConfig 记忆管理配置

type OpenAITokenParamMode added in v0.3.4

type OpenAITokenParamMode string
const (
	OpenAITokenParamAuto                OpenAITokenParamMode = "auto"
	OpenAITokenParamMaxTokens           OpenAITokenParamMode = "max_tokens"
	OpenAITokenParamMaxCompletionTokens OpenAITokenParamMode = "max_completion_tokens"
)

type OpenClawConfig added in v0.3.0

type OpenClawConfig struct {
	Enabled bool   `json:"enabled"` // 是否启用
	Port    int    `json:"port"`    // 监听端口
	APIKey  string `json:"apiKey"`  // API 鉴权密钥(可选)
}

OpenClawConfig OpenClaw 服务配置

type OrderBook

type OrderBook struct {
	Bids []OrderBookItem `json:"bids"`
	Asks []OrderBookItem `json:"asks"`
}

OrderBook 盘口数据

type OrderBookItem

type OrderBookItem struct {
	Price   float64 `json:"price"`
	Size    int64   `json:"size"`
	Total   int64   `json:"total"`
	Percent float64 `json:"percent"`
}

OrderBookItem 盘口单项

type PerformanceEvents added in v0.3.4

type PerformanceEvents struct {
	Forecast []map[string]any `json:"forecast,omitempty"`
	Express  []map[string]any `json:"express,omitempty"`
	Schedule []map[string]any `json:"schedule,omitempty"`
}

PerformanceEvents 业绩事件集合

type ProxyConfig

type ProxyConfig struct {
	Mode      ProxyMode `json:"mode"`
	CustomURL string    `json:"customUrl"` // 自定义代理地址
}

ProxyConfig 代理配置

type ProxyMode

type ProxyMode string

ProxyMode 代理模式

const (
	ProxyModeNone   ProxyMode = "none"   // 无代理,直连
	ProxyModeSystem ProxyMode = "system" // 使用系统代理
	ProxyModeCustom ProxyMode = "custom" // 自定义代理
)

type RSIConfig added in v0.3.3

type RSIConfig struct {
	Enabled bool `json:"enabled"`
	Period  int  `json:"period"` // 默认 14
}

type ShareholderChanges added in v0.3.4

type ShareholderChanges struct {
	Records []map[string]any `json:"records,omitempty"`
	Latest  map[string]any   `json:"latest,omitempty"`
}

ShareholderChanges 股东增减持

type ShareholderNumbers added in v0.3.4

type ShareholderNumbers struct {
	Records []map[string]any `json:"records,omitempty"`
	Latest  map[string]any   `json:"latest,omitempty"`
}

ShareholderNumbers 股东户数信息

type Stock

type Stock struct {
	Symbol        string  `json:"symbol"`
	Name          string  `json:"name"`
	Price         float64 `json:"price"`
	Change        float64 `json:"change"`
	ChangePercent float64 `json:"changePercent"`
	Volume        int64   `json:"volume"`
	Amount        float64 `json:"amount"`
	MarketCap     string  `json:"marketCap"`
	Sector        string  `json:"sector"`
	Open          float64 `json:"open"`
	High          float64 `json:"high"`
	Low           float64 `json:"low"`
	PreClose      float64 `json:"preClose"`
}

Stock 股票基本信息

type StockAnnouncement added in v0.3.4

type StockAnnouncement struct {
	Title      string `json:"title"`
	NoticeDate string `json:"noticeDate"`
	Type       string `json:"type,omitempty"`
	Columns    string `json:"columns,omitempty"`
	ArtCode    string `json:"artCode,omitempty"`
}

StockAnnouncement 公告摘要

type StockAnnouncements added in v0.3.4

type StockAnnouncements struct {
	Code  string              `json:"code"`
	Items []StockAnnouncement `json:"items"`
	Total int64               `json:"total,omitempty"`
}

StockAnnouncements 公告列表

type StockBuyback added in v0.3.4

type StockBuyback struct {
	Records []map[string]any `json:"records,omitempty"`
	Latest  map[string]any   `json:"latest,omitempty"`
}

StockBuyback 股票回购

type StockMoveItem added in v0.3.4

type StockMoveItem struct {
	Rank               int     `json:"rank"`
	Code               string  `json:"code"`
	Name               string  `json:"name"`
	Price              float64 `json:"price"`
	ChangePercent      float64 `json:"changePercent"`
	Speed              float64 `json:"speed"`
	TurnoverRate       float64 `json:"turnoverRate"`
	Volume             int64   `json:"volume"`
	Amount             float64 `json:"amount"`
	MainNetInflow      float64 `json:"mainNetInflow"`
	MainNetInflowRatio float64 `json:"mainNetInflowRatio"`
	High               float64 `json:"high"`
	Low                float64 `json:"low"`
	Open               float64 `json:"open"`
	PreClose           float64 `json:"preClose"`
	UpdateTime         string  `json:"updateTime,omitempty"`
}

StockMoveItem 盘口异动候选

type StockMoveList added in v0.3.4

type StockMoveList struct {
	MoveType   string          `json:"moveType"`
	Items      []StockMoveItem `json:"items"`
	Total      int64           `json:"total,omitempty"`
	UpdateTime string          `json:"updateTime,omitempty"`
}

StockMoveList 盘口异动结果

type StockPeer added in v0.3.4

type StockPeer struct {
	Symbol string `json:"symbol"`
	Name   string `json:"name"`
	Market string `json:"market,omitempty"`
}

StockPeer 同行业可比公司

type StockPosition

type StockPosition struct {
	Shares    int64   `json:"shares"`    // 持仓数量
	CostPrice float64 `json:"costPrice"` // 成本价
}

StockPosition 股票持仓信息

type StockSession

type StockSession struct {
	ID        string         `json:"id"`
	StockCode string         `json:"stockCode"` // 股票代码
	StockName string         `json:"stockName"` // 股票名称
	Messages  []ChatMessage  `json:"messages"`  // 讨论历史
	Position  *StockPosition `json:"position"`  // 持仓信息
	CreatedAt int64          `json:"createdAt"`
	UpdatedAt int64          `json:"updatedAt"`
}

StockSession 股票会话(每个自选股独立)

type StockValuation added in v0.3.4

type StockValuation struct {
	Price          float64 `json:"price,omitempty"`
	PETTM          float64 `json:"peTtm,omitempty"`
	PB             float64 `json:"pb,omitempty"`
	TotalMarketCap float64 `json:"totalMarketCap,omitempty"`
	FloatMarketCap float64 `json:"floatMarketCap,omitempty"`
	TurnoverRate   float64 `json:"turnoverRate,omitempty"`
	Amplitude      float64 `json:"amplitude,omitempty"`
	TotalShares    float64 `json:"totalShares,omitempty"`
	FloatShares    float64 `json:"floatShares,omitempty"`
}

StockValuation 估值指标

type Strategy added in v0.2.0

type Strategy struct {
	ID          string          `json:"id"`
	Name        string          `json:"name"`
	Description string          `json:"description"`
	Color       string          `json:"color"`
	Agents      []StrategyAgent `json:"agents"` // 策略专属的专家配置

	IsBuiltin  bool   `json:"isBuiltin"`
	Source     string `json:"source"`     // builtin/user/ai
	SourceMeta string `json:"sourceMeta"` // AI生成时的原始prompt
	CreatedAt  int64  `json:"createdAt"`
}

Strategy 策略配置

type StrategyAgent added in v0.2.0

type StrategyAgent struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Role        string   `json:"role"`
	Avatar      string   `json:"avatar"`
	Color       string   `json:"color"`
	Instruction string   `json:"instruction"`
	Tools       []string `json:"tools"`
	MCPServers  []string `json:"mcpServers"`
	Enabled     bool     `json:"enabled"`
	AIConfigID  string   `json:"aiConfigId"` // 可选,空则用默认AI
}

StrategyAgent 策略专属专家配置

type StrategyStore added in v0.2.0

type StrategyStore struct {
	ActiveID   string     `json:"activeId"`
	Strategies []Strategy `json:"strategies"`
}

StrategyStore 策略存储结构

type TradePeriod added in v0.3.4

type TradePeriod struct {
	Begin int64 `json:"begin"`
	End   int64 `json:"end"`
}

TradePeriod 单段交易时间

type TradePeriods added in v0.3.4

type TradePeriods struct {
	Pre     *TradePeriod  `json:"pre,omitempty"`
	After   *TradePeriod  `json:"after,omitempty"`
	Periods []TradePeriod `json:"periods,omitempty"`
}

TradePeriods 交易时段

Jump to

Keyboard shortcuts

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