Skip to content

市場快照

市場快照為證券、期貨及選擇權當下資訊。內容包含開盤價、最高價、最低價、收盤價、變動價、均價、成交量、總成交量、委買價、委買量、委賣價、委賣量和昨量。

提醒

市場快照每次最多500檔商品。

範例

In

var contracts = new List<IContract>();
contracts.Add(_api.Contracts.Stocks["TSE"]["2890"]);
contracts.Add(_api.Contracts.Stocks["TSE"]["2330"]);
List<dynamic> snapshot = _api.Snapshots(contracts);
Console.WriteLine(snapshot.ToString());

Out

[
    {
        ts=1656935843384000000, 
        code=2890, 
        exchange=TSE, 
        open=16.65, 
        high=17, 
        low=16.55, 
        close=16.55, 
        tick_type=Sell, 
        change_price=-0.1, 
        change_rate=-0.6, 
        change_type=Down, 
        average_price=16.75, 
        volume=0, 
        total_volume=12447, 
        amount=16550, 
        total_amount=208451300, 
        yesterday_volume=0,
        buy_price=15.9, 
        buy_volume=247, 
        sell_price=15.95, 
        sell_volume=404, 
        volume_ratio=0, 
    },
    {
        ts=1656935843079000000, 
        code=2330, 
        exchange=TSE, 
        open=443, 
        high=451.5, 
        low=443, 
        close=445.5, 
        tick_type=Buy, 
        change_price=-8, 
        change_rate=-1.76, 
        change_type=Down, 
        average_price=446.65, 
        volume=0, 
        total_volume=32523, 
        amount=445500, 
        total_amount=14526383500, 
        yesterday_volume=0, 
        buy_price=495, 
        buy_volume=484, 
        sell_price=495.5, 
        sell_volume=12, 
        volume_ratio=0, 
    }
]

屬性

Snapshot

ts (long): 取得資訊時間戳記
code (string): 商品代碼
exchange (Exchange): 交易所
open (double): 開盤價
high (double): 最高價
low (double): 最低價
close (double): 收盤價
tick_type (TickType): 收盤買賣別 {None, Buy, Sell}
change_price (double): 漲跌
change_rate (double): 漲跌幅
change_type (ChangeType): 漲跌 {LimitUp, Up, Unchanged, Dowm, LimitDown}
average_price (double): 均價
volume (int): 單量
total_volume (int): 成交量
amount (int): 單量成交金額
total_amount (int): 成交金額
yesterday_volume (double): 昨量
buy_price (double): 委買價
buy_volume (double): 委買量
sell_price (double): 賣出價
sell_volume (long): 委賣量
volume_ratio (double): 昨量比