From 8ddc7f5ecc67c0bb424954a86b75ec7444080ba2 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 29 三月 2023 18:02:50 +0800 Subject: [PATCH] 首板买入策略分值优化 --- juejin.py | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/juejin.py b/juejin.py index bc36187..0e2a1fe 100644 --- a/juejin.py +++ b/juejin.py @@ -536,11 +536,25 @@ keys = redis.keys("juejin_listen_code-*") return len(keys) + # 杩斿洖鎸囧畾鏃ユ湡鐨勪笂涓氦鏄撴棩 @classmethod def get_previous_trading_date(cls, date): account_id, s_id, token = getAccountInfo() gmapi.set_token(token) return gmapi.get_previous_trading_date("SHSE", date) + + # 杩斿洖鎸囧畾鏃ユ湡鐨勪笅涓氦鏄撴棩 + @classmethod + def get_next_trading_date(cls, date): + account_id, s_id, token = getAccountInfo() + gmapi.set_token(token) + return gmapi.get_previous_trading_date("SHSE", date) + + @classmethod + def get_trading_dates(cls, start_date, end_date): + account_id, s_id, token = getAccountInfo() + gmapi.set_token(token) + return gmapi.get_trading_dates("SHSE", start_date, end_date) def trade(code, volume): @@ -668,7 +682,4 @@ if __name__ == '__main__': - # datas = (get_volumns_by_code("603083", 150)) - # print(datas) - # print(get_limit_up_money_percent(datas)) - everyday_init() + print(JueJinManager.get_trading_dates("2023-03-01", "2023-03-29")) -- Gitblit v1.8.0