pip install quickfin
pip install --upgrade quickfin
from quickfin import * price_data = PriceData()
data = price_data.current("MSFT")
print(data) # Print object assigned to `data` variable
{
'info': {
'industry': 'Software - Infrastructure',
'name': 'Microsoft Corporation',
'sector': 'Technology',
'symbol': 'MSFT'
},
'current': {
'Adj Close': 424.57,
'Change Amount': -0.62,
'Change Rate': -0.0,
'Close': 424.57,
'Date': '2024-04-01',
'Day Range': 5.67,
'High': 427.89,
'Low': 422.22,
'Open': 423.95,
'Volume': 16298900
}
}
data = price_data.history("META")
print(data)
{
'info': {
'industry': 'Internet Content & Information',
'name': 'Meta Platforms, Inc.',
'sector': 'Communication Services',
'symbol': 'META'
},
'current': {
'Adj Close': 491.35,
'Change Amount': -4.15,
'Change Rate': -0.01,
'Close': 491.35,
'Date': '2024-04-01',
'Day Range': 15.65,
'High': 497.43,
'Low': 481.78,
'Open': 487.2,
'Volume': 9236300
},
'history': [
{
'Adj Close': 491.35,
'Change Amount': -4.15,
'Change Rate': -0.01,
'Close': 491.35,
'Date': '2024-04-01',
'Day Range': 15.65,
'High': 497.43,
'Low': 481.78,
'Open': 487.2,
'Volume': 9236300
},
{
'Adj Close': 485.58,
'Change Amount': 7.26,
'Change Rate': 0.01,
'Close': 485.58,
'Date': '2024-03-28',
'Day Range': 7.74,
'High': 492.89,
'Low': 485.15,
'Open': 492.84,
'Volume': 15212800
},
{
'Adj Close': 493.86,
'Change Amount': 5.44,
'Change Rate': 0.01,
'Close': 493.86,
'Date': '2024-03-27',
'Day Range': 11.82,
'High': 499.89,
'Low': 488.07,
'Open': 499.3,
'Volume': 9989700
}
--- snip ---
]
}
data = price_data.history("DTE", days=5)
print(data)
{
'info': {
'industry': 'Utilities - Regulated Electric',
'name': 'DTE Energy Company',
'sector': 'Utilities',
'symbol': 'DTE'
},
'current': {
'Adj Close': 110.73,
'Change Amount': 1.41,
'Change Rate': 0.01,
'Close': 110.73,
'Date': '2024-04-01',
'Day Range': 1.86,
'High': 112.14,
'Low': 110.28,
'Open': 112.14,
'Volume': 847500
},
'history': [
{
'Adj Close': 110.73,
'Change Amount': 1.41,
'Change Rate': 0.01,
'Close': 110.73,
'Date': '2024-04-01',
'Day Range': 1.86,
'High': 112.14,
'Low': 110.28,
'Open': 112.14,
'Volume': 847500
},
{
'Adj Close': 112.14,
'Change Amount': -0.82,
'Change Rate': -0.01,
'Close': 112.14,
'Date': '2024-03-28',
'Day Range': 1.34,
'High': 112.31,
'Low': 110.97,
'Open': 111.32,
'Volume': 990500
},
{
'Adj Close': 111.3,
'Change Amount': -3.35,
'Change Rate': -0.03,
'Close': 111.3,
'Date': '2024-03-27',
'Day Range': 3.46,
'High': 111.41,
'Low': 107.95,
'Open': 107.95,
'Volume': 1668700
},
{
'Adj Close': 107.13,
'Change Amount': 1.34,
'Change Rate': 0.01,
'Close': 107.13,
'Date': '2024-03-26',
'Day Range': 1.91,
'High': 108.98,
'Low': 107.07,
'Open': 108.47,
'Volume': 1110800
},
{
'Adj Close': 108.42,
'Change Amount': 0.88,
'Change Rate': 0.01,
'Close': 108.42,
'Date': '2024-03-25',
'Day Range': 1.41,
'High': 109.3,
'Low': 107.89,
'Open': 109.3,
'Volume': 1045100
}
]
}
data = price_data.history("CMS", date="2022-03-25")
print(data)
{
'info': {
'industry': 'Utilities - Regulated Electric',
'name': 'CMS Energy Corporation',
'sector': 'Utilities',
'symbol': 'CMS'
},
'current': {
'Adj Close': 59.98,
'Change Amount': 0.41,
'Change Rate': 0.01,
'Close': 59.98,
'Date': '2024-04-01',
'Day Range': 0.7,
'High': 60.42,
'Low': 59.72,
'Open': 60.39,
'Volume': 1619100
},
'history': [
{
'Adj Close': 64.66,
'Change Amount': -0.72,
'Change Rate': -0.01,
'Close': 68.92,
'Date': '2022-03-25',
'Day Range': 0.94,
'High': 69.05,
'Low': 68.11,
'Open': 68.2,
'Volume': 1706900
}
]
}
data = price_data.history("SCS", date_start="2021-03-10", date_end="2021-03-14")
print(data)
{
'info': {
'industry': 'Business Equipment & Supplies',
'name': 'Steelcase Inc.',
'sector': 'Industrials',
'symbol': 'SCS'
},
'current': {
'Adj Close': 13.03,
'Change Amount': 0.09,
'Change Rate': 0.01,
'Close': 13.03,
'Date': '2024-04-01',
'Day Range': 0.35,
'High': 13.3,
'Low': 12.95,
'Open': 13.12,
'Volume': 1679800
},
'history': [
{
'Adj Close': 14.47,
'Change Amount': -0.38,
'Change Rate': -0.02,
'Close': 16.59,
'Date': '2021-03-12',
'Day Range': 0.55,
'High': 16.71,
'Low': 16.16,
'Open': 16.21,
'Volume': 542400
},
{
'Adj Close': 14.08,
'Change Amount': 0.03,
'Change Rate': 0.0,
'Close': 16.14,
'Date': '2021-03-11',
'Day Range': 0.29,
'High': 16.23,
'Low': 15.94,
'Open': 16.17,
'Volume': 620200
},
{
'Adj Close': 14.11,
'Change Amount': -0.73,
'Change Rate': -0.05,
'Close': 16.18,
'Date': '2021-03-10',
'Day Range': 0.91,
'High': 16.22,
'Low': 15.31,
'Open': 15.45,
'Volume': 758800
}
]
}
data = price_data.candlestick("F", 25)
print(data)
data = price_data.line("F", 25, "Close")
print(data)
data = price_data.table("F", 25)
print(data)
from quickfin import * fin_info = FinInfo()
data = fin_info.equity("IBM")
print(type(data)) # Print Python data type
print(data) # Print object assigned to `data` variable
<class 'dict'>
{
'industry': 'Information Technology Services',
'name': 'International Business Machines Corporation',
'sector': 'Technology',
'symbol': 'IBM'
}
data = fin_info.equities() print(data)
[
{
'industry': 'Diagnostics & Research',
'name': 'Agilent Technologies, Inc.',
'sector': 'Healthcare',
'symbol': 'A'},
{
'industry': 'Aluminum',
'name': 'Alcoa Corporation',
'sector': 'Basic Materials',
'symbol': 'AA'
},
{
'industry': 'Education & Training Services',
'name': 'ATA Creativity Global',
'sector': 'Consumer Defensive',
'symbol': 'AACG'
},
--- snip ---
]
data = fin_info.industries() print(data)
[ 'Diagnostics & Research', 'Aluminum', 'Education & Training Services', 'Uncategorized', 'Shell Companies', 'Farm Products', 'Insurance - Life', 'Rental & Leasing Services', 'Communication Equipment', 'Building Products & Equipment', 'Specialty Retail', 'Consumer Electronics', 'REIT - Diversified', 'Asset Management', --- snip --- ]
data = fin_info.sectors() print(data)
[ 'Healthcare', 'Basic Materials', 'Consumer Defensive', 'Uncategorized', 'Financial Services', 'Industrials', 'Technology', 'Consumer Cyclical', 'Real Estate', 'Communication Services', 'Energy', 'Utilities' ]
data = fin_info.sector_industries("technology")
print(data)
[ 'Communication Equipment', 'Consumer Electronics', 'Software - Infrastructure', 'Semiconductor Equipment & Materials', 'Information Technology Services', 'Software - Application', 'Semiconductors', 'Computer Hardware', 'Electronic Components', 'Solar', 'Electronics & Computer Distribution', 'Scientific & Technical Instruments' ]
data = fin_info.sector_equities("healthcare")
print(data)
[
{
'industry': 'Diagnostics & Research',
'name': 'Agilent Technologies, Inc.',
'sector': 'Healthcare',
'symbol': 'A'
},
{
'industry': 'Drug Manufacturers - General',
'name': 'AbbVie Inc.',
'sector': 'Healthcare',
'symbol': 'ABBV'
},
{
'industry': 'Biotechnology',
'name': 'AbCellera Biologics Inc.',
'sector': 'Healthcare',
'symbol': 'ABCL'
},
--- snip ---
]
data = fin_info.industry_equities("farm products")
print(data)
[
{
'industry': 'Farm Products',
'name': 'African Agriculture Holdings Inc.',
'sector': 'Consumer Defensive',
'symbol': 'AAGRW'},
{
'industry': 'Farm Products',
'name': 'Archer-Daniels-Midland Company',
'sector': 'Consumer Defensive',
'symbol': 'ADM'
},
{
'industry': 'Farm Products',
'name': 'Forafric Global PLC',
'sector': 'Consumer Defensive',
'symbol': 'AFRIW'
}
--- snip ---
]
data = fin_info.symbols() print(data)
[ 'A', 'AA', 'AACG', 'AACT-WT', 'AACT', 'AAGRW', 'AAME', 'AAN', --- snip --- ]
data = fin_info.sector_symbols("communication services")
print(data)
[ 'ABLV', 'ABLVW', 'ADTH', 'ADVWW', 'ANTE', 'BAOS', 'BOC', 'CCO', --- snip --- ]
data = fin_info.industry_symbols("electronic components")
print(data)
[ 'ALNT', 'BELFA', 'CLS', 'CTS', 'DAKT', 'DSWL', 'ELTK', 'FLEX', --- snip --- ]