COMPOSITION OF A CALL
To explain the composition of a call, we will use the time-series dataset Federal Reserve Economic Dataset as an example. See product page at https://data.nasdaq.com/data/FRED - this URL contains the product code for this dataset, which is FRED
. On the product page, you will see that this product is made up of many individual time-series datasets, each one with their own code eg. the time-series for Natural Rate of Unemployment (Short-Term) has code FRED/NROUST
, the time-series for Real Potential Gross Domestic Product has code FRED/GDPPOT
and so on. These are the codes we will use in API calls.
The following call retrieves the first year of monthly settle prices for FRED GDP time-series data (FRED/GDP
), which you can find on Nasdaq Data Link here, in CSV format:
curl "https://data.nasdaq.com/api/v3/datasets/FRED/GDP.csv?collapse=annual&rows=6&order=asc&column_index=1&api_key=YOURAPIKEY"
We can break down this request as follows:
URL COMPONENT | EXPLANATION |
---|---|
https://data.nasdaq.com/api/v3/datasets/FRED/GDP.csv | This portion of the call queries the FRED/GDP time-series and returns the data in CSV format. |
collapse=annual | Converts the series to annual. |
rows=6 | This truncates the results to include only the first six rows of data. |
order=asc | This arranges the dates in ascending order. |
column_index=1 | This parameter allows users to define just a single column to return, in this case column 1 (Value). |
api_key=YOURAPIKEY | This part of the call authenticates you as a Nasdaq Data Link user. Replace the placeholder text <YOURAPIKEY> with your personal API Key. |
The following is the output for our example call:
DATE,VALUE
1947-12-31,260.3
1948-12-31,280.7
1949-12-31,271
1950-12-31,320.3
1951-12-31,356.6
1952-12-31,381.2
For a complete list of time-series parameters, click here.
Updated 7 months ago