Blog

Historical Stock Price Data in Python

Analyzing stock market data is essential in making trading decisions, especially historical stock price data. Do you know how to get daily and minute level historical stock data from Barchart? You can do this with our Historical Data API, getHistory. This API is used to request historical time series data on stocks, indexes, mutual funds, ETFs, futures, foreign exchange, cash commodities or cryptocurrencies. You can access this data as tick, minute bars or end-of-day time series.

Here is a sample of our Historical Data API in Python:

We also have sample codes in PHP, Perl, Classic ASP, and Ruby. You can view them here.

Barchart OnDemand is compatible with any operating system, such as Windows, Linux, iOS or Android, and any programming language, such as Java, PHP or ASP.NET. To get started, contact us to receive your unique API key. Once you have your API key you can customize your queries using the inputs found in the API documentation. 

Whether you are looking for a fully custom or off-the-shelf solution, our flexible market data APIs can be tailored to include only the data you need. With direct connectivity to the exchanges, our OnDemand solution is completely platform-independent so you can receive the data you need in any operating system or programming language. Barchart OnDemand delivers a truly reliable and scalable cloud-based solution. To learn more about our market data APIs for historical stock price data, contact us at solutions@barchart.com.

VIEW ALL POSTS