ccxt 4.1.84__py2.py3-none-any.whl → 4.1.85__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/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +4 -1
- ccxt/async_support/bingx.py +8 -7
- ccxt/async_support/bithumb.py +2 -2
- ccxt/async_support/bitmart.py +90 -73
- ccxt/async_support/bitopro.py +2 -2
- ccxt/async_support/coinex.py +1 -0
- ccxt/async_support/kucoinfutures.py +0 -3
- ccxt/base/exchange.py +4 -1
- ccxt/bingx.py +8 -7
- ccxt/bitmart.py +90 -73
- ccxt/coinex.py +1 -0
- ccxt/kucoinfutures.py +0 -3
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitmart.py +965 -247
- {ccxt-4.1.84.dist-info → ccxt-4.1.85.dist-info}/METADATA +6 -5
- {ccxt-4.1.84.dist-info → ccxt-4.1.85.dist-info}/RECORD +20 -20
- {ccxt-4.1.84.dist-info → ccxt-4.1.85.dist-info}/WHEEL +0 -0
- {ccxt-4.1.84.dist-info → ccxt-4.1.85.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/async_support/__init__.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.1.
|
5
|
+
__version__ = '4.1.85'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -1016,6 +1016,9 @@ class Exchange(BaseExchange):
|
|
1016
1016
|
async def close_all_positions(self, params={}):
|
1017
1017
|
raise NotSupported(self.id + ' closeAllPositions() is not supported yet')
|
1018
1018
|
|
1019
|
+
async def fetch_l3_order_book(self, symbol: str, limit: Int = None, params={}):
|
1020
|
+
raise BadRequest(self.id + ' fetchL3OrderBook() is not supported yet')
|
1021
|
+
|
1019
1022
|
async def fetch_deposit_address(self, code: str, params={}):
|
1020
1023
|
if self.has['fetchDepositAddresses']:
|
1021
1024
|
depositAddresses = await self.fetchDepositAddresses([code], params)
|
ccxt/async_support/bingx.py
CHANGED
@@ -1913,6 +1913,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
1913
1913
|
positionSide = self.safe_string_2(order, 'positionSide', 'ps')
|
1914
1914
|
marketType = 'spot' if (positionSide is None) else 'swap'
|
1915
1915
|
marketId = self.safe_string_2(order, 'symbol', 's')
|
1916
|
+
if market is None:
|
1917
|
+
market = self.safe_market(marketId, None, None, marketType)
|
1916
1918
|
symbol = self.safe_symbol(marketId, market, '-', marketType)
|
1917
1919
|
orderId = self.safe_string_2(order, 'orderId', 'i')
|
1918
1920
|
side = self.safe_string_lower_2(order, 'side', 'S')
|
@@ -2251,15 +2253,14 @@ class bingx(Exchange, ImplicitAPI):
|
|
2251
2253
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2252
2254
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
2253
2255
|
"""
|
2254
|
-
if symbol is None:
|
2255
|
-
raise ArgumentsRequired(self.id + ' fetchOrders() requires a symbol argument')
|
2256
2256
|
await self.load_markets()
|
2257
|
-
market =
|
2258
|
-
request = {
|
2259
|
-
|
2260
|
-
|
2257
|
+
market = None
|
2258
|
+
request = {}
|
2259
|
+
if symbol is not None:
|
2260
|
+
market = self.market(symbol)
|
2261
|
+
request['symbol'] = market['id']
|
2261
2262
|
response = None
|
2262
|
-
marketType, query = self.handle_market_type_and_params('
|
2263
|
+
marketType, query = self.handle_market_type_and_params('fetchOpenOrders', market, params)
|
2263
2264
|
if marketType == 'spot':
|
2264
2265
|
response = await self.spotV1PrivateGetTradeOpenOrders(self.extend(request, query))
|
2265
2266
|
else:
|
ccxt/async_support/bithumb.py
CHANGED
@@ -903,11 +903,11 @@ class bithumb(Exchange, ImplicitAPI):
|
|
903
903
|
}
|
904
904
|
return await self.privatePostTradeCancel(self.extend(request, params))
|
905
905
|
|
906
|
-
def cancel_unified_order(self, order, params={}):
|
906
|
+
async def cancel_unified_order(self, order, params={}):
|
907
907
|
request = {
|
908
908
|
'side': order['side'],
|
909
909
|
}
|
910
|
-
return self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
|
910
|
+
return await self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
|
911
911
|
|
912
912
|
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
913
913
|
"""
|
ccxt/async_support/bitmart.py
CHANGED
@@ -1308,48 +1308,58 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1308
1308
|
#
|
1309
1309
|
# public fetchTrades spot( amount = count * price )
|
1310
1310
|
#
|
1311
|
-
#
|
1312
|
-
#
|
1313
|
-
#
|
1314
|
-
#
|
1315
|
-
#
|
1316
|
-
#
|
1317
|
-
#
|
1311
|
+
# {
|
1312
|
+
# "amount": "818.94",
|
1313
|
+
# "order_time": "1637601839035", # ETH/USDT
|
1314
|
+
# "price": "4221.99",
|
1315
|
+
# "count": "0.19397",
|
1316
|
+
# "type": "buy"
|
1317
|
+
# }
|
1318
1318
|
#
|
1319
1319
|
# spot: fetchMyTrades
|
1320
1320
|
#
|
1321
|
-
#
|
1322
|
-
#
|
1323
|
-
#
|
1324
|
-
#
|
1325
|
-
#
|
1326
|
-
#
|
1327
|
-
#
|
1328
|
-
#
|
1329
|
-
#
|
1330
|
-
#
|
1331
|
-
#
|
1332
|
-
#
|
1333
|
-
#
|
1334
|
-
#
|
1335
|
-
#
|
1336
|
-
#
|
1321
|
+
# {
|
1322
|
+
# "tradeId":"182342999769370687",
|
1323
|
+
# "orderId":"183270218784142990",
|
1324
|
+
# "clientOrderId":"183270218784142990",
|
1325
|
+
# "symbol":"ADA_USDT",
|
1326
|
+
# "side":"buy",
|
1327
|
+
# "orderMode":"spot",
|
1328
|
+
# "type":"market",
|
1329
|
+
# "price":"0.245948",
|
1330
|
+
# "size":"20.71",
|
1331
|
+
# "notional":"5.09358308",
|
1332
|
+
# "fee":"0.00509358",
|
1333
|
+
# "feeCoinName":"USDT",
|
1334
|
+
# "tradeRole":"taker",
|
1335
|
+
# "createTime":1695658457836,
|
1336
|
+
# }
|
1337
1337
|
#
|
1338
1338
|
# swap: fetchMyTrades
|
1339
1339
|
#
|
1340
|
-
#
|
1341
|
-
#
|
1342
|
-
#
|
1343
|
-
#
|
1344
|
-
#
|
1345
|
-
#
|
1346
|
-
#
|
1347
|
-
#
|
1348
|
-
#
|
1349
|
-
#
|
1350
|
-
#
|
1351
|
-
#
|
1352
|
-
#
|
1340
|
+
# {
|
1341
|
+
# "order_id": "230930336848609",
|
1342
|
+
# "trade_id": "6212604014",
|
1343
|
+
# "symbol": "BTCUSDT",
|
1344
|
+
# "side": 3,
|
1345
|
+
# "price": "26910.4",
|
1346
|
+
# "vol": "1",
|
1347
|
+
# "exec_type": "Taker",
|
1348
|
+
# "profit": False,
|
1349
|
+
# "create_time": 1695961596692,
|
1350
|
+
# "realised_profit": "-0.0003",
|
1351
|
+
# "paid_fees": "0.01614624"
|
1352
|
+
# }
|
1353
|
+
#
|
1354
|
+
# ws swap
|
1355
|
+
#
|
1356
|
+
# {
|
1357
|
+
# 'fee': '-0.000044502',
|
1358
|
+
# 'feeCcy': 'USDT',
|
1359
|
+
# 'fillPrice': '74.17',
|
1360
|
+
# 'fillQty': '1',
|
1361
|
+
# 'lastTradeID': 6802340762
|
1362
|
+
# }
|
1353
1363
|
#
|
1354
1364
|
timestamp = self.safe_integer_n(trade, ['order_time', 'createTime', 'create_time'])
|
1355
1365
|
isPublicTrade = ('order_time' in trade)
|
@@ -1362,7 +1372,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1362
1372
|
cost = self.safe_string(trade, 'amount')
|
1363
1373
|
side = self.safe_string(trade, 'type')
|
1364
1374
|
else:
|
1365
|
-
amount = self.
|
1375
|
+
amount = self.safe_string_n(trade, ['size', 'vol', 'fillQty'])
|
1366
1376
|
cost = self.safe_string(trade, 'notional')
|
1367
1377
|
type = self.safe_string(trade, 'type')
|
1368
1378
|
side = self.parse_order_side(self.safe_string(trade, 'side'))
|
@@ -1381,14 +1391,14 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1381
1391
|
}
|
1382
1392
|
return self.safe_trade({
|
1383
1393
|
'info': trade,
|
1384
|
-
'id': self.
|
1394
|
+
'id': self.safe_string_n(trade, ['tradeId', 'trade_id', 'lastTradeID']),
|
1385
1395
|
'order': self.safe_string_2(trade, 'orderId', 'order_id'),
|
1386
1396
|
'timestamp': timestamp,
|
1387
1397
|
'datetime': self.iso8601(timestamp),
|
1388
1398
|
'symbol': market['symbol'],
|
1389
1399
|
'type': type,
|
1390
1400
|
'side': side,
|
1391
|
-
'price': self.
|
1401
|
+
'price': self.safe_string_2(trade, 'price', 'fillPrice'),
|
1392
1402
|
'amount': amount,
|
1393
1403
|
'cost': cost,
|
1394
1404
|
'takerOrMaker': self.safe_string_lower_2(trade, 'tradeRole', 'exec_type'),
|
@@ -1439,38 +1449,45 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1439
1449
|
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1440
1450
|
#
|
1441
1451
|
# spot
|
1442
|
-
#
|
1443
|
-
#
|
1444
|
-
#
|
1445
|
-
#
|
1446
|
-
#
|
1447
|
-
#
|
1448
|
-
#
|
1449
|
-
#
|
1450
|
-
#
|
1451
|
-
# ]
|
1452
|
+
# [
|
1453
|
+
# "1699512060", # timestamp
|
1454
|
+
# "36746.49", # open
|
1455
|
+
# "36758.71", # high
|
1456
|
+
# "36736.13", # low
|
1457
|
+
# "36755.99", # close
|
1458
|
+
# "2.83965", # base volume
|
1459
|
+
# "104353.57" # quote volume
|
1460
|
+
# ]
|
1452
1461
|
#
|
1453
1462
|
# swap
|
1454
|
-
#
|
1455
|
-
#
|
1456
|
-
#
|
1457
|
-
#
|
1458
|
-
#
|
1459
|
-
#
|
1460
|
-
#
|
1461
|
-
#
|
1462
|
-
# }
|
1463
|
+
# {
|
1464
|
+
# "low_price": "20090.3",
|
1465
|
+
# "high_price": "20095.5",
|
1466
|
+
# "open_price": "20092.6",
|
1467
|
+
# "close_price": "20091.4",
|
1468
|
+
# "volume": "8748",
|
1469
|
+
# "timestamp": 1665002281
|
1470
|
+
# }
|
1463
1471
|
#
|
1464
1472
|
# ws
|
1465
|
-
#
|
1466
|
-
#
|
1467
|
-
#
|
1468
|
-
#
|
1469
|
-
#
|
1470
|
-
#
|
1471
|
-
#
|
1472
|
-
#
|
1473
|
-
#
|
1473
|
+
# [
|
1474
|
+
# 1631056350, # timestamp
|
1475
|
+
# "46532.83", # open
|
1476
|
+
# "46555.71", # high
|
1477
|
+
# "46511.41", # low
|
1478
|
+
# "46555.71", # close
|
1479
|
+
# "0.25", # volume
|
1480
|
+
# ]
|
1481
|
+
#
|
1482
|
+
# ws swap
|
1483
|
+
# {
|
1484
|
+
# "symbol":"BTCUSDT",
|
1485
|
+
# "o":"146.24",
|
1486
|
+
# "h":"146.24",
|
1487
|
+
# "l":"146.24",
|
1488
|
+
# "c":"146.24",
|
1489
|
+
# "v":"146"
|
1490
|
+
# }
|
1474
1491
|
#
|
1475
1492
|
if isinstance(ohlcv, list):
|
1476
1493
|
return [
|
@@ -1483,12 +1500,12 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1483
1500
|
]
|
1484
1501
|
else:
|
1485
1502
|
return [
|
1486
|
-
self.
|
1487
|
-
self.
|
1488
|
-
self.
|
1489
|
-
self.
|
1490
|
-
self.
|
1491
|
-
self.
|
1503
|
+
self.safe_timestamp_2(ohlcv, 'timestamp', 'ts'),
|
1504
|
+
self.safe_number_2(ohlcv, 'open_price', 'o'),
|
1505
|
+
self.safe_number_2(ohlcv, 'high_price', 'h'),
|
1506
|
+
self.safe_number_2(ohlcv, 'low_price', 'l'),
|
1507
|
+
self.safe_number_2(ohlcv, 'close_price', 'c'),
|
1508
|
+
self.safe_number_2(ohlcv, 'volume', 'v'),
|
1492
1509
|
]
|
1493
1510
|
|
1494
1511
|
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
ccxt/async_support/bitopro.py
CHANGED
@@ -1191,11 +1191,11 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1191
1191
|
#
|
1192
1192
|
return self.parse_orders(orders, market, since, limit)
|
1193
1193
|
|
1194
|
-
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1194
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1195
1195
|
request = {
|
1196
1196
|
'statusKind': 'OPEN',
|
1197
1197
|
}
|
1198
|
-
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1198
|
+
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1199
1199
|
|
1200
1200
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1201
1201
|
"""
|
ccxt/async_support/coinex.py
CHANGED
@@ -692,9 +692,6 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
692
692
|
orderbook['nonce'] = self.safe_integer(data, 'sequence')
|
693
693
|
return orderbook
|
694
694
|
|
695
|
-
async def fetch_l3_order_book(self, symbol: str, limit: Int = None, params={}):
|
696
|
-
raise BadRequest(self.id + ' fetchL3OrderBook() is not supported yet')
|
697
|
-
|
698
695
|
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
699
696
|
"""
|
700
697
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.1.
|
7
|
+
__version__ = '4.1.85'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -3853,6 +3853,9 @@ class Exchange(object):
|
|
3853
3853
|
def close_all_positions(self, params={}):
|
3854
3854
|
raise NotSupported(self.id + ' closeAllPositions() is not supported yet')
|
3855
3855
|
|
3856
|
+
def fetch_l3_order_book(self, symbol: str, limit: Int = None, params={}):
|
3857
|
+
raise BadRequest(self.id + ' fetchL3OrderBook() is not supported yet')
|
3858
|
+
|
3856
3859
|
def parse_last_price(self, price, market: Market = None):
|
3857
3860
|
raise NotSupported(self.id + ' parseLastPrice() is not supported yet')
|
3858
3861
|
|
ccxt/bingx.py
CHANGED
@@ -1912,6 +1912,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
1912
1912
|
positionSide = self.safe_string_2(order, 'positionSide', 'ps')
|
1913
1913
|
marketType = 'spot' if (positionSide is None) else 'swap'
|
1914
1914
|
marketId = self.safe_string_2(order, 'symbol', 's')
|
1915
|
+
if market is None:
|
1916
|
+
market = self.safe_market(marketId, None, None, marketType)
|
1915
1917
|
symbol = self.safe_symbol(marketId, market, '-', marketType)
|
1916
1918
|
orderId = self.safe_string_2(order, 'orderId', 'i')
|
1917
1919
|
side = self.safe_string_lower_2(order, 'side', 'S')
|
@@ -2250,15 +2252,14 @@ class bingx(Exchange, ImplicitAPI):
|
|
2250
2252
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2251
2253
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
2252
2254
|
"""
|
2253
|
-
if symbol is None:
|
2254
|
-
raise ArgumentsRequired(self.id + ' fetchOrders() requires a symbol argument')
|
2255
2255
|
self.load_markets()
|
2256
|
-
market =
|
2257
|
-
request = {
|
2258
|
-
|
2259
|
-
|
2256
|
+
market = None
|
2257
|
+
request = {}
|
2258
|
+
if symbol is not None:
|
2259
|
+
market = self.market(symbol)
|
2260
|
+
request['symbol'] = market['id']
|
2260
2261
|
response = None
|
2261
|
-
marketType, query = self.handle_market_type_and_params('
|
2262
|
+
marketType, query = self.handle_market_type_and_params('fetchOpenOrders', market, params)
|
2262
2263
|
if marketType == 'spot':
|
2263
2264
|
response = self.spotV1PrivateGetTradeOpenOrders(self.extend(request, query))
|
2264
2265
|
else:
|
ccxt/bitmart.py
CHANGED
@@ -1308,48 +1308,58 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1308
1308
|
#
|
1309
1309
|
# public fetchTrades spot( amount = count * price )
|
1310
1310
|
#
|
1311
|
-
#
|
1312
|
-
#
|
1313
|
-
#
|
1314
|
-
#
|
1315
|
-
#
|
1316
|
-
#
|
1317
|
-
#
|
1311
|
+
# {
|
1312
|
+
# "amount": "818.94",
|
1313
|
+
# "order_time": "1637601839035", # ETH/USDT
|
1314
|
+
# "price": "4221.99",
|
1315
|
+
# "count": "0.19397",
|
1316
|
+
# "type": "buy"
|
1317
|
+
# }
|
1318
1318
|
#
|
1319
1319
|
# spot: fetchMyTrades
|
1320
1320
|
#
|
1321
|
-
#
|
1322
|
-
#
|
1323
|
-
#
|
1324
|
-
#
|
1325
|
-
#
|
1326
|
-
#
|
1327
|
-
#
|
1328
|
-
#
|
1329
|
-
#
|
1330
|
-
#
|
1331
|
-
#
|
1332
|
-
#
|
1333
|
-
#
|
1334
|
-
#
|
1335
|
-
#
|
1336
|
-
#
|
1321
|
+
# {
|
1322
|
+
# "tradeId":"182342999769370687",
|
1323
|
+
# "orderId":"183270218784142990",
|
1324
|
+
# "clientOrderId":"183270218784142990",
|
1325
|
+
# "symbol":"ADA_USDT",
|
1326
|
+
# "side":"buy",
|
1327
|
+
# "orderMode":"spot",
|
1328
|
+
# "type":"market",
|
1329
|
+
# "price":"0.245948",
|
1330
|
+
# "size":"20.71",
|
1331
|
+
# "notional":"5.09358308",
|
1332
|
+
# "fee":"0.00509358",
|
1333
|
+
# "feeCoinName":"USDT",
|
1334
|
+
# "tradeRole":"taker",
|
1335
|
+
# "createTime":1695658457836,
|
1336
|
+
# }
|
1337
1337
|
#
|
1338
1338
|
# swap: fetchMyTrades
|
1339
1339
|
#
|
1340
|
-
#
|
1341
|
-
#
|
1342
|
-
#
|
1343
|
-
#
|
1344
|
-
#
|
1345
|
-
#
|
1346
|
-
#
|
1347
|
-
#
|
1348
|
-
#
|
1349
|
-
#
|
1350
|
-
#
|
1351
|
-
#
|
1352
|
-
#
|
1340
|
+
# {
|
1341
|
+
# "order_id": "230930336848609",
|
1342
|
+
# "trade_id": "6212604014",
|
1343
|
+
# "symbol": "BTCUSDT",
|
1344
|
+
# "side": 3,
|
1345
|
+
# "price": "26910.4",
|
1346
|
+
# "vol": "1",
|
1347
|
+
# "exec_type": "Taker",
|
1348
|
+
# "profit": False,
|
1349
|
+
# "create_time": 1695961596692,
|
1350
|
+
# "realised_profit": "-0.0003",
|
1351
|
+
# "paid_fees": "0.01614624"
|
1352
|
+
# }
|
1353
|
+
#
|
1354
|
+
# ws swap
|
1355
|
+
#
|
1356
|
+
# {
|
1357
|
+
# 'fee': '-0.000044502',
|
1358
|
+
# 'feeCcy': 'USDT',
|
1359
|
+
# 'fillPrice': '74.17',
|
1360
|
+
# 'fillQty': '1',
|
1361
|
+
# 'lastTradeID': 6802340762
|
1362
|
+
# }
|
1353
1363
|
#
|
1354
1364
|
timestamp = self.safe_integer_n(trade, ['order_time', 'createTime', 'create_time'])
|
1355
1365
|
isPublicTrade = ('order_time' in trade)
|
@@ -1362,7 +1372,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1362
1372
|
cost = self.safe_string(trade, 'amount')
|
1363
1373
|
side = self.safe_string(trade, 'type')
|
1364
1374
|
else:
|
1365
|
-
amount = self.
|
1375
|
+
amount = self.safe_string_n(trade, ['size', 'vol', 'fillQty'])
|
1366
1376
|
cost = self.safe_string(trade, 'notional')
|
1367
1377
|
type = self.safe_string(trade, 'type')
|
1368
1378
|
side = self.parse_order_side(self.safe_string(trade, 'side'))
|
@@ -1381,14 +1391,14 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1381
1391
|
}
|
1382
1392
|
return self.safe_trade({
|
1383
1393
|
'info': trade,
|
1384
|
-
'id': self.
|
1394
|
+
'id': self.safe_string_n(trade, ['tradeId', 'trade_id', 'lastTradeID']),
|
1385
1395
|
'order': self.safe_string_2(trade, 'orderId', 'order_id'),
|
1386
1396
|
'timestamp': timestamp,
|
1387
1397
|
'datetime': self.iso8601(timestamp),
|
1388
1398
|
'symbol': market['symbol'],
|
1389
1399
|
'type': type,
|
1390
1400
|
'side': side,
|
1391
|
-
'price': self.
|
1401
|
+
'price': self.safe_string_2(trade, 'price', 'fillPrice'),
|
1392
1402
|
'amount': amount,
|
1393
1403
|
'cost': cost,
|
1394
1404
|
'takerOrMaker': self.safe_string_lower_2(trade, 'tradeRole', 'exec_type'),
|
@@ -1439,38 +1449,45 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1439
1449
|
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1440
1450
|
#
|
1441
1451
|
# spot
|
1442
|
-
#
|
1443
|
-
#
|
1444
|
-
#
|
1445
|
-
#
|
1446
|
-
#
|
1447
|
-
#
|
1448
|
-
#
|
1449
|
-
#
|
1450
|
-
#
|
1451
|
-
# ]
|
1452
|
+
# [
|
1453
|
+
# "1699512060", # timestamp
|
1454
|
+
# "36746.49", # open
|
1455
|
+
# "36758.71", # high
|
1456
|
+
# "36736.13", # low
|
1457
|
+
# "36755.99", # close
|
1458
|
+
# "2.83965", # base volume
|
1459
|
+
# "104353.57" # quote volume
|
1460
|
+
# ]
|
1452
1461
|
#
|
1453
1462
|
# swap
|
1454
|
-
#
|
1455
|
-
#
|
1456
|
-
#
|
1457
|
-
#
|
1458
|
-
#
|
1459
|
-
#
|
1460
|
-
#
|
1461
|
-
#
|
1462
|
-
# }
|
1463
|
+
# {
|
1464
|
+
# "low_price": "20090.3",
|
1465
|
+
# "high_price": "20095.5",
|
1466
|
+
# "open_price": "20092.6",
|
1467
|
+
# "close_price": "20091.4",
|
1468
|
+
# "volume": "8748",
|
1469
|
+
# "timestamp": 1665002281
|
1470
|
+
# }
|
1463
1471
|
#
|
1464
1472
|
# ws
|
1465
|
-
#
|
1466
|
-
#
|
1467
|
-
#
|
1468
|
-
#
|
1469
|
-
#
|
1470
|
-
#
|
1471
|
-
#
|
1472
|
-
#
|
1473
|
-
#
|
1473
|
+
# [
|
1474
|
+
# 1631056350, # timestamp
|
1475
|
+
# "46532.83", # open
|
1476
|
+
# "46555.71", # high
|
1477
|
+
# "46511.41", # low
|
1478
|
+
# "46555.71", # close
|
1479
|
+
# "0.25", # volume
|
1480
|
+
# ]
|
1481
|
+
#
|
1482
|
+
# ws swap
|
1483
|
+
# {
|
1484
|
+
# "symbol":"BTCUSDT",
|
1485
|
+
# "o":"146.24",
|
1486
|
+
# "h":"146.24",
|
1487
|
+
# "l":"146.24",
|
1488
|
+
# "c":"146.24",
|
1489
|
+
# "v":"146"
|
1490
|
+
# }
|
1474
1491
|
#
|
1475
1492
|
if isinstance(ohlcv, list):
|
1476
1493
|
return [
|
@@ -1483,12 +1500,12 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1483
1500
|
]
|
1484
1501
|
else:
|
1485
1502
|
return [
|
1486
|
-
self.
|
1487
|
-
self.
|
1488
|
-
self.
|
1489
|
-
self.
|
1490
|
-
self.
|
1491
|
-
self.
|
1503
|
+
self.safe_timestamp_2(ohlcv, 'timestamp', 'ts'),
|
1504
|
+
self.safe_number_2(ohlcv, 'open_price', 'o'),
|
1505
|
+
self.safe_number_2(ohlcv, 'high_price', 'h'),
|
1506
|
+
self.safe_number_2(ohlcv, 'low_price', 'l'),
|
1507
|
+
self.safe_number_2(ohlcv, 'close_price', 'c'),
|
1508
|
+
self.safe_number_2(ohlcv, 'volume', 'v'),
|
1492
1509
|
]
|
1493
1510
|
|
1494
1511
|
def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
ccxt/coinex.py
CHANGED
ccxt/kucoinfutures.py
CHANGED
@@ -692,9 +692,6 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
692
692
|
orderbook['nonce'] = self.safe_integer(data, 'sequence')
|
693
693
|
return orderbook
|
694
694
|
|
695
|
-
def fetch_l3_order_book(self, symbol: str, limit: Int = None, params={}):
|
696
|
-
raise BadRequest(self.id + ' fetchL3OrderBook() is not supported yet')
|
697
|
-
|
698
695
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
699
696
|
"""
|
700
697
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|