kiwoom-cli 1.1.2__tar.gz → 2.0.0__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 (51) hide show
  1. kiwoom_cli-2.0.0/LICENSE +90 -0
  2. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/PKG-INFO +35 -6
  3. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/README.md +32 -3
  4. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/__init__.py +1 -1
  5. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/api_spec.py +35 -0
  6. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/commands/account.py +306 -86
  7. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/commands/order.py +95 -30
  8. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/commands/stock.py +103 -21
  9. kiwoom_cli-2.0.0/kiwoom_cli/commands/us/__init__.py +5 -0
  10. kiwoom_cli-2.0.0/kiwoom_cli/commands/us/_constants.py +31 -0
  11. kiwoom_cli-2.0.0/kiwoom_cli/commands/us/account_ops.py +14 -0
  12. kiwoom_cli-2.0.0/kiwoom_cli/commands/us/detect.py +80 -0
  13. kiwoom_cli-2.0.0/kiwoom_cli/commands/us/exchange.py +64 -0
  14. kiwoom_cli-2.0.0/kiwoom_cli/commands/us/order_ops.py +161 -0
  15. kiwoom_cli-2.0.0/kiwoom_cli/commands/us/stock_ops.py +107 -0
  16. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/config.py +0 -2
  17. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/formatters.py +292 -5
  18. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli.egg-info/PKG-INFO +35 -6
  19. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli.egg-info/SOURCES.txt +10 -1
  20. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/pyproject.toml +2 -2
  21. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_account.py +6 -6
  22. kiwoom_cli-2.0.0/tests/test_us.py +530 -0
  23. kiwoom_cli-2.0.0/tests/test_us_account.py +353 -0
  24. kiwoom_cli-1.1.2/LICENSE +0 -21
  25. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/auth.py +0 -0
  26. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/client.py +0 -0
  27. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/commands/__init__.py +0 -0
  28. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/commands/_constants.py +0 -0
  29. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/commands/dashboard.py +0 -0
  30. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/commands/market.py +0 -0
  31. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/commands/stream.py +0 -0
  32. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/commands/watch.py +0 -0
  33. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/main.py +0 -0
  34. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/output.py +0 -0
  35. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/secure_store.py +0 -0
  36. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli/streaming.py +0 -0
  37. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli.egg-info/dependency_links.txt +0 -0
  38. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli.egg-info/entry_points.txt +0 -0
  39. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli.egg-info/requires.txt +0 -0
  40. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/kiwoom_cli.egg-info/top_level.txt +0 -0
  41. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/setup.cfg +0 -0
  42. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_auth.py +0 -0
  43. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_cli.py +0 -0
  44. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_client.py +0 -0
  45. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_formatters.py +0 -0
  46. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_formatters_property.py +0 -0
  47. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_market.py +0 -0
  48. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_migration.py +0 -0
  49. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_order.py +0 -0
  50. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_secure_store.py +0 -0
  51. {kiwoom_cli-1.1.2 → kiwoom_cli-2.0.0}/tests/test_stock.py +0 -0
