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 /

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by michael.t.smith · Jul 31, 2020 at 07:27 PM · eikoneikon-data-apiworkspacepythonworkspace-data-apirefinitiv-dataplatform-eikonchain-rictimeseries

How can I sum a field within a chain RIC?

Looking to get the sum of OPINT_1 for an options chain RIC (0#KODK*.U) by puts and calls. I separated out the puts and calls into different lists. But I cannot find any instruction on how to now sum these values. As you can tell, I'm a beginner here. My goal is to look at the summed data in a time series.

fields = ['PUTCALLIND', 'STRIKE_PRC', 'OPINT_1']

kodk = ek.get_data('0#KODK*.U' , fields=fields)[0]

kodkputs = kodk[kodk['PUTCALLIND'] == 'PUT ']

kodkcalls = kodk[kodk['PUTCALLIND'] == 'CALL']

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.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov.1 · Jul 31, 2020 at 09:03 PM

Use the "sum" method on pandas series:

op_int_puts = kodkputs['OPINT_1'].sum()
Comment
michael.t.smith

People who like this

1 Show 0 · 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
REFINITIV
Answer by chavalit-jintamalit · Jul 31, 2020 at 08:34 PM

Hi @michael.t.smith

If you would like to know how to sum() the data on a dataframe.

Here is the dataframe document.

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.sum.html

Here is the sample code:

kodkcalls['STRIKE_PRC'].sum()
Comment
michael.t.smith

People who like this

1 Show 1 · 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
michael.t.smith · Aug 01, 2020 at 11:21 AM 0
Share

thanks for the link to help. It will be very useful going forward.

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 >
10 People are following this question.

Related Questions

Option Chain From MCX Future: MCGBN0

How to get the component RICs from <0#.STAR50>?

Couldn't get RIC list for chain RIC 0#.MAIIf and 0#.SETIf

Historical option chains

Trying to fetch Close Bid Price for CMO tranche from Python

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • 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
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • 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
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges