MetaData

public class MetaData

The header Alpha Vantage returns above a stock time series: which ticker it covers, how recently it was refreshed, and how it was sampled.

How much of this is filled in depends on the cadence requested, because the API only echoes back the parameters that cadence accepts — an interval means nothing to a monthly series, so no interval comes back. Only getInformation, getSymbol and getLastRefreshed are populated for every cadence; the rest document their own gaps.

A TimeSeriesResponse that carries an error rather than a series still carries a header, the empty placeholder, so reaching for a field never needs a null check on the header itself.

Author

Sylvester Sefa-Yeboah

Since

1.0.1

Constructors

Link copied to clipboard
public void MetaData(String information, String symbol, String lastRefreshed, String interval, String outputSize, String timeZone)
Creates a metadata header from the values a response carried.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public String symbol
Link copied to clipboard

Functions

Link copied to clipboard
public static MetaData empty()
Creates a placeholder header with every field null.
Link copied to clipboard
Gets Alpha Vantage's own description of what the series contains, as in Daily Prices (open, high, low, close) and Volumes.
Link copied to clipboard
Gets how much time each bar in the series covers.
Link copied to clipboard
Gets the timestamp of the newest data point in the series, which is how fresh the data is rather than when the request was made.
Link copied to clipboard
Gets how much of the ticker's history the series covers, echoing back the output size the request asked for.
Link copied to clipboard
public String getSymbol()
Gets the ticker the series covers, echoed back as the API resolved it rather than as the request spelled it.
Link copied to clipboard
Gets the timezone the series timestamps are expressed in, which for these endpoints is US Eastern.
Link copied to clipboard
public String toString()