Expana Data Direct API

Endpoints

This section describes the behavior of all endpoints in the Expana’s Data Direct API.

Contents

Choose from the items below ↓


Get categories

Get all historical series in a category

Get all historical series data points in a category

Get historical series by series code

Get historical series data points by series code

Get all forecast series in a category

Get all forecast series data points in a category

Get forecast series by series code

Get forecast series data points by series code

⬆

Get Categories

https://app.expanamarkets.com/api/v1/data-direct/categories/

This endpoint will return either all categories available to you in your subscription, or all categories available in Expana.

Query Parameters

Name
Description
Optional
Type
inSubscription
Use 'true' if you want only categories available under your subscription, use 'false' if you want all Expana categories.
No
string

Response Parameters

Name
Description
Optional
Type
name
Name of category
No
string
shortName
Shore name, use to query in other endpoints
No
string

Example 1 Returns all categories in your subscription. See the JSON response on the next page (assuming in this example that the used API Key includes Chemicals, Economics, Eggs, Poultry, Red Meat, and Sea Food)

https://app.expanamarkets.com/api/v1/data-direct/categories/

https://app.expanamarkets.com/api/v1/data-direct/categories/?inSubscription=true

Example 2 Returns all 23 categories available in Expana

https://app.expanamarkets.com/api/v1/data-direct/categories/?inSubscription=false

Example 1 - JSON response

⬆

Get all historical series in a category

https://app.expanamarkets.com/api/v1/data-direct/categories/:shortName/historical-series

This endpoint will return all Historical Series for the specified category.

Path Parameters

Name
Description
Optional
Type
shortName
The short category name
No
string

Query Parameters

Only the standard query parameters, see earlier in the document.

Response

A list of Historical Series objects. See the definition of a Historical Series earlier in the document.

Example 1 Returns all historical series in category Eggs. Note that the category shortName URL parameter is case insensitive.

https://app.expanamarkets.com/api/v1/data-direct/categories/eggs/historical-series

https://app.expanamarkets.com/api/v1/data-direct/categories/Eggs/historical-series

https://app.expanamarkets.com/api/v1/data-direct/categories/EGGS/historical-series

Example 2 Returns all historical series in category Poultry.

https://app.expanamarkets.com/api/v1/data-direct/categories/Poultry/historical-series

Example 3 Return all historical series in category Red Meat which name ends with EBP (meaning Expana Benchmark Price), these are Expana proprietary series.

https://app.expanamarkets.com/api/v1/data-direct/categories/RedMeat/historical-series?filters[0][by]=name&filters[0][operator]=endswith&filters[0][value]=EBP

See all available filter options in the Filtering section earlier in the documentation.

Example 4 (with JSON response) https://app.expanamarkets.com/api/v1/data-direct/categories/RedMeat/historical-series?filters[0][by]=currencyCode&filters[0][operator]=eq&filters[0][value]=GBP

Returns all historical series in category Red Meat that have currency code of GBP

⬆

Get all historical series data points in a category

https://app.expanamarkets.com/api/v1/data-direct/categories/:shortName/historical-series-data-points

This endpoint will return all Historical Series Data Points for the specified category.

Path Parameters

Name
Description
Optional
Type
shortName
The short category name
No
string

Query Parameters

The standard query parameters (see earlier in the document) and the following endpoint specific query parameters

Name
Description
Optional
Type
allFrequencies

true – data points in all available frequencies for each series in the category will be returned

false (default) – data points in source frequencies only for each series in the category will be returned

Yes
string

Response

A list of Historical Series Data Points objects. See the definition of a Historical Series Data Point earlier in the document. By default the list is sorted by date in a descending way.

Example 1 Returns all historical series data points in category Eggs.

https://app.expanamarkets.com/api/v1/data-direct/categories/eggs/historical-series-data-points

Example 2 Returns all historical series data points in category Poultry, sorted by date ascending (starting from the oldest data points available for this category). Note that the default sorting is by date descending.

https://app.expanamarkets.com/api/v1/data-direct/categories/eggs/historical-series-data-points?sort[0][by]=date&sort[0][order]=asc

Example 3 Returns all historical series data points in category Eggs before the year 2019

