package entity type Kline struct { OpenTime int64 `csv:"open_time" db:"open_time" cql:"open_time" clustering_key:"true"` // 開盤時間(毫秒),clustering key,用於時序查詢 Open string `csv:"open" db:"open" cql:"open"` // 開盤價 High string `csv:"high" db:"high" cql:"high"` // 最高價 Low string `csv:"low" db:"low" cql:"low"` // 最低價 Close string `csv:"close" db:"close" cql:"close"` // 收盤價 Volume string `csv:"volume" db:"volume" cql:"volume"` // 成交量 CloseTime int64 `csv:"close_time" db:"close_time" cql:"close_time"` // 收盤時間(毫秒) QuoteAssetVolume string `csv:"quote_asset_volume" db:"quote_asset_volume" cql:"quote_asset_volume"` // 成交額(以報價資產計) NumberOfTrades int `csv:"number_of_trades" db:"number_of_trades" cql:"number_of_trades"` // 交易筆數 TakerBuyBaseAssetVolume string `csv:"taker_buy_base_asset_volume" db:"taker_buy_base_asset_volume" cql:"taker_buy_base_asset_volume"` // 主動買入成交量 TakerBuyQuoteAssetVolume string `csv:"taker_buy_quote_asset_volume" db:"taker_buy_quote_asset_volume" cql:"taker_buy_quote_asset_volume"` // 主動買入成交額 Symbol string `db:"symbol" partition_key:"true" cql:"symbol"` // 交易對,partition key // K 線時間區間,partition key // 12h,15m,1d,1h,1m,1s,2h,30m,3m,4h,5m,6h,8h Interval string `db:"interval" partition_key:"true" cql:"interval"` } func (s *Kline) TableName() string { return "kline" } // todo 未來在分表,每一個交易幣兌一個表