stock_sentiment 0.0.2 copy "stock_sentiment: ^0.0.2" to clipboard
stock_sentiment: ^0.0.2 copied to clipboard

outdated

A package to get stock sentiment from headlines. Given a String of tickers seperated by space, it will give you all the headlines with links from finviz and then you can get sentiment of each day or e [...]

example/main.dart

// @dart=2.9
/// import the stock sentiment package
import 'package:stock_sentiment/stock_sentiment.dart';

/// main() example
void main() {
  var sentiment = StockSentiment("GOOG");
  /// get headlines for 8 days
  sentiment.getHeadlines(8).then((value) {
    if (value != null) {
      print(value);
      /// get the sentiment for each day
      var stuff = sentiment.getDailySentiment(value);
      print(stuff);
      /// get a single headline sentiment
      var single = sentiment.getSingleSentiment(value["GOOG"][0].text);
      print(single);
    } else {
      print("null ticker search or invalid ticker");
    }
  });
}
0
likes
0
pub points
0%
popularity

Publisher

verified publishercopypasteearth.com

A package to get stock sentiment from headlines. Given a String of tickers seperated by space, it will give you all the headlines with links from finviz and then you can get sentiment of each day or each headline.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, html, http, intl, sentiment_dart

More

Packages that depend on stock_sentiment