kiwoom-cli 1.1.2__tar.gz → 1.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/PKG-INFO +1 -1
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/__init__.py +1 -1
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/formatters.py +73 -3
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli.egg-info/PKG-INFO +1 -1
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/LICENSE +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/README.md +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/api_spec.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/auth.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/client.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/commands/__init__.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/commands/_constants.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/commands/account.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/commands/dashboard.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/commands/market.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/commands/order.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/commands/stock.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/commands/stream.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/commands/watch.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/config.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/main.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/output.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/secure_store.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli/streaming.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli.egg-info/SOURCES.txt +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli.egg-info/dependency_links.txt +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli.egg-info/entry_points.txt +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli.egg-info/requires.txt +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/kiwoom_cli.egg-info/top_level.txt +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/pyproject.toml +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/setup.cfg +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_account.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_auth.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_cli.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_client.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_formatters.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_formatters_property.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_market.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_migration.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_order.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_secure_store.py +0 -0
- {kiwoom_cli-1.1.2 → kiwoom_cli-1.1.3}/tests/test_stock.py +0 -0
|
@@ -516,9 +516,79 @@ _FIELD_LABELS: dict[str, str] = {
|
|
|
516
516
|
# 날짜/시간
|
|
517
517
|
"dt": "일자", "date": "일자", "tm": "시간",
|
|
518
518
|
"qry_dt": "조회일자", "trde_dt": "매매일자",
|
|
519
|
+
# 업종 추가
|
|
520
|
+
"inds_nm": "업종명", "upl": "상한", "lst": "하한",
|
|
521
|
+
"flo_stk_num": "유통주식수", "wght": "비중", "kospi200": "KOSPI200",
|
|
522
|
+
"pre_smbol": "대비부호",
|
|
523
|
+
# 순위
|
|
524
|
+
"now_rank": "현재순위", "pred_rank": "전일순위", "bigd_rank": "대형주순위",
|
|
525
|
+
"rank_chg": "순위변동", "rank_chg_sign": "순위변동기호",
|
|
526
|
+
"cnt": "건수", "tot": "합계", "drng": "기간",
|
|
527
|
+
# 전일/기준 대비
|
|
528
|
+
"pred_pre_1": "전일대비1", "pred_pre_2": "전일대비2", "pred_pre_3": "전일대비3",
|
|
529
|
+
"pred_dvida": "전일거래대금",
|
|
530
|
+
"prev_base_chgr": "전일기준변동율", "prev_base_sign": "전일기준기호",
|
|
531
|
+
"base_comp_chgr": "기준대비변동율", "base_comp_sign": "기준대비기호",
|
|
532
|
+
"past_curr_prc": "과거현재가",
|
|
533
|
+
# 장구분별 시세
|
|
534
|
+
"opmr_pred_rt": "장중전일비", "opmr_trde_amt": "장중거래대금",
|
|
535
|
+
"opmr_trde_rt": "장중거래비율",
|
|
536
|
+
"af_mkrt_pred_rt": "장후전일비", "af_mkrt_trde_amt": "장후거래대금",
|
|
537
|
+
"af_mkrt_trde_rt": "장후거래비율",
|
|
538
|
+
"bf_mkrt_pred_rt": "장전전일비", "bf_mkrt_trde_amt": "장전거래대금",
|
|
539
|
+
"bf_mkrt_trde_rt": "장전거래비율",
|
|
540
|
+
# 투자자 순매수
|
|
541
|
+
"frgnr_netprps": "외국인순매수", "insrnc_netprps": "보험순매수",
|
|
542
|
+
"invtrt_netprps": "투신순매수", "bank_netprps": "은행순매수",
|
|
543
|
+
"samo_fund_netprps": "사모펀드순매수", "endw_netprps": "기금순매수",
|
|
544
|
+
"etc_corp_netprps": "기타법인순매수", "sc_netprps": "증권순매수",
|
|
545
|
+
"natn_netprps": "국가순매수", "jnsinkm_netprps": "연기금순매수",
|
|
546
|
+
"native_trmt_frgnr_netprps": "내국인대우외인순매수",
|
|
547
|
+
# 외인/기관 상세
|
|
548
|
+
"for_netprps_amt": "외인순매수금액",
|
|
549
|
+
"for_netprps_stk_cd": "외인순매수종목코드", "for_netprps_stk_nm": "외인순매수종목명",
|
|
550
|
+
"for_netslmt_amt": "외인순매도금액", "for_netslmt_qty": "외인순매도수량",
|
|
551
|
+
"for_netslmt_stk_cd": "외인순매도종목코드", "for_netslmt_stk_nm": "외인순매도종목명",
|
|
552
|
+
"orgn_netprps_amt": "기관순매수금액",
|
|
553
|
+
"orgn_netprps_stk_cd": "기관순매수종목코드", "orgn_netprps_stk_nm": "기관순매수종목명",
|
|
554
|
+
"orgn_netslmt_amt": "기관순매도금액", "orgn_netslmt_qty": "기관순매도수량",
|
|
555
|
+
"orgn_netslmt_stk_cd": "기관순매도종목코드", "orgn_netslmt_stk_nm": "기관순매도종목명",
|
|
556
|
+
# 프로그램매매 추가
|
|
557
|
+
"dfrt_trde_acc": "차익거래누적", "dfrt_trde_tdy": "차익거래당일",
|
|
558
|
+
"ndiffpro_trde_acc": "비차익거래누적", "ndiffpro_trde_tdy": "비차익거래당일",
|
|
559
|
+
"all_acc": "전체누적", "all_tdy": "전체당일",
|
|
560
|
+
# ETF 추가
|
|
561
|
+
"trace_flu_rt": "추적등락율", "trace_idex": "추적지수",
|
|
562
|
+
"trace_idex_cd": "추적지수코드", "trace_idex_nm": "추적지수명",
|
|
563
|
+
"basis": "베이시스", "dvid_bf_base": "배당전기준가", "txbs": "세전",
|
|
564
|
+
# 순위/테마 추가
|
|
565
|
+
"base_limit_exh_rt": "기준한도소진율", "base_pre": "기준대비",
|
|
566
|
+
"buy_tot_req": "매수총잔량", "sel_tot_req": "매도총잔량",
|
|
567
|
+
"exh_rt_incrs": "소진율증가", "fall_stk_num": "하락종목수",
|
|
568
|
+
"rising_stk_num": "상승종목수", "stk_num": "종목수",
|
|
569
|
+
"gain_pos_stkcnt": "보유종목수", "poss_stkcnt": "보유종목수",
|
|
570
|
+
"jmp_rt": "급등률", "main_stk": "주력종목",
|
|
571
|
+
"netslmt": "순매도", "sel_qty": "매도수량",
|
|
572
|
+
"pred_trde_qty_pre_rt": "전일거래량대비율", "prev_trde_qty": "전일거래량",
|
|
573
|
+
"tdy_close_pric": "당일종가", "tdy_close_pric_flu_rt": "당일종가등락율",
|
|
574
|
+
"tdy_high_pric": "당일고가", "tdy_low_pric": "당일저가",
|
|
575
|
+
"thema_grp_cd": "테마그룹코드", "thema_nm": "테마명",
|
|
576
|
+
# 기타
|
|
577
|
+
"dm1": "연속일1", "dm2": "연속일2", "dm3": "연속일3",
|
|
578
|
+
"pipe1": "구분1", "pipe2": "구분2", "pipe3": "구분3",
|
|
519
579
|
}
|
|
520
580
|
|
|
521
581
|
|
|
582
|
+
def _get_label(key: str) -> str:
|
|
583
|
+
"""Get Korean label for an API field key, with _n suffix fallback."""
|
|
584
|
+
label = _FIELD_LABELS.get(key)
|
|
585
|
+
if label:
|
|
586
|
+
return label
|
|
587
|
+
if key.endswith("_n") and len(key) > 2:
|
|
588
|
+
return _FIELD_LABELS.get(key[:-2], key)
|
|
589
|
+
return key
|
|
590
|
+
|
|
591
|
+
|
|
522
592
|
def print_generic_table(data: dict[str, Any] | list, title: str = "결과") -> None:
|
|
523
593
|
"""Generic formatter for any API response. Respects --format option."""
|
|
524
594
|
fmt = _get_format()
|
|
@@ -554,7 +624,7 @@ def print_generic_table(data: dict[str, Any] | list, title: str = "결과") -> N
|
|
|
554
624
|
|
|
555
625
|
t = Table(title=title, border_style="dim", show_lines=False)
|
|
556
626
|
for k in keys:
|
|
557
|
-
label =
|
|
627
|
+
label = _get_label(k)
|
|
558
628
|
justify = "right" if k in (
|
|
559
629
|
"cur_prc", "pred_pre", "flu_rt", "trde_qty", "trde_amt",
|
|
560
630
|
"open_pric", "high_pric", "low_pric", "close_pric",
|
|
@@ -582,7 +652,7 @@ def print_generic_table(data: dict[str, Any] | list, title: str = "결과") -> N
|
|
|
582
652
|
t.add_column("항목", style="cyan", width=25)
|
|
583
653
|
t.add_column("값", width=35)
|
|
584
654
|
for k, v in scalar.items():
|
|
585
|
-
label =
|
|
655
|
+
label = _get_label(k)
|
|
586
656
|
sv = str(v)
|
|
587
657
|
if k not in _CODE_FIELDS and sv.lstrip("+-").isdigit() and len(sv) > 4:
|
|
588
658
|
sv = _smart_fmt(sv, k)
|
|
@@ -590,7 +660,7 @@ def print_generic_table(data: dict[str, Any] | list, title: str = "결과") -> N
|
|
|
590
660
|
console.print(t)
|
|
591
661
|
|
|
592
662
|
for list_key, list_val in lists.items():
|
|
593
|
-
list_title =
|
|
663
|
+
list_title = _get_label(list_key)
|
|
594
664
|
print_generic_table(list_val, title=list_title)
|
|
595
665
|
|
|
596
666
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|