Getting started
Concepts
- Model concepts
- API concepts
- API versions
- Entitlements
- Filters
- Request parameters
- Usage quota
- Error codes
Services
Parameters
- after
- aggregate
- aggregateIncrementFrom
- cursor
- dateFormat
- descending
- entity
- envelope
- fields
- format
- from
- groupBy
- groupById
- groupByIdAndTime
- groupByTo
- includeMetaData
- inline
- inlineLatest
- inlineTimeseries
- limit
- modulus
- nextUrl
- part
- pivot
- rankBy
- requestTimeout
- returnPreSignedUrl
- showMessage
- showStreamCursor
- to
- trace
- verifyLinks
- wait
Deprecated parameters
Datasets
- ECR: timeseries and observations
- ECR: usage patterns
- fiindices: retrieving index data
- Parsing: asset classes
- Parsing: best practices
Samples
ECR: usage patterns
This topic applies to the ecr dataset.
You can keep the data of an entity in your own systems and keep it up to date with the stream, or look the data up through the API when you need it. You can choose per entity. For example, you can keep Timeseries or GeographicLocation locally and look up Observations on demand.
Getting reference data
For most entities you can read all available data with the latest service:
https://consumer.qa.data.spglobal.com/ecr/Bank/latest
https://consumer.qa.data.spglobal.com/ecr/Concept/latest
https://consumer.qa.data.spglobal.com/ecr/ConversionMethod/latest
https://consumer.qa.data.spglobal.com/ecr/DistributionMethod/latest
https://consumer.qa.data.spglobal.com/ecr/Frequency/latest
https://consumer.qa.data.spglobal.com/ecr/GeographicLocation/latest
https://consumer.qa.data.spglobal.com/ecr/Industry/latest
https://consumer.qa.data.spglobal.com/ecr/Scale/latest
https://consumer.qa.data.spglobal.com/ecr/SeriesType/latest
https://consumer.qa.data.spglobal.com/ecr/Source/latest
https://consumer.qa.data.spglobal.com/ecr/Unit/latest
Getting Timeseries
Because of the number of Timeseries, filter the request, both to limit the size of the response and to get faster results.
To look up specific Timeseries, filter by mnemonic or by a combination of other filters:
https://consumer.qa.data.spglobal.com/ecr/Timeseries/latest?mnemonic=MNEMONIC1,MNEMONIC2
https://consumer.qa.data.spglobal.com/ecr/Timeseries/latest?bank=%40USPRICE&economicConcept=16106&geographicLocation=257
To look up all Timeseries you are entitled to:
- Look up the Banks you are entitled to:
https://consumer.qa.data.spglobal.com/ecr/Bank/latest - Look up the Timeseries of each Bank:
https://consumer.qa.data.spglobal.com/ecr/Timeseries/latest?bank=BANK_ID
Some Banks hold many Timeseries. Set a limit and request the following pages with after:
https://consumer.qa.data.spglobal.com/ecr/Timeseries/latest?bank=BANK_ID&limit=10000&envelope=true&after=AFTER_VALUE
Getting Observations
Observation and Timeseries share the same id values, so you find the Observations by looking up the Timeseries. Request the Observations from the timeseries service with the ids of the Timeseries that you found:
https://consumer.qa.data.spglobal.com/ecr/Observation/timeseries?id=ID1,ID2&limit=10000&envelope=true
Tip: A request can contain up to 1000 ids.
A request for Observations can match more records than one response holds. Request the next pages by repeating the request with the after value from the envelope.
Keeping local data up to date
If you store ECR data locally, use the stream to receive updates:
https://consumer.qa.data.spglobal.com/ecr/stream
Each message holds the updates of one entity, so you can ignore the messages of entities that you do not store.