-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[P/L Addon] Holdings Analyzer feature request to show stock exposure #14
Comments
Hi @ajinabraham, yeah tats doable. We need to figure out an API that will return the holdings of an API, then we can show a table for these in-direct holdings. Are you aware of any API which will take a list of ETF symbols and returns the holdings in each ETF? If so, let me know, we can look into implementing it. Thanks! |
Most of the stable APIs are paid, the rest I found are actually scraping yahoo finance / google finance and seems to be not maintained well. I found a node and python module that seems to provide ETF holding info, based on Yahoo Finance. Both only lists the top 10 individual stocks hold by the ETF though. Node.js - https://github.com/gadicc/node-yahoo-finance2const yahooFinance = require('yahoo-finance2').default;
(async function (){
const results = await yahooFinance.quoteSummary('XIU.TO', { modules: [ "topHoldings" ] });
console.log(JSON.stringify(results, null, 2))
})();
Python - https://pypi.org/project/yahooquery/from json import dumps
from yahooquery import Ticker
x = Ticker('xic.to')
print(dumps(x.fund_holding_info, indent=4, sort_keys=True))
|
Hi @mani-coder 👋
I have a feature request. I can also work on it, if you can point me to the related code, data points and dev setup.
Show detailed exposure to a stock in holdings analyzer.
Today holding analyzer shows exposure to individual stocks and etfs. Can we have a feature that will show exposure/holding percentage at the stock level, that will take into account both direct stock holding as well as holding via ETFs?
The text was updated successfully, but these errors were encountered: