ccxt 4.4.21__py2.py3-none-any.whl → 4.4.23__py2.py3-none-any.whl
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.
- ccxt/__init__.py +3 -1
- ccxt/abstract/binance.py +64 -43
- ccxt/abstract/binancecoinm.py +64 -43
- ccxt/abstract/binanceus.py +64 -43
- ccxt/abstract/binanceusdm.py +64 -43
- ccxt/abstract/bitflyer.py +1 -0
- ccxt/abstract/bitget.py +3 -0
- ccxt/abstract/cex.py +28 -29
- ccxt/abstract/coincatch.py +94 -0
- ccxt/abstract/gate.py +5 -0
- ccxt/abstract/gateio.py +5 -0
- ccxt/abstract/kucoin.py +1 -0
- ccxt/abstract/kucoinfutures.py +1 -0
- ccxt/abstract/okx.py +1 -0
- ccxt/alpaca.py +1 -0
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/alpaca.py +1 -0
- ccxt/async_support/base/exchange.py +7 -1
- ccxt/async_support/bigone.py +3 -0
- ccxt/async_support/binance.py +183 -63
- ccxt/async_support/bitfinex.py +4 -0
- ccxt/async_support/bitflyer.py +57 -1
- ccxt/async_support/bitget.py +73 -1
- ccxt/async_support/bitrue.py +3 -0
- ccxt/async_support/bybit.py +76 -3
- ccxt/async_support/cex.py +1247 -1322
- ccxt/async_support/coinbase.py +1 -1
- ccxt/async_support/coinbaseexchange.py +3 -0
- ccxt/async_support/coincatch.py +4955 -0
- ccxt/async_support/coinex.py +60 -1
- ccxt/async_support/cryptocom.py +1 -1
- ccxt/async_support/gate.py +97 -2
- ccxt/async_support/htx.py +1 -5
- ccxt/async_support/hyperliquid.py +10 -8
- ccxt/async_support/kucoin.py +27 -57
- ccxt/async_support/latoken.py +6 -0
- ccxt/async_support/mexc.py +1 -1
- ccxt/async_support/oceanex.py +2 -0
- ccxt/async_support/okcoin.py +1 -0
- ccxt/async_support/okx.py +67 -1
- ccxt/async_support/poloniex.py +5 -0
- ccxt/base/exchange.py +21 -1
- ccxt/base/types.py +9 -0
- ccxt/bigone.py +3 -0
- ccxt/binance.py +183 -63
- ccxt/bitfinex.py +4 -0
- ccxt/bitflyer.py +57 -1
- ccxt/bitget.py +73 -1
- ccxt/bitrue.py +3 -0
- ccxt/bybit.py +76 -3
- ccxt/cex.py +1246 -1322
- ccxt/coinbase.py +1 -1
- ccxt/coinbaseexchange.py +3 -0
- ccxt/coincatch.py +4955 -0
- ccxt/coinex.py +60 -1
- ccxt/cryptocom.py +1 -1
- ccxt/gate.py +97 -2
- ccxt/htx.py +1 -5
- ccxt/hyperliquid.py +10 -8
- ccxt/kucoin.py +27 -57
- ccxt/latoken.py +6 -0
- ccxt/mexc.py +1 -1
- ccxt/oceanex.py +2 -0
- ccxt/okcoin.py +1 -0
- ccxt/okx.py +67 -1
- ccxt/poloniex.py +5 -0
- ccxt/pro/__init__.py +3 -1
- ccxt/pro/coincatch.py +1429 -0
- ccxt/test/tests_async.py +19 -5
- ccxt/test/tests_sync.py +19 -5
- ccxt-4.4.23.dist-info/METADATA +636 -0
- {ccxt-4.4.21.dist-info → ccxt-4.4.23.dist-info}/RECORD +75 -71
- ccxt-4.4.21.dist-info/METADATA +0 -635
- {ccxt-4.4.21.dist-info → ccxt-4.4.23.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.21.dist-info → ccxt-4.4.23.dist-info}/WHEEL +0 -0
- {ccxt-4.4.21.dist-info → ccxt-4.4.23.dist-info}/top_level.txt +0 -0
ccxt/test/tests_async.py
CHANGED
@@ -31,9 +31,9 @@ class testMainClass:
|
|
31
31
|
proxy_test_file_name = 'proxies'
|
32
32
|
|
33
33
|
def parse_cli_args_and_props(self):
|
34
|
-
self.response_tests = get_cli_arg_value('--responseTests')
|
34
|
+
self.response_tests = get_cli_arg_value('--responseTests') or get_cli_arg_value('--response')
|
35
35
|
self.id_tests = get_cli_arg_value('--idTests')
|
36
|
-
self.request_tests = get_cli_arg_value('--requestTests')
|
36
|
+
self.request_tests = get_cli_arg_value('--requestTests') or get_cli_arg_value('--request')
|
37
37
|
self.info = get_cli_arg_value('--info')
|
38
38
|
self.verbose = get_cli_arg_value('--verbose')
|
39
39
|
self.debug = get_cli_arg_value('--debug')
|
@@ -858,7 +858,7 @@ class testMainClass:
|
|
858
858
|
self.assert_static_request_output(exchange, type, skip_keys, data['url'], request_url, call_output, output)
|
859
859
|
except Exception as e:
|
860
860
|
self.request_tests_failed = True
|
861
|
-
error_message = '[' + self.lang + '][
|
861
|
+
error_message = '[' + self.lang + '][STATIC_REQUEST]' + '[' + exchange.id + ']' + '[' + method + ']' + '[' + data['description'] + ']' + str(e)
|
862
862
|
dump('[TEST_FAILURE]' + error_message)
|
863
863
|
|
864
864
|
async def test_response_statically(self, exchange, method, skip_keys, data):
|
@@ -873,7 +873,7 @@ class testMainClass:
|
|
873
873
|
self.assert_static_response_output(mocked_exchange, skip_keys, unified_result_sync, expected_result)
|
874
874
|
except Exception as e:
|
875
875
|
self.response_tests_failed = True
|
876
|
-
error_message = '[' + self.lang + '][
|
876
|
+
error_message = '[' + self.lang + '][STATIC_RESPONSE]' + '[' + exchange.id + ']' + '[' + method + ']' + '[' + data['description'] + ']' + str(e)
|
877
877
|
dump('[TEST_FAILURE]' + error_message)
|
878
878
|
set_fetch_response(exchange, None) # reset state
|
879
879
|
|
@@ -1071,7 +1071,7 @@ class testMainClass:
|
|
1071
1071
|
# -----------------------------------------------------------------------------
|
1072
1072
|
# --- Init of brokerId tests functions-----------------------------------------
|
1073
1073
|
# -----------------------------------------------------------------------------
|
1074
|
-
promises = [self.test_binance(), self.test_okx(), self.test_cryptocom(), self.test_bybit(), self.test_kucoin(), self.test_kucoinfutures(), self.test_bitget(), self.test_mexc(), self.test_htx(), self.test_woo(), self.test_bitmart(), self.test_coinex(), self.test_bingx(), self.test_phemex(), self.test_blofin(), self.test_hyperliquid(), self.test_coinbaseinternational(), self.test_coinbase_advanced(), self.test_woofi_pro(), self.test_oxfun(), self.test_xt(), self.test_vertex(), self.test_paradex(), self.test_hashkey()]
|
1074
|
+
promises = [self.test_binance(), self.test_okx(), self.test_cryptocom(), self.test_bybit(), self.test_kucoin(), self.test_kucoinfutures(), self.test_bitget(), self.test_mexc(), self.test_htx(), self.test_woo(), self.test_bitmart(), self.test_coinex(), self.test_bingx(), self.test_phemex(), self.test_blofin(), self.test_hyperliquid(), self.test_coinbaseinternational(), self.test_coinbase_advanced(), self.test_woofi_pro(), self.test_oxfun(), self.test_xt(), self.test_vertex(), self.test_paradex(), self.test_hashkey(), self.test_coincatch()]
|
1075
1075
|
await asyncio.gather(*promises)
|
1076
1076
|
success_message = '[' + self.lang + '][TEST_SUCCESS] brokerId tests passed.'
|
1077
1077
|
dump('[INFO]' + success_message)
|
@@ -1533,3 +1533,17 @@ class testMainClass:
|
|
1533
1533
|
if not is_sync():
|
1534
1534
|
await close(exchange)
|
1535
1535
|
return True
|
1536
|
+
|
1537
|
+
async def test_coincatch(self):
|
1538
|
+
exchange = self.init_offline_exchange('coincatch')
|
1539
|
+
req_headers = None
|
1540
|
+
id = '47cfy'
|
1541
|
+
try:
|
1542
|
+
await exchange.create_order('BTC/USDT', 'limit', 'buy', 1, 20000)
|
1543
|
+
except Exception as e:
|
1544
|
+
# we expect an error here, we're only interested in the headers
|
1545
|
+
req_headers = exchange.last_request_headers
|
1546
|
+
assert req_headers['X-CHANNEL-API-CODE'] == id, 'coincatch - id: ' + id + ' not in headers.'
|
1547
|
+
if not is_sync():
|
1548
|
+
await close(exchange)
|
1549
|
+
return True
|
ccxt/test/tests_sync.py
CHANGED
@@ -28,9 +28,9 @@ class testMainClass:
|
|
28
28
|
proxy_test_file_name = 'proxies'
|
29
29
|
|
30
30
|
def parse_cli_args_and_props(self):
|
31
|
-
self.response_tests = get_cli_arg_value('--responseTests')
|
31
|
+
self.response_tests = get_cli_arg_value('--responseTests') or get_cli_arg_value('--response')
|
32
32
|
self.id_tests = get_cli_arg_value('--idTests')
|
33
|
-
self.request_tests = get_cli_arg_value('--requestTests')
|
33
|
+
self.request_tests = get_cli_arg_value('--requestTests') or get_cli_arg_value('--request')
|
34
34
|
self.info = get_cli_arg_value('--info')
|
35
35
|
self.verbose = get_cli_arg_value('--verbose')
|
36
36
|
self.debug = get_cli_arg_value('--debug')
|
@@ -855,7 +855,7 @@ class testMainClass:
|
|
855
855
|
self.assert_static_request_output(exchange, type, skip_keys, data['url'], request_url, call_output, output)
|
856
856
|
except Exception as e:
|
857
857
|
self.request_tests_failed = True
|
858
|
-
error_message = '[' + self.lang + '][
|
858
|
+
error_message = '[' + self.lang + '][STATIC_REQUEST]' + '[' + exchange.id + ']' + '[' + method + ']' + '[' + data['description'] + ']' + str(e)
|
859
859
|
dump('[TEST_FAILURE]' + error_message)
|
860
860
|
|
861
861
|
def test_response_statically(self, exchange, method, skip_keys, data):
|
@@ -870,7 +870,7 @@ class testMainClass:
|
|
870
870
|
self.assert_static_response_output(mocked_exchange, skip_keys, unified_result_sync, expected_result)
|
871
871
|
except Exception as e:
|
872
872
|
self.response_tests_failed = True
|
873
|
-
error_message = '[' + self.lang + '][
|
873
|
+
error_message = '[' + self.lang + '][STATIC_RESPONSE]' + '[' + exchange.id + ']' + '[' + method + ']' + '[' + data['description'] + ']' + str(e)
|
874
874
|
dump('[TEST_FAILURE]' + error_message)
|
875
875
|
set_fetch_response(exchange, None) # reset state
|
876
876
|
|
@@ -1068,7 +1068,7 @@ class testMainClass:
|
|
1068
1068
|
# -----------------------------------------------------------------------------
|
1069
1069
|
# --- Init of brokerId tests functions-----------------------------------------
|
1070
1070
|
# -----------------------------------------------------------------------------
|
1071
|
-
promises = [self.test_binance(), self.test_okx(), self.test_cryptocom(), self.test_bybit(), self.test_kucoin(), self.test_kucoinfutures(), self.test_bitget(), self.test_mexc(), self.test_htx(), self.test_woo(), self.test_bitmart(), self.test_coinex(), self.test_bingx(), self.test_phemex(), self.test_blofin(), self.test_hyperliquid(), self.test_coinbaseinternational(), self.test_coinbase_advanced(), self.test_woofi_pro(), self.test_oxfun(), self.test_xt(), self.test_vertex(), self.test_paradex(), self.test_hashkey()]
|
1071
|
+
promises = [self.test_binance(), self.test_okx(), self.test_cryptocom(), self.test_bybit(), self.test_kucoin(), self.test_kucoinfutures(), self.test_bitget(), self.test_mexc(), self.test_htx(), self.test_woo(), self.test_bitmart(), self.test_coinex(), self.test_bingx(), self.test_phemex(), self.test_blofin(), self.test_hyperliquid(), self.test_coinbaseinternational(), self.test_coinbase_advanced(), self.test_woofi_pro(), self.test_oxfun(), self.test_xt(), self.test_vertex(), self.test_paradex(), self.test_hashkey(), self.test_coincatch()]
|
1072
1072
|
(promises)
|
1073
1073
|
success_message = '[' + self.lang + '][TEST_SUCCESS] brokerId tests passed.'
|
1074
1074
|
dump('[INFO]' + success_message)
|
@@ -1530,3 +1530,17 @@ class testMainClass:
|
|
1530
1530
|
if not is_sync():
|
1531
1531
|
close(exchange)
|
1532
1532
|
return True
|
1533
|
+
|
1534
|
+
def test_coincatch(self):
|
1535
|
+
exchange = self.init_offline_exchange('coincatch')
|
1536
|
+
req_headers = None
|
1537
|
+
id = '47cfy'
|
1538
|
+
try:
|
1539
|
+
exchange.create_order('BTC/USDT', 'limit', 'buy', 1, 20000)
|
1540
|
+
except Exception as e:
|
1541
|
+
# we expect an error here, we're only interested in the headers
|
1542
|
+
req_headers = exchange.last_request_headers
|
1543
|
+
assert req_headers['X-CHANNEL-API-CODE'] == id, 'coincatch - id: ' + id + ' not in headers.'
|
1544
|
+
if not is_sync():
|
1545
|
+
close(exchange)
|
1546
|
+
return True
|