I have been unsuccessful on retrieving the market cap of a security. This is what I have tried :
AAPL_Market_cap = request.financial("NASDAQ:AAPL", "MKT_CAP", "FQ")
AAPL_Market_cap = request.financial("NASDAQ:AAPL", "MARKET_CAPITALIZATION", "FQ")
I have been unsuccessful on retrieving the market cap of a security. This is what I have tried :
AAPL_Market_cap = request.financial("NASDAQ:AAPL", "MKT_CAP", "FQ")
AAPL_Market_cap = request.financial("NASDAQ:AAPL", "MARKET_CAPITALIZATION", "FQ")
Market Capitalization is partially based on the stock price, so it cannot be directly requested via request.financial(). You need to request total shares and multiply them by close:
TSO = request.financial("NASDAQ:AAPL", "TOTAL_SHARES_OUTSTANDING", "FQ")
MarketCap = TSO * close