*work in progress*
I recently came across a Reddit post in r/algotrading where someone was looking for a comprehensive list of API’s to access various types of market data. You can see the original post here. This is something I have been thinking about and researching over the first half of 2020 and thought it would be a fun project for me to put together some things I have come across and found useful. From the reddit post, you will quickly see that a user commented a very comprehensive list they had put together, which you can see here, but it is much broader in scope (which is great!) and I don’t mean to copy that in any way, and it does include a section on Algos/APIs here. I felt that in this post I could focus specifically on algotrading and python for finance resources, instead of all of the broader stock markets tools I have come across and utilize, though I may cover that in a separate post. This post assumes that you have some fundamental knowledge of the stock market and investing/trading, and will not provide the basics of that, but is intended to help get you started on your journey with algotrading and/or utilizing python for various financial use-cases. My goal was also not to list every single possible service or link I could find, but one’s I have found useful or interesting in some way. Please feel free to let me know if you feel there is anything you would like me to add and I would be more than happy to expand the list.
**For clarification, I cannot vouch for the stability and accuracy of all of these services or programs. I have not fully implemented all of them, some I just use to dig around the code and documentation to learn things. If you’re going to use any of this for live trading, please do so at your own risk, and make sure you backtest and paper trade first!
APIs
Alpaca.Markets
Alpaca is a commission-free API trading platform. You can utilize it for everything from accessing streaming market data to building fully-featured stock trading applications. They are a registered securities broker, offering both margin and short selling, though no options trading as of now. The API is available in Python, .NET/C#, GO, Node, and others. Sandboxing is available for testing your applications before using live data, and you can have a fully functional paper trader account to practice as well before going live. You can read more on their documentation here. A wide variety of integrations are available with other platforms such as TradingView and Slack, which you can explore further here.
https://financialmodelingprep.com/developer/docs/
https://developer.tdameritrade.com/apis
https://github.com/alexgolec/tda-api
https://tda-api.readthedocs.io/en/latest/
https://robin-stocks.readthedocs.io/en/latest/index.html
Education
https://www.reddit.com/r/algotrading
https://www.reddit.com/r/algotrading/wiki/index#wiki_how_to_get_historical_data_for_free
https://www.tradientblog.com/2019/11/lessons-learned-building-an-ml-trading-system-that-turned-5k-into-200k/
https://www.youtube.com/user/sentdex
- Python Programming for Finance p.1
- Algorithmic Trading with Python and Quantopian p.1
- Neural Networks from Scratch p.1
- Introduction to Data Analysis and Data Science with Python and Pandas
https://www.youtube.com/watch?v=QIUxPv5PJOY
https://www.youtube.com/watch?v=EYnC4ACIt2g
Part Time Larry
- Tradier API Stock and Option Trading with Python
- Alpaca Market Data API Part 1
- Building a Historical Option Price Database with Tradier API, SQLite, and Cron
- Bear Market, Put Options and the Robinhood Private API Part 1
- Building an Automated Trading Bot with Python and Real-Time Market Data over Websockets Part 1
- Placing a Bracket Order on Apple Stock with Python and Alpaca
- Golden Cross Algorithmic Trading Strategy with Python and Backtrader Part 1
- Algorithmic Trading with Python and Backtrader Part 1
- Stock Chart Pattern Recognition in Python Part 1
- Paper Trading with the Alpaca API
- Trading Stocks with the Robinhood API and Python Part 1
- Automated Trading with Python and Robinhood Part 1
AMA
This is a classic reddit AMA post from an algotrader who was particularly successful and provided a lot of good insights throughout the thread, it’s definitely worth reading.
https://www.reddit.com/r/algotrading/comments/96mjt2/some_final_words/
Blogs
https://financial-hacker.com/ - “A new view on algorithmic trading”
https://qoppac.blogspot.com/
https://quantstrattrader.wordpress.com/
GitHub Repositories/Python Libraries/Documentation
https://github.com/AlgoTraders/stock-analysis-engine
https://github.com/knipknap/stocklist
https://github.com/drquant/Python_Finance
https://github.com/google/tf-quant-finance
https://github.com/Hvass-Labs/FinanceOps
https://github.com/cantaro86/Financial-Models-Numerical-Methods
https://github.com/ranaroussi/yfinance
https://pynance.net/
https://numpy.org/
https://www.scipy.org/
https://pandas.pydata.org/
https://github.com/johnbywater/quantdsl
https://github.com/pmorissette/ffn
https://github.com/bpsmith/tia
https://github.com/harttraveller/finlib
https://github.com/robertmartin8/PyPortfolioOpt
https://github.com/chrisconlan/algorithmic-trading-with-python
https://github.com/jankrepl/deepdow
https://pypi.org/project/qfrm/
https://github.com/alpacahq/alpaca-trade-api-python
https://github.com/dmackenz/Keras-Neuro-Evolution-Trading-Bot-Skeleton