RSS Feeds

class quotek::datasource::rss

rss is a class which allows to fetch rss feeds inside quotek strategies in order to process them (and potentially dedude positions to take).

Inherits from quotek::datasource::datasource

Public Functions

rss(std::string source)

rss class constructor


rss class destructor

std::vector<quotek::data::news> fetch(int nb_news)

fetches the the RSS stream passed inside the RSS object constructor.

a vector of quotek news objects.
  • nb_news -

    The number of news to fetch (sorted by descending date)


You will find below a sample source code about how to use the Quotek RSS client to fetch news from wall-street journal Market RSS feed */

#include <quotek/quotek.hpp>
#include <quotek/datasources/rss.hpp>
#include <iostream>
using namespace quotek::datasource;
using namespace quotek::data;

int main(int argc, char** argv) {

  //We declare a new rss client.
  rss r1("");

  //we fetch the last five news of the feed.
  std::vector<news> nvect = r1.fetch(5);

  //Then we iterate through them to display their content on stdout.
  for(int i=0;i<nvect.size();i++) {
    std::cout << nvect[i].content << std::endl;