ksxt 1.0.3__tar.gz → 1.0.5__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.
- {ksxt-1.0.3/src/ksxt.egg-info → ksxt-1.0.5}/PKG-INFO +1 -1
- {ksxt-1.0.3 → ksxt-1.0.5}/pyproject.toml +1 -1
- ksxt-1.0.5/src/ksxt/__pycache__/bithumb.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/__pycache__/koreainvest.cpython-312.pyc +0 -0
- ksxt-1.0.5/src/ksxt/__pycache__/upbit.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/__pycache__/bithumb.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/__pycache__/koreainvest.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/__pycache__/upbit.cpython-312.pyc +0 -0
- ksxt-1.0.5/src/ksxt/async_/__pycache__/bithumb.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/__pycache__/koreainvest.cpython-312.pyc +0 -0
- ksxt-1.0.5/src/ksxt/async_/__pycache__/upbit.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/base/__pycache__/async_exchange.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/base/async_exchange.py +19 -17
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/bithumb.py +41 -21
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/koreainvest.py +80 -8
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/upbit.py +58 -22
- ksxt-1.0.5/src/ksxt/base/__pycache__/exchange.cpython-312.pyc +0 -0
- ksxt-1.0.5/src/ksxt/base/__pycache__/rest_exchange.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/exchange.py +33 -66
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/rest_exchange.py +28 -29
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/bithumb.py +33 -14
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/koreainvest.py +30 -8
- ksxt-1.0.5/src/ksxt/models/__pycache__/transaction.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/transaction.py +2 -0
- ksxt-1.0.5/src/ksxt/parser/__pycache__/bithumb.cpython-312.pyc +0 -0
- ksxt-1.0.5/src/ksxt/parser/__pycache__/koreainvest.cpython-312.pyc +0 -0
- ksxt-1.0.5/src/ksxt/parser/__pycache__/parser.cpython-312.pyc +0 -0
- ksxt-1.0.5/src/ksxt/parser/__pycache__/upbit.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/parser/bithumb.py +102 -12
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/parser/koreainvest.py +66 -12
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/parser/parser.py +25 -7
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/parser/upbit.py +106 -16
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/upbit.py +48 -18
- {ksxt-1.0.3 → ksxt-1.0.5/src/ksxt.egg-info}/PKG-INFO +1 -1
- ksxt-1.0.3/src/ksxt/__pycache__/bithumb.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/__pycache__/upbit.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/async_/__pycache__/bithumb.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/async_/__pycache__/upbit.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/base/__pycache__/exchange.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/base/__pycache__/rest_exchange.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/models/__pycache__/transaction.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/parser/__pycache__/bithumb.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/parser/__pycache__/koreainvest.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/parser/__pycache__/parser.cpython-312.pyc +0 -0
- ksxt-1.0.3/src/ksxt/parser/__pycache__/upbit.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/LICENSE.txt +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/MANIFEST.in +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/README.md +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/setup.cfg +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/__init__.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/__pycache__/__init__.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/__init__.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/__pycache__/__init__.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/auto/__pycache__/bithumb.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/auto/__pycache__/koreainvest.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/auto/__pycache__/upbit.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/auto/api_generator.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/auto/bithumb.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/auto/koreainvest.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/auto/upbit.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/bithumb.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/koreainvest.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/api/upbit.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/__init__.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/__pycache__/__init__.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/base/__init__.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/base/__pycache__/__init__.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/async_/base/__pycache__/throttler.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/__init__.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/__pycache__/__init__.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/__pycache__/errors.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/__pycache__/rate_limiter.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/__pycache__/types.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/com_exchange.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/errors.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/rate_limiter.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/base/types.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/config/__init__.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/config/__pycache__/__init__.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/config/bithumb.toml +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/config/koreainvest.toml +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/config/token.toml +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/config/upbit.toml +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/__pycache__/base.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/__pycache__/db.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/__pycache__/logging.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/__pycache__/manager.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/__pycache__/markets.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/base.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/db.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/krx/__pycache__/kosdaq.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/krx/__pycache__/kospi.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/krx/__pycache__/stock.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/krx/kosdaq.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/krx/kospi.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/krx/stock.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/logging.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/manager.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/markets.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/us/__pycache__/amex.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/us/__pycache__/nasdaq.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/us/__pycache__/nyse.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/us/__pycache__/stock.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/us/amex.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/us/nasdaq.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/us/nyse.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/market/us/stock.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__init__.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/__init__.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/balance.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/cash.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/common.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/error.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/historical.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/market.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/order.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/orderbook.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/ticker.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/__pycache__/token.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/balance.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/cash.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/common.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/error.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/historical.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/market.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/order.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/orderbook.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/ticker.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/models/token.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/sample/symbol_sync.ipynb +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/utils/__pycache__/safer.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/utils/__pycache__/sorter.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/utils/__pycache__/timer.cpython-312.pyc +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/utils/safer.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/utils/sorter.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt/utils/timer.py +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt.egg-info/SOURCES.txt +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt.egg-info/dependency_links.txt +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt.egg-info/requires.txt +0 -0
- {ksxt-1.0.3 → ksxt-1.0.5}/src/ksxt.egg-info/top_level.txt +0 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -85,7 +85,7 @@ class AsyncExchange(RestExchange):
|
|
85
85
|
self.rate_limiters[api_name].release()
|
86
86
|
|
87
87
|
async def fetch2(
|
88
|
-
self, path, security_type, params={}, headers:
|
88
|
+
self, path, security_type, params={}, headers: Any | None = None, body: Any | None = None, config={}
|
89
89
|
):
|
90
90
|
is_activate = self.apis[self.type][security_type][path]["activate"]
|
91
91
|
if not is_activate:
|
@@ -130,8 +130,8 @@ class AsyncExchange(RestExchange):
|
|
130
130
|
self,
|
131
131
|
symbol: str,
|
132
132
|
time_frame: str,
|
133
|
-
start:
|
134
|
-
end:
|
133
|
+
start: datetime | None = None,
|
134
|
+
end: datetime | None = None,
|
135
135
|
base_market: str = "KRW",
|
136
136
|
) -> ksxt.models.KsxtHistoricalDataResponse:
|
137
137
|
raise NotSupportedError(f"{self.id} {self.fetch_historical_data.__qualname__}() is not supported yet.")
|
@@ -142,7 +142,9 @@ class AsyncExchange(RestExchange):
|
|
142
142
|
async def fetch_user_info(self, base_market: str = "KRW"):
|
143
143
|
raise NotSupportedError(f"{self.id} {self.fetch_user_info.__qualname__}() is not supported yet.")
|
144
144
|
|
145
|
-
async def fetch_balance(
|
145
|
+
async def fetch_balance(
|
146
|
+
self, acc_num: str, base_market: str = "KRW", excluded_symbols: list[str] | None = None
|
147
|
+
) -> ksxt.models.KsxtBalanceResponse:
|
146
148
|
raise NotSupportedError(f"{self.id} {self.fetch_balance.__qualname__}() is not supported yet.")
|
147
149
|
|
148
150
|
async def fetch_cash(self, acc_num: str, base_market: str = "KRW") -> ksxt.models.KsxtCashResponse:
|
@@ -155,12 +157,12 @@ class AsyncExchange(RestExchange):
|
|
155
157
|
raise NotSupportedError(f"{self.id} {self.fetch_screener.__qualname__}() is not supported yet.")
|
156
158
|
|
157
159
|
async def fetch_deposit_history(
|
158
|
-
self, acc_num: str, base_market: str = "KRW"
|
160
|
+
self, acc_num: str, start: datetime | None = None, end: datetime | None = None, base_market: str = "KRW"
|
159
161
|
) -> ksxt.models.KsxtDepositHistoryResponse:
|
160
162
|
raise NotSupportedError(f"{self.id} {self.fetch_deposit_history.__qualname__}() is not supported yet.")
|
161
163
|
|
162
164
|
async def fetch_withdrawal_history(
|
163
|
-
self, acc_num: str, base_market: str = "KRW"
|
165
|
+
self, acc_num: str, start: datetime | None = None, end: datetime | None = None, base_market: str = "KRW"
|
164
166
|
) -> ksxt.models.KsxtWithdrawalHistoryResponse:
|
165
167
|
raise NotSupportedError(f"{self.id} {self.fetch_withdrawal_history.__qualname__}() is not supported yet.")
|
166
168
|
|
@@ -170,15 +172,15 @@ class AsyncExchange(RestExchange):
|
|
170
172
|
symbol: str,
|
171
173
|
ticket_type: Literal["EntryLong", "EntryShort", "ExitLong", "ExitShort"],
|
172
174
|
otype: Literal["limit", "market"],
|
173
|
-
price:
|
174
|
-
qty:
|
175
|
-
amount:
|
175
|
+
price: float | None = 0,
|
176
|
+
qty: float | None = 0,
|
177
|
+
amount: float | None = 0,
|
176
178
|
base_market: str = "KRW",
|
177
179
|
) -> ksxt.models.KsxtCreateOrderResponse:
|
178
180
|
raise NotSupportedError(f"{self.id} {self.create_order.__qualname__}() is not supported yet.")
|
179
181
|
|
180
182
|
async def cancel_order(
|
181
|
-
self, acc_num: str, order_id: str, symbol:
|
183
|
+
self, acc_num: str, order_id: str, symbol: str | None = "", qty: float = 0, *args, base_market: str = "KRW"
|
182
184
|
) -> ksxt.models.KsxtCancelOrderResponse:
|
183
185
|
raise NotSupportedError(f"{self.id} {self.cancel_order.__qualname__}() is not supported yet.")
|
184
186
|
|
@@ -189,7 +191,7 @@ class AsyncExchange(RestExchange):
|
|
189
191
|
price: float,
|
190
192
|
qty: float,
|
191
193
|
*args,
|
192
|
-
symbol:
|
194
|
+
symbol: str | None = "",
|
193
195
|
base_market: str = "KRW",
|
194
196
|
):
|
195
197
|
raise NotSupportedError(f"{self.id} {self.modify_order.__qualname__}() is not supported yet.")
|
@@ -197,9 +199,9 @@ class AsyncExchange(RestExchange):
|
|
197
199
|
async def fetch_open_order(
|
198
200
|
self,
|
199
201
|
acc_num: str,
|
200
|
-
symbol:
|
201
|
-
start:
|
202
|
-
end:
|
202
|
+
symbol: str | None = "",
|
203
|
+
start: datetime | None = None,
|
204
|
+
end: datetime | None = None,
|
203
205
|
base_market: str = "KRW",
|
204
206
|
) -> ksxt.models.KsxtOpenOrderResponse:
|
205
207
|
raise NotSupportedError(f"{self.id} {self.fetch_open_order.__qualname__}() is not supported yet.")
|
@@ -207,9 +209,9 @@ class AsyncExchange(RestExchange):
|
|
207
209
|
async def fetch_closed_order(
|
208
210
|
self,
|
209
211
|
acc_num: str,
|
210
|
-
symbol:
|
211
|
-
start:
|
212
|
-
end:
|
212
|
+
symbol: str | None = "",
|
213
|
+
start: datetime | None = None,
|
214
|
+
end: datetime | None = None,
|
213
215
|
base_market: str = "KRW",
|
214
216
|
) -> ksxt.models.KsxtClosedOrderResponse:
|
215
217
|
raise NotSupportedError(f"{self.id} {self.fetch_closed_order.__qualname__}() is not supported yet.")
|
@@ -3,7 +3,7 @@ import hashlib
|
|
3
3
|
import hmac
|
4
4
|
import json
|
5
5
|
import time
|
6
|
-
from datetime import datetime
|
6
|
+
from datetime import datetime, timezone
|
7
7
|
from typing import Any, Dict, List, Literal, Optional
|
8
8
|
from urllib.parse import urlencode
|
9
9
|
import uuid
|
@@ -108,10 +108,19 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
108
108
|
return ksxt.models.KsxtMarketResponse(header=common_header, response=common_response, info=parsed_info)
|
109
109
|
|
110
110
|
async def fetch_historical_data(
|
111
|
-
self,
|
111
|
+
self,
|
112
|
+
symbol: str,
|
113
|
+
time_frame: str,
|
114
|
+
start: datetime | None = None,
|
115
|
+
end: datetime | None = None,
|
116
|
+
base_market: str = "KRW",
|
112
117
|
) -> ksxt.models.KsxtHistoricalDataResponse:
|
113
118
|
params = {"market": self.safe_symbol(base_market=base_market, security=symbol), "count": 200}
|
114
119
|
|
120
|
+
if end:
|
121
|
+
end_utc = end.astimezone(timezone.utc)
|
122
|
+
params.update({"to": end_utc.strftime("%Y-%m-%d %H:%M:%S")})
|
123
|
+
|
115
124
|
common_header = self.create_common_header(request_params=params)
|
116
125
|
|
117
126
|
# TODO : time_frame 을 어떻게 고정시킬까? 우리는 분봉, 일봉, 주봉, 월봉 만 지원한다고 가정하면?
|
@@ -135,7 +144,10 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
135
144
|
if common_response.success != "0":
|
136
145
|
return ksxt.models.KsxtHistoricalDataResponse(header=common_header, response=common_response, info=None)
|
137
146
|
|
138
|
-
parsed_response = self.parser.parse_historical_data(
|
147
|
+
parsed_response = self.parser.parse_historical_data(
|
148
|
+
response=response, symbol=symbol, start=start, end=end, base_market=base_market
|
149
|
+
)
|
150
|
+
|
139
151
|
return ksxt.models.KsxtHistoricalDataResponse(
|
140
152
|
header=common_header, response=common_response, info=parsed_response
|
141
153
|
)
|
@@ -219,7 +231,9 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
219
231
|
|
220
232
|
return ksxt.models.KsxtMultiOrderBookResponse(header=common_header, response=common_response, info=parsed_info)
|
221
233
|
|
222
|
-
async def fetch_balance(
|
234
|
+
async def fetch_balance(
|
235
|
+
self, acc_num: str, base_market: str = "KRW", excluded_symbols: Optional[list[str]] = None
|
236
|
+
) -> ksxt.models.KsxtBalanceResponse:
|
223
237
|
params = {}
|
224
238
|
|
225
239
|
common_header = self.create_common_header(request_params=params)
|
@@ -233,7 +247,7 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
233
247
|
return ksxt.models.KsxtBalanceResponse(header=common_header, response=common_response, info=None)
|
234
248
|
|
235
249
|
# 데이터 파싱
|
236
|
-
parsed_info = self.parser.parse_balance(response, base_market)
|
250
|
+
parsed_info = self.parser.parse_balance(response, base_market, excluded_symbols=excluded_symbols)
|
237
251
|
|
238
252
|
return ksxt.models.KsxtBalanceResponse(header=common_header, response=common_response, info=parsed_info)
|
239
253
|
|
@@ -292,9 +306,9 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
292
306
|
async def fetch_open_order(
|
293
307
|
self,
|
294
308
|
acc_num: str,
|
295
|
-
symbol: str
|
296
|
-
start:
|
297
|
-
end:
|
309
|
+
symbol: Optional[str] = "",
|
310
|
+
start: datetime | None = None,
|
311
|
+
end: datetime | None = None,
|
298
312
|
base_market: str = "KRW",
|
299
313
|
) -> ksxt.models.KsxtOpenOrderResponse:
|
300
314
|
params = {
|
@@ -314,7 +328,9 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
314
328
|
return ksxt.models.KsxtOpenOrderResponse(header=common_header, response=common_response, info=None)
|
315
329
|
|
316
330
|
# 데이터 파싱
|
317
|
-
parsed_info = self.parser.parse_open_order_history(
|
331
|
+
parsed_info = self.parser.parse_open_order_history(
|
332
|
+
response=response, start=start, end=end, base_market=base_market
|
333
|
+
)
|
318
334
|
|
319
335
|
return ksxt.models.KsxtOpenOrderResponse(header=common_header, response=common_response, info=parsed_info)
|
320
336
|
|
@@ -322,8 +338,8 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
322
338
|
self,
|
323
339
|
acc_num: str,
|
324
340
|
symbol: Optional[str] = "",
|
325
|
-
start:
|
326
|
-
end:
|
341
|
+
start: datetime | None = None,
|
342
|
+
end: datetime | None = None,
|
327
343
|
base_market: str = "KRW",
|
328
344
|
) -> ksxt.models.KsxtClosedOrderResponse:
|
329
345
|
params = {"market": self.safe_symbol(base_market, symbol), "uuids": "", "state": "done"}
|
@@ -339,7 +355,9 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
339
355
|
return ksxt.models.KsxtClosedOrderResponse(header=common_header, response=common_response, info=None)
|
340
356
|
|
341
357
|
# 데이터 파싱
|
342
|
-
parsed_info = self.parser.parse_closed_order_history(
|
358
|
+
parsed_info = self.parser.parse_closed_order_history(
|
359
|
+
response=response, start=start, end=end, base_market=base_market
|
360
|
+
)
|
343
361
|
|
344
362
|
return ksxt.models.KsxtClosedOrderResponse(header=common_header, response=common_response, info=parsed_info)
|
345
363
|
|
@@ -411,9 +429,9 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
411
429
|
return ksxt.models.KsxtCreateOrderResponse(header=common_header, response=common_response, info=parsed_info)
|
412
430
|
|
413
431
|
async def fetch_withdrawal_history(
|
414
|
-
self, acc_num: str, base_market: str = "KRW"
|
432
|
+
self, acc_num: str, start: datetime | None = None, end: datetime | None = None, base_market: str = "KRW"
|
415
433
|
) -> ksxt.models.KsxtWithdrawalHistoryResponse:
|
416
|
-
params = {"state": "
|
434
|
+
params = {"state": "DONE", "uuids": "", "txids": ""}
|
417
435
|
|
418
436
|
common_header = self.create_common_header(request_params=params)
|
419
437
|
|
@@ -426,14 +444,16 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
426
444
|
return ksxt.models.KsxtWithdrawalHistoryResponse(header=common_header, response=common_response, info=None)
|
427
445
|
|
428
446
|
# 데이터 파싱
|
429
|
-
parsed_info = self.parser.parse_withdrawal_history(
|
447
|
+
parsed_info = self.parser.parse_withdrawal_history(
|
448
|
+
response=response, start=start, end=end, base_market=base_market
|
449
|
+
)
|
430
450
|
|
431
451
|
return ksxt.models.KsxtWithdrawalHistoryResponse(
|
432
452
|
header=common_header, response=common_response, info=parsed_info
|
433
453
|
)
|
434
454
|
|
435
455
|
async def fetch_deposit_history(
|
436
|
-
self, acc_num: str, base_market: str = "KRW"
|
456
|
+
self, acc_num: str, start: datetime | None = None, end: datetime | None = None, base_market: str = "KRW"
|
437
457
|
) -> ksxt.models.KsxtDepositHistoryResponse:
|
438
458
|
params = {"state": "ACCEPTED", "uuids": "", "txids": ""}
|
439
459
|
|
@@ -445,11 +465,11 @@ class Bithumb(AsyncExchange, ImplicitAPI):
|
|
445
465
|
|
446
466
|
# 실패 시 오류 응답 반환
|
447
467
|
if common_response.success != "0":
|
448
|
-
return ksxt.models.
|
468
|
+
return ksxt.models.KsxtDepositHistoryResponse(header=common_header, response=common_response, info=None)
|
449
469
|
|
450
470
|
# 데이터 파싱
|
451
|
-
parsed_info = self.parser.parse_deposit_history(
|
452
|
-
|
453
|
-
return ksxt.models.KsxtWithdrawalHistoryResponse(
|
454
|
-
header=common_header, response=common_response, info=parsed_info
|
471
|
+
parsed_info = self.parser.parse_deposit_history(
|
472
|
+
response=response, start=start, end=end, base_market=base_market
|
455
473
|
)
|
474
|
+
|
475
|
+
return ksxt.models.KsxtDepositHistoryResponse(header=common_header, response=common_response, info=parsed_info)
|
@@ -124,7 +124,9 @@ class KoreaInvest(AsyncExchange, ImplicitAPI):
|
|
124
124
|
)
|
125
125
|
|
126
126
|
@AsyncExchange.check_token
|
127
|
-
async def fetch_balance(
|
127
|
+
async def fetch_balance(
|
128
|
+
self, acc_num: str, base_market: str = "KRW", excluded_symbols: Optional[list[str]] = None
|
129
|
+
) -> ksxt.models.KsxtBalanceResponse:
|
128
130
|
if base_market == "KRW":
|
129
131
|
params = {
|
130
132
|
"CANO": acc_num[:8],
|
@@ -150,7 +152,9 @@ class KoreaInvest(AsyncExchange, ImplicitAPI):
|
|
150
152
|
if common_response.success != "0":
|
151
153
|
return ksxt.models.KsxtBalanceResponse(header=common_header, response=common_response, info=None)
|
152
154
|
|
153
|
-
parsed_info = self.parser.parse_balance(
|
155
|
+
parsed_info = self.parser.parse_balance(
|
156
|
+
response=response, base_market=base_market, excluded_symbols=excluded_symbols
|
157
|
+
)
|
154
158
|
|
155
159
|
return ksxt.models.KsxtBalanceResponse(header=common_header, response=common_response, info=parsed_info)
|
156
160
|
|
@@ -244,7 +248,12 @@ class KoreaInvest(AsyncExchange, ImplicitAPI):
|
|
244
248
|
|
245
249
|
@AsyncExchange.check_token
|
246
250
|
async def fetch_historical_data_index(
|
247
|
-
self,
|
251
|
+
self,
|
252
|
+
symbol: str,
|
253
|
+
time_frame: str,
|
254
|
+
start: datetime | None = None,
|
255
|
+
end: datetime | None = None,
|
256
|
+
base_market: str = "KRW",
|
248
257
|
) -> ksxt.models.KsxtHistoricalDataResponse:
|
249
258
|
if time_frame.endswith("D"):
|
250
259
|
param_code = "D"
|
@@ -281,13 +290,22 @@ class KoreaInvest(AsyncExchange, ImplicitAPI):
|
|
281
290
|
if common_response.success != "0":
|
282
291
|
return ksxt.models.KsxtHistoricalDataResponse(header=common_header, response=common_response, info=None)
|
283
292
|
|
284
|
-
|
293
|
+
parsed_response = self.parser.parse_historical_index_data(
|
294
|
+
response=response, symbol=symbol, start=start, end=end, base_market=base_market
|
295
|
+
)
|
285
296
|
|
286
|
-
return ksxt.models.KsxtHistoricalDataResponse(
|
297
|
+
return ksxt.models.KsxtHistoricalDataResponse(
|
298
|
+
header=common_header, response=common_response, info=parsed_response
|
299
|
+
)
|
287
300
|
|
288
301
|
@AsyncExchange.check_token
|
289
302
|
async def fetch_historical_data(
|
290
|
-
self,
|
303
|
+
self,
|
304
|
+
symbol: str,
|
305
|
+
time_frame: str,
|
306
|
+
start: datetime | None = None,
|
307
|
+
end: datetime | None = None,
|
308
|
+
base_market: str = "KRW",
|
291
309
|
) -> ksxt.models.KsxtHistoricalDataResponse:
|
292
310
|
if time_frame.endswith("D"):
|
293
311
|
param_code = "D"
|
@@ -337,9 +355,63 @@ class KoreaInvest(AsyncExchange, ImplicitAPI):
|
|
337
355
|
if common_response.success != "0":
|
338
356
|
return ksxt.models.KsxtHistoricalDataResponse(header=common_header, response=common_response, info=None)
|
339
357
|
|
340
|
-
|
358
|
+
parsed_response = self.parser.parse_historical_data(
|
359
|
+
response=response, symbol=symbol, start=start, end=end, base_market=base_market
|
360
|
+
)
|
361
|
+
|
362
|
+
return ksxt.models.KsxtHistoricalDataResponse(
|
363
|
+
header=common_header, response=common_response, info=parsed_response
|
364
|
+
)
|
365
|
+
|
366
|
+
@AsyncExchange.check_token
|
367
|
+
async def fetch_deposit_history(
|
368
|
+
self, acc_num: str, start: datetime | None = None, end: datetime | None = None, base_market: str = "KRW"
|
369
|
+
) -> ksxt.models.KsxtDepositHistoryResponse:
|
370
|
+
params = {"state": "ACCEPTED", "uuids": "", "txids": ""}
|
371
|
+
|
372
|
+
common_header = self.create_common_header(request_params=params)
|
373
|
+
|
374
|
+
response = await self.private_get_fetch_deposit_history(self.extend(params))
|
375
|
+
|
376
|
+
common_response = self.get_common_response(response=response)
|
341
377
|
|
342
|
-
|
378
|
+
# 실패 시 오류 응답 반환
|
379
|
+
if common_response.success != "0":
|
380
|
+
return ksxt.models.KsxtWithdrawalHistoryResponse(header=common_header, response=common_response, info=None)
|
381
|
+
|
382
|
+
# 데이터 파싱
|
383
|
+
parsed_info = self.parser.parse_deposit_history(
|
384
|
+
response=response, start=start, end=end, base_market=base_market
|
385
|
+
)
|
386
|
+
|
387
|
+
return ksxt.models.KsxtWithdrawalHistoryResponse(
|
388
|
+
header=common_header, response=common_response, info=parsed_info
|
389
|
+
)
|
390
|
+
|
391
|
+
@AsyncExchange.check_token
|
392
|
+
async def fetch_withdrawal_history(
|
393
|
+
self, acc_num: str, start: datetime | None = None, end: datetime | None = None, base_market: str = "KRW"
|
394
|
+
) -> ksxt.models.KsxtWithdrawalHistoryResponse:
|
395
|
+
params = {"state": "done", "uuids": "", "txids": ""}
|
396
|
+
|
397
|
+
common_header = self.create_common_header(request_params=params)
|
398
|
+
|
399
|
+
response = await self.private_get_fetch_withdrawal_history(self.extend(params))
|
400
|
+
|
401
|
+
common_response = self.get_common_response(response=response)
|
402
|
+
|
403
|
+
# 실패 시 오류 응답 반환
|
404
|
+
if common_response.success != "0":
|
405
|
+
return ksxt.models.KsxtWithdrawalHistoryResponse(header=common_header, response=common_response, info=None)
|
406
|
+
|
407
|
+
# 데이터 파싱
|
408
|
+
parsed_info = self.parser.parse_withdrawal_history(
|
409
|
+
response=response, start=start, end=end, base_market=base_market
|
410
|
+
)
|
411
|
+
|
412
|
+
return ksxt.models.KsxtWithdrawalHistoryResponse(
|
413
|
+
header=common_header, response=common_response, info=parsed_info
|
414
|
+
)
|
343
415
|
|
344
416
|
@AsyncExchange.check_token
|
345
417
|
async def modify_order(
|
@@ -2,7 +2,7 @@ import hashlib
|
|
2
2
|
import json
|
3
3
|
import time
|
4
4
|
import uuid
|
5
|
-
from datetime import datetime
|
5
|
+
from datetime import datetime, timezone
|
6
6
|
from typing import Any, Dict, List, Literal, Optional
|
7
7
|
from urllib.parse import urlencode
|
8
8
|
|
@@ -110,6 +110,10 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
110
110
|
) -> ksxt.models.KsxtHistoricalDataResponse:
|
111
111
|
params = {"market": self.safe_symbol(base_market, symbol), "count": 200}
|
112
112
|
|
113
|
+
if end:
|
114
|
+
end_utc = end.astimezone(timezone.utc)
|
115
|
+
params.update({"to": end_utc.strftime("%Y-%m-%d %H:%M:%S")})
|
116
|
+
|
113
117
|
# TODO : time_frame 을 어떻게 고정시킬까? 우리는 분봉, 일봉, 주봉, 월봉 만 지원한다고 가정하면?
|
114
118
|
if time_frame.endswith("m"):
|
115
119
|
# TODO : parse number
|
@@ -135,9 +139,13 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
135
139
|
if common_response.success != "0":
|
136
140
|
return ksxt.models.KsxtHistoricalDataResponse(header=common_header, response=common_response, info=None)
|
137
141
|
|
138
|
-
|
142
|
+
parsed_response = self.parser.parse_historical_data(
|
143
|
+
response=response, symbol=symbol, start=start, end=end, base_market=base_market
|
144
|
+
)
|
139
145
|
|
140
|
-
return ksxt.models.KsxtHistoricalDataResponse(
|
146
|
+
return ksxt.models.KsxtHistoricalDataResponse(
|
147
|
+
header=common_header, response=common_response, info=parsed_response
|
148
|
+
)
|
141
149
|
|
142
150
|
async def fetch_ticker(self, symbol: str, base_market: str = "KRW") -> ksxt.models.KsxtTickerResponse:
|
143
151
|
params = {"markets": self.safe_symbol(base_market, symbol)} # 다중 조회 시, 콤마로 구분 ex. 'KRW-BTC, BTC-ETH'
|
@@ -209,7 +217,9 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
209
217
|
|
210
218
|
return ksxt.models.KsxtMultiOrderBookResponse(header=common_header, response=common_response, info=parsed_info)
|
211
219
|
|
212
|
-
async def fetch_balance(
|
220
|
+
async def fetch_balance(
|
221
|
+
self, acc_num: str, base_market: str = "KRW", excluded_symbols: Optional[list[str]] = None
|
222
|
+
) -> ksxt.models.KsxtBalanceResponse:
|
213
223
|
params = {}
|
214
224
|
|
215
225
|
common_header = self.create_common_header(request_params=params)
|
@@ -220,7 +230,9 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
220
230
|
if common_response.success != "0":
|
221
231
|
return ksxt.models.KsxtBalanceResponse(header=common_header, response=common_response, info=None)
|
222
232
|
|
223
|
-
parsed_info = self.parser.parse_balance(
|
233
|
+
parsed_info = self.parser.parse_balance(
|
234
|
+
response=response, base_market=base_market, excluded_symbols=excluded_symbols
|
235
|
+
)
|
224
236
|
|
225
237
|
return ksxt.models.KsxtBalanceResponse(header=common_header, response=common_response, info=parsed_info)
|
226
238
|
|
@@ -272,7 +284,7 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
272
284
|
|
273
285
|
async def fetch_closed_order_detail(
|
274
286
|
self, acc_num: str, order_ids: List[str], base_market: str = "KRW"
|
275
|
-
) -> ksxt.models.
|
287
|
+
) -> ksxt.models.KsxtClosedOrderResponse:
|
276
288
|
params = {
|
277
289
|
"uuids": order_ids,
|
278
290
|
}
|
@@ -285,12 +297,12 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
285
297
|
|
286
298
|
# 실패 시 오류 응답 반환
|
287
299
|
if common_response.success != "0":
|
288
|
-
return ksxt.models.
|
300
|
+
return ksxt.models.KsxtClosedOrderResponse(header=common_header, response=common_response, info=None)
|
289
301
|
|
290
302
|
# 데이터 파싱
|
291
303
|
parsed_info = self.parser.parse_closed_order_history(response, base_market)
|
292
304
|
|
293
|
-
return ksxt.models.
|
305
|
+
return ksxt.models.KsxtClosedOrderResponse(header=common_header, response=common_response, info=parsed_info)
|
294
306
|
|
295
307
|
async def fetch_open_order_detail(
|
296
308
|
self, acc_num: str, order_ids: List[str], base_market: str = "KRW"
|
@@ -317,16 +329,28 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
317
329
|
async def fetch_closed_order(
|
318
330
|
self,
|
319
331
|
acc_num: str,
|
320
|
-
symbol:
|
321
|
-
start:
|
322
|
-
end:
|
332
|
+
symbol: str = "",
|
333
|
+
start: datetime | None = None,
|
334
|
+
end: datetime | None = None,
|
323
335
|
base_market: str = "KRW",
|
324
336
|
) -> ksxt.models.KsxtClosedOrderResponse:
|
325
337
|
params = {"state": "done"}
|
326
338
|
|
327
|
-
if
|
339
|
+
if symbol:
|
328
340
|
params.update({"market": self.safe_symbol(base_market, symbol)})
|
329
341
|
|
342
|
+
if start and end:
|
343
|
+
duration = end - start
|
344
|
+
if duration.days > 7:
|
345
|
+
raise ValueError("The duration between start and end cannot exceed 7 days.")
|
346
|
+
|
347
|
+
elif start:
|
348
|
+
start_timestamp = int(start.timestamp() * 1000)
|
349
|
+
params.update({"start_time": start_timestamp})
|
350
|
+
elif end:
|
351
|
+
end_timestamp = int(end.timestamp() * 1000)
|
352
|
+
params.update({"end_time": end_timestamp})
|
353
|
+
|
330
354
|
common_header = self.create_common_header(request_params=params)
|
331
355
|
|
332
356
|
response = await self.private_get_fetch_closed_order(self.extend(params))
|
@@ -335,21 +359,24 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
335
359
|
if common_response.success != "0":
|
336
360
|
return ksxt.models.KsxtClosedOrderResponse(header=common_header, response=common_response, info=None)
|
337
361
|
|
338
|
-
|
362
|
+
# 데이터 파싱
|
363
|
+
parsed_info = self.parser.parse_closed_order_history(
|
364
|
+
response=response, start=start, end=end, base_market=base_market
|
365
|
+
)
|
339
366
|
|
340
367
|
return ksxt.models.KsxtClosedOrderResponse(header=common_header, response=common_response, info=parsed_info)
|
341
368
|
|
342
369
|
async def fetch_open_order(
|
343
370
|
self,
|
344
371
|
acc_num: str,
|
345
|
-
symbol: str
|
346
|
-
start:
|
347
|
-
end:
|
372
|
+
symbol: str = "",
|
373
|
+
start: datetime | None = None,
|
374
|
+
end: datetime | None = None,
|
348
375
|
base_market: str = "KRW",
|
349
376
|
) -> ksxt.models.KsxtOpenOrderResponse:
|
350
377
|
params = {"state": "wait"}
|
351
378
|
|
352
|
-
if
|
379
|
+
if symbol:
|
353
380
|
params.update({"market": self.safe_symbol(base_market, symbol)})
|
354
381
|
|
355
382
|
common_header = self.create_common_header(request_params=params)
|
@@ -360,12 +387,15 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
360
387
|
if common_response.success != "0":
|
361
388
|
return ksxt.models.KsxtOpenOrderResponse(header=common_header, response=common_response, info=None)
|
362
389
|
|
363
|
-
|
390
|
+
# 데이터 파싱
|
391
|
+
parsed_info = self.parser.parse_open_order_history(
|
392
|
+
response=response, start=start, end=end, base_market=base_market
|
393
|
+
)
|
364
394
|
|
365
395
|
return ksxt.models.KsxtOpenOrderResponse(header=common_header, response=common_response, info=parsed_info)
|
366
396
|
|
367
397
|
async def fetch_withdrawal_history(
|
368
|
-
self, acc_num: str, base_market: str = "KRW"
|
398
|
+
self, acc_num: str, start: datetime | None = None, end: datetime | None = None, base_market: str = "KRW"
|
369
399
|
) -> ksxt.models.KsxtWithdrawalHistoryResponse:
|
370
400
|
params = {"currency": base_market, "state": "DONE"}
|
371
401
|
|
@@ -377,14 +407,17 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
377
407
|
if common_response.success != "0":
|
378
408
|
return ksxt.models.KsxtWithdrawalHistoryResponse(header=common_header, response=common_response, info=None)
|
379
409
|
|
380
|
-
|
410
|
+
# 데이터 파싱
|
411
|
+
parsed_info = self.parser.parse_withdrawal_history(
|
412
|
+
response=response, start=start, end=end, base_market=base_market
|
413
|
+
)
|
381
414
|
|
382
415
|
return ksxt.models.KsxtWithdrawalHistoryResponse(
|
383
416
|
header=common_header, response=common_response, info=parsed_info
|
384
417
|
)
|
385
418
|
|
386
419
|
async def fetch_deposit_history(
|
387
|
-
self, acc_num: str, base_market: str = "KRW"
|
420
|
+
self, acc_num: str, start: datetime | None = None, end: datetime | None = None, base_market: str = "KRW"
|
388
421
|
) -> ksxt.models.KsxtDepositHistoryResponse:
|
389
422
|
params = {"currency": base_market, "state": "ACCEPTED"}
|
390
423
|
|
@@ -396,7 +429,10 @@ class Upbit(AsyncExchange, ImplicitAPI):
|
|
396
429
|
if common_response.success != "0":
|
397
430
|
return ksxt.models.KsxtDepositHistoryResponse(header=common_header, response=common_response, info=None)
|
398
431
|
|
399
|
-
|
432
|
+
# 데이터 파싱
|
433
|
+
parsed_info = self.parser.parse_deposit_history(
|
434
|
+
response=response, start=start, end=end, base_market=base_market
|
435
|
+
)
|
400
436
|
|
401
437
|
return ksxt.models.KsxtDepositHistoryResponse(header=common_header, response=common_response, info=parsed_info)
|
402
438
|
|
Binary file
|
Binary file
|