get_data Time parameter. Python

Hello, I'm using Python.

I want to retreive the BID/ASK of Eur at a specific time(seconds).

I'm using data, error=ek.get_data('EUR=', ['TR.ASKPRICE.Date', 'TR.ASKPRICE','TR.BIDPRICE'], parameters={'SDate':'2018-06-20', 'EDate':'2018-06-22'})

I would like to Know how to Change the SDate EDate format and add Hour/min/sec to it.

thank you

Best Answer

  • nick.zincone
    Answer ✓

    Hi @e-naji,

    If you are interested in intraday activity, use the get_timeseries() method call. With that you can narrow down your time range and specify the granularity of the measure using the available options for the interval parameter. For example:

    df = tr.get_timeseries( 'EUR=', start_date='2018-06-20T09:25:00', 
    end_date='2018-06-20T16:01:00',
    interval='minute' )

    Note: See this post which provides additional details around the interval and what to expect.

Answers

  • In addition to the response from @nick.zincone.1 get_timeseries method currently can only retrieve timeseries for the default view for an instrument, which for spot exchange rates is BID. If you need both bid and ask intraday history at the moment there's no way to retrieve it using Eikon Data API. The only Eikon API that can currently provide both bid and ask intraday history is Eikon .NET API.

  • I am very new to python. Can you please suggest me some website from where I can get all the code and the basic thing of python, but don't suggest me Skype Customer Service this website, I am fed up with this website. So please suggest me some real and good website so that I can be an expert in python.

  • Hello and thank you for you answer. @nick.zincone.1 But sadly we can't get BID/ASK and such using get_timeseries

  • Hello and thank you for your answers. I find it odd that the function get_data() allows us to get Bid/Ask for a specific Date M/D/Year and not for an exact time like M/D/Y H/M/Sec.

  • Alex Putkov., is it still the case that there is no way to get intraday bid and ask prices using the Eikon Python API?

  • Correct. It's still the case that intraday quote history for exchange traded instruments is only available through Eikon .NET API and RHistory COM API (the latter can only be used in Excel VBA).

  • okay thanks!