Unable to Retrieve 1-Minute Historical Bid and Ask Size using Refinitiv's Python SDK

Hello,

I am trying to access historical bid and ask size data for the instrument HKY.OL on a 1-minute interval using Refinitiv's Python Software Development Kit (SDK). However, I'm consistently receiving NA values for both bid and ask sizes.

Here's the code I've been working with:


import datetime
import refinitiv.data as rd
rd.open_session()


## Set the datetime
start_date = datetime.datetime(2023, 1, 1).strftime('%Y-%m-%d')
end_date = datetime.datetime(2023, 2, 1).strftime('%Y-%m-%d')


## Fetch data from Refinitv
df = rd.get_history(
    universe= ['HKY.OL'],
    fields=['ASK', 'ASKSIZE', 'BID', 'BIDSIZE'],
    start = start_date,
    end = end_date,
    interval = '1min'
)
df


The fields ASK and BID return values as expected, but ASKSIZE and BIDSIZE are returning NA. I have verified that the instrument has data for the specified date range, but I am unsure if I'm using the correct field names or if there's an inherent limitation to the data's granularity. Here is my current output data:
skjermbilde-2023-09-26-kl-090054.png

Any guidance on how to correctly retrieve this data, or insights into potential issues, would be highly appreciated. Thank you!

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @s1810335

    Thank you for reaching out to us.

    The BIDSIZE and ASKSIZE fields are not valid fieds of 1 minute interval data of HKY.OL. You can remove the fields parameter to get all available fields.

    The valid fields are:

    Index(['HIGH_1', 'LOW_1', 'OPEN_PRC', 'TRDPRC_1', 'NUM_MOVES', 'ACVOL_UNS',
           'HIGH_YLD', 'LOW_YLD', 'OPEN_YLD', 'YIELD', 'BID_HIGH_1', 'BID_LOW_1',
           'OPEN_BID', 'BID', 'BID_NUMMOV', 'ASK_HIGH_1', 'ASK_LOW_1', 'OPEN_ASK',
           'ASK', 'ASK_NUMMOV', 'MID_HIGH', 'MID_LOW', 'MID_OPEN', 'MID_PRICE'],
          dtype='object', name='HKY.OL')

    You can contact the Elektron Data Platform - Historical Pricing API support team directly via MyRefinitiv to verify if this endpoint can provide the BID size and ASK size.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.