ccxt 4.4.82__py2.py3-none-any.whl → 4.4.86__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 -9
- ccxt/abstract/blofin.py +8 -0
- ccxt/abstract/btcbox.py +1 -0
- ccxt/abstract/myokx.py +2 -0
- ccxt/abstract/okx.py +2 -0
- ccxt/apex.py +2 -1
- ccxt/ascendex.py +187 -151
- ccxt/async_support/__init__.py +3 -9
- ccxt/async_support/apex.py +2 -1
- ccxt/async_support/ascendex.py +187 -151
- ccxt/async_support/base/exchange.py +51 -24
- ccxt/async_support/base/ws/cache.py +6 -1
- ccxt/async_support/bequant.py +1 -1
- ccxt/async_support/bitget.py +5 -6
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/bitrue.py +14 -32
- ccxt/async_support/bitso.py +33 -0
- ccxt/async_support/bitstamp.py +33 -0
- ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
- ccxt/async_support/blofin.py +145 -14
- ccxt/async_support/btcbox.py +25 -5
- ccxt/async_support/bybit.py +16 -37
- ccxt/async_support/cex.py +2 -4
- ccxt/async_support/coinbase.py +58 -47
- ccxt/async_support/coinbaseexchange.py +141 -32
- ccxt/async_support/coincatch.py +14 -67
- ccxt/async_support/coinex.py +28 -29
- ccxt/async_support/coinlist.py +17 -16
- ccxt/async_support/coinmetro.py +20 -11
- ccxt/async_support/coinone.py +8 -10
- ccxt/async_support/coinsph.py +124 -2
- ccxt/async_support/cryptocom.py +109 -2
- ccxt/async_support/cryptomus.py +42 -80
- ccxt/async_support/delta.py +75 -36
- ccxt/async_support/deribit.py +4 -5
- ccxt/async_support/derive.py +46 -10
- ccxt/async_support/ellipx.py +175 -77
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/gemini.py +3 -4
- ccxt/async_support/hitbtc.py +56 -65
- ccxt/async_support/hollaex.py +106 -49
- ccxt/async_support/htx.py +20 -43
- ccxt/async_support/hyperliquid.py +6 -6
- ccxt/async_support/kraken.py +27 -23
- ccxt/async_support/kucoinfutures.py +5 -0
- ccxt/async_support/lbank.py +1 -1
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/ndax.py +25 -24
- ccxt/async_support/okcoin.py +12 -29
- ccxt/async_support/okx.py +9 -0
- ccxt/async_support/onetrading.py +10 -7
- ccxt/async_support/oxfun.py +40 -110
- ccxt/async_support/paradex.py +123 -4
- ccxt/base/exchange.py +21 -2
- ccxt/base/types.py +3 -0
- ccxt/bequant.py +1 -1
- ccxt/bitget.py +5 -6
- ccxt/bitmart.py +1 -1
- ccxt/bitrue.py +14 -32
- ccxt/bitso.py +33 -0
- ccxt/bitstamp.py +33 -0
- ccxt/{huobijp.py → bittrade.py} +11 -11
- ccxt/blofin.py +145 -14
- ccxt/btcbox.py +24 -5
- ccxt/bybit.py +16 -37
- ccxt/cex.py +2 -4
- ccxt/coinbase.py +58 -47
- ccxt/coinbaseexchange.py +141 -32
- ccxt/coincatch.py +14 -67
- ccxt/coinex.py +28 -29
- ccxt/coinlist.py +17 -16
- ccxt/coinmetro.py +20 -11
- ccxt/coinone.py +8 -10
- ccxt/coinsph.py +124 -2
- ccxt/cryptocom.py +109 -2
- ccxt/cryptomus.py +42 -80
- ccxt/delta.py +75 -36
- ccxt/deribit.py +4 -5
- ccxt/derive.py +46 -10
- ccxt/ellipx.py +175 -77
- ccxt/gate.py +1 -1
- ccxt/gemini.py +3 -4
- ccxt/hitbtc.py +56 -65
- ccxt/hollaex.py +106 -49
- ccxt/htx.py +20 -43
- ccxt/hyperliquid.py +6 -6
- ccxt/kraken.py +27 -23
- ccxt/kucoinfutures.py +5 -0
- ccxt/lbank.py +1 -1
- ccxt/mexc.py +2 -2
- ccxt/ndax.py +25 -24
- ccxt/okcoin.py +12 -29
- ccxt/okx.py +9 -0
- ccxt/onetrading.py +10 -7
- ccxt/oxfun.py +40 -110
- ccxt/paradex.py +123 -4
- ccxt/pro/__init__.py +109 -5
- ccxt/pro/binance.py +32 -33
- ccxt/pro/bithumb.py +5 -3
- ccxt/pro/{huobijp.py → bittrade.py} +3 -3
- ccxt/pro/kraken.py +249 -79
- ccxt/pro/luno.py +6 -5
- ccxt/pro/mexc.py +254 -7
- ccxt/pro/poloniex.py +6 -2
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/METADATA +8 -11
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/RECORD +110 -121
- ccxt/abstract/bl3p.py +0 -19
- ccxt/abstract/idex.py +0 -26
- ccxt/abstract/kuna.py +0 -182
- ccxt/async_support/base/ws/fast_client.py +0 -97
- ccxt/async_support/bl3p.py +0 -543
- ccxt/async_support/idex.py +0 -1889
- ccxt/async_support/kuna.py +0 -1935
- ccxt/bl3p.py +0 -543
- ccxt/idex.py +0 -1889
- ccxt/kuna.py +0 -1935
- ccxt/pro/idex.py +0 -687
- /ccxt/abstract/{huobijp.py → bittrade.py} +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/WHEEL +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/top_level.txt +0 -0
ccxt/pro/mexc.py
CHANGED
@@ -39,6 +39,12 @@ class mexc(ccxt.async_support.mexc):
|
|
39
39
|
'watchBidsAsks': True,
|
40
40
|
'watchTrades': True,
|
41
41
|
'watchTradesForSymbols': False,
|
42
|
+
'unWatchTicker': True,
|
43
|
+
'unWatchTickers': True,
|
44
|
+
'unWatchBidsAsks': True,
|
45
|
+
'unWatchOHLCV': True,
|
46
|
+
'unWatchOrderBook': True,
|
47
|
+
'unWatchTrades': True,
|
42
48
|
},
|
43
49
|
'urls': {
|
44
50
|
'api': {
|
@@ -471,12 +477,15 @@ class mexc(ccxt.async_support.mexc):
|
|
471
477
|
}, market)
|
472
478
|
|
473
479
|
async def watch_spot_public(self, channel, messageHash, params={}):
|
480
|
+
unsubscribed = self.safe_bool(params, 'unsubscribed', False)
|
481
|
+
params = self.omit(params, ['unsubscribed'])
|
474
482
|
url = self.urls['api']['ws']['spot']
|
483
|
+
method = 'UNSUBSCRIPTION' if (unsubscribed) else 'SUBSCRIPTION'
|
475
484
|
request: dict = {
|
476
|
-
'method':
|
485
|
+
'method': method,
|
477
486
|
'params': [channel],
|
478
487
|
}
|
479
|
-
return await self.watch(url, messageHash, self.extend(request, params),
|
488
|
+
return await self.watch(url, messageHash, self.extend(request, params), messageHash)
|
480
489
|
|
481
490
|
async def watch_spot_private(self, channel, messageHash, params={}):
|
482
491
|
self.check_required_credentials()
|
@@ -759,11 +768,8 @@ class mexc(ccxt.async_support.mexc):
|
|
759
768
|
messageHash = 'orderbook:' + symbol
|
760
769
|
subscription = self.safe_value(client.subscriptions, messageHash)
|
761
770
|
limit = self.safe_integer(subscription, 'limit')
|
762
|
-
if
|
763
|
-
|
764
|
-
# once we have received the first delta and initialized the orderbook
|
765
|
-
client.subscriptions[messageHash] = 1
|
766
|
-
self.orderbooks[symbol] = self.counted_order_book({})
|
771
|
+
if not (symbol in self.orderbooks):
|
772
|
+
self.orderbooks[symbol] = self.order_book()
|
767
773
|
storedOrderBook = self.orderbooks[symbol]
|
768
774
|
nonce = self.safe_integer(storedOrderBook, 'nonce')
|
769
775
|
if nonce is None:
|
@@ -1351,6 +1357,247 @@ class mexc(ccxt.async_support.mexc):
|
|
1351
1357
|
self.balance[type] = self.safe_balance(self.balance[type])
|
1352
1358
|
client.resolve(self.balance[type], messageHash)
|
1353
1359
|
|
1360
|
+
async def un_watch_ticker(self, symbol: str, params={}) -> Any:
|
1361
|
+
"""
|
1362
|
+
unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
1363
|
+
:param str symbol: unified symbol of the market to fetch the ticker for
|
1364
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1365
|
+
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
1366
|
+
"""
|
1367
|
+
await self.load_markets()
|
1368
|
+
market = self.market(symbol)
|
1369
|
+
messageHash = 'unsubscribe:ticker:' + market['symbol']
|
1370
|
+
url = None
|
1371
|
+
channel = None
|
1372
|
+
if market['spot']:
|
1373
|
+
miniTicker = False
|
1374
|
+
miniTicker, params = self.handle_option_and_params(params, 'watchTicker', 'miniTicker')
|
1375
|
+
if miniTicker:
|
1376
|
+
channel = 'spot@public.miniTicker.v3.api@' + market['id'] + '@UTC+8'
|
1377
|
+
else:
|
1378
|
+
channel = 'spot@public.bookTicker.v3.api@' + market['id']
|
1379
|
+
url = self.urls['api']['ws']['spot']
|
1380
|
+
params['unsubscribed'] = True
|
1381
|
+
self.watch_spot_public(channel, messageHash, params)
|
1382
|
+
else:
|
1383
|
+
channel = 'unsub.ticker'
|
1384
|
+
requestParams: dict = {
|
1385
|
+
'symbol': market['id'],
|
1386
|
+
}
|
1387
|
+
url = self.urls['api']['ws']['swap']
|
1388
|
+
self.watch_swap_public(channel, messageHash, requestParams, params)
|
1389
|
+
client = self.client(url)
|
1390
|
+
self.handle_unsubscriptions(client, [messageHash])
|
1391
|
+
return None
|
1392
|
+
|
1393
|
+
async def un_watch_tickers(self, symbols: Strings = None, params={}) -> Any:
|
1394
|
+
"""
|
1395
|
+
unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
1396
|
+
:param str[] symbols: unified symbol of the market to fetch the ticker for
|
1397
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1398
|
+
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
1399
|
+
"""
|
1400
|
+
await self.load_markets()
|
1401
|
+
symbols = self.market_symbols(symbols, None)
|
1402
|
+
messageHashes = []
|
1403
|
+
firstSymbol = self.safe_string(symbols, 0)
|
1404
|
+
market = None
|
1405
|
+
if firstSymbol is not None:
|
1406
|
+
market = self.market(firstSymbol)
|
1407
|
+
type = None
|
1408
|
+
type, params = self.handle_market_type_and_params('watchTickers', market, params)
|
1409
|
+
isSpot = (type == 'spot')
|
1410
|
+
url = self.urls['api']['ws']['spot'] if (isSpot) else self.urls['api']['ws']['swap']
|
1411
|
+
request: dict = {}
|
1412
|
+
if isSpot:
|
1413
|
+
miniTicker = False
|
1414
|
+
miniTicker, params = self.handle_option_and_params(params, 'watchTickers', 'miniTicker')
|
1415
|
+
topics = []
|
1416
|
+
if not miniTicker:
|
1417
|
+
if symbols is None:
|
1418
|
+
raise ArgumentsRequired(self.id + ' watchTickers required symbols argument for the bookTicker channel')
|
1419
|
+
marketIds = self.market_ids(symbols)
|
1420
|
+
for i in range(0, len(marketIds)):
|
1421
|
+
marketId = marketIds[i]
|
1422
|
+
messageHashes.append('unsubscribe:ticker:' + symbols[i])
|
1423
|
+
channel = 'spot@public.bookTicker.v3.api@' + marketId
|
1424
|
+
topics.append(channel)
|
1425
|
+
else:
|
1426
|
+
topics.append('spot@public.miniTickers.v3.api@UTC+8')
|
1427
|
+
if symbols is None:
|
1428
|
+
messageHashes.append('unsubscribe:spot:ticker')
|
1429
|
+
else:
|
1430
|
+
for i in range(0, len(symbols)):
|
1431
|
+
messageHashes.append('unsubscribe:ticker:' + symbols[i])
|
1432
|
+
request['method'] = 'UNSUBSCRIPTION'
|
1433
|
+
request['params'] = topics
|
1434
|
+
else:
|
1435
|
+
request['method'] = 'unsub.tickers'
|
1436
|
+
request['params'] = {}
|
1437
|
+
messageHashes.append('unsubscribe:ticker')
|
1438
|
+
client = self.client(url)
|
1439
|
+
self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
|
1440
|
+
self.handle_unsubscriptions(client, messageHashes)
|
1441
|
+
return None
|
1442
|
+
|
1443
|
+
async def un_watch_bids_asks(self, symbols: Strings = None, params={}) -> Any:
|
1444
|
+
"""
|
1445
|
+
unWatches best bid & ask for symbols
|
1446
|
+
:param str[] symbols: unified symbol of the market to fetch the ticker for
|
1447
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1448
|
+
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
1449
|
+
"""
|
1450
|
+
await self.load_markets()
|
1451
|
+
symbols = self.market_symbols(symbols, None, True, False, True)
|
1452
|
+
marketType = None
|
1453
|
+
if symbols is None:
|
1454
|
+
raise ArgumentsRequired(self.id + ' watchBidsAsks required symbols argument')
|
1455
|
+
markets = self.markets_for_symbols(symbols)
|
1456
|
+
marketType, params = self.handle_market_type_and_params('watchBidsAsks', markets[0], params)
|
1457
|
+
isSpot = marketType == 'spot'
|
1458
|
+
if not isSpot:
|
1459
|
+
raise NotSupported(self.id + ' watchBidsAsks only support spot market')
|
1460
|
+
messageHashes = []
|
1461
|
+
topics = []
|
1462
|
+
for i in range(0, len(symbols)):
|
1463
|
+
if isSpot:
|
1464
|
+
market = self.market(symbols[i])
|
1465
|
+
topics.append('spot@public.bookTicker.v3.api@' + market['id'])
|
1466
|
+
messageHashes.append('unsubscribe:bidask:' + symbols[i])
|
1467
|
+
url = self.urls['api']['ws']['spot']
|
1468
|
+
request: dict = {
|
1469
|
+
'method': 'UNSUBSCRIPTION',
|
1470
|
+
'params': topics,
|
1471
|
+
}
|
1472
|
+
client = self.client(url)
|
1473
|
+
self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
|
1474
|
+
self.handle_unsubscriptions(client, messageHashes)
|
1475
|
+
return None
|
1476
|
+
|
1477
|
+
async def un_watch_ohlcv(self, symbol: str, timeframe='1m', params={}) -> Any:
|
1478
|
+
"""
|
1479
|
+
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1480
|
+
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
1481
|
+
:param str timeframe: the length of time each candle represents
|
1482
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1483
|
+
:param dict [params.timezone]: if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
|
1484
|
+
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
1485
|
+
"""
|
1486
|
+
await self.load_markets()
|
1487
|
+
market = self.market(symbol)
|
1488
|
+
symbol = market['symbol']
|
1489
|
+
timeframes = self.safe_value(self.options, 'timeframes', {})
|
1490
|
+
timeframeId = self.safe_string(timeframes, timeframe)
|
1491
|
+
messageHash = 'unsubscribe:candles:' + symbol + ':' + timeframe
|
1492
|
+
url = None
|
1493
|
+
if market['spot']:
|
1494
|
+
url = self.urls['api']['ws']['spot']
|
1495
|
+
channel = 'spot@public.kline.v3.api@' + market['id'] + '@' + timeframeId
|
1496
|
+
params['unsubscribed'] = True
|
1497
|
+
self.watch_spot_public(channel, messageHash, params)
|
1498
|
+
else:
|
1499
|
+
url = self.urls['api']['ws']['swap']
|
1500
|
+
channel = 'unsub.kline'
|
1501
|
+
requestParams: dict = {
|
1502
|
+
'symbol': market['id'],
|
1503
|
+
'interval': timeframeId,
|
1504
|
+
}
|
1505
|
+
self.watch_swap_public(channel, messageHash, requestParams, params)
|
1506
|
+
client = self.client(url)
|
1507
|
+
self.handle_unsubscriptions(client, [messageHash])
|
1508
|
+
return None
|
1509
|
+
|
1510
|
+
async def un_watch_order_book(self, symbol: str, params={}) -> Any:
|
1511
|
+
"""
|
1512
|
+
unWatches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
1513
|
+
:param str symbol: unified array of symbols
|
1514
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1515
|
+
:returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
|
1516
|
+
"""
|
1517
|
+
await self.load_markets()
|
1518
|
+
market = self.market(symbol)
|
1519
|
+
symbol = market['symbol']
|
1520
|
+
messageHash = 'unsubscribe:orderbook:' + symbol
|
1521
|
+
url = None
|
1522
|
+
if market['spot']:
|
1523
|
+
url = self.urls['api']['ws']['spot']
|
1524
|
+
channel = 'spot@public.increase.depth.v3.api@' + market['id']
|
1525
|
+
params['unsubscribed'] = True
|
1526
|
+
self.watch_spot_public(channel, messageHash, params)
|
1527
|
+
else:
|
1528
|
+
url = self.urls['api']['ws']['swap']
|
1529
|
+
channel = 'unsub.depth'
|
1530
|
+
requestParams: dict = {
|
1531
|
+
'symbol': market['id'],
|
1532
|
+
}
|
1533
|
+
self.watch_swap_public(channel, messageHash, requestParams, params)
|
1534
|
+
client = self.client(url)
|
1535
|
+
self.handle_unsubscriptions(client, [messageHash])
|
1536
|
+
return None
|
1537
|
+
|
1538
|
+
async def un_watch_trades(self, symbol: str, params={}) -> Any:
|
1539
|
+
"""
|
1540
|
+
unsubscribes from the trades channel
|
1541
|
+
:param str symbol: unified symbol of the market to fetch trades for
|
1542
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1543
|
+
:param str [params.name]: the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
|
1544
|
+
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
|
1545
|
+
"""
|
1546
|
+
await self.load_markets()
|
1547
|
+
market = self.market(symbol)
|
1548
|
+
symbol = market['symbol']
|
1549
|
+
messageHash = 'unsubscribe:trades:' + symbol
|
1550
|
+
url = None
|
1551
|
+
if market['spot']:
|
1552
|
+
url = self.urls['api']['ws']['spot']
|
1553
|
+
channel = 'spot@public.deals.v3.api@' + market['id']
|
1554
|
+
params['unsubscribed'] = True
|
1555
|
+
self.watch_spot_public(channel, messageHash, params)
|
1556
|
+
else:
|
1557
|
+
url = self.urls['api']['ws']['swap']
|
1558
|
+
channel = 'unsub.deal'
|
1559
|
+
requestParams: dict = {
|
1560
|
+
'symbol': market['id'],
|
1561
|
+
}
|
1562
|
+
self.watch_swap_public(channel, messageHash, requestParams, params)
|
1563
|
+
client = self.client(url)
|
1564
|
+
self.handle_unsubscriptions(client, [messageHash])
|
1565
|
+
return None
|
1566
|
+
|
1567
|
+
def handle_unsubscriptions(self, client: Client, messageHashes: List[str]):
|
1568
|
+
for i in range(0, len(messageHashes)):
|
1569
|
+
messageHash = messageHashes[i]
|
1570
|
+
subMessageHash = messageHash.replace('unsubscribe:', '')
|
1571
|
+
self.clean_unsubscription(client, subMessageHash, messageHash)
|
1572
|
+
if messageHash.find('ticker') >= 0:
|
1573
|
+
symbol = messageHash.replace('unsubscribe:ticker:', '')
|
1574
|
+
if symbol.find('unsubscribe') >= 0:
|
1575
|
+
# unWatchTickers
|
1576
|
+
symbols = list(self.tickers.keys())
|
1577
|
+
for j in range(0, len(symbols)):
|
1578
|
+
del self.tickers[symbols[j]]
|
1579
|
+
elif symbol in self.tickers:
|
1580
|
+
del self.tickers[symbol]
|
1581
|
+
elif messageHash.find('bidask') >= 0:
|
1582
|
+
symbol = messageHash.replace('unsubscribe:bidask:', '')
|
1583
|
+
if symbol in self.bidsasks:
|
1584
|
+
del self.bidsasks[symbol]
|
1585
|
+
elif messageHash.find('candles') >= 0:
|
1586
|
+
splitHashes = messageHash.split(':')
|
1587
|
+
symbol = self.safe_string(splitHashes, 2)
|
1588
|
+
if len(splitHashes) > 4:
|
1589
|
+
symbol += ':' + self.safe_string(splitHashes, 3)
|
1590
|
+
if symbol in self.ohlcvs:
|
1591
|
+
del self.ohlcvs[symbol]
|
1592
|
+
elif messageHash.find('orderbook') >= 0:
|
1593
|
+
symbol = messageHash.replace('unsubscribe:orderbook:', '')
|
1594
|
+
if symbol in self.orderbooks:
|
1595
|
+
del self.orderbooks[symbol]
|
1596
|
+
elif messageHash.find('trades') >= 0:
|
1597
|
+
symbol = messageHash.replace('unsubscribe:trades:', '')
|
1598
|
+
if symbol in self.trades:
|
1599
|
+
del self.trades[symbol]
|
1600
|
+
|
1354
1601
|
async def authenticate(self, subscriptionHash, params={}):
|
1355
1602
|
# we only need one listenKey since ccxt shares connections
|
1356
1603
|
listenKey = self.safe_string(self.options, 'listenKey')
|
ccxt/pro/poloniex.py
CHANGED
@@ -244,7 +244,9 @@ class poloniex(ccxt.async_support.poloniex):
|
|
244
244
|
request['quantity'] = self.amount_to_precision(market['symbol'], amount)
|
245
245
|
if price is not None:
|
246
246
|
request['price'] = self.price_to_precision(symbol, price)
|
247
|
-
|
247
|
+
orders = await self.trade_request('createOrder', self.extend(request, params))
|
248
|
+
order = self.safe_dict(orders, 0)
|
249
|
+
return order
|
248
250
|
|
249
251
|
async def cancel_order_ws(self, id: str, symbol: Str = None, params={}):
|
250
252
|
"""
|
@@ -262,7 +264,9 @@ class poloniex(ccxt.async_support.poloniex):
|
|
262
264
|
if clientOrderId is not None:
|
263
265
|
clientOrderIds = self.safe_value(params, 'clientOrderId', [])
|
264
266
|
params['clientOrderIds'] = self.array_concat(clientOrderIds, [clientOrderId])
|
265
|
-
|
267
|
+
orders = await self.cancel_orders_ws([id], symbol, params)
|
268
|
+
order = self.safe_dict(orders, 0)
|
269
|
+
return order
|
266
270
|
|
267
271
|
async def cancel_orders_ws(self, ids: List[str], symbol: Str = None, params={}):
|
268
272
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ccxt
|
3
|
-
Version: 4.4.
|
3
|
+
Version: 4.4.86
|
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
|
@@ -38,7 +38,7 @@ Requires-Dist: certifi>=2018.1.18
|
|
38
38
|
Requires-Dist: requests>=2.18.4
|
39
39
|
Requires-Dist: cryptography>=2.6.1
|
40
40
|
Requires-Dist: typing-extensions>=4.4.0
|
41
|
-
Requires-Dist: aiohttp
|
41
|
+
Requires-Dist: aiohttp>=3.10.11; python_version >= "3.5.2"
|
42
42
|
Requires-Dist: aiodns>=1.1.1; python_version >= "3.5.2"
|
43
43
|
Requires-Dist: yarl>=1.7.2; python_version >= "3.5.2"
|
44
44
|
Provides-Extra: qa
|
@@ -49,7 +49,7 @@ Requires-Dist: mypy==1.6.1; extra == "type"
|
|
49
49
|
|
50
50
|
# CCXT – CryptoCurrency eXchange Trading Library
|
51
51
|
|
52
|
-
[](https://www.npmjs.com/package/ccxt) [](https://npmjs.com/package/ccxt) [](https://pypi.python.org/pypi/ccxt) [](https://www.nuget.org/packages/ccxt) [](https://godoc.org/github.com/ccxt/ccxt/go/v4) [](https://discord.gg/ccxt) [](https://www.npmjs.com/package/ccxt) [](https://npmjs.com/package/ccxt) [](https://pypi.python.org/pypi/ccxt) [](https://www.nuget.org/packages/ccxt) [](https://godoc.org/github.com/ccxt/ccxt/go/v4) [](https://discord.gg/ccxt) [](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [](https://x.com/ccxt_official)
|
53
53
|
|
54
54
|
A `JavaScript` / `Python` / `PHP` / `C#` / `Go` library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
|
55
55
|
|
@@ -102,7 +102,7 @@ Current feature list:
|
|
102
102
|
| [](https://dex.woo.org/en/trade?ref=CCXT) | woofipro | [WOOFI PRO](https://dex.woo.org/en/trade?ref=CCXT) | [](https://orderly.network/docs/build-on-evm/building-on-evm) |  | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) | [](https://dex.woo.org/en/trade?ref=CCXT) |
|
103
103
|
|
104
104
|
## Supported Cryptocurrency Exchanges
|
105
|
-
<!--- init list -->The CCXT library currently supports the following
|
105
|
+
<!--- init list -->The CCXT library currently supports the following 101 cryptocurrency exchange markets and trading APIs:
|
106
106
|
|
107
107
|
|logo |id |name |ver |type |certified |pro |
|
108
108
|
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------:|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
|
@@ -130,8 +130,8 @@ Current feature list:
|
|
130
130
|
| [](https://bitso.com/?ref=itej) | bitso | [Bitso](https://bitso.com/?ref=itej) | [](https://bitso.com/api_info) |  | | |
|
131
131
|
| [](https://www.bitstamp.net) | bitstamp | [Bitstamp](https://www.bitstamp.net) | [](https://www.bitstamp.net/api) |  | | [](https://ccxt.pro) |
|
132
132
|
| [](https://bit.team/auth/sign-up?ref=bitboy2023) | bitteam | [BIT.TEAM](https://bit.team/auth/sign-up?ref=bitboy2023) | [](https://bit.team/trade/api/documentation) |  | | |
|
133
|
+
| [](https://www.bittrade.co.jp/register/?invite_code=znnq3) | bittrade | [BitTrade](https://www.bittrade.co.jp/register/?invite_code=znnq3) | [](https://api-doc.bittrade.co.jp) |  | | [](https://ccxt.pro) |
|
133
134
|
| [](https://bitvavo.com/?a=24F34952F7) | bitvavo | [Bitvavo](https://bitvavo.com/?a=24F34952F7) | [](https://docs.bitvavo.com/) |  | | [](https://ccxt.pro) |
|
134
|
-
| [](https://bl3p.eu) | bl3p | [BL3P](https://bl3p.eu) | [](https://github.com/BitonicNL/bl3p-api/tree/master/docs) |  | | |
|
135
135
|
| [](https://blockchain.com) | blockchaincom | [Blockchain.com](https://blockchain.com) | [](https://api.blockchain.com/v3) |  | | [](https://ccxt.pro) |
|
136
136
|
| [](https://blofin.com/register?referral_code=f79EsS) | blofin | [BloFin](https://blofin.com/register?referral_code=f79EsS) | [](https://blofin.com/docs) |  | | [](https://ccxt.pro) |
|
137
137
|
| [](https://btc-alpha.com/?r=123788) | btcalpha | [BTC-Alpha](https://btc-alpha.com/?r=123788) | [](https://btc-alpha.github.io/api-docs) |  | | |
|
@@ -168,16 +168,13 @@ Current feature list:
|
|
168
168
|
| [](https://hitbtc.com/?ref_id=5a5d39a65d466) | hitbtc | [HitBTC](https://hitbtc.com/?ref_id=5a5d39a65d466) | [](https://api.hitbtc.com) |  | | |
|
169
169
|
| [](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | hollaex | [HollaEx](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | [](https://apidocs.hollaex.com) |  | | [](https://ccxt.pro) |
|
170
170
|
| [](https://www.htx.com.vc/invite/en-us/1h?invite_code=6rmm2223) | htx | [HTX](https://www.htx.com.vc/invite/en-us/1h?invite_code=6rmm2223) | [](https://huobiapi.github.io/docs/spot/v1/en/) |  | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) |
|
171
|
-
| [](https://www.huobi.co.jp/register/?invite_code=znnq3) | huobijp | [Huobi Japan](https://www.huobi.co.jp/register/?invite_code=znnq3) | [](https://api-doc.huobi.co.jp) |  | | [](https://ccxt.pro) |
|
172
171
|
| [](https://app.hyperliquid.xyz/) | hyperliquid | [Hyperliquid](https://app.hyperliquid.xyz/) | [](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api) |  | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) |
|
173
|
-
| [](https://idex.io) | idex | [IDEX](https://idex.io) | [](https://api-docs-v3.idex.io/) |  | | [](https://ccxt.pro) |
|
174
172
|
| [](https://www.independentreserve.com) | independentreserve | [Independent Reserve](https://www.independentreserve.com) | [](https://www.independentreserve.com/API) |  | | [](https://ccxt.pro) |
|
175
173
|
| [](https://indodax.com/ref/testbitcoincoid/1) | indodax | [INDODAX](https://indodax.com/ref/testbitcoincoid/1) | [](https://github.com/btcid/indodax-official-api-docs) |  | | |
|
176
174
|
| [](https://www.kraken.com) | kraken | [Kraken](https://www.kraken.com) | [](https://docs.kraken.com/rest/) |  | | [](https://ccxt.pro) |
|
177
175
|
| [](https://futures.kraken.com/) | krakenfutures | [Kraken Futures](https://futures.kraken.com/) | [](https://docs.futures.kraken.com/#introduction) |  | | [](https://ccxt.pro) |
|
178
176
|
| [](https://www.kucoin.com/ucenter/signup?rcode=E5wkqe) | kucoin | [KuCoin](https://www.kucoin.com/ucenter/signup?rcode=E5wkqe) | [](https://docs.kucoin.com) |  | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) |
|
179
177
|
| [](https://futures.kucoin.com/?rcode=E5wkqe) | kucoinfutures | [KuCoin Futures](https://futures.kucoin.com/?rcode=E5wkqe) | [](https://docs.kucoin.com/futures) |  | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) |
|
180
|
-
| [](https://kuna.io?r=kunaid-gvfihe8az7o4) | kuna | [Kuna](https://kuna.io?r=kunaid-gvfihe8az7o4) | [](https://kuna.io/documents/api) |  | | |
|
181
178
|
| [](https://latoken.com/invite?r=mvgp2djk) | latoken | [Latoken](https://latoken.com/invite?r=mvgp2djk) | [](https://api.latoken.com) |  | | |
|
182
179
|
| [](https://www.lbank.com/login/?icode=7QCY) | lbank | [LBank](https://www.lbank.com/login/?icode=7QCY) | [](https://www.lbank.com/en-US/docs/index.html) |  | | [](https://ccxt.pro) |
|
183
180
|
| [](https://www.luno.com/invite/44893A) | luno | [luno](https://www.luno.com/invite/44893A) | [](https://www.luno.com/en/api) |  | | [](https://ccxt.pro) |
|
@@ -271,13 +268,13 @@ console.log(version, Object.keys(exchanges));
|
|
271
268
|
|
272
269
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
273
270
|
|
274
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
275
|
-
* unpkg: https://unpkg.com/ccxt@4.4.
|
271
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.86/dist/ccxt.browser.min.js
|
272
|
+
* unpkg: https://unpkg.com/ccxt@4.4.86/dist/ccxt.browser.min.js
|
276
273
|
|
277
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.
|
278
275
|
|
279
276
|
```HTML
|
280
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
277
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.86/dist/ccxt.browser.min.js"></script>
|
281
278
|
```
|
282
279
|
|
283
280
|
Creates a global `ccxt` object:
|