kiwoom-cli 0.2.0__tar.gz → 0.2.2__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.
Files changed (31) hide show
  1. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/PKG-INFO +10 -10
  2. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/README.md +9 -9
  3. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/__init__.py +1 -1
  4. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/commands/account.py +3 -2
  5. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/commands/market.py +166 -112
  6. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/commands/stock.py +176 -140
  7. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/formatters.py +7 -2
  8. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli.egg-info/PKG-INFO +10 -10
  9. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/pyproject.toml +1 -1
  10. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/tests/test_cli.py +1 -1
  11. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/LICENSE +0 -0
  12. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/api_spec.py +0 -0
  13. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/auth.py +0 -0
  14. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/client.py +0 -0
  15. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/commands/__init__.py +0 -0
  16. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/commands/dashboard.py +0 -0
  17. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/commands/order.py +0 -0
  18. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/commands/stream.py +0 -0
  19. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/commands/watch.py +0 -0
  20. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/config.py +0 -0
  21. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/main.py +0 -0
  22. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/output.py +0 -0
  23. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli/streaming.py +0 -0
  24. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli.egg-info/SOURCES.txt +0 -0
  25. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli.egg-info/dependency_links.txt +0 -0
  26. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli.egg-info/entry_points.txt +0 -0
  27. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli.egg-info/requires.txt +0 -0
  28. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/kiwoom_cli.egg-info/top_level.txt +0 -0
  29. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/setup.cfg +0 -0
  30. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/tests/test_client.py +0 -0
  31. {kiwoom_cli-0.2.0 → kiwoom_cli-0.2.2}/tests/test_formatters.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kiwoom-cli
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: User-friendly CLI for the Kiwoom Securities REST API (키움증권)
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/gejyn14/kiwoom-cli
@@ -118,7 +118,7 @@ kiwoom stock trader 005930 # 거래원
118
118
  kiwoom stock foreign 005930 # 외국인 매매동향
119
119
  kiwoom stock institution 005930 # 기관 매매동향
120
120
  kiwoom stock short 005930 --from 20260101 --to 20260330 # 공매도 추이
121
- kiwoom stock search --market 0 # 코스피 종목 리스트
121
+ kiwoom stock search --market kospi # 코스피 종목 리스트
122
122
  kiwoom stock watchlist "005930|000660" # 관심종목
123
123
  ```
124
124
 
@@ -126,11 +126,11 @@ kiwoom stock watchlist "005930|000660" # 관심종목
126
126
 
127
127
  ```bash
128
128
  kiwoom stock chart tick 005930 --range 1 # 틱
129
- kiwoom stock chart minute 005930 --range 5 # 5분봉
130
- kiwoom stock chart day 005930 --date 20260301 # 일봉
131
- kiwoom stock chart week 005930 --date 20260301 # 주봉
132
- kiwoom stock chart month 005930 --date 20260301 # 월봉
133
- kiwoom stock chart year 005930 --date 20260301 # 년봉
129
+ kiwoom stock chart minute 005930 --interval 5 # 5분봉
130
+ kiwoom stock chart day 005930 --base-date 20260301 # 일봉
131
+ kiwoom stock chart week 005930 --base-date 20260301 # 주봉
132
+ kiwoom stock chart month 005930 --base-date 20260301 # 월봉
133
+ kiwoom stock chart year 005930 --base-date 20260301 # 년봉
134
134
  ```
135
135
 
136
136
  ### 투자자/분석
@@ -194,7 +194,7 @@ kiwoom account pnl today 005930 # 당일 실현손익
194
194
  kiwoom account orders pending # 미체결 주문
195
195
  kiwoom account orders executed # 체결 내역
196
196
  kiwoom account holdings eval # 잔고내역
197
- kiwoom account orderable amount 005930 --trade buy --price 70000
197
+ kiwoom account orderable amount 005930 --side buy --price 70000
198
198
  ```
199
199
 
200
200
  <details>
@@ -252,8 +252,8 @@ kiwoom order credit sell 005930 10 --type market --confirm
252
252
 
253
253
  # 금현물
254
254
  kiwoom order gold buy M04020000 1 --type market --confirm
255
- kiwoom order gold balance # 잔고
256
- kiwoom order gold pending # 미체결
255
+ kiwoom order gold balance --confirm # 잔고
256
+ kiwoom order gold pending --confirm # 미체결
257
257
 