https://app.expanamarkets.com/api/v1/data-direct/categories/eggs/historical-series-data-points?filters[1][by]=date&filters[1][operator]=lte&filters[1][value]=2019-12-31

Example 4 Return all available frequencies for all series in category Eggs (which frequencies are available for each series depends on its source frequencies – please see the Frequency conversion section earlier in the document)

https://app.expanamarkets.com/api/v1/data-direct/categories/eggs/historical-series-data-points?allFrequencies=true

Example 5 (with JSON response) Return all historical series data point objects in category Seafood from the year 2023

https://app.expanamarkets.com/api/v1/data-direct/categories/seafood/historical-series-data-points?filters[0][by]=date&filters[0][operator]=gte&filters[0][value]=2023-01-01&filters[1][by]=date&filters[1][operator]=lte&filters[1][value]=2023-12-31

⬆

Get historical series by series code

https://app.expanamarkets.com/api/v1/data-direct/historical-series/:code/

This endpoint will return a Historical Series for the specified code.

Path Parameters

Name
Description
Optional
Type
code
Unique identifier for the series
No
string

Query Parameters

Only the standard query parameters, see earlier in the document.

Response

A Historical Series object. See its definition earlier in the document.

Example 1 Return the historical series object for the series with code 0P24. Note that the code URL parameter is case insensitive

https://app.expanamarkets.com/api/v1/data-direct/historical-series/0P24/

https://app.expanamarkets.com/api/v1/data-direct/historical-series/0p24/

Example 2 Return the historical series object for a series with code 377

https://app.expanamarkets.com/api/v1/data-direct/historical-series/377/

⬆

Get historical series data points by series code

https://app.expanamarkets.com/api/v1/data-direct/historical-series/:code/historical-series-data-points

This endpoint will return all Historical Series Data Points for the specified series code.

Path Parameters

Name
Description
Optional
Type
code
Unique identifier for the series
No
string

Query Parameters

The standard query parameters (see earlier in the document) and the following endpoint specific query parameters

Name
Description
Optional
Type
frequency
Frequency to convert the data points to. Choose any frequency that is less frequent than the source frequency of the series.
Yes
string
currency
Currency to convert the data points to
Yes
string
unit
Unit to convert the data points to. See available units in the Appendix.
Yes
string
allFrequencies
true – data points in all available frequencies for the series will be returned.
Note: if you provide a frequency parameter as well as allFrequencies set to True, the selected specific frequency will be returned over returning all frequencies.
false (default) – data points in source frequencies only for the series will be returned
Note: if you provide a frequency parameter as well as allFrequencies set to False, the selected specific frequency will be returned over returning source frequencies.
Yes
string

Response

A list of Historical Series Data Points objects. See the definition of a Historical Series Data Point earlier in the document. By default the list is sorted by date descending.

Example 1 Return data points for the historical series with code 0P23, which has the low value lower than 400 (in the case of this 0P23 series it’s 400 EUR / 100 kilograms)

https://app.expanamarkets.com/api/v1/data-direct/historical-series/0P23/historical-series-data-points?filters[0][by]=low&filters[0][operator]=lt&filters[0][value]=400

Example 2 Return data points the for historical series with code 13623, which has the high value greater than 2 (in the case of this 13623 series it’s 4 USD / pound)

https://app.expanamarkets.com/api/v1/data-direct/historical-series/13623/historical-series-data-points?filters[0][by]=high&filters[0][operator]=gt&filters[0][value]=4

Example 3 Return data points for historical series with code 1 converted to Weekly (it’s source frequency is Daily)

https://app.expanamarkets.com/api/v1/data-direct/historical-series/1/historical-series-data-points?frequency=Weekly

Example 4 Return data points for historical series with code in all available frequencies. In this case, the series has source frequency of Weekly, so the converted frequencies will be Monthly, Quarterly, Semi-Annually, and Yearly. Note: There won’t be any Daily frequency data points, as we do not convert to more frequent frequencies than the source frequency.

https://app.expanamarkets.com/api/v1/data-direct/historical-series/18881/historical-series-data-points?allFrequencies=true

Example 5 All frequencies and a frequency of Monthly were requested at the same time. In this case, the specific frequency will be returned (frequency parameter has priority over the allFrequencies parameter)

https://app.expanamarkets.com/api/v1/data-direct/historical-series/18881/historical-series-data-points?frequency=Monthly&allFrequencies=true

