stock_sentiment 0.0.4 copy "stock_sentiment: ^0.0.4" to clipboard
stock_sentiment: ^0.0.4 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 sentiment.

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 ?jO+");
  /// get headlines for 8 days
  try{
    sentiment.getHeadlines(8).then((value) {

      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);
      /// this will be null
      print(value["?jO+"]);

    });
  }catch(e){
    print(e);
  }


}
0
likes
60
points
10
downloads

Documentation

API reference

Publisher

verified publishercopypasteearth.com

Weekly Downloads

A package to get stock sentiment from headlines. Given a String of tickers seperated by space, it will give you all the sentiment.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, html, http, intl, sentiment_dart

More

Packages that depend on stock_sentiment