aboutsummaryrefslogtreecommitdiff
path: root/backend/internal/analyzer/analyzer.go
blob: c05564734c2f3f7166bf2089a00925476eefbd97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package analyzer

import (
	"context"

	"github.com/Rhymond/go-money"
)

type Analyzer interface {
	Analyze(
		ctx context.Context,
		symbol string,
		price *money.Money,
		rawAnalysis string,
	) (*Analysis, error)
}

type ChartAction string

const (
	Buy     ChartAction = "buy"
	Sell    ChartAction = "sell"
	Hold    ChartAction = "hold"
	Unknown ChartAction = "unknown"
)

type Analysis struct {
	Action     ChartAction
	Price      *money.Money
	Reason     string
	Confidence uint8
}