ccxt 4.3.57__py2.py3-none-any.whl → 4.3.58__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +1 -1
- ccxt/abstract/kucoin.py +1 -0
- ccxt/abstract/kucoinfutures.py +1 -0
- ccxt/alpaca.py +5 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +5 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/base/ws/client.py +1 -0
- ccxt/async_support/bigone.py +19 -1
- ccxt/async_support/bingx.py +69 -19
- ccxt/async_support/coinmate.py +28 -32
- ccxt/async_support/coinone.py +1 -1
- ccxt/async_support/gate.py +6 -2
- ccxt/async_support/htx.py +3 -1
- ccxt/async_support/kucoin.py +3 -0
- ccxt/async_support/latoken.py +5 -1
- ccxt/async_support/okx.py +2 -0
- ccxt/async_support/woo.py +2 -1
- ccxt/base/exchange.py +1 -1
- ccxt/bigone.py +19 -1
- ccxt/bingx.py +69 -19
- ccxt/coinmate.py +28 -32
- ccxt/coinone.py +1 -1
- ccxt/gate.py +6 -2
- ccxt/htx.py +3 -1
- ccxt/kucoin.py +3 -0
- ccxt/latoken.py +5 -1
- ccxt/okx.py +2 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/htx.py +1 -1
- ccxt/pro/okx.py +3 -3
- ccxt/woo.py +2 -1
- {ccxt-4.3.57.dist-info → ccxt-4.3.58.dist-info}/METADATA +4 -4
- {ccxt-4.3.57.dist-info → ccxt-4.3.58.dist-info}/RECORD +37 -37
- {ccxt-4.3.57.dist-info → ccxt-4.3.58.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.3.57.dist-info → ccxt-4.3.58.dist-info}/WHEEL +0 -0
- {ccxt-4.3.57.dist-info → ccxt-4.3.58.dist-info}/top_level.txt +0 -0
ccxt/bingx.py
CHANGED
@@ -815,13 +815,14 @@ class bingx(Exchange, ImplicitAPI):
|
|
815
815
|
:see: https://bingx-api.github.io/docs/#/spot/market-api.html#Candlestick%20chart%20data
|
816
816
|
:see: https://bingx-api.github.io/docs/#/swapV2/market-api.html#%20K-Line%20Data
|
817
817
|
:see: https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#K-Line%20Data%20-%20Mark%20Price
|
818
|
+
:see: https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20K-line%20Data
|
818
819
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
819
820
|
:param str timeframe: the length of time each candle represents
|
820
821
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
821
822
|
:param int [limit]: the maximum amount of candles to fetch
|
822
823
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
823
824
|
:param int [params.until]: timestamp in ms of the latest candle to fetch
|
824
|
-
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [
|
825
|
+
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
825
826
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
826
827
|
"""
|
827
828
|
self.load_markets()
|
@@ -846,12 +847,15 @@ class bingx(Exchange, ImplicitAPI):
|
|
846
847
|
if market['spot']:
|
847
848
|
response = self.spotV1PublicGetMarketKline(self.extend(request, params))
|
848
849
|
else:
|
849
|
-
|
850
|
-
|
851
|
-
if price == 'mark':
|
852
|
-
response = self.swapV1PrivateGetMarketMarkPriceKlines(self.extend(request, params))
|
850
|
+
if market['inverse']:
|
851
|
+
response = self.cswapV1PublicGetMarketKlines(self.extend(request, params))
|
853
852
|
else:
|
854
|
-
|
853
|
+
price = self.safe_string(params, 'price')
|
854
|
+
params = self.omit(params, 'price')
|
855
|
+
if price == 'mark':
|
856
|
+
response = self.swapV1PrivateGetMarketMarkPriceKlines(self.extend(request, params))
|
857
|
+
else:
|
858
|
+
response = self.swapV3PublicGetQuoteKlines(self.extend(request, params))
|
855
859
|
#
|
856
860
|
# {
|
857
861
|
# "code": 0,
|
@@ -1144,6 +1148,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1144
1148
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
1145
1149
|
:see: https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20depth%20information
|
1146
1150
|
:see: https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Market%20Depth
|
1151
|
+
:see: https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%20Depth%20Data
|
1147
1152
|
:param str symbol: unified symbol of the market to fetch the order book for
|
1148
1153
|
:param int [limit]: the maximum amount of order book entries to return
|
1149
1154
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1162,7 +1167,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
1162
1167
|
if marketType == 'spot':
|
1163
1168
|
response = self.spotV1PublicGetMarketDepth(self.extend(request, params))
|
1164
1169
|
else:
|
1165
|
-
|
1170
|
+
if market['inverse']:
|
1171
|
+
response = self.cswapV1PublicGetMarketDepth(self.extend(request, params))
|
1172
|
+
else:
|
1173
|
+
response = self.swapV2PublicGetQuoteDepth(self.extend(request, params))
|
1166
1174
|
#
|
1167
1175
|
# spot
|
1168
1176
|
#
|
@@ -1228,6 +1236,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1228
1236
|
"""
|
1229
1237
|
fetch the current funding rate
|
1230
1238
|
:see: https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
|
1239
|
+
:see: https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Price%20&%20Current%20Funding%20Rate
|
1231
1240
|
:param str symbol: unified market symbol
|
1232
1241
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1233
1242
|
:returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
|
@@ -1237,7 +1246,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
1237
1246
|
request: dict = {
|
1238
1247
|
'symbol': market['id'],
|
1239
1248
|
}
|
1240
|
-
response =
|
1249
|
+
response = None
|
1250
|
+
if market['inverse']:
|
1251
|
+
response = self.cswapV1PublicGetMarketPremiumIndex(self.extend(request, params))
|
1252
|
+
else:
|
1253
|
+
response = self.swapV2PublicGetQuotePremiumIndex(self.extend(request, params))
|
1241
1254
|
#
|
1242
1255
|
# {
|
1243
1256
|
# "code":0,
|
@@ -1375,9 +1388,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
1375
1388
|
|
1376
1389
|
def fetch_open_interest(self, symbol: str, params={}):
|
1377
1390
|
"""
|
1378
|
-
|
1391
|
+
retrieves the open interest of a trading pair
|
1379
1392
|
:see: https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Swap%20Open%20Positions
|
1380
|
-
:
|
1393
|
+
:see: https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20Swap%20Open%20Positions
|
1394
|
+
:param str symbol: unified CCXT market symbol
|
1381
1395
|
:param dict [params]: exchange specific parameters
|
1382
1396
|
:returns dict} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure:
|
1383
1397
|
"""
|
@@ -1386,7 +1400,13 @@ class bingx(Exchange, ImplicitAPI):
|
|
1386
1400
|
request: dict = {
|
1387
1401
|
'symbol': market['id'],
|
1388
1402
|
}
|
1389
|
-
response =
|
1403
|
+
response = None
|
1404
|
+
if market['inverse']:
|
1405
|
+
response = self.cswapV1PublicGetMarketOpenInterest(self.extend(request, params))
|
1406
|
+
else:
|
1407
|
+
response = self.swapV2PublicGetQuoteOpenInterest(self.extend(request, params))
|
1408
|
+
#
|
1409
|
+
# linear swap
|
1390
1410
|
#
|
1391
1411
|
# {
|
1392
1412
|
# "code": 0,
|
@@ -1398,18 +1418,48 @@ class bingx(Exchange, ImplicitAPI):
|
|
1398
1418
|
# }
|
1399
1419
|
# }
|
1400
1420
|
#
|
1401
|
-
|
1402
|
-
|
1421
|
+
# inverse swap
|
1422
|
+
#
|
1423
|
+
# {
|
1424
|
+
# "code": 0,
|
1425
|
+
# "msg": "",
|
1426
|
+
# "timestamp": 1720328247986,
|
1427
|
+
# "data": [
|
1428
|
+
# {
|
1429
|
+
# "symbol": "BTC-USD",
|
1430
|
+
# "openInterest": "749.1160",
|
1431
|
+
# "timestamp": 1720310400000
|
1432
|
+
# }
|
1433
|
+
# ]
|
1434
|
+
# }
|
1435
|
+
#
|
1436
|
+
result: dict = {}
|
1437
|
+
if market['inverse']:
|
1438
|
+
data = self.safe_list(response, 'data', [])
|
1439
|
+
result = self.safe_dict(data, 0, {})
|
1440
|
+
else:
|
1441
|
+
result = self.safe_dict(response, 'data', {})
|
1442
|
+
return self.parse_open_interest(result, market)
|
1403
1443
|
|
1404
1444
|
def parse_open_interest(self, interest, market: Market = None):
|
1405
1445
|
#
|
1406
|
-
#
|
1407
|
-
#
|
1408
|
-
#
|
1409
|
-
#
|
1410
|
-
#
|
1446
|
+
# linear swap
|
1447
|
+
#
|
1448
|
+
# {
|
1449
|
+
# "openInterest": "3289641547.10",
|
1450
|
+
# "symbol": "BTC-USDT",
|
1451
|
+
# "time": 1672026617364
|
1452
|
+
# }
|
1453
|
+
#
|
1454
|
+
# inverse swap
|
1455
|
+
#
|
1456
|
+
# {
|
1457
|
+
# "symbol": "BTC-USD",
|
1458
|
+
# "openInterest": "749.1160",
|
1459
|
+
# "timestamp": 1720310400000
|
1460
|
+
# }
|
1411
1461
|
#
|
1412
|
-
timestamp = self.
|
1462
|
+
timestamp = self.safe_integer_2(interest, 'time', 'timestamp')
|
1413
1463
|
id = self.safe_string(interest, 'symbol')
|
1414
1464
|
symbol = self.safe_symbol(id, market, '-', 'swap')
|
1415
1465
|
openInterest = self.safe_number(interest, 'openInterest')
|
ccxt/coinmate.py
CHANGED
@@ -26,7 +26,7 @@ class coinmate(Exchange, ImplicitAPI):
|
|
26
26
|
'id': 'coinmate',
|
27
27
|
'name': 'CoinMate',
|
28
28
|
'countries': ['GB', 'CZ', 'EU'], # UK, Czech Republic
|
29
|
-
'rateLimit':
|
29
|
+
'rateLimit': 600,
|
30
30
|
'has': {
|
31
31
|
'CORS': True,
|
32
32
|
'spot': True,
|
@@ -175,28 +175,28 @@ class coinmate(Exchange, ImplicitAPI):
|
|
175
175
|
'trading': {
|
176
176
|
'tierBased': True,
|
177
177
|
'percentage': True,
|
178
|
-
'
|
179
|
-
'
|
178
|
+
'taker': self.parse_number('0.006'),
|
179
|
+
'maker': self.parse_number('0.004'),
|
180
180
|
'tiers': {
|
181
181
|
'taker': [
|
182
|
-
[self.parse_number('0'), self.parse_number('0.
|
183
|
-
[self.parse_number('10000'), self.parse_number('0.
|
184
|
-
[self.parse_number('100000'), self.parse_number('0.
|
185
|
-
[self.parse_number('250000'), self.parse_number('0.
|
186
|
-
[self.parse_number('500000'), self.parse_number('0.
|
187
|
-
[self.parse_number('1000000'), self.parse_number('0.
|
188
|
-
[self.parse_number('3000000'), self.parse_number('0.
|
189
|
-
[self.parse_number('15000000'), self.parse_number('0.
|
182
|
+
[self.parse_number('0'), self.parse_number('0.006')],
|
183
|
+
[self.parse_number('10000'), self.parse_number('0.003')],
|
184
|
+
[self.parse_number('100000'), self.parse_number('0.0023')],
|
185
|
+
[self.parse_number('250000'), self.parse_number('0.0021')],
|
186
|
+
[self.parse_number('500000'), self.parse_number('0.0018')],
|
187
|
+
[self.parse_number('1000000'), self.parse_number('0.0015')],
|
188
|
+
[self.parse_number('3000000'), self.parse_number('0.0012')],
|
189
|
+
[self.parse_number('15000000'), self.parse_number('0.001')],
|
190
190
|
],
|
191
191
|
'maker': [
|
192
|
-
[self.parse_number('0'), self.parse_number('0.
|
193
|
-
[self.parse_number('10000'), self.parse_number('0.
|
194
|
-
[self.parse_number('100000'), self.parse_number('0.
|
195
|
-
[self.parse_number('250000'), self.parse_number('0.
|
192
|
+
[self.parse_number('0'), self.parse_number('0.004')],
|
193
|
+
[self.parse_number('10000'), self.parse_number('0.002')],
|
194
|
+
[self.parse_number('100000'), self.parse_number('0.0012')],
|
195
|
+
[self.parse_number('250000'), self.parse_number('0.0009')],
|
196
196
|
[self.parse_number('500000'), self.parse_number('0.0005')],
|
197
197
|
[self.parse_number('1000000'), self.parse_number('0.0003')],
|
198
198
|
[self.parse_number('3000000'), self.parse_number('0.0002')],
|
199
|
-
[self.parse_number('15000000'), self.parse_number('0')],
|
199
|
+
[self.parse_number('15000000'), self.parse_number('-0.0004')],
|
200
200
|
],
|
201
201
|
},
|
202
202
|
},
|
@@ -1048,20 +1048,16 @@ class coinmate(Exchange, ImplicitAPI):
|
|
1048
1048
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1049
1049
|
|
1050
1050
|
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1051
|
-
if response is
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
self.throw_exactly_matched_exception(self.exceptions['exact'], body, feedback)
|
1064
|
-
self.throw_broadly_matched_exception(self.exceptions['broad'], body, feedback)
|
1065
|
-
raise ExchangeError(feedback) # unknown message
|
1066
|
-
raise ExchangeError(self.id + ' ' + body)
|
1051
|
+
if response is None:
|
1052
|
+
return None # fallback to default error handler
|
1053
|
+
#
|
1054
|
+
# {"error":true,"errorMessage":"Api internal error","data":null}
|
1055
|
+
# {"error":true,"errorMessage":"Access denied.","data":null}
|
1056
|
+
#
|
1057
|
+
errorMessage = self.safe_string(response, 'errorMessage')
|
1058
|
+
if errorMessage is not None:
|
1059
|
+
feedback = self.id + ' ' + body
|
1060
|
+
self.throw_exactly_matched_exception(self.exceptions['exact'], errorMessage, feedback)
|
1061
|
+
self.throw_broadly_matched_exception(self.exceptions['broad'], errorMessage, feedback)
|
1062
|
+
raise ExchangeError(feedback) # unknown message
|
1067
1063
|
return None
|
ccxt/coinone.py
CHANGED
@@ -1116,7 +1116,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
1116
1116
|
# {"result":"error","error_code":"108","error_msg":"Unknown CryptoCurrency"}
|
1117
1117
|
#
|
1118
1118
|
errorCode = self.safe_string(response, 'error_code')
|
1119
|
-
if errorCode != '0':
|
1119
|
+
if errorCode is not None and errorCode != '0':
|
1120
1120
|
feedback = self.id + ' ' + body
|
1121
1121
|
self.throw_exactly_matched_exception(self.exceptions, errorCode, feedback)
|
1122
1122
|
raise ExchangeError(feedback) # unknown message
|
ccxt/gate.py
CHANGED
@@ -3786,7 +3786,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3786
3786
|
if isMarketOrder:
|
3787
3787
|
request['price'] = price # set to 0 for market orders
|
3788
3788
|
else:
|
3789
|
-
request['price'] = self.price_to_precision(symbol, price)
|
3789
|
+
request['price'] = '0' if (price == 0) else self.price_to_precision(symbol, price)
|
3790
3790
|
if reduceOnly is not None:
|
3791
3791
|
request['reduce_only'] = reduceOnly
|
3792
3792
|
if timeInForce is not None:
|
@@ -3857,7 +3857,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3857
3857
|
'initial': {
|
3858
3858
|
'contract': market['id'],
|
3859
3859
|
'size': amount, # positive = buy, negative = sell, set to 0 to close the position
|
3860
|
-
'price': self.price_to_precision(symbol, price), # set to 0 to use market price
|
3860
|
+
# 'price': '0' if (price == 0) else self.price_to_precision(symbol, price), # set to 0 to use market price
|
3861
3861
|
# 'close': False, # set to True if trying to close the position
|
3862
3862
|
# 'tif': 'gtc', # gtc, ioc, if using market price, only ioc is supported
|
3863
3863
|
# 'text': clientOrderId, # web, api, app
|
@@ -3865,6 +3865,10 @@ class gate(Exchange, ImplicitAPI):
|
|
3865
3865
|
},
|
3866
3866
|
'settle': market['settleId'],
|
3867
3867
|
}
|
3868
|
+
if type == 'market':
|
3869
|
+
request['initial']['price'] = '0'
|
3870
|
+
else:
|
3871
|
+
request['initial']['price'] = '0' if (price == 0) else self.price_to_precision(symbol, price)
|
3868
3872
|
if trigger is None:
|
3869
3873
|
rule = None
|
3870
3874
|
triggerOrderPrice = None
|
ccxt/htx.py
CHANGED
@@ -3053,6 +3053,7 @@ class htx(Exchange, ImplicitAPI):
|
|
3053
3053
|
instStatus = self.safe_string(entry, 'instStatus')
|
3054
3054
|
currencyActive = instStatus == 'normal'
|
3055
3055
|
minPrecision = None
|
3056
|
+
minDeposit = None
|
3056
3057
|
minWithdraw = None
|
3057
3058
|
maxWithdraw = None
|
3058
3059
|
deposit = False
|
@@ -3064,6 +3065,7 @@ class htx(Exchange, ImplicitAPI):
|
|
3064
3065
|
self.options['networkChainIdsByNames'][code][title] = uniqueChainId
|
3065
3066
|
self.options['networkNamesByChainIds'][uniqueChainId] = title
|
3066
3067
|
networkCode = self.network_id_to_code(uniqueChainId)
|
3068
|
+
minDeposit = self.safe_number(chainEntry, 'minDepositAmt')
|
3067
3069
|
minWithdraw = self.safe_number(chainEntry, 'minWithdrawAmt')
|
3068
3070
|
maxWithdraw = self.safe_number(chainEntry, 'maxWithdrawAmt')
|
3069
3071
|
withdrawStatus = self.safe_string(chainEntry, 'withdrawStatus')
|
@@ -3083,7 +3085,7 @@ class htx(Exchange, ImplicitAPI):
|
|
3083
3085
|
'network': networkCode,
|
3084
3086
|
'limits': {
|
3085
3087
|
'deposit': {
|
3086
|
-
'min':
|
3088
|
+
'min': minDeposit,
|
3087
3089
|
'max': None,
|
3088
3090
|
},
|
3089
3091
|
'withdraw': {
|
ccxt/kucoin.py
CHANGED
@@ -259,6 +259,8 @@ class kucoin(Exchange, ImplicitAPI):
|
|
259
259
|
'purchase/orders': 10, # 10SW
|
260
260
|
# broker
|
261
261
|
'broker/api/rebase/download': 3,
|
262
|
+
# affiliate
|
263
|
+
'affiliate/inviter/statistics': 30,
|
262
264
|
},
|
263
265
|
'post': {
|
264
266
|
# account
|
@@ -700,6 +702,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
700
702
|
'redeem/orders': 'v3',
|
701
703
|
'purchase/orders': 'v3',
|
702
704
|
'margin/symbols': 'v3',
|
705
|
+
'affiliate/inviter/statistics': 'v2',
|
703
706
|
},
|
704
707
|
'POST': {
|
705
708
|
# account
|
ccxt/latoken.py
CHANGED
@@ -1344,7 +1344,11 @@ class latoken(Exchange, ImplicitAPI):
|
|
1344
1344
|
# "status":"SUCCESS"
|
1345
1345
|
# }
|
1346
1346
|
#
|
1347
|
-
return
|
1347
|
+
return [
|
1348
|
+
self.safe_order({
|
1349
|
+
'info': response,
|
1350
|
+
}),
|
1351
|
+
]
|
1348
1352
|
|
1349
1353
|
def fetch_transactions(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1350
1354
|
"""
|
ccxt/okx.py
CHANGED
@@ -6858,6 +6858,8 @@ class okx(Exchange, ImplicitAPI):
|
|
6858
6858
|
depositWithdrawFees[code] = self.deposit_withdraw_fee({})
|
6859
6859
|
depositWithdrawFees[code]['info'][currencyId] = feeInfo
|
6860
6860
|
chain = self.safe_string(feeInfo, 'chain')
|
6861
|
+
if chain is None:
|
6862
|
+
continue
|
6861
6863
|
chainSplit = chain.split('-')
|
6862
6864
|
networkId = self.safe_value(chainSplit, 1)
|
6863
6865
|
withdrawFee = self.safe_number(feeInfo, 'minFee')
|
ccxt/pro/__init__.py
CHANGED
ccxt/pro/htx.py
CHANGED
@@ -124,7 +124,7 @@ class htx(ccxt.async_support.htx):
|
|
124
124
|
'2002': AuthenticationError, # {action: 'sub', code: 2002, ch: 'accounts.update#2', message: 'invalid.auth.state'}
|
125
125
|
'2021': BadRequest,
|
126
126
|
'2001': BadSymbol, # {action: 'sub', code: 2001, ch: 'orders#2ltcusdt', message: 'invalid.symbol'}
|
127
|
-
'2011': BadSymbol, # {op: 'sub', cid: '1649149285', topic: 'orders_cross.
|
127
|
+
'2011': BadSymbol, # {op: 'sub', cid: '1649149285', topic: 'orders_cross.ltc-usdt', 'err-code': 2011, 'err-msg': "Contract doesn't exist.", ts: 1649149287637}
|
128
128
|
'2040': BadRequest, # {op: 'sub', cid: '1649152947', 'err-code': 2040, 'err-msg': 'Missing required parameter.', ts: 1649152948684}
|
129
129
|
'4007': BadRequest, # {op: 'sub', cid: '1', topic: 'accounts_unify.USDT', 'err-code': 4007, 'err-msg': 'Non - single account user is not available, please check through the cross and isolated account asset interface', ts: 1698419318540}
|
130
130
|
},
|
ccxt/pro/okx.py
CHANGED
@@ -1571,7 +1571,7 @@ class okx(ccxt.async_support.okx):
|
|
1571
1571
|
if self.is_empty(args):
|
1572
1572
|
method = self.safe_string(message, 'op')
|
1573
1573
|
stringMsg = self.json(message)
|
1574
|
-
self.handle_errors(None, None, client.url, method, None, stringMsg,
|
1574
|
+
self.handle_errors(None, None, client.url, method, None, stringMsg, message, None, None)
|
1575
1575
|
orders = self.parse_orders(args, None, None, None)
|
1576
1576
|
first = self.safe_dict(orders, 0, {})
|
1577
1577
|
client.resolve(first, messageHash)
|
@@ -1729,8 +1729,8 @@ class okx(ccxt.async_support.okx):
|
|
1729
1729
|
future.resolve(True)
|
1730
1730
|
|
1731
1731
|
def ping(self, client):
|
1732
|
-
#
|
1733
|
-
#
|
1732
|
+
# OKX does not support the built-in WebSocket protocol-level ping-pong.
|
1733
|
+
# Instead, it requires a custom text-based ping-pong mechanism.
|
1734
1734
|
return 'ping'
|
1735
1735
|
|
1736
1736
|
def handle_pong(self, client: Client, message):
|
ccxt/woo.py
CHANGED
@@ -15,6 +15,7 @@ from ccxt.base.errors import ArgumentsRequired
|
|
15
15
|
from ccxt.base.errors import BadRequest
|
16
16
|
from ccxt.base.errors import InvalidOrder
|
17
17
|
from ccxt.base.errors import NotSupported
|
18
|
+
from ccxt.base.errors import OperationFailed
|
18
19
|
from ccxt.base.errors import RateLimitExceeded
|
19
20
|
from ccxt.base.errors import OnMaintenance
|
20
21
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
@@ -316,7 +317,7 @@ class woo(Exchange, ImplicitAPI):
|
|
316
317
|
'commonCurrencies': {},
|
317
318
|
'exceptions': {
|
318
319
|
'exact': {
|
319
|
-
'-1000':
|
320
|
+
'-1000': OperationFailed, # {"code": -1000, "message": "An unknown error occurred while processing the request"} or {"success":false,"code":"-1000","message":"An internal error has occurred. We are unable to process your request. Please try again later."}
|
320
321
|
'-1001': AuthenticationError, # {"code": -1001, "message": "The api key or secret is in wrong format"}
|
321
322
|
'-1002': AuthenticationError, # {"code": -1002, "message": "API key or secret is invalid, it may because key have insufficient permission or the key is expired/revoked."}
|
322
323
|
'-1003': RateLimitExceeded, # {"code": -1003, "message": "Rate limit exceed."}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ccxt
|
3
|
-
Version: 4.3.
|
3
|
+
Version: 4.3.58
|
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
|
@@ -268,13 +268,13 @@ console.log(version, Object.keys(exchanges));
|
|
268
268
|
|
269
269
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
270
270
|
|
271
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.
|
272
|
-
* unpkg: https://unpkg.com/ccxt@4.3.
|
271
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.58/dist/ccxt.browser.min.js
|
272
|
+
* unpkg: https://unpkg.com/ccxt@4.3.58/dist/ccxt.browser.min.js
|
273
273
|
|
274
274
|
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.
|
275
275
|
|
276
276
|
```HTML
|
277
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.
|
277
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.58/dist/ccxt.browser.min.js"></script>
|
278
278
|
```
|
279
279
|
|
280
280
|
Creates a global `ccxt` object:
|