
7 Free APIs for Financial Data (Stocks, Crypto, Forex — No Paid Plan)
Bloomberg terminal costs $24,000/year. These 7 free APIs give you most of the data you actually need. 1. Yahoo Finance — Stock Data (No Key) import requests def get_stock ( symbol ): url = f ' https://query1.finance.yahoo.com/v8/finance/chart/ { symbol } ' resp = requests . get ( url , headers = { ' User-Agent ' : ' Mozilla/5.0 ' }, params = { ' interval ' : ' 1d ' , ' range ' : ' 5d ' }) meta = resp . json ()[ ' chart ' ][ ' result ' ][ 0 ][ ' meta ' ] price = meta [ ' regularMarketPrice ' ] prev = meta [ ' previousClose ' ] change = price - prev print ( f " $ { symbol } : $ { price : . 2 f } ( { ' + ' if change > 0 else '' }{ change : . 2 f } ) " ) get_stock ( ' AAPL ' ) # Apple get_stock ( ' TSLA ' ) # Tesla get_stock ( ' NVDA ' ) # NVIDIA No key needed. Real-time-ish data. 2. CoinGecko — Crypto Prices (No Key) 10,000+ coins with market cap, volume, and 24h change. def get_crypto ( coins = [ ' bitcoin ' , ' ethereum ' , ' solana ' ]): resp = requests . get ( ' https://api.coingecko.
Continue reading on Dev.to Tutorial
Opens in a new tab