258
258
  # 조건검색
259
259
  kiwoom order condition list
@@ -85,7 +85,7 @@ kiwoom stock trader 005930 # 거래원
85
85
  kiwoom stock foreign 005930 # 외국인 매매동향
86
86
  kiwoom stock institution 005930 # 기관 매매동향
87
87
  kiwoom stock short 005930 --from 20260101 --to 20260330 # 공매도 추이
88
- kiwoom stock search --market 0 # 코스피 종목 리스트
88
+ kiwoom stock search --market kospi # 코스피 종목 리스트
89
89
  kiwoom stock watchlist "005930|000660" # 관심종목
90
90
  ```
91
91
 
@@ -93,11 +93,11 @@ kiwoom stock watchlist "005930|000660" # 관심종목
93
93
 
94
94
  ```bash
95
95
  kiwoom stock chart tick 005930 --range 1 # 틱
96
- kiwoom stock chart minute 005930 --range 5 # 5분봉
97
- kiwoom stock chart day 005930 --date 20260301 # 일봉
98
- kiwoom stock chart week 005930 --date 20260301 # 주봉
99
- kiwoom stock chart month 005930 --date 20260301 # 월봉
100
- kiwoom stock chart year 005930 --date 20260301 # 년봉
96
+ kiwoom stock chart minute 005930 --interval 5 # 5분봉
97
+ kiwoom stock chart day 005930 --base-date 20260301 # 일봉
98
+ kiwoom stock chart week 005930 --base-date 20260301 # 주봉
99
+ kiwoom stock chart month 005930 --base-date 20260301 # 월봉
100
+ kiwoom stock chart year 005930 --base-date 20260301 # 년봉
101
101
  ```
102
102
 
103
103
  ### 투자자/분석
@@ -161,7 +161,7 @@ kiwoom account pnl today 005930 # 당일 실현손익
161
161
  kiwoom account orders pending # 미체결 주문
162
162
  kiwoom account orders executed # 체결 내역
163
163
  kiwoom account holdings eval # 잔고내역
164
- kiwoom account orderable amount 005930 --trade buy --price 70000
164
+ kiwoom account orderable amount 005930 --side buy --price 70000
165
165
  ```
166
166
 
167
167
  <details>
@@ -219,8 +219,8 @@ kiwoom order credit sell 005930 10 --type market --confirm
219
219
 
220
220
  # 금현물
221
221
  kiwoom order gold buy M04020000 1 --type market --confirm
222
- kiwoom order gold balance # 잔고
223
- kiwoom order gold pending # 미체결
222
+ kiwoom order gold balance --confirm # 잔고
223
+ kiwoom order gold pending --confirm # 미체결
224
224
 
225
225
  # 조건검색
226
226
  kiwoom order condition list
@@ -1,3 +1,3 @@
1
1
  """Kiwoom Securities REST API CLI."""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.2.2"
@@ -374,17 +374,18 @@ def orderable():
374
374
 
375
375
  @orderable.command("amount")
376
376
  @click.argument("code")
377
- @click.option("--side", "trde_tp", required=True, type=click.Choice(["1", "2"]), help="매매구분 (1=매도, 2=매수)")
377
+ @click.option("--side", "trde_tp", required=True, type=click.Choice(["sell", "buy"]), help="매매구분 (sell=매도, buy=매수)")
378
378
  @click.option("--price", "uv", required=True, help="매수가격")
379
379
  @click.option("--io-amount", "io_amt", default="", help="입출금액")
380
380
  @click.option("--qty", "trde_qty", default="", help="매매수량")
381
381
  @click.option("--est-price", "exp_buy_unp", default="", help="예상매수단가")
382
382
  def orderable_amount(code: str, trde_tp: str, uv: str, io_amt: str, trde_qty: str, exp_buy_unp: str):
383
383
  """주문 인출가능 금액 조회. (kt00010)"""
384
+ _side_map = {"sell": "1", "buy": "2"}
384
385
  with KiwoomClient() as c:
385
386
  body: dict = {
386
387
  "stk_cd": code,
387
- "trde_tp": trde_tp,
388
+ "trde_tp": _side_map[trde_tp],
388
389
  "uv": uv,
389
390
  }
390
391
  if io_amt: