why do HistoricalPricing.get_summaries() with interval other than minutely or daily, not work?

It appears that when extracting data via refinitiv.dataplatform.HistoricalPricing.get_summaries(), only the minutely interval and the daily interval work. See the example below.
import refinitiv.dataplatform as rdp
grant = rdp.GrantPassword(username=RDP_LOGIN, password=RDP_PASSWORD)
rdp.open_platform_session(APP_KEY, grant)
rdp.logging.disable()
for interval in rdp.Intervals:
response = rdp.HistoricalPricing.get_summaries('GBP=', interval=interval, count=5)
print('\ninterval name=%s value=%s\n%s'
% (interval.name, interval.value, response.data.df[['BID', 'ASK']].head()))
interval name=ONE_MINUTE value=PT1M
BID ASK
2021-03-12 21:56:00 1.3916 1.3921
2021-03-12 21:57:00 1.3919 1.3924
2021-03-12 21:58:00 1.3918 1.3923
2021-03-12 21:59:00 1.3922 1.3927
2021-03-12 22:00:00 1.3922 1.3927
interval name=FIVE_MINUTES value=PT5M
BID ASK
2021-03-12 21:56:00 1.3916 1.3921
2021-03-12 21:57:00 1.3919 1.3924
2021-03-12 21:58:00 1.3918 1.3923
2021-03-12 21:59:00 1.3922 1.3927
2021-03-12 22:00:00 1.3922 1.3927
interval name=TEN_MINUTES value=PT10M
BID ASK
2021-03-12 21:56:00 1.3916 1.3921
2021-03-12 21:57:00 1.3919 1.3924
2021-03-12 21:58:00 1.3918 1.3923
2021-03-12 21:59:00 1.3922 1.3927
2021-03-12 22:00:00 1.3922 1.3927
interval name=THIRTY_MINUTES value=PT30M
BID ASK
2021-03-12 21:56:00 1.3916 1.3921
2021-03-12 21:57:00 1.3919 1.3924
2021-03-12 21:58:00 1.3918 1.3923
2021-03-12 21:59:00 1.3922 1.3927
2021-03-12 22:00:00 1.3922 1.3927
interval name=SIXTY_MINUTES value=PT60M
BID ASK
2021-03-12 21:56:00 1.3916 1.3921
2021-03-12 21:57:00 1.3919 1.3924
2021-03-12 21:58:00 1.3918 1.3923
2021-03-12 21:59:00 1.3922 1.3927
2021-03-12 22:00:00 1.3922 1.3927
interval name=ONE_HOUR value=PT1H
BID ASK
2021-03-12 21:56:00 1.3916 1.3921
2021-03-12 21:57:00 1.3919 1.3924
2021-03-12 21:58:00 1.3918 1.3923
2021-03-12 21:59:00 1.3922 1.3927
2021-03-12 22:00:00 1.3922 1.3927
interval name=DAILY value=P1D
BID ASK
2021-03-08 1.3824 1.3828
2021-03-09 1.3893 1.3896
2021-03-10 1.393 1.3934
2021-03-11 1.399 1.3994
2021-03-12 1.3922 1.3927
interval name=SEVEN_DAYS value=P7D
BID ASK
2021-03-08 1.3824 1.3828
2021-03-09 1.3893 1.3896
2021-03-10 1.393 1.3934
2021-03-11 1.399 1.3994
2021-03-12 1.3922 1.3927
interval name=WEEKLY value=P1W
BID ASK
2021-03-08 1.3824 1.3828
2021-03-09 1.3893 1.3896
2021-03-10 1.393 1.3934
2021-03-11 1.399 1.3994
2021-03-12 1.3922 1.3927
interval name=MONTHLY value=P1M
BID ASK
2021-03-08 1.3824 1.3828
2021-03-09 1.3893 1.3896
2021-03-10 1.393 1.3934
2021-03-11 1.399 1.3994
2021-03-12 1.3922 1.3927
interval name=QUARTERLY value=P3M
BID ASK
2021-03-08 1.3824 1.3828
2021-03-09 1.3893 1.3896
2021-03-10 1.393 1.3934
2021-03-11 1.399 1.3994
2021-03-12 1.3922 1.3927
interval name=TWELVE_MONTHS value=P12M
BID ASK
2021-03-08 1.3824 1.3828
2021-03-09 1.3893 1.3896
2021-03-10 1.393 1.3934
2021-03-11 1.399 1.3994
2021-03-12 1.3922 1.3927
interval name=YEARLY value=P1Y
BID ASK
2021-03-08 1.3824 1.3828
2021-03-09 1.3893 1.3896
2021-03-10 1.393 1.3934
2021-03-11 1.399 1.3994
2021-03-12 1.3922 1.3927
Best Answer
-
It looks like to be a bug as mentioned in this thread.
The workaround could be like the following.
endpoint = rdp.Endpoint(
session = rdp.get_default_session(), # Optional
url = "/data/historical-pricing/v1/views/intraday-summaries/JPY=")
response = endpoint.send_request(
method = rdp.Endpoint.RequestMethod.GET,
query_parameters={
'interval': 'PT1H',
'count': 5,
'summaryTimestampLabel': 'endPeriod'
}
)
if response.is_success:
headers = [h['name'] for h in response.data.raw[0]['headers']]
df = pd.DataFrame(data=response.data.raw[0]['data'], columns=headers)
display(df)0
Answers
-
thanks, that appears to work.
0 -
any idea as to how one can specify an ending date / time?
this did work with rdp.HistoricalPricing.get_summaries():
end=datetime.utcnow()it doesn't appear to work with the code you supplied.
I get an error message:
response.status
Out[12]:
{'http_status_code': 400,
'http_reason': 'Bad Request',
'error': {'id': 'bf914859-de80-476e-810c-5ab748c6b9a8',
'code': 'TS.Intraday.UserRequestError.90004',
'status': '400',
'message': 'Request Validation Error',
'errors': [{'key': 'end',
'reason': 'The request parameter validation failed. end is invalid format.',
'invalidValues': ['2021-04-14T11:43:57.132911']}]}}
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.5K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 560 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 281 Open PermID
- 46 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 724 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