Documentation
¶
Index ¶
- Variables
- func ScreenerForExchange(exchange string) (string, error)
- type HTTPClient
- func (c *HTTPClient) Get(ctx context.Context, url string) ([]byte, error)
- func (c *HTTPClient) GetWithHeaders(ctx context.Context, url string, headers map[string]string) ([]byte, error)
- func (c *HTTPClient) Post(ctx context.Context, url string, body io.Reader) ([]byte, error)
- func (c *HTTPClient) PostWithHeaders(ctx context.Context, url string, body io.Reader, headers map[string]string) ([]byte, error)
- type RSSClient
- type RSSItem
- type RedditClient
- type RedditPost
- type TVSymbolData
- type TradingViewClient
- type YahooChartResult
- type YahooClient
- type YahooMeta
- type YahooOHLCV
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultColumns = []string{
"open", "high", "low", "close", "volume",
"SMA10", "SMA20", "SMA30", "SMA50", "SMA100", "SMA200",
"EMA9", "EMA20", "EMA50", "EMA100", "EMA200",
"BB.upper", "BB.lower",
"RSI", "RSI[1]",
"MACD.macd", "MACD.signal",
"Stoch.K", "Stoch.D",
"ATR", "ADX", "CCI20", "W.R", "AO", "Mom",
"P.SAR", "Ichimoku.BLine", "VWAP", "VWMA", "HullMA9",
"Stoch.RSI.K",
"average_volume_10d_calc", "relative_volume_10d_calc",
"Pivot.M.Classic.Middle", "Pivot.M.Classic.R1", "Pivot.M.Classic.S1",
"Recommend.All", "Recommend.MA", "Recommend.Other",
"UO", "change", "Volatility.D",
}
View Source
var ExchangeToScreener = map[string]string{
"KUCOIN": "crypto",
"BINANCE": "crypto",
"BITGET": "crypto",
"BYBIT": "crypto",
"OKX": "crypto",
"COINBASE": "crypto",
"GATE": "crypto",
"MEXC": "crypto",
"HTX": "crypto",
"BITFINEX": "crypto",
"BINGX": "crypto",
"PHEMEX": "crypto",
"KRAKEN": "crypto",
"NASDAQ": "america",
"NYSE": "america",
}
View Source
var NewsFeeds = map[string]string{
"coindesk": "https://www.coindesk.com/arc/outboundfeeds/rss/",
"cointelegraph": "https://cointelegraph.com/rss",
"reuters-business": "https://feeds.reuters.com/reuters/businessNews",
"reuters-companies": "https://feeds.reuters.com/reuters/companyNews",
}
Functions ¶
func ScreenerForExchange ¶
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(cfg *config.Config) *HTTPClient
func (*HTTPClient) GetWithHeaders ¶
type RSSClient ¶
type RSSClient struct {
// contains filtered or unexported fields
}
func NewRSSClient ¶
func NewRSSClient(http *HTTPClient) *RSSClient
func (*RSSClient) FetchMultiple ¶
FetchMultiple aggregates items from multiple feeds. Individual feed failures are skipped so a single unavailable source does not block the rest.
type RedditClient ¶
type RedditClient struct {
// contains filtered or unexported fields
}
func NewRedditClient ¶
func NewRedditClient(http *HTTPClient) *RedditClient
func (*RedditClient) Search ¶
func (c *RedditClient) Search(ctx context.Context, subreddit, query string, limit int) ([]RedditPost, error)
type RedditPost ¶
type TVSymbolData ¶
type TradingViewClient ¶
type TradingViewClient struct {
// contains filtered or unexported fields
}
func NewTradingViewClient ¶
func NewTradingViewClient(http *HTTPClient) *TradingViewClient
func (*TradingViewClient) GetMultipleAnalysis ¶
func (c *TradingViewClient) GetMultipleAnalysis(ctx context.Context, screener string, tickers []string, columns []string) ([]TVSymbolData, error)
type YahooChartResult ¶
type YahooChartResult struct {
Meta YahooMeta
Candles []YahooOHLCV
}
type YahooClient ¶
type YahooClient struct {
// contains filtered or unexported fields
}
func NewYahooClient ¶
func NewYahooClient(http *HTTPClient) *YahooClient
func (*YahooClient) GetChart ¶
func (c *YahooClient) GetChart(ctx context.Context, symbol, interval, rangeStr string) ([]YahooOHLCV, error)
func (*YahooClient) GetFullChart ¶
func (c *YahooClient) GetFullChart(ctx context.Context, symbol, interval, rangeStr string) (*YahooChartResult, error)
type YahooMeta ¶
type YahooMeta struct {
Symbol string `json:"symbol"`
Currency string `json:"currency"`
ExchangeName string `json:"exchangeName"`
RegularMarketPrice float64 `json:"regularMarketPrice"`
PreviousClose float64 `json:"previousClose"`
ChartPreviousClose float64 `json:"chartPreviousClose"`
FiftyTwoWeekHigh float64 `json:"fiftyTwoWeekHigh"`
FiftyTwoWeekLow float64 `json:"fiftyTwoWeekLow"`
MarketState string `json:"marketState"`
}
func (YahooMeta) EffectivePreviousClose ¶
EffectivePreviousClose returns the best available previous close value.
Click to show internal directories.
Click to hide internal directories.