How to use Python to get a stock's 5-minute K-line history from the Ekion API?

Best Answer

  • Hi @yuyang

    Please try this code:

    #pip install refinitiv.dataplatform
    import refinitiv.dataplatform as rdp
    rdp.open_desktop_session('xxxxxxxxxxxxxx')
    df = rdp.get_historical_price_summaries(
            universe = 'TSLA.O',
            interval = rdp.Intervals.FIVE_MINUTES,
            start = '2021-02-20',
            end = '2021-02-21'     )
    df

    image

Answers