Documentation ¶
Index ¶
- Constants
- Variables
- func NewClient() (c *client)
- func NewClientWithCustomHttpConfig(httpClient *http.Client) (c *client)
- type Data
- type DataResponse
- type Recommend
- type RecommendSummary
- type Scanner
- func (c *Scanner) ComputeADX(adx, adxpdi, adxndi, adxpdi1, adxndi1 float64) string
- func (c *Scanner) ComputeAO(ao, ao1 float64) string
- func (c *Scanner) ComputeBBBuy(close, bblower float64) string
- func (c *Scanner) ComputeBBSell(close, bbupper float64) string
- func (c *Scanner) ComputeCCI20(cci20, cci201 float64) string
- func (c *Scanner) ComputeMA(ma, close float64) string
- func (c *Scanner) ComputeMACD(macd, signal float64) string
- func (c *Scanner) ComputeMOM(mom, mom1 float64) string
- func (c *Scanner) ComputePSAR(psar, open float64) string
- func (c *Scanner) ComputeRSI(rsi, rsi1 float64) string
- func (c *Scanner) ComputeRecommend(value float64) (string, error)
- func (c *Scanner) ComputeSimple(value float64) string
- func (c *Scanner) ComputeStoch(k, d, k1, d1 float64) string
- func (c *Scanner) GetAnalysis(screener, exchange, symbol, interval string) (RecommendSummary, error)
- func (c *Scanner) GetIchimoku(screener, exchange, symbol, interval string) (Ichimoku string, value float64, err error)
- func (c *Scanner) GetRecommendations(screener, exchange, symbol, interval string) (RecommendSummary, error)
- func (c *Scanner) PrepareData(symbol, interval string, indicators []string) ([]byte, error)
- func (c *Scanner) PrepareRecommendations() (err error)
- func (c *Scanner) SetDebug(enable bool)
Constants ¶
View Source
const ( Buy = "BUY" StrongBuy = "STRONG_BUY" Sell = "SELL" StrongSell = "STRONG_SELL" Neutral = "NEUTRAL" Error = "ERROR" )
View Source
const ( API_URL = "https://scanner.tradingview.com/" DEFAULT_SCREENER = "crypto" API_POSTFIX = "scan" // INTERVAL_1_MINUTE = "1m" INTERVAL_5_MINUTES = "5m" INTERVAL_15_MINUTES = "15m" INTERVAL_1_HOUR = "1h" INTERVAL_4_HOURS = "4h" INTERVAL_1_DAY = "1d" INTERVAL_1_WEEK = "1W" INTERVAL_1_MONTH = "1M" )
Variables ¶
View Source
var (
ContextLogger = logrus.WithFields(logrus.Fields{
"client_name": "tvscanner",
})
)
Functions ¶
func NewClientWithCustomHttpConfig ¶
NewClientWithCustomHttpConfig returns a new Scanner HTTP client using the predefined http client
Types ¶
type DataResponse ¶
type RecommendSummary ¶
type RecommendSummary struct { Recommend Recommend BuyCount int SellCount int NeutralCount int Ocsillators DataResponse Pivot DataResponse }
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner represent a Scanner client
func NewWithCustomHttpClient ¶
NewWithCustomHttpClient returns an instantiated Scanner struct with custom http client
func (*Scanner) ComputeADX ¶
ComputeADX
func (*Scanner) ComputeBBBuy ¶
ComputeBBBuy
func (*Scanner) ComputeBBSell ¶
ComputeBBSell
func (*Scanner) ComputeCCI20 ¶
ComputeCCI20
func (*Scanner) ComputeMACD ¶
ComputeMACD
func (*Scanner) ComputeRecommend ¶
ComputeRecommend return "STRONG_BUY", "BUY", "NEUTRAL", "SELL", "STRONG_SELL", or "ERROR"
func (*Scanner) ComputeSimple ¶
ComputeSimple return "BUY", "SELL", or "NEUTRAL"
func (*Scanner) ComputeStoch ¶
ComputeStoch
func (*Scanner) GetAnalysis ¶
func (c *Scanner) GetAnalysis(screener, exchange, symbol, interval string) (RecommendSummary, error)
func (*Scanner) GetIchimoku ¶
func (*Scanner) GetRecommendations ¶
func (c *Scanner) GetRecommendations(screener, exchange, symbol, interval string) (RecommendSummary, error)
func (*Scanner) PrepareData ¶
PrepareData prepare payload for request
func (*Scanner) PrepareRecommendations ¶
Click to show internal directories.
Click to hide internal directories.