ccxt 4.4.97__py2.py3-none-any.whl → 4.4.98__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 +2 -1
- ccxt/async_support/__init__.py +2 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bitget.py +14 -2
- ccxt/async_support/coinmetro.py +2 -3
- ccxt/async_support/cryptocom.py +1 -0
- ccxt/async_support/ndax.py +8 -0
- ccxt/async_support/okx.py +2 -0
- ccxt/base/decimal_to_precision.py +7 -9
- ccxt/base/errors.py +6 -0
- ccxt/base/exchange.py +1 -1
- ccxt/bitget.py +14 -2
- ccxt/coinmetro.py +2 -3
- ccxt/cryptocom.py +1 -0
- ccxt/ndax.py +8 -0
- ccxt/okx.py +2 -0
- ccxt/pro/__init__.py +2 -1
- {ccxt-4.4.97.dist-info → ccxt-4.4.98.dist-info}/METADATA +4 -4
- {ccxt-4.4.97.dist-info → ccxt-4.4.98.dist-info}/RECORD +22 -22
- {ccxt-4.4.97.dist-info → ccxt-4.4.98.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.97.dist-info → ccxt-4.4.98.dist-info}/WHEEL +0 -0
- {ccxt-4.4.97.dist-info → ccxt-4.4.98.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.4.
|
25
|
+
__version__ = '4.4.98'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -55,6 +55,7 @@ from ccxt.base.errors import NoChange # noqa: F4
|
|
55
55
|
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
|
56
56
|
from ccxt.base.errors import MarketClosed # noqa: F401
|
57
57
|
from ccxt.base.errors import ManualInteractionNeeded # noqa: F401
|
58
|
+
from ccxt.base.errors import RestrictedLocation # noqa: F401
|
58
59
|
from ccxt.base.errors import InsufficientFunds # noqa: F401
|
59
60
|
from ccxt.base.errors import InvalidAddress # noqa: F401
|
60
61
|
from ccxt.base.errors import AddressPending # noqa: F401
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.98'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -34,6 +34,7 @@ from ccxt.base.errors import NoChange # noqa: F4
|
|
34
34
|
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
|
35
35
|
from ccxt.base.errors import MarketClosed # noqa: F401
|
36
36
|
from ccxt.base.errors import ManualInteractionNeeded # noqa: F401
|
37
|
+
from ccxt.base.errors import RestrictedLocation # noqa: F401
|
37
38
|
from ccxt.base.errors import InsufficientFunds # noqa: F401
|
38
39
|
from ccxt.base.errors import InvalidAddress # noqa: F401
|
39
40
|
from ccxt.base.errors import AddressPending # noqa: F401
|
ccxt/async_support/bitget.py
CHANGED
@@ -3817,6 +3817,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
3817
3817
|
if historicalEndpointNeeded:
|
3818
3818
|
response = await self.publicSpotGetV2SpotMarketHistoryCandles(self.extend(request, params))
|
3819
3819
|
else:
|
3820
|
+
if not limitDefined:
|
3821
|
+
request['limit'] = 1000
|
3822
|
+
limit = 1000
|
3820
3823
|
response = await self.publicSpotGetV2SpotMarketCandles(self.extend(request, params))
|
3821
3824
|
else:
|
3822
3825
|
priceType = None
|
@@ -3825,8 +3828,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
3825
3828
|
productType, params = self.handle_product_type_and_params(market, params)
|
3826
3829
|
request['productType'] = productType
|
3827
3830
|
extended = self.extend(request, params)
|
3828
|
-
|
3829
|
-
|
3831
|
+
if not historicalEndpointNeeded and (priceType == 'mark' or priceType == 'index'):
|
3832
|
+
if not limitDefined:
|
3833
|
+
extended['limit'] = 1000
|
3834
|
+
limit = 1000
|
3835
|
+
# Recent endpoint for mark/index prices
|
3836
|
+
# https://www.bitget.com/api-doc/contract/market/Get-Candle-Data
|
3837
|
+
response = await self.publicMixGetV2MixMarketCandles(self.extend({'kLineType': priceType}, extended))
|
3838
|
+
elif priceType == 'mark':
|
3830
3839
|
response = await self.publicMixGetV2MixMarketHistoryMarkCandles(extended)
|
3831
3840
|
elif priceType == 'index':
|
3832
3841
|
response = await self.publicMixGetV2MixMarketHistoryIndexCandles(extended)
|
@@ -3834,6 +3843,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
3834
3843
|
if historicalEndpointNeeded:
|
3835
3844
|
response = await self.publicMixGetV2MixMarketHistoryCandles(extended)
|
3836
3845
|
else:
|
3846
|
+
if not limitDefined:
|
3847
|
+
extended['limit'] = 1000
|
3848
|
+
limit = 1000
|
3837
3849
|
response = await self.publicMixGetV2MixMarketCandles(extended)
|
3838
3850
|
if response == '':
|
3839
3851
|
return [] # happens when a new token is listed
|
ccxt/async_support/coinmetro.py
CHANGED
@@ -221,7 +221,6 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
221
221
|
'options': {
|
222
222
|
'currenciesByIdForParseMarket': None,
|
223
223
|
'currencyIdsListForParseMarket': ['QRDO'],
|
224
|
-
'skippedMarkets': ['VXVUSDT'], # broken markets which do not have enough info in API
|
225
224
|
},
|
226
225
|
'features': {
|
227
226
|
'spot': {
|
@@ -462,11 +461,11 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
462
461
|
# ...
|
463
462
|
# ]
|
464
463
|
#
|
465
|
-
skippedMarkets = self.safe_list(self.options, 'skippedMarkets', [])
|
466
464
|
result = []
|
467
465
|
for i in range(0, len(response)):
|
468
466
|
market = self.parse_market(response[i])
|
469
|
-
|
467
|
+
# there are several broken(unavailable info) markets
|
468
|
+
if market['base'] is None or market['quote'] is None:
|
470
469
|
continue
|
471
470
|
result.append(market)
|
472
471
|
return result
|
ccxt/async_support/cryptocom.py
CHANGED
@@ -481,6 +481,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
481
481
|
'exceptions': {
|
482
482
|
'exact': {
|
483
483
|
'219': InvalidOrder,
|
484
|
+
'306': InsufficientFunds, # {"id" : 1753xxx, "method" : "private/amend-order", "code" : 306, "message" : "INSUFFICIENT_AVAILABLE_BALANCE", "result" : {"client_oid" : "1753xxx", "order_id" : "6530xxx"}}
|
484
485
|
'314': InvalidOrder, # {"id" : 1700xxx, "method" : "private/create-order", "code" : 314, "message" : "EXCEEDS_MAX_ORDER_SIZE", "result" : {"client_oid" : "1700xxx", "order_id" : "6530xxx"}}
|
485
486
|
'325': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 325, "message" : "EXCEED_DAILY_VOL_LIMIT", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
486
487
|
'415': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 415, "message" : "BELOW_MIN_ORDER_SIZE", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
ccxt/async_support/ndax.py
CHANGED
@@ -35,6 +35,9 @@ class ndax(Exchange, ImplicitAPI):
|
|
35
35
|
'future': False,
|
36
36
|
'option': False,
|
37
37
|
'addMargin': False,
|
38
|
+
'borrowCrossMargin': False,
|
39
|
+
'borrowIsolatedMargin': False,
|
40
|
+
'borrowMargin': False,
|
38
41
|
'cancelAllOrders': True,
|
39
42
|
'cancelOrder': True,
|
40
43
|
'closeAllPositions': False,
|
@@ -47,6 +50,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
47
50
|
'createStopOrder': True,
|
48
51
|
'editOrder': True,
|
49
52
|
'fetchAccounts': True,
|
53
|
+
'fetchAllGreeks': False,
|
50
54
|
'fetchBalance': True,
|
51
55
|
'fetchBorrowInterest': False,
|
52
56
|
'fetchBorrowRate': False,
|
@@ -77,12 +81,15 @@ class ndax(Exchange, ImplicitAPI):
|
|
77
81
|
'fetchLeverages': False,
|
78
82
|
'fetchLeverageTiers': False,
|
79
83
|
'fetchLiquidations': False,
|
84
|
+
'fetchLongShortRatio': False,
|
85
|
+
'fetchLongShortRatioHistory': False,
|
80
86
|
'fetchMarginAdjustmentHistory': False,
|
81
87
|
'fetchMarginMode': False,
|
82
88
|
'fetchMarginModes': False,
|
83
89
|
'fetchMarketLeverageTiers': False,
|
84
90
|
'fetchMarkets': True,
|
85
91
|
'fetchMarkOHLCV': False,
|
92
|
+
'fetchMarkPrice': False,
|
86
93
|
'fetchMarkPrices': False,
|
87
94
|
'fetchMyLiquidations': False,
|
88
95
|
'fetchMySettlementHistory': False,
|
@@ -90,6 +97,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
90
97
|
'fetchOHLCV': True,
|
91
98
|
'fetchOpenInterest': False,
|
92
99
|
'fetchOpenInterestHistory': False,
|
100
|
+
'fetchOpenInterests': False,
|
93
101
|
'fetchOpenOrders': True,
|
94
102
|
'fetchOption': False,
|
95
103
|
'fetchOptionChain': False,
|
ccxt/async_support/okx.py
CHANGED
@@ -19,6 +19,7 @@ from ccxt.base.errors import BadRequest
|
|
19
19
|
from ccxt.base.errors import BadSymbol
|
20
20
|
from ccxt.base.errors import OperationRejected
|
21
21
|
from ccxt.base.errors import ManualInteractionNeeded
|
22
|
+
from ccxt.base.errors import RestrictedLocation
|
22
23
|
from ccxt.base.errors import InsufficientFunds
|
23
24
|
from ccxt.base.errors import InvalidAddress
|
24
25
|
from ccxt.base.errors import InvalidOrder
|
@@ -762,6 +763,7 @@ class okx(Exchange, ImplicitAPI):
|
|
762
763
|
'51137': InvalidOrder, # Your opening price has triggered the limit price, and the max buy price is {0}
|
763
764
|
'51138': InvalidOrder, # Your opening price has triggered the limit price, and the min sell price is {0}
|
764
765
|
'51139': InvalidOrder, # Reduce-only feature is unavailable for the spot transactions by simple account
|
766
|
+
'51155': RestrictedLocation, # {"code":"1","data":[{"clOrdId":"e847xxx","ordId":"","sCode":"51155","sMsg":"You can't trade self pair or borrow self crypto due to local compliance restrictions. ","tag":"e847xxx","ts":"1753979177157"}],"inTime":"1753979177157408","msg":"All operations failed","outTime":"1753979177157874"}
|
765
767
|
'51156': BadRequest, # You're leading trades in long/short mode and can't use self API endpoint to close positions
|
766
768
|
'51159': BadRequest, # You're leading trades in buy/sell mode. If you want to place orders using self API endpoint, the orders must be in the same direction existing positions and open orders.
|
767
769
|
'51162': InvalidOrder, # You have {instrument} open orders. Cancel these orders and try again
|
@@ -33,25 +33,23 @@ NO_PADDING = 5
|
|
33
33
|
PAD_WITH_ZERO = 6
|
34
34
|
|
35
35
|
|
36
|
-
def decimal_to_precision(n, rounding_mode=ROUND,
|
37
|
-
assert
|
36
|
+
def decimal_to_precision(n, rounding_mode=ROUND, precision=None, counting_mode=DECIMAL_PLACES, padding_mode=NO_PADDING):
|
37
|
+
assert precision is not None, 'precision should not be None'
|
38
38
|
|
39
|
-
if isinstance(
|
40
|
-
|
41
|
-
assert isinstance(
|
39
|
+
if isinstance(precision, str):
|
40
|
+
precision = float(precision)
|
41
|
+
assert isinstance(precision, float) or isinstance(precision, decimal.Decimal) or isinstance(precision, numbers.Integral), 'precision has an invalid number'
|
42
42
|
|
43
43
|
if counting_mode == TICK_SIZE:
|
44
|
-
assert
|
44
|
+
assert precision > 0, 'negative or zero precision can not be used with TICK_SIZE precisionMode'
|
45
45
|
else:
|
46
|
-
assert isinstance(
|
46
|
+
assert isinstance(precision, numbers.Integral)
|
47
47
|
|
48
48
|
assert rounding_mode in [TRUNCATE, ROUND]
|
49
49
|
assert counting_mode in [DECIMAL_PLACES, SIGNIFICANT_DIGITS, TICK_SIZE]
|
50
50
|
assert padding_mode in [NO_PADDING, PAD_WITH_ZERO]
|
51
51
|
# end of checks
|
52
52
|
|
53
|
-
precision = numPrecisionDigits # "precision" variable name was in signature, but to make function signature similar to php/js, I had to change the argument name to "numPrecisionDigits". however, the below codes use "precision" variable name, so we have to assign that name here (you can change the usage of 'precision' variable name below everywhere, but i've refrained to do that to avoid many changes)
|
54
|
-
|
55
53
|
context = decimal.getcontext()
|
56
54
|
|
57
55
|
if counting_mode != TICK_SIZE:
|
ccxt/base/errors.py
CHANGED
@@ -23,6 +23,7 @@ error_hierarchy = {
|
|
23
23
|
},
|
24
24
|
'MarketClosed': {},
|
25
25
|
'ManualInteractionNeeded': {},
|
26
|
+
'RestrictedLocation': {},
|
26
27
|
},
|
27
28
|
'InsufficientFunds': {},
|
28
29
|
'InvalidAddress': {
|
@@ -118,6 +119,10 @@ class ManualInteractionNeeded(OperationRejected):
|
|
118
119
|
pass
|
119
120
|
|
120
121
|
|
122
|
+
class RestrictedLocation(OperationRejected):
|
123
|
+
pass
|
124
|
+
|
125
|
+
|
121
126
|
class InsufficientFunds(ExchangeError):
|
122
127
|
pass
|
123
128
|
|
@@ -238,6 +243,7 @@ __all__ = [
|
|
238
243
|
'MarginModeAlreadySet',
|
239
244
|
'MarketClosed',
|
240
245
|
'ManualInteractionNeeded',
|
246
|
+
'RestrictedLocation',
|
241
247
|
'InsufficientFunds',
|
242
248
|
'InvalidAddress',
|
243
249
|
'AddressPending',
|
ccxt/base/exchange.py
CHANGED
ccxt/bitget.py
CHANGED
@@ -3816,6 +3816,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
3816
3816
|
if historicalEndpointNeeded:
|
3817
3817
|
response = self.publicSpotGetV2SpotMarketHistoryCandles(self.extend(request, params))
|
3818
3818
|
else:
|
3819
|
+
if not limitDefined:
|
3820
|
+
request['limit'] = 1000
|
3821
|
+
limit = 1000
|
3819
3822
|
response = self.publicSpotGetV2SpotMarketCandles(self.extend(request, params))
|
3820
3823
|
else:
|
3821
3824
|
priceType = None
|
@@ -3824,8 +3827,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
3824
3827
|
productType, params = self.handle_product_type_and_params(market, params)
|
3825
3828
|
request['productType'] = productType
|
3826
3829
|
extended = self.extend(request, params)
|
3827
|
-
|
3828
|
-
|
3830
|
+
if not historicalEndpointNeeded and (priceType == 'mark' or priceType == 'index'):
|
3831
|
+
if not limitDefined:
|
3832
|
+
extended['limit'] = 1000
|
3833
|
+
limit = 1000
|
3834
|
+
# Recent endpoint for mark/index prices
|
3835
|
+
# https://www.bitget.com/api-doc/contract/market/Get-Candle-Data
|
3836
|
+
response = self.publicMixGetV2MixMarketCandles(self.extend({'kLineType': priceType}, extended))
|
3837
|
+
elif priceType == 'mark':
|
3829
3838
|
response = self.publicMixGetV2MixMarketHistoryMarkCandles(extended)
|
3830
3839
|
elif priceType == 'index':
|
3831
3840
|
response = self.publicMixGetV2MixMarketHistoryIndexCandles(extended)
|
@@ -3833,6 +3842,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
3833
3842
|
if historicalEndpointNeeded:
|
3834
3843
|
response = self.publicMixGetV2MixMarketHistoryCandles(extended)
|
3835
3844
|
else:
|
3845
|
+
if not limitDefined:
|
3846
|
+
extended['limit'] = 1000
|
3847
|
+
limit = 1000
|
3836
3848
|
response = self.publicMixGetV2MixMarketCandles(extended)
|
3837
3849
|
if response == '':
|
3838
3850
|
return [] # happens when a new token is listed
|
ccxt/coinmetro.py
CHANGED
@@ -220,7 +220,6 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
220
220
|
'options': {
|
221
221
|
'currenciesByIdForParseMarket': None,
|
222
222
|
'currencyIdsListForParseMarket': ['QRDO'],
|
223
|
-
'skippedMarkets': ['VXVUSDT'], # broken markets which do not have enough info in API
|
224
223
|
},
|
225
224
|
'features': {
|
226
225
|
'spot': {
|
@@ -461,11 +460,11 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
461
460
|
# ...
|
462
461
|
# ]
|
463
462
|
#
|
464
|
-
skippedMarkets = self.safe_list(self.options, 'skippedMarkets', [])
|
465
463
|
result = []
|
466
464
|
for i in range(0, len(response)):
|
467
465
|
market = self.parse_market(response[i])
|
468
|
-
|
466
|
+
# there are several broken(unavailable info) markets
|
467
|
+
if market['base'] is None or market['quote'] is None:
|
469
468
|
continue
|
470
469
|
result.append(market)
|
471
470
|
return result
|
ccxt/cryptocom.py
CHANGED
@@ -481,6 +481,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
481
481
|
'exceptions': {
|
482
482
|
'exact': {
|
483
483
|
'219': InvalidOrder,
|
484
|
+
'306': InsufficientFunds, # {"id" : 1753xxx, "method" : "private/amend-order", "code" : 306, "message" : "INSUFFICIENT_AVAILABLE_BALANCE", "result" : {"client_oid" : "1753xxx", "order_id" : "6530xxx"}}
|
484
485
|
'314': InvalidOrder, # {"id" : 1700xxx, "method" : "private/create-order", "code" : 314, "message" : "EXCEEDS_MAX_ORDER_SIZE", "result" : {"client_oid" : "1700xxx", "order_id" : "6530xxx"}}
|
485
486
|
'325': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 325, "message" : "EXCEED_DAILY_VOL_LIMIT", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
486
487
|
'415': InvalidOrder, # {"id" : 1741xxx, "method" : "private/create-order", "code" : 415, "message" : "BELOW_MIN_ORDER_SIZE", "result" : {"client_oid" : "1741xxx", "order_id" : "6530xxx"}}
|
ccxt/ndax.py
CHANGED
@@ -35,6 +35,9 @@ class ndax(Exchange, ImplicitAPI):
|
|
35
35
|
'future': False,
|
36
36
|
'option': False,
|
37
37
|
'addMargin': False,
|
38
|
+
'borrowCrossMargin': False,
|
39
|
+
'borrowIsolatedMargin': False,
|
40
|
+
'borrowMargin': False,
|
38
41
|
'cancelAllOrders': True,
|
39
42
|
'cancelOrder': True,
|
40
43
|
'closeAllPositions': False,
|
@@ -47,6 +50,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
47
50
|
'createStopOrder': True,
|
48
51
|
'editOrder': True,
|
49
52
|
'fetchAccounts': True,
|
53
|
+
'fetchAllGreeks': False,
|
50
54
|
'fetchBalance': True,
|
51
55
|
'fetchBorrowInterest': False,
|
52
56
|
'fetchBorrowRate': False,
|
@@ -77,12 +81,15 @@ class ndax(Exchange, ImplicitAPI):
|
|
77
81
|
'fetchLeverages': False,
|
78
82
|
'fetchLeverageTiers': False,
|
79
83
|
'fetchLiquidations': False,
|
84
|
+
'fetchLongShortRatio': False,
|
85
|
+
'fetchLongShortRatioHistory': False,
|
80
86
|
'fetchMarginAdjustmentHistory': False,
|
81
87
|
'fetchMarginMode': False,
|
82
88
|
'fetchMarginModes': False,
|
83
89
|
'fetchMarketLeverageTiers': False,
|
84
90
|
'fetchMarkets': True,
|
85
91
|
'fetchMarkOHLCV': False,
|
92
|
+
'fetchMarkPrice': False,
|
86
93
|
'fetchMarkPrices': False,
|
87
94
|
'fetchMyLiquidations': False,
|
88
95
|
'fetchMySettlementHistory': False,
|
@@ -90,6 +97,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
90
97
|
'fetchOHLCV': True,
|
91
98
|
'fetchOpenInterest': False,
|
92
99
|
'fetchOpenInterestHistory': False,
|
100
|
+
'fetchOpenInterests': False,
|
93
101
|
'fetchOpenOrders': True,
|
94
102
|
'fetchOption': False,
|
95
103
|
'fetchOptionChain': False,
|
ccxt/okx.py
CHANGED
@@ -18,6 +18,7 @@ from ccxt.base.errors import BadRequest
|
|
18
18
|
from ccxt.base.errors import BadSymbol
|
19
19
|
from ccxt.base.errors import OperationRejected
|
20
20
|
from ccxt.base.errors import ManualInteractionNeeded
|
21
|
+
from ccxt.base.errors import RestrictedLocation
|
21
22
|
from ccxt.base.errors import InsufficientFunds
|
22
23
|
from ccxt.base.errors import InvalidAddress
|
23
24
|
from ccxt.base.errors import InvalidOrder
|
@@ -761,6 +762,7 @@ class okx(Exchange, ImplicitAPI):
|
|
761
762
|
'51137': InvalidOrder, # Your opening price has triggered the limit price, and the max buy price is {0}
|
762
763
|
'51138': InvalidOrder, # Your opening price has triggered the limit price, and the min sell price is {0}
|
763
764
|
'51139': InvalidOrder, # Reduce-only feature is unavailable for the spot transactions by simple account
|
765
|
+
'51155': RestrictedLocation, # {"code":"1","data":[{"clOrdId":"e847xxx","ordId":"","sCode":"51155","sMsg":"You can't trade self pair or borrow self crypto due to local compliance restrictions. ","tag":"e847xxx","ts":"1753979177157"}],"inTime":"1753979177157408","msg":"All operations failed","outTime":"1753979177157874"}
|
764
766
|
'51156': BadRequest, # You're leading trades in long/short mode and can't use self API endpoint to close positions
|
765
767
|
'51159': BadRequest, # You're leading trades in buy/sell mode. If you want to place orders using self API endpoint, the orders must be in the same direction existing positions and open orders.
|
766
768
|
'51162': InvalidOrder, # You have {instrument} open orders. Cancel these orders and try again
|
ccxt/pro/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# ----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.98'
|
8
8
|
|
9
9
|
# ----------------------------------------------------------------------------
|
10
10
|
|
@@ -27,6 +27,7 @@ from ccxt.base.errors import NoChange # noqa: F4
|
|
27
27
|
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
|
28
28
|
from ccxt.base.errors import MarketClosed # noqa: F401
|
29
29
|
from ccxt.base.errors import ManualInteractionNeeded # noqa: F401
|
30
|
+
from ccxt.base.errors import RestrictedLocation # noqa: F401
|
30
31
|
from ccxt.base.errors import InsufficientFunds # noqa: F401
|
31
32
|
from ccxt.base.errors import InvalidAddress # noqa: F401
|
32
33
|
from ccxt.base.errors import AddressPending # noqa: F401
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ccxt
|
3
|
-
Version: 4.4.
|
3
|
+
Version: 4.4.98
|
4
4
|
Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
|
5
5
|
Home-page: https://ccxt.com
|
6
6
|
Author: Igor Kroitor
|
@@ -269,13 +269,13 @@ console.log(version, Object.keys(exchanges));
|
|
269
269
|
|
270
270
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
271
271
|
|
272
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
273
|
-
* unpkg: https://unpkg.com/ccxt@4.4.
|
272
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.98/dist/ccxt.browser.min.js
|
273
|
+
* unpkg: https://unpkg.com/ccxt@4.4.98/dist/ccxt.browser.min.js
|
274
274
|
|
275
275
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
276
276
|
|
277
277
|
```HTML
|
278
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
278
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.98/dist/ccxt.browser.min.js"></script>
|
279
279
|
```
|
280
280
|
|
281
281
|
Creates a global `ccxt` object:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
ccxt/__init__.py,sha256=
|
1
|
+
ccxt/__init__.py,sha256=hdnOaSLphpYHm02THX-5DUebpOCTVGJGEDVumxPyt8I,16364
|
2
2
|
ccxt/alpaca.py,sha256=S-PvXknJDcYUqHZWg4isZKGbTa8oU2G4Z0BqbvObNPI,80687
|
3
3
|
ccxt/apex.py,sha256=ZJUTXrYPcOpX66w2jjliICkaZ_nrcOTUwJ67d6u6kzI,82740
|
4
4
|
ccxt/ascendex.py,sha256=dvKe_bKvMRbILpPIldsWe06jpUwVJXtkiFQlDUSl7sM,158696
|
@@ -14,7 +14,7 @@ ccxt/bitbank.py,sha256=foAoge13WzWGHKUEn6LTTGsxqKhU7tXyTHkzFgqlkNQ,47774
|
|
14
14
|
ccxt/bitbns.py,sha256=5GqPAa7MEbUA2BcDzlus-GGW2rjUliqeWTg4P5gm0us,50931
|
15
15
|
ccxt/bitfinex.py,sha256=xje9kkfIlrdnmYdC2Vz8J9M511KPxvkqVw68ceIbsgc,167867
|
16
16
|
ccxt/bitflyer.py,sha256=WCSs3DkjhmoBuV5mCLHSTMOB9eUwKmntfhBKbiY5B3g,46926
|
17
|
-
ccxt/bitget.py,sha256=
|
17
|
+
ccxt/bitget.py,sha256=2gHZy2lzbBnHjlD9R3a1uNaa-mHbxzYPz2rPTmSjvk4,450963
|
18
18
|
ccxt/bithumb.py,sha256=GHYK_Xwzk9nwINHN1lhnRvnTX8mL98RZQ3Khz213A1s,51640
|
19
19
|
ccxt/bitmart.py,sha256=s3XXIBeFJ5wxlkQ8FCvMBiEEB59FcycZx-uD0xuiUAU,249337
|
20
20
|
ccxt/bitmex.py,sha256=ueedqmgQhSTNZdES0h7RCHD2Vqy34lHyuQajQRz3AOA,131919
|
@@ -41,11 +41,11 @@ ccxt/coincatch.py,sha256=e2_bRVu46cnnJvo4SUCGztFbyq43xvoA3ulYph2S7ms,244315
|
|
41
41
|
ccxt/coincheck.py,sha256=c0Ynqa3HnhqCpPjjRc-tOJsLPSM-b4yIzRlRs5cqe_I,39975
|
42
42
|
ccxt/coinex.py,sha256=2IWog856J1MkEwbFWGUBAtiLVycQJEDzk2ddXhEh964,267633
|
43
43
|
ccxt/coinmate.py,sha256=IJg8Ve0Z9qLn5VXZQosLdu2OtuK5Zg53ASFhrhebpow,50345
|
44
|
-
ccxt/coinmetro.py,sha256=
|
44
|
+
ccxt/coinmetro.py,sha256=KmFNaHBqxOXRhDhj9AV62LYg8vCPVReBXswF1BCWHsE,84892
|
45
45
|
ccxt/coinone.py,sha256=SaPpabedg3r9kNKfDP4vQmA99HGy84g3ne0Kvhz_1D8,50803
|
46
46
|
ccxt/coinsph.py,sha256=Rg2TMjXejMD_O4AKZ2xM2g6IO8I3otI7wmEaJnkvGN0,100802
|
47
47
|
ccxt/coinspot.py,sha256=_SoxcsD7EP20BKePMbXme-uSUPZ5_uHT8wvBkSsA4FU,27615
|
48
|
-
ccxt/cryptocom.py,sha256=
|
48
|
+
ccxt/cryptocom.py,sha256=ShI0f39kp76tNvx7v52kIsEeQjS18JS_mbsGXpTxoMg,152409
|
49
49
|
ccxt/cryptomus.py,sha256=3N9BVRLmv4a_L6BkJFuwzrm-tFaa0CxdV7lxxHgLKaM,48531
|
50
50
|
ccxt/defx.py,sha256=rCS9AAywzRoS6gQ4lM52-OH6gx4RU45A9S-SmaT6LaU,85320
|
51
51
|
ccxt/delta.py,sha256=nChbNm4BsOLUubaFJP7DgvCBnfbz5FHZuz2Gog629dI,157309
|
@@ -78,11 +78,11 @@ ccxt/mercado.py,sha256=QYFOAwfLDXJzB6qMvTadLcTe9Rmp0TDtdaaBJPIMbNQ,40007
|
|
78
78
|
ccxt/mexc.py,sha256=yXohafY0UHla1VQMplaIGm-ChAnLSdaEj-SxoH-fX_g,259329
|
79
79
|
ccxt/modetrade.py,sha256=0sJnouC4bIFvzJyN1YnP9l9KZrOunuXQA-JKOYesP-I,120885
|
80
80
|
ccxt/myokx.py,sha256=1fuUUuz5HuhSzTefnqUayu4NWVLNXzK58LPdpi0GYu4,1773
|
81
|
-
ccxt/ndax.py,sha256=
|
81
|
+
ccxt/ndax.py,sha256=BtUzzDkNf3_tp8F3BHDj3tka493R-4bQV7snEF1czbQ,114209
|
82
82
|
ccxt/novadax.py,sha256=8K6mKIBY5KyyunyBsYJEosfkr2yDrPVgJfFUpET242k,67583
|
83
83
|
ccxt/oceanex.py,sha256=YhvVgresX7nm8sFxD8Yr5pQI5IzuuRllW-JdA9RkDSM,44195
|
84
84
|
ccxt/okcoin.py,sha256=5GZdTZEWKhcxGBiDAjyc4s-VMCEUFlkONNj4Q2faoww,153940
|
85
|
-
ccxt/okx.py,sha256=
|
85
|
+
ccxt/okx.py,sha256=mkTCAItKUHl_f_WqiHwOtewykXqPg0bYlBuRx_EByJk,407622
|
86
86
|
ccxt/okxus.py,sha256=luEXOXlnV3UAmoZ_y8_7OGMxC3KyxLvy_8qI7Dc8F-g,1773
|
87
87
|
ccxt/onetrading.py,sha256=9ZC9BAH_apPfAGIRbQ9x3tOmlj_8eHfUqT5QT6EP2QI,76521
|
88
88
|
ccxt/oxfun.py,sha256=O-Cue1kv4psKbO7pKIoYKuYANCNDMJZLIrPqMjI701Q,124479
|
@@ -212,7 +212,7 @@ ccxt/abstract/xt.py,sha256=n3eX1cItL_J0j8prOViV-C_tRwIFv_GO8JTvZZw8jv8,27837
|
|
212
212
|
ccxt/abstract/yobit.py,sha256=8ycfCO8ORFly9hc0Aa47sZyX4_ZKPXS9h9yJzI-uQ7Q,1339
|
213
213
|
ccxt/abstract/zaif.py,sha256=m15WHdl3gYy0GOXNZ8NEH8eE7sVh8c0T_ITNuU8vXeU,3935
|
214
214
|
ccxt/abstract/zonda.py,sha256=X-hCW0SdX3YKZWixDyW-O2211M58Rno8kKJ6quY7rw4,7183
|
215
|
-
ccxt/async_support/__init__.py,sha256=
|
215
|
+
ccxt/async_support/__init__.py,sha256=KMZSJiNfORIqJaCyK3y-877wv3YrcfRTlQU5rcieORI,16147
|
216
216
|
ccxt/async_support/alpaca.py,sha256=Tag0HpHxho_qrXoQ8rjZBVJZj9T38qg8g-mZR39_m18,81133
|
217
217
|
ccxt/async_support/apex.py,sha256=JJHQD53lwpxcvu6a07IjBEsL5xj9HJsTK_xRNol93OM,83228
|
218
218
|
ccxt/async_support/ascendex.py,sha256=B9bJI-7KlbsUOyebpLSnLL0NBgKcfrw7k6qG-Nmw9GI,159533
|
@@ -228,7 +228,7 @@ ccxt/async_support/bitbank.py,sha256=1LUSR3ePVrdT80QWVMAlKDr3Ld9vYRj98Yg6IpYIoIE
|
|
228
228
|
ccxt/async_support/bitbns.py,sha256=L6wAlhQu7ydl8R1kph7_K6QvnMAKuvjWQd_4w7d_uzY,51185
|
229
229
|
ccxt/async_support/bitfinex.py,sha256=reAsUMsbu8a3g_hK0s50btHcWQXo3jTH4bfvjFM5dRE,168627
|
230
230
|
ccxt/async_support/bitflyer.py,sha256=i68Vb2iY6OCXQ2DU9pHKJexOxH8dZAZrZSPr_q-colA,47252
|
231
|
-
ccxt/async_support/bitget.py,sha256=
|
231
|
+
ccxt/async_support/bitget.py,sha256=WjCyaNXQnV2F5r0pYedAFVN-ExcYN0TvC_eXO-olQ_E,452712
|
232
232
|
ccxt/async_support/bithumb.py,sha256=ar0QoFintFU7qv7wW6xjnYqBR3keNYN4qN5cbybYxEY,51919
|
233
233
|
ccxt/async_support/bitmart.py,sha256=yiFwdael2gfr0nhi9sub13DaACwojOeCGb6CPt2ZKuU,250461
|
234
234
|
ccxt/async_support/bitmex.py,sha256=pImd4aNvGd6-Kp8HqX78kA7toBrrbS0bIHSbG_13s5M,132497
|
@@ -255,11 +255,11 @@ ccxt/async_support/coincatch.py,sha256=2_qdmOvJo-T65OGW3LKIpYm2H2eBP7T1y6BiIJBZn
|
|
255
255
|
ccxt/async_support/coincheck.py,sha256=rONaOxXDF5scpONv_YKyloPom_50tNSKkQOvT1izDMs,40181
|
256
256
|
ccxt/async_support/coinex.py,sha256=rKjhOk0bRSh2r-RuEf-mneByxwJVl9qHvVILtAbJuZA,268921
|
257
257
|
ccxt/async_support/coinmate.py,sha256=OezG_cOabNy4FHqBWxgrt7KPzpvnXLqra8amxwaMQjE,50611
|
258
|
-
ccxt/async_support/coinmetro.py,sha256=
|
258
|
+
ccxt/async_support/coinmetro.py,sha256=cerPjFtdBnBbKD-Qw8_ImwVLrWSkpA1DWjKrGs6aWAI,85238
|
259
259
|
ccxt/async_support/coinone.py,sha256=UCKADt0G8DrboUbRwawwF5AAI_QUlbsddX9WjdiVp_0,51045
|
260
260
|
ccxt/async_support/coinsph.py,sha256=21yqN3s97ATrv0rtWuG5NAbKiGn_uyh8rUHQonldvi8,101248
|
261
261
|
ccxt/async_support/coinspot.py,sha256=dPH3GINJ4ko0h_fl9NnuN0Nv0qL6MAHwY1N8dxIRoHQ,27773
|
262
|
-
ccxt/async_support/cryptocom.py,sha256=
|
262
|
+
ccxt/async_support/cryptocom.py,sha256=_Ex0w6Pq7O3bTs-27Rku0qk69z3_kcK9vxYHjCn7NWE,153065
|
263
263
|
ccxt/async_support/cryptomus.py,sha256=0VUovylSLQ8CcNSl-iJpP67Q5jqiBWXWkBBLerTRQ8w,48731
|
264
264
|
ccxt/async_support/defx.py,sha256=naYOHDdf-JP6ADOzy0eqmMv3OB7pPENpBT1ak_HhThE,85822
|
265
265
|
ccxt/async_support/delta.py,sha256=5wh7mM8MGXupMAyNe3Pu47od1VNKfKkLCOASyBh2BMw,157917
|
@@ -292,11 +292,11 @@ ccxt/async_support/mercado.py,sha256=AQiMQNle2eMtNDWzl2UA9VmgVBC6_JRiM8b2t7hEduQ
|
|
292
292
|
ccxt/async_support/mexc.py,sha256=D12q3K3txzm7XHgGdz5ebXQOT33D4rZ29Y6jyDre4HU,260593
|
293
293
|
ccxt/async_support/modetrade.py,sha256=7Pl-OytThhmazivftUzGZNfeX3ZXTsX2t1kTJb235Dk,121577
|
294
294
|
ccxt/async_support/myokx.py,sha256=hU24R4SOpmyjnvgZe5YSU4ELucsSZlENBox4U0P862w,1787
|
295
|
-
ccxt/async_support/ndax.py,sha256=
|
295
|
+
ccxt/async_support/ndax.py,sha256=dC1b_vrrdvOBnlLpGFJYmf5IVrRSOx6P0007W4bdlJE,114733
|
296
296
|
ccxt/async_support/novadax.py,sha256=QIFIoZdkkq2odkX7V0wGn9ytgtzEDOTr4MnFGlgnKEk,67951
|
297
297
|
ccxt/async_support/oceanex.py,sha256=_vi8sI3aucMmMPXwqqrpdfnWWHpfLYN_QaBpo2s9zvg,44533
|
298
298
|
ccxt/async_support/okcoin.py,sha256=FNMl97S41eAhJrSVvW3f4yxYKXnVqIgdq_g3-qJNQzY,154464
|
299
|
-
ccxt/async_support/okx.py,sha256=
|
299
|
+
ccxt/async_support/okx.py,sha256=H2Rz8PX3VfFUEIfC91fKRh6F8RRz0F-u0Ol5Ja32gMc,409341
|
300
300
|
ccxt/async_support/okxus.py,sha256=MuQ7TqH1CIKec_Z11O7hbz5bRCDzqW51fy1tZoZ1_DI,1787
|
301
301
|
ccxt/async_support/onetrading.py,sha256=xLpv4GZe9Hw4cJXc5jT1PWrWGOVWV0_ovuwMfTjarVY,76877
|
302
302
|
ccxt/async_support/oxfun.py,sha256=uVkMI-TNUjj_mzsDam2T55QsLZ8noEpVua3Qbl_YHNI,125041
|
@@ -320,7 +320,7 @@ ccxt/async_support/yobit.py,sha256=B2T9UXo0ke-YyXxNW9avOPJ8cReVGXWD9OpkORI9ZSU,5
|
|
320
320
|
ccxt/async_support/zaif.py,sha256=jZZv3ZjGQgkPNRfY5B5p5DNMvanHWTTS8m6BLBWm9tA,31357
|
321
321
|
ccxt/async_support/zonda.py,sha256=2QL_B9CmBu4SU4K-Y8segpj57vzAd4aUT2H2cD3b07g,85320
|
322
322
|
ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
|
323
|
-
ccxt/async_support/base/exchange.py,sha256=
|
323
|
+
ccxt/async_support/base/exchange.py,sha256=h7rGS7bj1QxT69nooadJgVM1UToAauxTskymPAMf7wo,119769
|
324
324
|
ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
|
325
325
|
ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
|
326
326
|
ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
|
@@ -330,12 +330,12 @@ ccxt/async_support/base/ws/future.py,sha256=hjdQ42zkfju5nar0GpTLJ4zXQBtgBU8DzYM5
|
|
330
330
|
ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_HozS6VxhEs8x-Kbj-NI,2894
|
331
331
|
ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9produGjmBJLCI5FHIRdMz1O-g,6551
|
332
332
|
ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
333
|
-
ccxt/base/decimal_to_precision.py,sha256=
|
334
|
-
ccxt/base/errors.py,sha256=
|
335
|
-
ccxt/base/exchange.py,sha256=
|
333
|
+
ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
|
334
|
+
ccxt/base/errors.py,sha256=OGhWNvNtRlJOzFx-n1x3ZjTnaPpfWH0Vc0xACS-MeDw,5012
|
335
|
+
ccxt/base/exchange.py,sha256=5KgAUmwjrHelR87gaxFRZzaju7B3csvnlUzkuw6mpJE,333932
|
336
336
|
ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
337
337
|
ccxt/base/types.py,sha256=vMQfFDVntED4YHrRJt0Q98YaM7OtGhK-DkbkqXFTYHc,11485
|
338
|
-
ccxt/pro/__init__.py,sha256=
|
338
|
+
ccxt/pro/__init__.py,sha256=BFHYJD9rNGQ7Aa9yPjZscIxiRPcT982fryVwHQ2FAf4,11464
|
339
339
|
ccxt/pro/alpaca.py,sha256=_WEorh5thYhvhn7R8hBvHW2m1P2foIbp8URjIt_9vcg,27623
|
340
340
|
ccxt/pro/apex.py,sha256=fiKLT2R4vSCtTBXtXOgw_rJc6jPGINrpEJagzfvlL9c,42004
|
341
341
|
ccxt/pro/ascendex.py,sha256=aSbIEzJ0Og_Nc5UGTYj3DVjGfIJ0-q0DdXSWJcQCKb4,37512
|
@@ -640,8 +640,8 @@ ccxt/test/tests_async.py,sha256=aVAHiW9TmvnvXQPXrixFXC7a8-DbFijo1t52XX37ovE,9550
|
|
640
640
|
ccxt/test/tests_helpers.py,sha256=egM69A2ZFYeVF5hwC1Qt-c5DOeClY5bv4jowmceeFV8,9736
|
641
641
|
ccxt/test/tests_init.py,sha256=qM0-Gb0h0p6CANWTkyYZI7wl-iYOcrPur7aj_OKh7m0,1212
|
642
642
|
ccxt/test/tests_sync.py,sha256=rEqYid-_VYQzVTFbLU2R3R4kzcaNUnekd8cOm6kXLyo,94444
|
643
|
-
ccxt-4.4.
|
644
|
-
ccxt-4.4.
|
645
|
-
ccxt-4.4.
|
646
|
-
ccxt-4.4.
|
647
|
-
ccxt-4.4.
|
643
|
+
ccxt-4.4.98.dist-info/LICENSE.txt,sha256=EIb9221AhMHV7xF1_55STFdKTFsnJVJYkRpY2Lnvo5w,1068
|
644
|
+
ccxt-4.4.98.dist-info/METADATA,sha256=4nKZuIuthXu-dkN474YVyFQpAEoXJRocL2uiQ6_yNr8,131453
|
645
|
+
ccxt-4.4.98.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
|
646
|
+
ccxt-4.4.98.dist-info/top_level.txt,sha256=CkQDuCTDKNcImPV60t36G6MdYfxsAPNiSaEwifVoVMo,5
|
647
|
+
ccxt-4.4.98.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|