JavaScript: Query Liberator

Query Liberator for the Latest Value of a Dataset

Query the Last Known Value(s)

To get the last known value in any dataset simply do not provide the as_of or back_to arguments. This will give you the last known value for the given dataset and symbols. Example query:

let params =  {
    symbols: "AAPL",                           //ticker symbol
    name:    "daily_bars",   //Dataset Name
};
liberator.datasets(params).then(function(results) {
    … Your Code
});

Query Liberator for Time Range from the Dataset

Query for a Time Series Result

Adding the back_to argument for any query will give you the time series data all the way back to the specified back to date.

Every dataset has different data frequencies. Some update very infrequently. For example, the earnings reports for a stock only update every 3 months. Others update very frequently intraday. A query that ask for a time series may still result in one or no results for the given symbol.

let params =  {
    back_to: “2021-01-12 00:00:00”
    symbols: "AAPL",                                 //ticker symbol
    name:    " daily_bars",   //Dataset Name
};
liberator.datasets(params).then(function(results) {
  <Your Code>
})