- Data
- Graphs
- Search
- Account
- API
- Contact us
Data 数据
Basics 基础
All the data stored in the ECB Data Portal can be retrieved using the query string below
ECB 数据门户中存储的所有数据都可以使用下面的查询字符串检索
protocol :// wsEntryPoint / resource / flowRef / key ? parameters |
where parameters
are defined as such:
其中 parameters
定义如下:
startPeriod = value & endPeriod = value & updatedAfter = value & firstNObservations = value & lastNObservations = value & detail = value & includeHistory = value |
Syntax definition 语法定义
As of 28 January 2021 the web service is only available over https . http calls made via a browser will be automatically redirected to https .截至 2021 年 1 月 28 日,网络服务仅通过 https 提供。通过浏览器进行的 http 调用将自动重定向到 https 。 |
The web service entry point is available at the following location: Web 服务入口位于以下位置: https://data-api.ecb.europa.eu/ |
The resource for data queries is data .数据查询的资源是 data 。 |
A reference to the dataflow describing the data that needs to be returned. The syntax is the For example: If the parameter contains only one of these three elements, it is considered to be the identifier of the dataflow. The value for the identifier of the agency maintaining the dataflow will default to If the string contains only two of these three elements, they are the identifier of the agency maintaining the dataflow and the identifier of the dataflow. The value for the dataflow version will default to In order to see the dataflows available in the ECB Data Portal, a metadata query for all dataflows can be performed: |
As explained in the Overview section, the combination of Dimensions allows statistical data to be uniquely identified. In SDMX, such a combination is known as a Series key, and this is what needs to be input for the For example, let’s say that exchange rates can be uniquely identified by the following:
To build the Series key, take the value for each of the Dimensions (following the order in which the Dimensions are defined in the DSD) and join them with a dot ( Wildcarding is supported by omitting the value for the Dimension to be wildcarded. For example, the following Series key can be used to retrieve the data for all daily currencies against the euro: The You can combine wildcarding and the |
It is possible to define a date range for which Observations are to be returned by using the startPeriod and/or endPeriod parameters. The values should be given according to the syntax defined in ISO 8601 or as SDMX reporting periods. The format will vary depending on the frequency. The supported formats are:
|
By supplying a percent-encoded ISO 8601 timestamp for the This will include: 这将包括:
For example, the percent-encoded representation for Developers who update their local databases with data stored in the ECB Data Portal should make use of the Should you not be able to handle updates and revisions, or if you would prefer to perform a full refresh of your local database when something has changed, you can use an |
Using the
|
Using the firstNObservations and/or lastNObservations parameters, it is possible to specify the maximum number of Observations to be returned for each of the matching Time series, starting from the first Observation (firstNObservations ) or counting back from the most recent Observation (lastNObservations ).使用 firstNObservations 和/或 lastNObservations 参数,可以指定为每个匹配的时间序列返回的最大观测数,从第一个观测值( firstNObservations )开始,或从最近的观测值( lastNObservations )倒数。 |
Using the
|
Using the
|
Examples 示例
Please refer to the Useful tips section to see examples of these queries with command line tools such as curl
or wget
.
请参考“实用技巧”部分,查看使用诸如 curl
或 wget
等命令行工具的这些查询示例。
https://data-api.ecb.europa.eu/service/data/EXR/M.USD.EUR.SP00.A |
https://data-api.ecb.europa.eu/service/data/EXR/M..EUR.SP00.A |
https://data-api.ecb.europa.eu/service/data/EXR/M.USD+GBP+JPY.EUR.SP00.A?updatedAfter=2009-05-15T14%3A15%3A00%2B01%3A00 |
https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?startPeriod=2009-05-01&endPeriod=2009-05-31 |
https://data-api.ecb.europa.eu/service/data/EXR |
https://data-api.ecb.europa.eu/service/data/EXR/M.USD.EUR.SP00.A?format=csvdata |