status_remarks轉換工具

透過呼叫函式,解析對應數值的註記內容。

Example

input
kgi.SWQuote_status_remarks(111)
output
{'ErrMsg': '',
 'raw_value': 111,
 'binary_value': '01101111',
 'disclosure_type': {'code': '0', 'label': '一般揭示'},
 'delayed_open': {'code': '1', 'label': True},
 'delayed_close': {'code': '1', 'label': True},
 'matching_method': {'code': '0', 'label': '集合競價'},
 'is_open': {'code': '1', 'label': True},
 'is_close': {'code': '1', 'label': True}}

Attribute

此函數會將該數值轉為二進位字串後,依照對應的位元邏輯解析出行情狀態資訊。

Return Attribute

返回dict,含以下結構:

名稱 資料型態 說明
ErrMsg str 錯誤訊息。若執行正常則為空字串
raw_value int 輸入的原始數值
binary_value str 原始數值轉為二進位後的字串
disclosure_type dict 試算狀態註記
delayed_open dict 試算後延後開盤註記
delayed_close dict 試算後延後收盤註記
matching_method dict 撮合方式註記
is_open dict 開盤註記
is_close dict 收盤註記