ksxt 0.0.8__tar.gz → 0.0.10__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 (164) hide show
  1. {ksxt-0.0.8/src/ksxt.egg-info → ksxt-0.0.10}/PKG-INFO +11 -1
  2. ksxt-0.0.10/pyproject.toml +34 -0
  3. ksxt-0.0.10/src/ksxt/__init__.py +5 -0
  4. ksxt-0.0.10/src/ksxt/__pycache__/__init__.cpython-312.pyc +0 -0
  5. ksxt-0.0.10/src/ksxt/__pycache__/bithumb.cpython-312.pyc +0 -0
  6. ksxt-0.0.10/src/ksxt/__pycache__/koreainvest.cpython-312.pyc +0 -0
  7. ksxt-0.0.10/src/ksxt/__pycache__/upbit.cpython-312.pyc +0 -0
  8. ksxt-0.0.10/src/ksxt/api/__init__.py +26 -0
  9. ksxt-0.0.10/src/ksxt/api/__pycache__/__init__.cpython-312.pyc +0 -0
  10. ksxt-0.0.10/src/ksxt/api/__pycache__/bithumb.cpython-312.pyc +0 -0
  11. ksxt-0.0.10/src/ksxt/api/__pycache__/koreainvest.cpython-312.pyc +0 -0
  12. ksxt-0.0.10/src/ksxt/api/__pycache__/upbit.cpython-312.pyc +0 -0
  13. ksxt-0.0.10/src/ksxt/api/auto/api_generator.py +54 -0
  14. ksxt-0.0.10/src/ksxt/api/auto/bithumb.py +35 -0
  15. ksxt-0.0.10/src/ksxt/api/auto/koreainvest.py +49 -0
  16. ksxt-0.0.10/src/ksxt/api/auto/upbit.py +39 -0
  17. ksxt-0.0.10/src/ksxt/api/bithumb.py +42 -0
  18. ksxt-0.0.10/src/ksxt/api/koreainvest.py +40 -0
  19. ksxt-0.0.10/src/ksxt/api/upbit.py +54 -0
  20. ksxt-0.0.10/src/ksxt/async_/__init__.py +4 -0
  21. ksxt-0.0.10/src/ksxt/async_/__pycache__/__init__.cpython-312.pyc +0 -0
  22. ksxt-0.0.10/src/ksxt/async_/__pycache__/bithumb.cpython-312.pyc +0 -0
  23. ksxt-0.0.10/src/ksxt/async_/__pycache__/koreainvest.cpython-312.pyc +0 -0
  24. ksxt-0.0.10/src/ksxt/async_/__pycache__/upbit.cpython-312.pyc +0 -0
  25. ksxt-0.0.10/src/ksxt/async_/base/__pycache__/__init__.cpython-312.pyc +0 -0
  26. ksxt-0.0.10/src/ksxt/async_/base/__pycache__/async_exchange.cpython-312.pyc +0 -0
  27. ksxt-0.0.10/src/ksxt/async_/base/__pycache__/throttler.cpython-312.pyc +0 -0
  28. ksxt-0.0.10/src/ksxt/async_/base/async_exchange.py +232 -0
  29. ksxt-0.0.10/src/ksxt/async_/base/throttler.py +63 -0
  30. ksxt-0.0.10/src/ksxt/async_/bithumb.py +455 -0
  31. ksxt-0.0.10/src/ksxt/async_/koreainvest.py +849 -0
  32. ksxt-0.0.10/src/ksxt/async_/upbit.py +488 -0
  33. ksxt-0.0.10/src/ksxt/base/__init__.py +0 -0
  34. ksxt-0.0.10/src/ksxt/base/__pycache__/__init__.cpython-312.pyc +0 -0
  35. ksxt-0.0.10/src/ksxt/base/__pycache__/errors.cpython-312.pyc +0 -0
  36. ksxt-0.0.10/src/ksxt/base/__pycache__/exchange.cpython-312.pyc +0 -0
  37. ksxt-0.0.10/src/ksxt/base/__pycache__/rest_exchange.cpython-312.pyc +0 -0
  38. ksxt-0.0.10/src/ksxt/base/__pycache__/types.cpython-312.pyc +0 -0
  39. ksxt-0.0.10/src/ksxt/base/com_exchange.py +8 -0
  40. ksxt-0.0.10/src/ksxt/base/errors.py +10 -0
  41. ksxt-0.0.10/src/ksxt/base/exchange.py +530 -0
  42. ksxt-0.0.10/src/ksxt/base/rest_exchange.py +402 -0
  43. ksxt-0.0.10/src/ksxt/base/types.py +4 -0
  44. ksxt-0.0.10/src/ksxt/bithumb.py +504 -0
  45. ksxt-0.0.10/src/ksxt/config/__init__.py +3 -0
  46. ksxt-0.0.10/src/ksxt/config/__pycache__/__init__.cpython-312.pyc +0 -0
  47. ksxt-0.0.10/src/ksxt/config/bithumb.toml +380 -0
  48. ksxt-0.0.10/src/ksxt/config/koreainvest.toml +312 -0
  49. ksxt-0.0.10/src/ksxt/config/token.toml +7 -0
  50. ksxt-0.0.10/src/ksxt/config/upbit.toml +428 -0
  51. ksxt-0.0.10/src/ksxt/koreainvest.py +501 -0
  52. ksxt-0.0.10/src/ksxt/market/__pycache__/base.cpython-312.pyc +0 -0
  53. ksxt-0.0.10/src/ksxt/market/__pycache__/db.cpython-312.pyc +0 -0
  54. ksxt-0.0.10/src/ksxt/market/__pycache__/logging.cpython-312.pyc +0 -0
  55. ksxt-0.0.10/src/ksxt/market/__pycache__/manager.cpython-312.pyc +0 -0
  56. ksxt-0.0.10/src/ksxt/market/__pycache__/markets.cpython-312.pyc +0 -0
  57. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/base.py +50 -50
  58. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/db.py +5 -4
  59. ksxt-0.0.10/src/ksxt/market/krx/__pycache__/kosdaq.cpython-312.pyc +0 -0
  60. ksxt-0.0.10/src/ksxt/market/krx/__pycache__/kospi.cpython-312.pyc +0 -0
  61. ksxt-0.0.10/src/ksxt/market/krx/__pycache__/stock.cpython-312.pyc +0 -0
  62. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/krx/kosdaq.py +150 -147
  63. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/krx/kospi.py +179 -175
  64. ksxt-0.0.10/src/ksxt/market/krx/stock.py +282 -0
  65. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/logging.py +4 -4
  66. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/manager.py +10 -12
  67. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/markets.py +1 -1
  68. ksxt-0.0.10/src/ksxt/market/us/__pycache__/amex.cpython-312.pyc +0 -0
  69. ksxt-0.0.10/src/ksxt/market/us/__pycache__/nasdaq.cpython-312.pyc +0 -0
  70. ksxt-0.0.10/src/ksxt/market/us/__pycache__/nyse.cpython-312.pyc +0 -0
  71. ksxt-0.0.10/src/ksxt/market/us/__pycache__/stock.cpython-312.pyc +0 -0
  72. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/us/amex.py +31 -31
  73. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/us/nasdaq.py +31 -31
  74. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/us/nyse.py +31 -31
  75. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/market/us/stock.py +20 -28
  76. ksxt-0.0.10/src/ksxt/models/__init__.py +16 -0
  77. ksxt-0.0.10/src/ksxt/models/__pycache__/__init__.cpython-312.pyc +0 -0
  78. ksxt-0.0.10/src/ksxt/models/__pycache__/balance.cpython-312.pyc +0 -0
  79. ksxt-0.0.10/src/ksxt/models/__pycache__/cash.cpython-312.pyc +0 -0
  80. ksxt-0.0.10/src/ksxt/models/__pycache__/common.cpython-312.pyc +0 -0
  81. ksxt-0.0.10/src/ksxt/models/__pycache__/error.cpython-312.pyc +0 -0
  82. ksxt-0.0.10/src/ksxt/models/__pycache__/historical.cpython-312.pyc +0 -0
  83. ksxt-0.0.10/src/ksxt/models/__pycache__/market.cpython-312.pyc +0 -0
  84. ksxt-0.0.10/src/ksxt/models/__pycache__/order.cpython-312.pyc +0 -0
  85. ksxt-0.0.10/src/ksxt/models/__pycache__/orderbook.cpython-312.pyc +0 -0
  86. ksxt-0.0.10/src/ksxt/models/__pycache__/ticker.cpython-312.pyc +0 -0
  87. ksxt-0.0.10/src/ksxt/models/__pycache__/token.cpython-312.pyc +0 -0
  88. ksxt-0.0.10/src/ksxt/models/__pycache__/transaction.cpython-312.pyc +0 -0
  89. ksxt-0.0.10/src/ksxt/models/balance.py +30 -0
  90. ksxt-0.0.10/src/ksxt/models/cash.py +15 -0
  91. ksxt-0.0.10/src/ksxt/models/common.py +31 -0
  92. ksxt-0.0.10/src/ksxt/models/error.py +13 -0
  93. ksxt-0.0.10/src/ksxt/models/historical.py +26 -0
  94. ksxt-0.0.10/src/ksxt/models/market.py +81 -0
  95. ksxt-0.0.10/src/ksxt/models/order.py +42 -0
  96. ksxt-0.0.10/src/ksxt/models/orderbook.py +32 -0
  97. ksxt-0.0.10/src/ksxt/models/ticker.py +25 -0
  98. ksxt-0.0.10/src/ksxt/models/token.py +14 -0
  99. ksxt-0.0.10/src/ksxt/models/transaction.py +79 -0
  100. ksxt-0.0.10/src/ksxt/parser/__pycache__/bithumb.cpython-312.pyc +0 -0
  101. ksxt-0.0.10/src/ksxt/parser/__pycache__/koreainvest.cpython-312.pyc +0 -0
  102. ksxt-0.0.10/src/ksxt/parser/__pycache__/parser.cpython-312.pyc +0 -0
  103. ksxt-0.0.10/src/ksxt/parser/__pycache__/upbit.cpython-312.pyc +0 -0
  104. ksxt-0.0.10/src/ksxt/parser/bithumb.py +300 -0
  105. ksxt-0.0.10/src/ksxt/parser/koreainvest.py +323 -0
  106. ksxt-0.0.10/src/ksxt/parser/parser.py +114 -0
  107. ksxt-0.0.10/src/ksxt/parser/upbit.py +308 -0
  108. ksxt-0.0.10/src/ksxt/upbit.py +499 -0
  109. ksxt-0.0.10/src/ksxt/utils/__pycache__/safer.cpython-312.pyc +0 -0
  110. ksxt-0.0.10/src/ksxt/utils/__pycache__/sorter.cpython-312.pyc +0 -0
  111. ksxt-0.0.10/src/ksxt/utils/__pycache__/timer.cpython-312.pyc +0 -0
  112. ksxt-0.0.10/src/ksxt/utils/safer.py +48 -0
  113. ksxt-0.0.10/src/ksxt/utils/sorter.py +8 -0
  114. ksxt-0.0.10/src/ksxt/utils/timer.py +47 -0
  115. {ksxt-0.0.8 → ksxt-0.0.10/src/ksxt.egg-info}/PKG-INFO +11 -1
  116. ksxt-0.0.10/src/ksxt.egg-info/SOURCES.txt +123 -0
  117. ksxt-0.0.10/src/ksxt.egg-info/requires.txt +10 -0
  118. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt.egg-info/top_level.txt +1 -0
  119. ksxt-0.0.8/pyproject.toml +0 -19
  120. ksxt-0.0.8/src/__pycache__/__init__.cpython-39.pyc +0 -0
  121. ksxt-0.0.8/src/ksxt/__init__.py +0 -3
  122. ksxt-0.0.8/src/ksxt/__pycache__/__init__.cpython-39.pyc +0 -0
  123. ksxt-0.0.8/src/ksxt/__pycache__/koreainvest.cpython-39.pyc +0 -0
  124. ksxt-0.0.8/src/ksxt/base/__pycache__/__init__.cpython-39.pyc +0 -0
  125. ksxt-0.0.8/src/ksxt/base/__pycache__/exchange.cpython-39.pyc +0 -0
  126. ksxt-0.0.8/src/ksxt/base/__pycache__/rest_exchange.cpython-39.pyc +0 -0
  127. ksxt-0.0.8/src/ksxt/base/__pycache__/restexchange.cpython-39.pyc +0 -0
  128. ksxt-0.0.8/src/ksxt/base/__pycache__/types.cpython-39.pyc +0 -0
  129. ksxt-0.0.8/src/ksxt/base/api_response.py +0 -68
  130. ksxt-0.0.8/src/ksxt/base/com_exchange.py +0 -8
  131. ksxt-0.0.8/src/ksxt/base/exchange.py +0 -839
  132. ksxt-0.0.8/src/ksxt/base/rest_exchange.py +0 -218
  133. ksxt-0.0.8/src/ksxt/base/types.py +0 -39
  134. ksxt-0.0.8/src/ksxt/config/__init__.py +0 -2
  135. ksxt-0.0.8/src/ksxt/config/__pycache__/__init__.cpython-39.pyc +0 -0
  136. ksxt-0.0.8/src/ksxt/config/tr_app.json +0 -381
  137. ksxt-0.0.8/src/ksxt/config/tr_dev.json +0 -446
  138. ksxt-0.0.8/src/ksxt/koreainvest.py +0 -1147
  139. ksxt-0.0.8/src/ksxt/market/__pycache__/base.cpython-39.pyc +0 -0
  140. ksxt-0.0.8/src/ksxt/market/__pycache__/db.cpython-39.pyc +0 -0
  141. ksxt-0.0.8/src/ksxt/market/__pycache__/logging.cpython-39.pyc +0 -0
  142. ksxt-0.0.8/src/ksxt/market/__pycache__/manager.cpython-39.pyc +0 -0
  143. ksxt-0.0.8/src/ksxt/market/__pycache__/markets.cpython-39.pyc +0 -0
  144. ksxt-0.0.8/src/ksxt/market/krx/__pycache__/kosdaq.cpython-39.pyc +0 -0
  145. ksxt-0.0.8/src/ksxt/market/krx/__pycache__/kospi.cpython-39.pyc +0 -0
  146. ksxt-0.0.8/src/ksxt/market/krx/__pycache__/stock.cpython-39.pyc +0 -0
  147. ksxt-0.0.8/src/ksxt/market/krx/stock.py +0 -280
  148. ksxt-0.0.8/src/ksxt/market/us/__pycache__/amex.cpython-39.pyc +0 -0
  149. ksxt-0.0.8/src/ksxt/market/us/__pycache__/nasdaq.cpython-39.pyc +0 -0
  150. ksxt-0.0.8/src/ksxt/market/us/__pycache__/nyse.cpython-39.pyc +0 -0
  151. ksxt-0.0.8/src/ksxt/market/us/__pycache__/stock.cpython-39.pyc +0 -0
  152. ksxt-0.0.8/src/ksxt.egg-info/SOURCES.txt +0 -58
  153. ksxt-0.0.8/tests/test_koreainvest_krx.py +0 -230
  154. ksxt-0.0.8/tests/test_koreainvest_us_app.py +0 -249
  155. ksxt-0.0.8/tests/test_koreainvest_us_dev.py +0 -241
  156. ksxt-0.0.8/tests/test_market_krx.py +0 -34
  157. ksxt-0.0.8/tests/test_market_us.py +0 -50
  158. {ksxt-0.0.8 → ksxt-0.0.10}/LICENSE.txt +0 -0
  159. {ksxt-0.0.8 → ksxt-0.0.10}/MANIFEST.in +0 -0
  160. {ksxt-0.0.8 → ksxt-0.0.10}/README.md +0 -0
  161. {ksxt-0.0.8 → ksxt-0.0.10}/setup.cfg +0 -0
  162. {ksxt-0.0.8/src/ksxt → ksxt-0.0.10/src/ksxt/async_}/base/__init__.py +0 -0
  163. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt/sample/symbol_sync.ipynb +0 -0
  164. {ksxt-0.0.8 → ksxt-0.0.10}/src/ksxt.egg-info/dependency_links.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ksxt
