question

Upvotes
Accepted
4 0 1 4

Historical Bid/Ask price and size at 10 levels

Hi,


I am using refinitiv data's get_history() function to retrieve historical bids/asks (1 minute frequency) along with sizes/depth. I only managed to get best bid/asks but not at level 2, 3, 4 and so on (I need upto 10 levels ideally).


Please see the code snippet below. Can someone help as to what should I add more to get additional details.


1659942467256.png


Can someone also explain that why certain fields under data item browser like A_LEVEL_1, B_LEVEL_1 do not work? I tried but they do not produce anything (comes up with NaN values).


Look forward to hearing on it.


Thanks,

apilevel-2order-book
1659942467256.png (130.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
79.2k 251 52 74

@gk21271

The get_history function retrieves historical data from the historical-pricing Refinitiv Data Platform endpoint. The valid fields of minute interval data for ETH= are:

"headers": [
      {
        "name": "DATE_TIME",
        "type": "string"
      },
      {
        "name": "BID_HIGH_1",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "BID_LOW_1",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "OPEN_BID",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "BID",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "BID_NUMMOV",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "ASK_HIGH_1",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "ASK_LOW_1",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "OPEN_ASK",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "ASK",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "ASK_NUMMOV",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "MID_HIGH",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "MID_LOW",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "MID_OPEN",
        "type": "number",
        "decimalChar": "."
      },
      {
        "name": "MID_PRICE",
        "type": "number",
        "decimalChar": "."
      }
    ],

It doesn't support the A_LEVEL_1, B_LEVEL_1 fields so it can't provide Historical Bid/Ask price and size at 10 levels.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks for your response.


Where can I see which fields are valid for which instruments in future. that will help immesely.


Is there an alternate way to get desired info (if not from Refinitiv Data Platform endpoint).


Thanks


@gk21271

If you ignore the fields parameter, it will return all fields.

rd.get_history(universe="ETH=", interval="1min")

1659949888192.png

You can contact your account or sales team to discuss another way to get Historical Bid/Ask price and size at 10 levels.

1659949888192.png (21.4 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.