Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by yuyang · Feb 22 at 05:41 AM · eikon python api

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

qq图片20210222132403.png (107.6 KiB)

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by chavalit.jintamalit · Feb 22 at 07:24 AM

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


ahs.png (45.0 KiB)
Comment

People who like this

0 Show 4 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
yuyang · Feb 22 at 08:01 AM 0
Share

Thank you for your reply, but all our codes are based on Eikon (Import Eikon as EK), your method needs to install a new package, I would like to know whether Eikon's method can get 5 minutes of historical data?

avatar image
REFINITIV
chavalit.jintamalit ♦♦ yuyang · Feb 22 at 09:39 AM 0
Share

Hi @yuyang

The ek.get_timeseries does not support 5 Minutes data.


You can run help(ek.get_timeseries) to see the description

interval: string
Data interval.
Possible values: 'tick', 'minute', 'hour', 'daily', 'weekly', 'monthly', 'quarterly', 'yearly' (Default 'daily')
Default: 'daily'


You may use ek to get minute data and drop 4 of every 5 records.

avatar image
yuyang · Feb 22 at 12:40 PM 0
Share

I use the method you provided (Ek.get_TimesSeries ()) to get the TSLA time-sharing data of a certain day, such as the historical time-sharing data of 2021-02-18. The data returned is from 0:00 to 01:00 and from 9:01 to 23:59 on the 18th. How can these data be distinguished between pre-market data, intra-market data and post-market data during that period?

avatar image
REFINITIV
chavalit.jintamalit ♦♦ yuyang · Feb 23 at 01:35 AM 0
Share

Hi @yuyang

The time you see is in GMT and I believe that this is one trading day data.

However, for the content question as to when is the pre-market, trading, post-market.

For an authoritative answer to any content questions, the best resource is the Refinitiv Content Helpdesk.
This forum is dedicated to things specific to the use of Eikon APIs.
The moderators here do not have deep expertise in every type of content available through Eikon.
The Refinitiv Content Helpdesk can be reached using Contact Us capability in your Eikon application.
Or by calling the Helpdesk number in your country.
Or at https://my.refinitiv.com/


ahs.png (66.4 KiB)

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
12 People are following this question.

Related Questions

Not able to download the desired historical data?

Excess returns in Eikon python API

How can I get the date from "get_data" of EIKON API?

Can I use Eikon API in Colab.research.google.com?

Beta of a Foreign Security

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges