symbol = 'CFFEX.IF2402' # ks_1d = [api.get_kline_serial(domain, duration_seconds=24*60*60) for domain in domains] ks_5m = api.get_kline_serial(symbol, duration_seconds=5*60) # print(ks_5m) sar = SAR(ks_5m, 4, 0.02, 0.2) # sar = SAR(ks_1d[i], 4, 2, 20) s = list(sar["sar"]) ks_5m['sar'] = sar["sar"] print(ks_5m[-10:])
[/apcode]