From d87bed9b17739877c58e8891a60b24630b8e08f8 Mon Sep 17 00:00:00 2001 From: samlin Date: Sun, 5 Jan 2025 11:44:47 +0800 Subject: [PATCH] fix: async document --- docs/tutor/TaiwanMarket/Chip.md | 9 ++++++--- docs/tutor/TaiwanMarket/Technical.md | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/tutor/TaiwanMarket/Chip.md b/docs/tutor/TaiwanMarket/Chip.md index 2ec86f9..ef186b8 100644 --- a/docs/tutor/TaiwanMarket/Chip.md +++ b/docs/tutor/TaiwanMarket/Chip.md @@ -1392,10 +1392,13 @@ from loguru import logger import datetime - api = DataLoader() + token = "" + + data_loader = DataLoader() + data_loader.login_by_token(token) date = '2024-12-20' - taiwan_stock_price_df = api.taiwan_stock_daily(start_date=date) + taiwan_stock_price_df = data_loader.taiwan_stock_daily(start_date=date) # 只拿取當天交易量大於 0 的股票 taiwan_stock_price_df = taiwan_stock_price_df[ ["stock_id", "Trading_Volume"] @@ -1405,7 +1408,7 @@ ] # 拿取當天上市櫃,industry_category 非大盤, index, 所有證券的股票 ID # 因為這些股票沒有分點 - stock_info_df = api.taiwan_stock_info() + stock_info_df = data_loader.taiwan_stock_info() stock_info = stock_info_df[stock_info_df["type"].isin(["twse", "tpex"])] cate_mask = stock_info["industry_category"].isin( ["大盤", "Index", "所有證券"] diff --git a/docs/tutor/TaiwanMarket/Technical.md b/docs/tutor/TaiwanMarket/Technical.md index a795660..7f905f7 100644 --- a/docs/tutor/TaiwanMarket/Technical.md +++ b/docs/tutor/TaiwanMarket/Technical.md @@ -1505,10 +1505,13 @@ from loguru import logger import datetime - api = DataLoader() + token = "" + + data_loader = DataLoader() + data_loader.login_by_token(token) date = '2024-12-20' - taiwan_stock_price_df = api.taiwan_stock_daily(start_date=date) + taiwan_stock_price_df = data_loader.taiwan_stock_daily(start_date=date) # 只拿取當天交易量大於 0 的股票 taiwan_stock_price_df = taiwan_stock_price_df[ ["stock_id", "Trading_Volume"] @@ -1518,7 +1521,7 @@ ] # 拿取當天上市櫃,industry_category 非大盤, index, 所有證券的股票 ID # 因為這些股票沒有分點 - stock_info_df = api.taiwan_stock_info() + stock_info_df = data_loader.taiwan_stock_info() stock_info = stock_info_df[stock_info_df["type"].isin(["twse", "tpex"])] cate_mask = stock_info["industry_category"].isin( ["大盤", "Index", "所有證券"]