@@ -0,0 +1,90 @@
1
+ kiwoom-cli Source-Available License
2
+ Version 1.0
3
+
4
+ Copyright (c) 2026 gejyn14
5
+
6
+ This license governs use of the accompanying software ("the Software"). By
7
+ using, copying, modifying, or distributing the Software, You accept this
8
+ license. If You do not accept it, do not use the Software.
9
+
10
+ Prior released versions of the Software that were distributed under the MIT
11
+ License remain available under the MIT License. This license applies to this
12
+ version and later versions distributed under it.
13
+
14
+ 1. DEFINITIONS
15
+
16
+ "Licensor" means gejyn14, the copyright holder, reachable at
17
+ ge.jyn14@gmail.com.
18
+
19
+ "You" means the individual or entity exercising rights under this license.
20
+
21
+ "Individual" means a natural person acting on their own behalf and not on
22
+ behalf of, or for the benefit of, any organization.
23
+
24
+ "Organization" means any legal entity other than an Individual, including
25
+ companies, partnerships, nonprofits, government bodies, and any natural
26
+ person acting on behalf of or for the benefit of such an entity.
27
+
28
+ "Commercial License" means a separate written agreement purchased from the
29
+ Licensor granting an Organization rights beyond those in this license.
30
+
31
+ "For Profit" means any use in connection with, or in furtherance of, a
32
+ commercial or revenue-generating activity of an Organization.
33
+
34
+ "Modify" means to create a work based on the Software, and a "Modified
35
+ Version" is any such work.
36
+
37
+ 2. GRANT FOR INDIVIDUALS
38
+
39
+ If You are an Individual, You are granted a perpetual, worldwide,
40
+ royalty-free right to use, copy, modify, and distribute the Software for any
41
+ purpose, including for Your own profit (for example, trading Your own
42
+ account), subject only to the attribution requirement in Section 5. You have
43
+ no obligation to disclose source code.
44
+
45
+ 3. GRANT FOR ORGANIZATIONS — UNMODIFIED USE
46
+
47
+ If You are an Organization and You use the Software without modification For
48
+ Profit, You must obtain a Commercial License from the Licensor. Use for
49
+ internal evaluation, testing, or non-profit purposes is permitted without a
50
+ Commercial License, subject to the attribution requirement in Section 5.
51
+
52
+ 4. GRANT FOR ORGANIZATIONS — MODIFIED USE
53
+
54
+ If You are an Organization and You use a Modified Version For Profit, You must
55
+ do EITHER (a) or (b):
56
+
57
+ (a) Obtain a Commercial License from the Licensor, in which case You may
58
+ keep Your Modified Version's source code closed to the public; OR
59
+
60
+ (b) Publish the complete source code of Your entire work incorporating the
61
+ Software to the public under this same license.
62
+
63
+ In BOTH cases — whether or not You have purchased a Commercial License — You
64
+ must deliver the complete source code of Your Modified Version to the
65
+ Licensor at ge.jyn14@gmail.com promptly upon first use For Profit and upon
66
+ each subsequent material change.
67
+
68
+ 5. ATTRIBUTION
69
+
70
+ All copies or substantial portions of the Software, and all distributions of
71
+ Modified Versions, must retain this license, the above copyright notice, and
72
+ a notice identifying gejyn14 as the original author.
73
+
74
+ 6. TERMINATION
75
+
76
+ Any use in breach of this license automatically terminates Your rights under
77
+ it. Rights may be reinstated by the Licensor in writing.
78
+
79
+ 7. DISCLAIMER OF WARRANTY AND LIMITATION OF LIABILITY
80
+
81
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
82
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
83
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
84
+ LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
85
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
86
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
87
+
88
+ 8. COMMERCIAL LICENSES
89
+
90
+ For commercial licensing, contact ge.jyn14@gmail.com.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kiwoom-cli
3
- Version: 1.1.2
3
+ Version: 2.0.0
4
4
  Summary: User-friendly CLI for the Kiwoom Securities REST API (키움증권)
5
- License: MIT
5
+ License: LicenseRef-kiwoom-cli-Source-Available-1.0
6
6
  Project-URL: Homepage, https://github.com/gejyn14/kiwoom-cli
7
7
  Project-URL: Repository, https://github.com/gejyn14/kiwoom-cli
8
8
  Project-URL: Issues, https://github.com/gejyn14/kiwoom-cli/issues
@@ -10,7 +10,7 @@ Keywords: kiwoom,stock,trading,cli,korea,finance
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Financial and Insurance Industry
13
- Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: License :: Other/Proprietary License
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
@@ -261,6 +261,29 @@ kiwoom account orderable amount 005930 --side buy --price 70000
261
261
 
262
262
  ---
263
263
 
264
+ ## 미국주식 (US Stocks)
265
+
266
+ 티커를 입력하면 자동으로 미국 시장으로 라우팅됩니다 (6자리 숫자 = 국내, 알파벳 = 미국).
267
+
268
+ ```bash
269
+ kiwoom order buy NVDA 10 --price 213.04 # 매수 (거래소 자동 판별)
270
+ kiwoom order sell NVDA 5 --type stop-limit --price 200.5 --stop 199.99 --confirm
271
+ kiwoom stock price NVDA # 현재가
272
+ kiwoom stock chart day NVDA --base-date 20260701 # 일봉
273
+ kiwoom stock search apple --market us # 종목 검색
274
+ kiwoom account balance # 국내+미국 통합 잔고 (원화 총계)
275
+ kiwoom account balance --market us # 미국만
276
+ kiwoom account exchange rate # 환율
277
+ kiwoom account exchange apply 1000000 --confirm # 원화 → 달러 환전
278
+ ```
279
+
280
+ - 거래소(`--exchange nasdaq|nyse|amex`)는 자동 판별되며, 복수 상장 종목만 직접 지정이 필요합니다.
281
+ - 미국 주문 유형: limit/market/vwap/twap/vwap-limit/twap-limit/loc (매수·매도), moc/stop/stop-limit (매도 전용).
282
+ - 정정은 가격만 가능(전량), 취소는 전량 취소만 지원됩니다 (키움 API 제약).
283
+ - 계좌 조회 명령(`balance/deposit/pnl/orders/history`)은 기본 통합 표시이며 `--market kr|us`로 필터링합니다.
284
+
285
+ ---
286
+
264
287
  ## order - 주문