3
- Version: 0.0.8
3
+ Version: 0.0.10
4
4
  License: MIT License
5
5
 
6
6
  Copyright © 2023 AMOSA
@@ -24,6 +24,16 @@ License: MIT License
24
24
  SOFTWARE.
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE.txt
27
+ Requires-Dist: requests
28
+ Requires-Dist: pandas
29
+ Requires-Dist: sqlalchemy
30
+ Requires-Dist: yarl
31
+ Requires-Dist: aiohttp
32
+ Requires-Dist: toml
33
+ Requires-Dist: pyjwt
34
+ Requires-Dist: pydantic
35
+ Requires-Dist: black
36
+ Requires-Dist: pytz
27
37
 
28
38
  # ksxt
29
39
  - Krx Stock eXchange Trading library
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools>=42",
4
+ "wheel"
5
+ ]
6
+
7
+ build-backend = "setuptools.build_meta"
8
+
9
+ [project]
10
+ name = "ksxt"
11
+ version = "0.0.10"
12
+ readme = "README.md"
13
+ license = { file="LICENSE.txt" }
14
+
15
+ # 프로젝트의 의존성을 명시
16
+ dependencies = [
17
+ "requests",
18
+ "pandas",
19
+ "sqlalchemy",
20
+ "yarl",
21
+ "aiohttp",
22
+ "toml",
23
+ "pyjwt",
24
+ "pydantic",
25
+ "black",
26
+ "pytz",
27
+ ]
28
+
29
+ # pytest path 설정
30
+ [tool.pytest.ini_options]
31
+ pythonpath = [
32
+ ".", "src",
33
+ ]
34
+ asyncio_mode = "auto"
@@ -0,0 +1,5 @@
1
+ __version__ = "0.0.2"
2
+
3
+ from ksxt.koreainvest import KoreaInvest
4
+ from ksxt.upbit import Upbit
5
+ from ksxt.bithumb import Bithumb
@@ -0,0 +1,26 @@
1
+ import types
2
+
3
+
4
+ class Entry:
5
+ def __init__(self, security_type, path, config):
6
+ # equity, derivative, oversea_equity, oversea_derivative
7
+ self.security_type = security_type
8
+
9
+ # function key
10
+ self.path = path
11
+
12
+ self.config = config
13
+
14
+ def unbound_method(_self, params={}):
15
+ return _self.request(self.path, self.security_type, params, config=self.config)
16
+
17
+ self.unbound_method = unbound_method
18
+
19
+ def __get__(self, instance, owner):
20
+ if instance is None:
21
+ return self.unbound_method
22
+ else:
23
+ return types.MethodType(self.unbound_method, instance)
24
+
25
+ def __set_name__(self, owner, name):
26
+ self.name = name
@@ -0,0 +1,54 @@
1
+ import importlib
2
+
3
+
4
+ def generate_class_code(exchange_name: str):
5
+ try:
6
+ # Dynamically import the module based on the exchange name
7
+ module = importlib.import_module(f"{exchange_name}")
8
+ exchange_methods = module.entries[exchange_name]
9
+ except ImportError:
10
+ raise ValueError(f"Module for exchange '{exchange_name}' could not be found.")
11
+ except AttributeError:
12
+ raise ValueError(f"Entries for exchange '{exchange_name}' not found in the module.")
13
+
14
+ class_code = "class ImplicitAPI:\n"
15
+
16
+ # Calculate maximum length for method names for alignment
17
+ max_length = 0
18
+ for category, methods in exchange_methods.items():
19
+ for access, http_methods in methods.items():
20
+ if isinstance(http_methods, dict):
21
+ for method, paths in http_methods.items():
22
+ max_length = max(max_length, *(len(f"{access}_{method}_{path}") for path in paths))
23
+ elif isinstance(http_methods, list):
24
+ max_length = max(max_length, *(len(f"{access}_{path}") for path in http_methods))
25
+
26
+ for category, methods in exchange_methods.items():
27
+ class_code += f"\n # {category} API methods\n"
28
+ for access, http_methods in methods.items():
29
+ class_code += f"\n # {access} methods\n"
30
+ if isinstance(http_methods, dict):
31
+ for method, paths in http_methods.items():
32
+ class_code += f"\n # {method} requests\n"
33
+ for path in paths:
34
+ entry_name = f"{access}_{method}_{path}"
35
+ # Right-align entry names for better readability
36
+ class_code += f" {entry_name.ljust(max_length)} = Entry('{category}', '{path}', {{}})\n"
37
+ elif isinstance(http_methods, list):
38
+ for path in http_methods:
39
+ entry_name = f"{access}_{path}"
40
+ class_code += f" {entry_name.ljust(max_length)} = Entry('{category}', '{path}', {{}})\n"
41
+
42
+ return class_code
43
+
44
+
45
+ if __name__ == "__main__":
46
+ exchange_names = ["bithumb", "koreainvest", "upbit"] # List of exchanges to generate files for
47
+
48
+ for exchange_name in exchange_names:
49
+ class_code = generate_class_code(exchange_name)
50
+ filename = f"./src/ksxt/api/{exchange_name}.py"
51
+ with open(filename, "w") as file:
52
+ file.write("from ksxt.api import Entry\n")
53
+ file.write("\n")
54
+ file.write(class_code)
@@ -0,0 +1,35 @@
1
+ entries = {
2
+ "bithumb": {
3
+ "stock": {
4
+ "public": {
5
+ "get": [
6
+ "fetch_markets",
7
+ "fetch_security_ohlcv_minute",
8
+ "fetch_security_ohlcv_day",
9
+ "fetch_security_ohlcv_week",
10
+ "fetch_security_ohlcv_month",
11
+ "fetch_ticker_price",
12
+ "fetch_tickers_price",
13
+ "fetch_orderbook",
14
+ "fetch_orderbooks",
15
+ "fetch_security_info",
16
+ ]
17
+ },
18
+ "private": {
19
+ "get": [
20
+ "fetch_balance",
21
+ "fetch_cash",
22
+ "fetch_trade_fee",
23
+ "fetch_opened_order",
24
+ "fetch_opened_order_detail",
25
+ "fetch_closed_order",
26
+ "fetch_closed_order_detail",
27
+ "fetch_withdrawal_history",
28
+ "fetch_deposit_history",
29
+ ],
30
+ "post": ["send_order_entry", "send_order_entry_market", "send_order_exit", "send_order_exit_market"],
31
+ "delete": ["send_cancel_order"],
32
+ },
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,49 @@
1
+ entries = {
2
+ "koreainvest": {
3
+ "stock": {
4
+ "private": {
5
+ "get": [
6
+ "fetch_balance",
7
+ "fetch_cash",
8
+ "fetch_orderbook",
9
+ "fetch_security_info",
10
+ "fetch_ticker_price",
11
+ "fetch_index_ohlcv",
12
+ "fetch_security_ohlcv_day",
13
+ "fetch_security_ohlcv_minute",
14
+ "fetch_security_ohlcv_month",
15
+ "fetch_security_ohlcv_week",
16
+ "fetch_security_ohlcv_year",
17
+ "fetch_closed_order",
18
+ "fetch_opened_order",
19
+ "fetch_pnl",
20
+ "fetch_screener",
21
+ "fetch_screener_list",
22
+ ],
23
+ "post": [
24
+ "send_modify_order",
25
+ "send_cancel_order",
26
+ "send_order_entry",
27
+ "send_order_exit",
28
+ "send_order_loan_entry",
29
+ "send_order_loan_exit",
30
+ ],
31
+ },
32
+ "public": {
33
+ "post": [
34
+ "generate_token",
35
+ "revoke_token",
36
+ ]
37
+ },
38
+ },
39
+ },
40
+ "websocket": {
41
+ "stock": {
42
+ "subscribe": {
43
+ "ticker": ["subscribe_ticker"],
44
+ "trade": ["subscribe_trade"],
45
+ "orderbook": ["subscribe_orderbook"],
46
+ }
47
+ }
48
+ },
49
+ }
@@ -0,0 +1,39 @@
1
+ entries = {
2
+ "upbit": {
3
+ "stock": {
4
+ "public": {
5
+ "get": [
6
+ "fetch_markets",
7
+ "fetch_security_ohlcv_minute",
8
+ "fetch_security_ohlcv_day",
9
+ "fetch_security_ohlcv_week",
10
+ "fetch_security_ohlcv_month",
11
+ "fetch_ticker_price",
12
+ "fetch_tickers_price",
13
+ "fetch_orderbook",
14
+ "fetch_orderbooks",
15
+ ]
16
+ },
17
+ "private": {
18
+ "get": [
19
+ "fetch_balance",
20
+ "fetch_cash",
21
+ "fetch_security_info",
22
+ "fetch_trade_fee",
23
+ "fetch_closed_order_detail",
24
+ "fetch_opened_order_detail",
25
+ "fetch_opened_order",
26
+ "fetch_closed_order",
27
+ "fetch_withdrawal_history",
28
+ "fetch_deposit_history",
29
+ ],
30
+ "post": ["send_order_entry", "send_order_entry_market", "send_order_exit", "send_order_exit_market"],
31
+ "delete": ["send_cancel_order"],
32
+ },
33
+ },
34
+ "websocket": {
35
+ "public": ["subscribe_ticker", "subscribe_trade", "subscribe_orderbook", "subscribe_order"],
36
+ "private": ["subscribe_ticker", "subscribe_trade"],
37
+ },
38
+ }
39
+ }
@@ -0,0 +1,42 @@
1
+ from ksxt.api import Entry
2
+
3
+
4
+ class ImplicitAPI:
5
+
6
+ # stock API methods
7
+
8
+ # public methods
9
+
10
+ # get requests
11
+ public_get_fetch_markets = Entry("stock", "fetch_markets", {})
12
+ public_get_fetch_security_ohlcv_minute = Entry("stock", "fetch_security_ohlcv_minute", {})
13
+ public_get_fetch_security_ohlcv_day = Entry("stock", "fetch_security_ohlcv_day", {})
14
+ public_get_fetch_security_ohlcv_week = Entry("stock", "fetch_security_ohlcv_week", {})
15
+ public_get_fetch_security_ohlcv_month = Entry("stock", "fetch_security_ohlcv_month", {})
16
+ public_get_fetch_ticker_price = Entry("stock", "fetch_ticker_price", {})
17
+ public_get_fetch_tickers_price = Entry("stock", "fetch_tickers_price", {})
18
+ public_get_fetch_orderbook = Entry("stock", "fetch_orderbook", {})
19
+ public_get_fetch_orderbooks = Entry("stock", "fetch_orderbooks", {})
20
+ public_get_fetch_security_info = Entry("stock", "fetch_security_info", {})
21
+
22
+ # private methods
23
+
24
+ # get requests
25
+ private_get_fetch_balance = Entry("stock", "fetch_balance", {})
26
+ private_get_fetch_cash = Entry("stock", "fetch_cash", {})
27
+ private_get_fetch_trade_fee = Entry("stock", "fetch_trade_fee", {})
28
+ private_get_fetch_opened_order = Entry("stock", "fetch_opened_order", {})
29
+ private_get_fetch_opened_order_detail = Entry("stock", "fetch_opened_order_detail", {})
30
+ private_get_fetch_closed_order = Entry("stock", "fetch_closed_order", {})
31
+ private_get_fetch_closed_order_detail = Entry("stock", "fetch_closed_order_detail", {})
32
+ private_get_fetch_withdrawal_history = Entry("stock", "fetch_withdrawal_history", {})
33
+ private_get_fetch_deposit_history = Entry("stock", "fetch_deposit_history", {})
34
+
35
+ # post requests
36
+ private_post_send_order_entry = Entry("stock", "send_order_entry", {})
37
+ private_post_send_order_entry_market = Entry("stock", "send_order_entry_market", {})
38
+ private_post_send_order_exit = Entry("stock", "send_order_exit", {})
39
+ private_post_send_order_exit_market = Entry("stock", "send_order_exit_market", {})
40
+
41
+ # delete requests
42
+ private_delete_send_cancel_order = Entry("stock", "send_cancel_order", {})
@@ -0,0 +1,40 @@
1
+ from ksxt.api import Entry
2
+
3
+
4
+ class ImplicitAPI:
5
+
6
+ # stock API methods
7
+
8
+ # private methods
9
+
10
+ # get requests
11
+ private_get_fetch_balance = Entry("stock", "fetch_balance", {})
12
+ private_get_fetch_cash = Entry("stock", "fetch_cash", {})
13
+ private_get_fetch_orderbook = Entry("stock", "fetch_orderbook", {})
14
+ private_get_fetch_security_info = Entry("stock", "fetch_security_info", {})
15
+ private_get_fetch_ticker_price = Entry("stock", "fetch_ticker_price", {})
16
+ private_get_fetch_index_ohlcv = Entry("stock", "fetch_index_ohlcv", {})
17
+ private_get_fetch_security_ohlcv_day = Entry("stock", "fetch_security_ohlcv_day", {})
18
+ private_get_fetch_security_ohlcv_minute = Entry("stock", "fetch_security_ohlcv_minute", {})
19
+ private_get_fetch_security_ohlcv_month = Entry("stock", "fetch_security_ohlcv_month", {})
20
+ private_get_fetch_security_ohlcv_week = Entry("stock", "fetch_security_ohlcv_week", {})
21
+ private_get_fetch_security_ohlcv_year = Entry("stock", "fetch_security_ohlcv_year", {})
22
+ # private_get_fetch_closed_order = Entry('stock', 'fetch_closed_order', {})
23
+ # private_get_fetch_opened_order = Entry('stock', 'fetch_opened_order', {})
24
+ # private_get_fetch_pnl = Entry('stock', 'fetch_pnl', {})
25
+ # private_get_fetch_screener = Entry('stock', 'fetch_screener', {})
26
+ # private_get_fetch_screener_list = Entry('stock', 'fetch_screener_list', {})
27
+
28
+ # post requests
29
+ private_post_send_modify_order = Entry("stock", "send_modify_order", {})
30
+ private_post_send_cancel_order = Entry("stock", "send_cancel_order", {})
31
+ private_post_send_order_entry = Entry("stock", "send_order_entry", {})
32
+ private_post_send_order_exit = Entry("stock", "send_order_exit", {})
33
+ private_post_send_order_loan_entry = Entry("stock", "send_order_loan_entry", {})
34
+ private_post_send_order_loan_exit = Entry("stock", "send_order_loan_exit", {})
35
+
36
+ # public methods
37
+
38
+ # post requests
39
+ public_post_generate_token = Entry("token", "generate_token", {})
40
+ public_post_revoke_token = Entry("token", "revoke_token", {})
@@ -0,0 +1,54 @@
1
+ from ksxt.api import Entry
2
+
3
+
4
+ class ImplicitAPI:
5
+
6
+ # stock API methods
7
+
8
+ # public methods
9
+
10
+ # get requests
11
+ public_get_fetch_markets = Entry("stock", "fetch_markets", {})
12
+ public_get_fetch_security_ohlcv_minute = Entry("stock", "fetch_security_ohlcv_minute", {})
13
+ public_get_fetch_security_ohlcv_day = Entry("stock", "fetch_security_ohlcv_day", {})
14
+ public_get_fetch_security_ohlcv_week = Entry("stock", "fetch_security_ohlcv_week", {})
15
+ public_get_fetch_security_ohlcv_month = Entry("stock", "fetch_security_ohlcv_month", {})
16
+ public_get_fetch_ticker_price = Entry("stock", "fetch_ticker_price", {})
17
+ public_get_fetch_tickers_price = Entry("stock", "fetch_tickers_price", {})
18
+ public_get_fetch_orderbook = Entry("stock", "fetch_orderbook", {})
19
+ public_get_fetch_orderbooks = Entry("stock", "fetch_orderbooks", {})
20
+
21
+ # private methods
22
+
23
+ # get requests
24
+ private_get_fetch_balance = Entry("stock", "fetch_balance", {})
25
+ private_get_fetch_cash = Entry("stock", "fetch_cash", {})
26
+ private_get_fetch_security_info = Entry("stock", "fetch_security_info", {})
27
+ private_get_fetch_trade_fee = Entry("stock", "fetch_trade_fee", {})
28
+ private_get_fetch_closed_order_detail = Entry("stock", "fetch_closed_order_detail", {})
29
+ private_get_fetch_opened_order_detail = Entry("stock", "fetch_opened_order_detail", {})
30
+ private_get_fetch_opened_order = Entry("stock", "fetch_opened_order", {})
31
+ private_get_fetch_closed_order = Entry("stock", "fetch_closed_order", {})
32
+ private_get_fetch_withdrawal_history = Entry("stock", "fetch_withdrawal_history", {})
33
+ private_get_fetch_deposit_history = Entry("stock", "fetch_deposit_history", {})
34
+
35
+ # post requests
36
+ private_post_send_order_entry = Entry("stock", "send_order_entry", {})
37
+ private_post_send_order_entry_market = Entry("stock", "send_order_entry_market", {})
38
+ private_post_send_order_exit = Entry("stock", "send_order_exit", {})
39
+ private_post_send_order_exit_market = Entry("stock", "send_order_exit_market", {})
40
+
41
+ # delete requests
42
+ private_delete_send_cancel_order = Entry("stock", "send_cancel_order", {})
43
+
44
+ # websocket API methods
45
+
46
+ # public methods
47
+ public_subscribe_ticker = Entry("websocket", "subscribe_ticker", {})
48
+ public_subscribe_trade = Entry("websocket", "subscribe_trade", {})
49
+ public_subscribe_orderbook = Entry("websocket", "subscribe_orderbook", {})
50
+ public_subscribe_order = Entry("websocket", "subscribe_order", {})
51
+
52
+ # private methods
53
+ private_subscribe_ticker = Entry("websocket", "subscribe_ticker", {})
54
+ private_subscribe_trade = Entry("websocket", "subscribe_trade", {})
@@ -0,0 +1,4 @@
1
+ from ksxt.async_.base.async_exchange import AsyncExchange
2
+ from ksxt.async_.upbit import Upbit
3
+ from ksxt.async_.bithumb import Bithumb
4
+ from ksxt.async_.koreainvest import KoreaInvest