import tickerinside as ti # NVDA's file, as served; the etf_ownership block holds the figure own = ti.security("NVDA").data["etf_ownership"] # pct_lower_bound is null when no figure is published, and refused says why if own["pct_lower_bound"] is None: print("NVDA etf_ownership: no figure published, refused", own["refused"]) else: print(f"NVDA etf_ownership: at least {own['pct_lower_bound']}% of its " f"shares held by covered US ETFs, basis {own['basis']}") # The shares counted, and the date of the count of shares outstanding print(f"shares_held {own['shares_held']:,} " f"shares_outstanding {own['shares_outstanding']:,} " f"as of {own['shares_outstanding_as_of']}") # The oldest and the newest holdings file behind the figure dates = own["holdings_dates"] print("holdings dated", dates["oldest"], "to", dates["newest"]) # The line to print under the figure print(own["cite_as"])