265
288
 
266
289
  모든 주문에 `--confirm` 필수.
@@ -279,8 +302,8 @@ kiwoom order credit sell 005930 10 --type market --confirm
279
302
 
280
303
  # 금현물
281
304
  kiwoom order gold buy M04020000 1 --type market --confirm
282
- kiwoom order gold balance --confirm # 잔고
283
- kiwoom order gold pending --confirm # 미체결
305
+ kiwoom order gold balance # 잔고
306
+ kiwoom order gold pending # 미체결
284
307
 
285
308
  # 조건검색
286
309
  kiwoom order condition list
@@ -479,4 +502,10 @@ eval (env _KIWOOM_COMPLETE=fish_source kiwoom)
479
502
 
480
503
  ## License
481
504
 
482
- MIT
505
+ kiwoom-cli **Source-Available License, Version 1.0** — see [LICENSE](LICENSE).
506
+
507
+ - **Individuals** (natural persons, on their own behalf): free to use, modify, and distribute for any purpose, including profit (e.g. trading your own account). Attribution only; no source-disclosure obligation.
508
+ - **Organizations, unmodified use for profit**: require a commercial license.
509
+ - **Organizations, modified use for profit**: either buy a commercial license (source may stay closed) or publish your entire codebase under this same license — and in both cases deliver the full modified source to the Licensor.
510
+
511
+ Versions released before v2.0 remain available under the MIT License. For commercial licensing, contact ge.jyn14@gmail.com — see [COMMERCIAL.md](COMMERCIAL.md).
@@ -223,6 +223,29 @@ kiwoom account orderable amount 005930 --side buy --price 70000
223
223
 
224
224
  ---
225
225
 
226
+ ## 미국주식 (US Stocks)
227
+
228
+ 티커를 입력하면 자동으로 미국 시장으로 라우팅됩니다 (6자리 숫자 = 국내, 알파벳 = 미국).
229
+
230
+ ```bash
231
+ kiwoom order buy NVDA 10 --price 213.04 # 매수 (거래소 자동 판별)
232
+ kiwoom order sell NVDA 5 --type stop-limit --price 200.5 --stop 199.99 --confirm
233
+ kiwoom stock price NVDA # 현재가
234
+ kiwoom stock chart day NVDA --base-date 20260701 # 일봉
235
+ kiwoom stock search apple --market us # 종목 검색
236
+ kiwoom account balance # 국내+미국 통합 잔고 (원화 총계)
237
+ kiwoom account balance --market us # 미국만
238
+ kiwoom account exchange rate # 환율
239
+ kiwoom account exchange apply 1000000 --confirm # 원화 → 달러 환전
240
+ ```
241
+
242
+ - 거래소(`--exchange nasdaq|nyse|amex`)는 자동 판별되며, 복수 상장 종목만 직접 지정이 필요합니다.
243
+ - 미국 주문 유형: limit/market/vwap/twap/vwap-limit/twap-limit/loc (매수·매도), moc/stop/stop-limit (매도 전용).
244
+ - 정정은 가격만 가능(전량), 취소는 전량 취소만 지원됩니다 (키움 API 제약).
245
+ - 계좌 조회 명령(`balance/deposit/pnl/orders/history`)은 기본 통합 표시이며 `--market kr|us`로 필터링합니다.
246
+
247
+ ---
248
+
226
249
  ## order - 주문
227
250
 
228
251
  모든 주문에 `--confirm` 필수.
@@ -241,8 +264,8 @@ kiwoom order credit sell 005930 10 --type market --confirm
241
264
 
242
265
  # 금현물
243
266
  kiwoom order gold buy M04020000 1 --type market --confirm
244
- kiwoom order gold balance --confirm # 잔고
245
- kiwoom order gold pending --confirm # 미체결
267
+ kiwoom order gold balance # 잔고
268
+ kiwoom order gold pending # 미체결
246
269
 
247
270
  # 조건검색
248
271
  kiwoom order condition list
