binancash

Easy to get data from cnbc.com, it is free

教育
NASDAQ:AAPL   Apple公司
It is a note for developer
Sometime, we need stock data to write strategy checking logic by python. Data from cnbc.com is good and it is free. How to get it?
There are 2 steps to do:
Step 1: install library python
pip install cnbcfinance
Step 2: Get history or get quote realtime
# Get history data
from cnbcfinance import get_history_df
data = get_history_df('AAPL', '30m')

# Get quote
from cnbcfinance import get_history_df
data = get_quota('AAPL')

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。