Bid/Ask fields on Eikon Data API

Hi team,

Using 0700.HK and 7832.T as the example instruments

1) Does Eikon Data API provide multiple bid and ask levels beyond the best one?

2) For the field 'Bid' and 'Ask', does it support interval of tick and minute? If so, how long is the history we can have through Eikon Data API?

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    @karl.kwok

    1. If your Eikon account is entitled to Level 2 data for these exchanges you can retrieve several levels of best bid/ask using Level 2 RICs. The number of levels available varies by exchange. The code snippet below retrieves 10 best bid/ask levels for 7832.T (using Level 2 RIC D7832.T) and constructs the dataframe mimicking the market by price orderbook view.

    bid_flds = ['BEST_BID' + str(x) for x in range(1,11)]
    ask_flds = ['BEST_ASK' + str(x) for x in range(1,11)]
    df_tmp, err = ek.get_data('D7832.T', bid_flds + ask_flds)
    df=pd.DataFrame()
    df['BID'] = df_tmp.loc[0,bid_flds].reset_index(drop=True)
    df['ASK'] = df_tmp.loc[0,ask_flds].reset_index(drop=True)
    df

    screen-shot-2021-07-20-at-95906-am.png

    2. Using RDP Library you can retrieve tick timeseries for bid and ask and OHLC for bid and ask in 1 minute aggregation. Tick history goes back 90 days, 1 minute history goes back 1 year.

    rdp.get_historical_price_summaries('7832.T', 
    fields=['OPEN_BID', 'BID_HIGH_1',
    'BID_LOW_1', 'BID',
    'OPEN_ASK', 'ASK_HIGH_1',
    'ASK_LOW_1', 'ASK'],
    interval='PT1M')

    screen-shot-2021-07-20-at-100603-am.png

Answers