Historical Dataset is wrong in Python.

Hello,

Today, I tried to get Average Price of RIC : CMZN0 on January, 2024 and get Daily Price then sum all of them and divide for average on January, 2024 so that I wanted to see entire provided data is correct.

However, it does not provide same dataset between them.

Here is what i got:

1706232016014.png

1706232105267.png

I think it has to be the same these data.

Or i assume that 'TR.OFFICIALASKPRICE' and 'TRDPRC_1' fields are showing different data.

I was told these fields are displaying same data so i am using like this.


If i was wrong, Please could you tell me what fields i can use when using 'get_history' function?

Here is the code i used in python:

history = rd.get_history(["CMZN0"],["TRDPRC_1","TR.OFFICIALASKPRICE"],end='2024-01-25',interval='daily', count=30)

print(history)


Thank you in advance.

Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @jwlee08 ,

    Thank you for your patience, could you try the field OFF_ASK to retrieve this data

    history = rd.get_history(["CMZN0"],['OFF_ASK'],start='2024-01-01',end='2024-01-25',interval='daily', count=30)
    history

    1707479416171.png


Answers

  • @jwlee08

    Thank you for reaching out to us.

    I don't have permission to access this RIC so I can't verify the data. However, if you don't specify the fields parameter, the response will contain all available real-time fields for this RIC.

    history = rd.get_history(["CMZN0"],end='2024-01-25',interval='daily', count=30)

    After that, you can check which field that can provide the official ask values.

  • Hi~

    I already tried that without specific fields but it gives me the same as the picture i posted...