For professional and retail investors alike, having real-time access to reliable market data is crucial for making informed investment decisions. However, working with large datasets in traditional spreadsheet software can be limiting and inefficient.
Quadratic, a next-generation spreadsheet platform that seamlessly integrates Python, provides a powerful solution. By combining Quadratic’s flexibility with the robust financial data available through Intrinio’s API, users can unlock new possibilities in data-driven investment analysis. This tutorial will guide you through the process of integrating Intrinio’s API with Quadratic to pull stock price data efficiently and effectively.
Quadratic is an innovative spreadsheet platform that seamlessly integrates Python and JavaScript, allowing users to perform complex data analysis directly within a browser-based spreadsheet interface. Unlike traditional spreadsheets, Quadratic provides a dynamic coding environment and native AI functionality, making it a powerful tool for financial analysts, quants, and developers.
Quadratic is ideal for professionals in finance, investment management, and quantitative analysis who require real-time data manipulation, visualization, and automation. Hedge funds, portfolio managers, and independent traders can all benefit from Quadratic’s ability to combine spreadsheet simplicity with programmatic flexibility.
By integrating Intrinio’s financial data API with Quadratic, users can:
This tutorial will guide you through fetching stock price data from Intrinio’s API and loading it into Quadratic.
Before getting started, ensure you have the following:
To use Intrinio’s API, you need an API key. Visit https://intrinio.com/ and either Request a Consultation or chat live with the team to get access to a free trial of 15-Min Delayed IEX Data.
Use the following Python script to fetch stock price data from Intrinio:
import requests
import pandas as pd
# Replace 'YOUR_API_KEY' with your actual API key from Intrinio
api_key = 'OjM2ZmE5YjQxNjgxMzJlY2E0YjQwN2Q0YTY2ZmI4N2Zm'
ticker = 'AAPL'
# Intrinio API endpoint for stock prices
url = f'https://api-v2.intrinio.com/securities/{ticker}/prices'
# Parameters
params = {
'api_key': api_key,
'page_size': 5 # 5 days worth of prices
}
# Make the request
response = requests.get(url, params=params)
data = response.json()
if "stock_prices" in data:
df = pd.DataFrame(data["stock_prices"])
df = df[["date", "adj_close", "adj_volume"]] # Keep only date, adjusted closing price, and adjusted volume columns
else:
df = pd.DataFrame([])
# Log to the console to see what the data looks like from Intrinio
# Additional fields can be added to
print(data)
df.head() # Display the first few rows in Quadratic
Quadratic’s spreadsheet will automatically display the DataFrame output, allowing you to manipulate and analyze the stock price data as needed.
Now that you have some initial data in Quadratic, you can:
To keep your stock price data up to date, you can schedule Quadratic to re-run the script periodically by clicking on the “Run” button in the Python cell.
The combination of Quadratic and the Intrinio API represents a paradigm shift in financial data analysis. It bridges the gap between traditional spreadsheet-based workflows and modern programmatic data science techniques, making high-level financial modeling accessible to both technical and non-technical users.
At Intrinio, this is near and dear to our hearts. Our APIs power innovation at top fintech companies and investment firms worldwide. Much of that innovation happens around financial analysis, and the advent of modern spreadsheeting technology, combined with our data, is a game changer.
Analysts, traders, and finance professionals can now leverage real-time data with powerful automation tools, dramatically improving efficiency and decision-making in market analysis.
By integrating Intrinio’s API with Quadratic, you gain a flexible and powerful way to analyze stock price data in real-time. This setup enables seamless data retrieval, analysis, and visualization—all within a single spreadsheet interface powered by Python.
For more advanced use cases, consider combining Intrinio’s API with Quadratic’s built-in machine learning or visualization tools to enhance your financial analysis. Intrinio offers over 30 different types of financial data, including fundamentals, options data, news, estimates, ETF holdings, and more. Quadratic has an extensive free plan, but you can also chat with their team for enterprise features.