ForexResponse

public class ForexResponse

A currency pair's exchange rate series, or the message Alpha Vantage returned in place of one.

All four forex cadences answer with this same type; what differs is the span each ForexUnit covers and how much of the MetaData is filled in.

A response carries results or an error, never both. On success getErrorMessage is null, getMetaData describes the series and getForexUnits holds its bars. On failure the message is set, the bar list is empty, and the metadata is the empty placeholder whose fields are all null — so checking the error message is what tells the two apart, not checking for nulls.

Author

Sylvester Sefa-Yeboah

Since

1.0.0

Types

Link copied to clipboard
Turns a decoded forex payload into a ForexResponse.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Gets the reason no series was returned, as reported by the API.
Link copied to clipboard
Gets the exchange rate bars making up the series, each carrying its own timestamp in getDate.
Link copied to clipboard
Gets the header describing the series: its currency pair, freshness and sampling.
Link copied to clipboard
public static ForexResponse of(Map<String, Object> stringObjectMap)
Builds a response from a decoded forex payload, whichever cadence produced it.
Link copied to clipboard
public String toString()