Get Data / Date Filter / Options Volumes
Hello,
I'm using the below get_data formula:
lst_dt = (datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d")
fst_dt = (datetime.now() - timedelta(days =5)).strftime("%Y-%m-%d")
list_rics = ["1SB2175E2"]
list_fields_1 = ['TR.AccumulatedVolume.date','TR.AccumulatedVolume']
print("load data from",fst_dt,"to",lst_dt)
df_a,e = ek.get_data(list_rics,list_fields_1, {'SDate':fst_dt,'EDate':lst_dt})
df_a = df_a.rename({'TR.AccumulatedVolume.date':'Date'},axis=1)
df_a = df_a.rename({'Accumulated Volume':'Volume'},axis=1)
df_a = df_a.rename(columns = {"Instrument":"Reuters Ticker"})
print(df_a)
And getting the below result:
Reuters Ticker Date Volume
0 1SB2175E2 2022-03-23T00:00:00Z 49
It suggests that my date filter is not working, as 23rd of March should be excluded as it is before my "SDate" and there should be something for the 5th of April (volume was 100 lots on that day which matches my "EDate").
How to use correctly those date filters?
Thanks in advance.
Adding as well a second question:
https://www.theice.com/marketdata/reports/13
As seen in the report reachable on this link, a good part of the volumes in options are going through blocks. Can you please explain to me how to get those volumes? What fields should I use? Thanks.
Answers
-
Hello @emmanuel.chaslin ,
On your first question, the issue appears to be specific to this instrument. Because:
from datetime import datetime
from datetime import timedelta
lst_dt = (datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d")
fst_dt = (datetime.now() - timedelta(days =5)).strftime("%Y-%m-%d")
list_rics = ['1SB2175E2']
list_fields_1 = ['TR.AccumulatedVolume.date','TR.AccumulatedVolume']
print("load data from",fst_dt,"to",lst_dt)
df_a,e = ek.get_data(list_rics,list_fields_1, {'SDate':fst_dt,'EDate':lst_dt})
print(df_a)results in
load data from 2022-04-01 to 2022-04-05
Instrument Date Accumulated Volume
0 1SB2175E2 2022-03-23T00:00:00Z 49while:
from datetime import datetime
from datetime import timedelta
lst_dt = (datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d")
fst_dt = (datetime.now() - timedelta(days =5)).strftime("%Y-%m-%d")
list_rics = ['IBM']
list_fields_1 = ['TR.AccumulatedVolume.date','TR.AccumulatedVolume']
print("load data from",fst_dt,"to",lst_dt)
df_a,e = ek.get_data(list_rics,list_fields_1, {'SDate':fst_dt,'EDate':lst_dt})
print(df_a)results in:
load data from 2022-04-01 to 2022-04-05
Instrument Date Accumulated Volume
0 IBM 2022-04-01T00:00:00Z 4012373
1 IBM 2022-04-04T00:00:00Z 2811100
2 IBM 2022-04-05T00:00:00Z 3107181So am going to get this looked into by product development, will get back with information when available, thanks for your patience!
---
For your second question, it is always better to ask separate question separately as this makes them easily findable an referenceable.
This question is on Eikon content and Eikon content experts will be the best resource to engage. Suggest to submit directly via Refinitiv Helpdesk Online -> Content -> Eikon and inquiry into obtaining this data via Eikon Excel. Once you have the Excel formula, it can usually be translated into EDAPI calls and we can help with that. Try to provide the complete details of the content that you require to identify, and not to mention that you have an API question or issue, in order to avoid being routed back to this forum.
2
Categories
- All Categories
- 6 AHS
- 37 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
- 367 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
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