Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentDecision ¶
type AgentDecision struct {
Agent string
Provider Provider
Signal Signal
Confidence float64 // 0.0 to 1.0
Reasoning string
}
AgentDecision is the output from a single AI agent
type ConsensusResult ¶
type ConsensusResult struct {
FinalSignal Signal
BuyScore float64
SellScore float64
HoldScore float64
AvgConfidence float64
Decisions []AgentDecision
SentimentData *SentimentData
}
ConsensusResult aggregates decisions from all agents
func (*ConsensusResult) ShouldBuy ¶
func (cr *ConsensusResult) ShouldBuy() bool
ShouldBuy returns true if AI consensus supports buying
func (*ConsensusResult) ShouldSell ¶
func (cr *ConsensusResult) ShouldSell() bool
ShouldSell returns true if AI consensus supports selling
func (*ConsensusResult) String ¶
func (cr *ConsensusResult) String() string
String returns a human-readable summary
type LLMClient ¶
type LLMClient struct {
Provider Provider
APIKey string
Model string
BaseURL string
HTTPClient *http.Client
}
LLMClient provides a unified interface across AI providers
func NewLLMClient ¶
NewLLMClient creates a client for the specified provider
type LLMResponse ¶
type LLMResponse struct {
Content string
}
LLMResponse is the parsed response from any provider
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
Orchestrator manages multiple AI agents and produces consensus decisions
func NewOrchestrator ¶
func NewOrchestrator(openaiKey, deepseekKey, claudeKey string, openaiModel, deepseekModel, claudeModel string) *Orchestrator
NewOrchestrator builds an orchestrator from the available API keys
func (*Orchestrator) Analyze ¶
func (o *Orchestrator) Analyze(ctx context.Context, ts *TechnicalSnapshot, tradeType string) (*ConsensusResult, error)
Analyze runs the multi-agent pipeline and returns a consensus
func (*Orchestrator) IsEnabled ¶
func (o *Orchestrator) IsEnabled() bool
IsEnabled returns true if at least one provider is configured
type SentimentData ¶
type SentimentData struct {
NewsHeadlines []string
FearGreedIndex int
FearGreedLabel string
FetchedAt time.Time
}
SentimentData holds aggregated market sentiment from multiple sources
func FetchSentimentData ¶
func FetchSentimentData(ctx context.Context, symbol string) (*SentimentData, error)
FetchSentimentData gathers sentiment data from free public APIs
func (*SentimentData) FormatForPrompt ¶
func (sd *SentimentData) FormatForPrompt() string
FormatForPrompt returns a text block ready to include in an LLM prompt
type TechnicalSnapshot ¶
type TechnicalSnapshot struct {
Symbol string
Price float64
PrevPrice float64
RSI float64
MACDLine float64
SignalLine float64
PrevMACDLine float64
PrevSignalLine float64
UpperBand float64
LowerBand float64
DEMA float64
Tendency string
ADX float64
Volume float64
AvgVolume float64
}
TechnicalSnapshot contains the current state of all technical indicators
func (*TechnicalSnapshot) FormatForPrompt ¶
func (ts *TechnicalSnapshot) FormatForPrompt() string
FormatForPrompt returns technical data formatted for LLM consumption