Example #1
0
 def testGetOptionList(self):
     #
     # 去掉商品期权,保留510050开头的50ETF期权
     rows = QA_fetch_get_option_contract_time_to_market()
     strToday = QA_util_today_str()
     for aRow in rows:
         #print(aRow)
         print(aRow.code);
         result2 = QA.QA_fetch_get_option_day(package='tdx', code=aRow.code, start='2018-01-01', end=strToday)
         pprint.pprint(result2);
Example #2
0
    def testGetCommodityCFOptionList(self):
        rows = QA_fetch_get_commodity_option_CF_contract_time_to_market()
        strToday = QA_util_today_str()
        for aRow in rows:
            # print(aRow)
            print("准备获取 ;-》")
            print(aRow)
            print("-------------")
            result2 = QA.QA_fetch_get_option_day(package='tdx', code=aRow.code, start='2018-01-01', end=strToday)
            pprint.pprint(result2);

            print("结束获取 ;-》")
Example #3
0
    def test_quotation_base_class(self):


        df_from_Tdx = QA.QA_quotation('300439', '2018-04-01', '2018-04-10', frequence=FREQUENCE.DAY,
                                   market=MARKET_TYPE.STOCK_CN, source=DATASOURCE.TDX, output=OUTPUT_FORMAT.DATAFRAME)
 def test_00(self):
   res =   QA.QA_fetch_index_day('000300', '2017-01-01', '2018-01-05')
   print(res)