Skip to content
No description, website, or topics provided.
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
pom.xml

README.md

fred-client

A simple java client for the FRED(https://research.stlouisfed.org/docs/api/fred/) api.

Latest version: Download

For payload/parameter data models See.

Getting started.

add to yur pom.xml

  <dependency>
  <groupId>com.pimco</groupId>
  <artifactId>fred-client</artifactId>
    <version>LATEST</version>
  </dependency>

use the client:

  Client fredClient = new Client(apiKey);
  ...
  //search for series
  SeriesDescriptorResultSet seriesDescriptors = fredClient.getSeriesResource().search(
            new SearchParams("farm", SearchType.full_text), null,
            new PagingParams(100, 0, null, Order.desc), null, null);

  ...
  //get observations
  SeriesObservationsResultSet observations = fredClient.getSeriesResource().getObservations("LODINIM066N", null,
            new ObservationInterval(LocalDate.now().minusYears(1), LocalDate.now()),
            new PagingParams(100, 0, null, Order.desc),
            new ObservationTransformations(Unit.lin, Frequency.m, AggregationMethod.eop),
           null, null);
  ...

See TestFred.java for examples of use.

You can’t perform that action at this time.