get_data
Sends a request to the Refinitiv Data Platform to retrieve the historical pricing summary data described in the historical_pricing.summaries.Definition object.
Module
refinitiv.data.content.historical_pricing.summaries
Syntax
get_data(session, on_response)
Parameters
Value | Description | Data type | Optional | Default value |
---|---|---|---|---|
session | Session object. If it's not passed the default session will be used. | Session object | Yes | None |
on_response | Callable function to process the retrieved data. | Callable | Yes | None |
Return value
Usage
The following examples demonstrates how to retrieve the historical pricing summary data for GPB during the past 5 days:
response = historical_pricing.summaries.Definition(
universe="GBP=",
count=5,
).get_data()
Response
Date | BID | ASK | BID_HIGH_1 | BID_LOW_1 | OPEN_BID | MID_PRICE | NUM_BIDS | ASK_LOW_1 | ASK_HIGH_1 | ASIAOP_BID | ASIAHI_BID | ASIALO_BID | ASIACL_BID | EUROP_BID | EURHI_BID | EURLO_BID | EURCL_BID | AMEROP_BID | AMERHI_BID | AMERLO_BID | AMERCL_BID | OPEN_ASK |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2022-05-10 00:00:00 | 1.2322 | 1.2326 | 1.2375 | 1.229 | 1.233 | 1.2324 | 136807 | 1.2292 | 1.2378 | 1.233 | 1.2375 | 1.2314 | 1.2315 | 1.2365 | 1.2375 | 1.229 | 1.2311 | 1.2347 | 1.2356 | 1.229 | 1.2322 | 1.2334 |
2022-05-11 00:00:00 | 1.225 | 1.2253 | 1.24 | 1.2234 | 1.2323 | 1.22515 | 131098 | 1.2238 | 1.2403 | 1.2323 | 1.2347 | 1.2302 | 1.2342 | 1.2336 | 1.24 | 1.2275 | 1.2315 | 1.2338 | 1.24 | 1.2234 | 1.225 | 1.2326 |
2022-05-12 00:00:00 | 1.2199 | 1.2203 | 1.226 | 1.2164 | 1.2259 | 1.2201 | 155651 | 1.2166 | 1.2263 | 1.2259 | 1.226 | 1.2178 | 1.2199 | 1.2206 | 1.2247 | 1.2164 | 1.2194 | 1.2205 | 1.2247 | 1.217 | 1.2199 | 1.2263 |
2022-05-13 00:00:00 | 1.2261 | 1.2265 | 1.2265 | 1.2154 | 1.2198 | 1.2263 | 121398 | 1.2157 | 1.2269 | 1.2198 | 1.2231 | 1.219 | 1.2215 | 1.2221 | 1.2244 | 1.2154 | 1.224 | 1.2198 | 1.2265 | 1.2154 | 1.2261 | 1.2203 |
2022-05-16 00:00:00 | 1.2317 | 1.2321 | 1.2329 | 1.2215 | 1.2233 | 1.2319 | 119220 | 1.2218 | 1.2333 | 1.2233 | 1.2297 | 1.2215 | 1.2219 | 1.2238 | 1.2273 | 1.2215 | 1.2269 | 1.2264 | 1.2329 | 1.2233 | 1.2317 | 1.2239 |
The following example demonstrates how to retrieve the historical pricing summary data for GPB over the past 5 days, specifying the particular fields.
from refinitiv.data.content import historical_pricing
from refinitiv.data.content.historical_pricing import Intervals
response = historical_pricing.summaries.Definition(
universe="GBP=",
interval=Intervals.DAILY,
count=5,
fields=["BID", "ASK", "OPEN_PRC", "HIGH_1", "LOW_1", "TRDPRC_1", "NUM_MOVES", "TRNOVR_UNS"]
).get_data()
print(response.data.df.to_string())
Response
BID | ASK | TRDPRC_1 | NUM_MOVES | LOW_1 | TRNOVR_UNS | OPEN_PRC | HIGH_1 | |
---|---|---|---|---|---|---|---|---|
2022-05-23 00:00:00 | 1.2588 | 1.2592 | N/A | N/A | N/A | N/A | N/A | N/A |
2022-05-24 00:00:00 | 1.2529 | 1.2533 | N/A | N/A | N/A | N/A | N/A | N/A |
2022-05-25 00:00:00 | 1.2564 | 1.2568 | N/A | N/A | N/A | N/A | N/A | N/A |
2022-05-26 00:00:00 | 1.2594 | 1.2598 | N/A | N/A | N/A | N/A | N/A | N/A |
2022-05-27 00:00:00 | 1.2616 | 1.262 | N/A | N/A | N/A | N/A | N/A | N/A |
Related links
None