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' )
df0
Answers
-
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?
0 -
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.
0 -
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?
0 -
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/0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