期貨取得ticks許多tick_type為0

有任何提問的都來這
回覆文章
gggogogo
文章: 2
註冊時間: 2022-08-19, 23:45

期貨取得ticks許多tick_type為0

文章 gggogogo »

期貨透過ticks取得的資料內容有很大部分是tick_type = 0,麻煩協助確認一下,謝謝

代碼: 選擇全部

ticks = api.ticks(
    contract=api.Contracts.Futures['CZFI2'],
    date='2022-08-24'
)
df = pd.DataFrame({**ticks})
df[df['tick_type'] == 0]
bid_price ask_volume volume ts tick_type ask_price close bid_volume
58 95.4 8 1 1661331181957000000 0 95.5 95.4 1
71 95.3 6 1 1661331353718000000 0 95.4 95.3 1
113 95.2 34 3 1661331632226000000 0 95.4 95.3 11
114 95.2 34 2 1661331632227000000 0 95.4 95.3 11
115 95.2 34 1 1661331632229000000 0 95.4 95.3 11
... ... ... ... ... ... ... ... ...
2150 92.8 51 1 1661344380921000000 0 93.0 92.9 22
2151 92.9 53 1 1661344380937000000 0 93.0 92.9 1
2154 92.9 52 2 1661344401562000000 0 93.0 92.9 2
2155 92.9 47 1 1661344409187000000 0 93.0 92.9 1
2169 92.7 26 1 1661344552890000000 0 92.9 92.8 25
回覆文章