Documentation ¶
Index ¶
- Variables
- func Binance1(data map[string]interface{}) bool
- func Binance2(data map[string]interface{}) bool
- func Coinbase1(data map[string]interface{}) bool
- func InitBot()
- func NewTwitterClient() *twitterClient
- func SendMsg(title, createTime, url, body, source, coins string)
- func Upbit1(data map[string]interface{}) bool
- type Config
- type RuelEngine
- type RuleEngine
- type TradeBot
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TgBotApiToken string ChatId int64 Bot *tgbotapi.BotAPI )
Functions ¶
func NewTwitterClient ¶
func NewTwitterClient() *twitterClient
Types ¶
type RuelEngine ¶
type RuelEngine struct { Keys []string RuleEngine CanOrder chan *config.CanOrder Hashmap *hashmap.HashMap TwitterClient *twitterClient }
func NewRuelEngine ¶
func NewRuelEngine(co chan *config.CanOrder) RuelEngine
func (RuelEngine) OrdreNews ¶
func (e RuelEngine) OrdreNews(json []byte)
func (RuelEngine) ParseNews ¶
func (e RuelEngine) ParseNews(json []byte)
func (RuelEngine) TeleNews ¶
func (e RuelEngine) TeleNews(json []byte)
type RuleEngine ¶
type RuleEngine struct { Rules map[string]func(data map[string]interface{}) bool Rows [][]interface{} Data dataframe.DataFrame Titles []string Time []string Source []string Url []string }
func NewRule ¶
func NewRule() RuleEngine
func (*RuleEngine) AddRule ¶
func (e *RuleEngine) AddRule(name string, fn func(data map[string]interface{}) bool)
func (*RuleEngine) RunRules ¶
func (e *RuleEngine) RunRules(data map[string]interface{}) (bool, string)
func (*RuleEngine) SaveToCSV ¶
func (e *RuleEngine) SaveToCSV()
type TradeBot ¶
type TradeBot struct { NewsStream *news.Stream RuelEngine *RuelEngine BinanceFuture *exchange.BinanceFuture CanOrder chan *config.CanOrder Cache *cache2go.CacheTable Twid *cache2go.CacheTable Ctx context.Context Wsserver *server.WebSocketServer TwitterClient *twitterClient }
func NewTradeBot ¶
func NewTradeBot() TradeBot
func (*TradeBot) ListenCreateOrder ¶
func (tb *TradeBot) ListenCreateOrder()
func (*TradeBot) ListenNews ¶
func (tb *TradeBot) ListenNews()
func (*TradeBot) ProcessOrder ¶
func (*TradeBot) SocketServer ¶
func (tb *TradeBot) SocketServer()
Click to show internal directories.
Click to hide internal directories.