Example 6 (with JSON response) Returns all data points all the historical series 377, which have their weighted Average value between 9.4 and 9.5 (in the case of this 377 series it’s USD / pound)

https://app.expanamarkets.com/api/v1/data-direct/historical-series/377/historical-series-data-points?filters[0][by]=wtdAvg&filters[0][operator]=gte&filters[0][value]=9.4&filters[1][by]=wtdAvg&filters[1][operator]=lte&filters[1][value]=9.5

⬆

Get all forecast series in a category

https://app.expanamarkets.com/api/v1/data-direct/categories/:shortName/forecast-series

This endpoint will return all Forecast Series for the specified category.

Path Parameters

Name
Description
Optional
Type
shortName
The short category name
No
string

Query Parameters

Only the standard query parameters, see earlier in the document.

Response

A list of Forecast Series objects. See the definition of a Forecast Series earlier in the document.

Example 1 Returns all forecast series in category Eggs. Note that the category shortName URL parameter is case insensitive

https://app.expanamarkets.com/api/v1/data-direct/categories/eggs/forecast-series

https://app.expanamarkets.com/api/v1/data-direct/categories/Eggs/forecast-series

https://app.expanamarkets.com/api/v1/data-direct/categories/EGGS/forecast-series

Example 2 (with JSON response example) https://app.expanamarkets.com/api/v1/data-direct/categories/redmeat/forecast-series

⬆

Get all forecast series data points in a category

https://app.expanamarkets.com/api/v1/data-direct/categories/:shortName/forecast-series-data-points

This endpoint will return all Forecast Series Data Points for the specified category.

Path Parameters

Name
Description
Optional
Type
shortName
The short category name
No
string

Query Parameters

The standard query parameters (see earlier in the document) and the following endpoint specific query parameter

Name
Description
Optional
Type
includeInterpolated

Boolean flag indicating if just target, or both target and interpolated points should be included in the response. Set to true by default.

Yes
string

Response

A list of Forecast Series Data Points objects. See the definition of a Forecast Series Data Point earlier in the document. By default the list is sorted by date in a descending way.

Example 1 Returns all forecast series data points in category Coffee. Note that the category shortName URL parameter is case insensitive

https://app.expanamarkets.com/api/v1/data-direct/categories/coffee/forecast-series-data-points

https://app.expanamarkets.com/api/v1/data-direct/categories/Coffee/forecast-series-data-points

https://app.expanamarkets.com/api/v1/data-direct/categories/COFFEE/forecast-series-data-points

Example 2 Returns all target forecast series data points in category Red Meat (excluding interpolated forecast points)

https://app.expanamarkets.com/api/v1/data-direct/categories/redmeat/forecast-series-data-points?includeInterpolated=False

Example 3 (with JSON response) https://app.expanamarkets.com/api/v1/data-direct/categories/redmeat/forecast-series-data-points

⬆

Get forecast series by series code

https://app.expanamarkets.com/api/v1/data-direct/forecast-series/:code/

This endpoint will return a Forecast Series for the specified code.

Path Parameters

Name
Description
Optional
Type
code
Unique identifier for the series
No
string

Query Parameters

Only the standard query parameters, see earlier in the document.

Response

A Forecast Series object. See its definition earlier in the document.

Example 1 (with JSON response) Return the forecast series object for the series with code 2126.

https://app.expanamarkets.com/api/v1/data-direct/forecast-series/2126/

⬆

Get forecast series data points by series code

This endpoint will return a list of all Forecast Series Data Points for the specified code.

Path Parameters

Name
Description
Optional
Type
shortName
Unique identifier for the series
No
string

Query Parameters

The standard query parameters (see earlier in the document) and the following endpoint specific query parameter

Name
Description
Optional
Type
includeInterpolated

Boolean flag indicating if just targets, or both targets and interpolated points should be included in the response

Yes
string

Response

A list of Forecast Series Data Points objects. See the definition of a Forecast Series Data Point earlier in the document. By default the list is sorted by date in a descending way.

Example 1 (with JSON response) Return data points for the forecast series with code COCL

https://app.expanamarkets.com/api/v1/data-direct/forecast-series/COCL/forecast-series-data-points

Continue reading