@@ -441,4 +464,10 @@ eval (env _KIWOOM_COMPLETE=fish_source kiwoom)
441
464
 
442
465
  ## License
443
466
 
444
- MIT
467
+ kiwoom-cli **Source-Available License, Version 1.0** — see [LICENSE](LICENSE).
468
+
469
+ - **Individuals** (natural persons, on their own behalf): free to use, modify, and distribute for any purpose, including profit (e.g. trading your own account). Attribution only; no source-disclosure obligation.
470
+ - **Organizations, unmodified use for profit**: require a commercial license.
471
+ - **Organizations, modified use for profit**: either buy a commercial license (source may stay closed) or publish your entire codebase under this same license — and in both cases deliver the full modified source to the Licensor.
472
+
473
+ Versions released before v2.0 remain available under the MIT License. For commercial licensing, contact ge.jyn14@gmail.com — see [COMMERCIAL.md](COMMERCIAL.md).
@@ -1,3 +1,3 @@
1
1
  """Kiwoom Securities REST API CLI."""
2
2
 
3
- __version__ = "1.1.2"
3
+ __version__ = "2.0.0"
@@ -212,6 +212,41 @@ API_REGISTRY: dict[str, tuple[str, str]] = {
212
212
  "ka10172": ("/api/dostk/websocket", "조건검색 요청 일반"),
213
213
  "ka10173": ("/api/dostk/websocket", "조건검색 요청 실시간"),
214
214
  "ka10174": ("/api/dostk/websocket", "조건검색 실시간 해제"),
215
+ # === 미국주식 주문 (US Orders) ===
216
+ "ust20000": ("/api/us/ordr", "미국주식 매수 주문"),
217
+ "ust20001": ("/api/us/ordr", "미국주식 매도 주문"),
218
+ "ust20002": ("/api/us/ordr", "미국주식 정정 주문"),
219
+ "ust20003": ("/api/us/ordr", "미국주식 취소 주문"),
220
+ "ust31490": ("/api/us/ordr", "미국주식 주문가능수량"),
221
+ # === 미국주식 계좌 (US Account) ===
222
+ "ust21070": ("/api/us/acnt", "미국주식 원장잔고확인"),
223
+ "ust21160": ("/api/us/acnt", "미국주식 예수금 상세"),
224
+ "ust21110": ("/api/us/acnt", "해외주식 예수금"),
225
+ "ust21530": ("/api/us/acnt", "미국주식 실현손익"),
226
+ "ust21170": ("/api/us/acnt", "미국주식 당일 종목별 실현손익"),
227
+ "ust21050": ("/api/us/acnt", "미국주식 원장 미체결"),
228
+ "ust21150": ("/api/us/acnt", "미국주식 일별 주문체결내역"),
229
+ "ust21510": ("/api/us/acnt", "미국주식 당일 주문체결 확인"),
230
+ "ust21180": ("/api/us/acnt", "미국주식 기간별 주문내역"),
231
+ "ust21100": ("/api/us/acnt", "미국주식 거래내역"),
232
+ # === 미국주식 종목정보 (US Stock Info) ===
233
+ "usa10098": ("/api/us/stkinfo", "미국주식 거래소구분 조회"),
234
+ "usa10099": ("/api/us/stkinfo", "미국주식 종목리스트"),
235
+ "usa10100": ("/api/us/stkinfo", "미국주식 종목 조회"),
236
+ # === 미국주식 시세 (US Quotes) ===
237
+ "usa20100": ("/api/us/mrkcond", "미국주식 현재가 종목정보"),
238
+ "usa20101": ("/api/us/mrkcond", "미국주식 현재가 10호가"),
239
+ # === 미국주식 차트 (US Charts) ===
240
+ "usa06010": ("/api/us/chart", "미국주식 틱 차트"),
241
+ "usa06011": ("/api/us/chart", "미국주식 분 차트"),
242
+ "usa06012": ("/api/us/chart", "미국주식 일 차트"),
243
+ "usa06013": ("/api/us/chart", "미국주식 주 차트"),
244
+ "usa06014": ("/api/us/chart", "미국주식 월 차트"),
245
+ "usa06015": ("/api/us/chart", "미국주식 년 차트"),
246
+ # === 환전 (FX) ===
247
+ "ust31300": ("/api/us/exchange", "환전 예상 금액 조회"),
248
+ "ust31301": ("/api/us/exchange", "환율 조회"),
249
+ "ust31302": ("/api/us/exchange", "환전 신청"),
215
250
  }
216
251
 
217
252