ccxt 3.0.86__py2.py3-none-any.whl → 3.0.87__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/ace.py +2 -1
- ccxt/alpaca.py +2 -1
- ccxt/ascendex.py +2 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +2 -1
- ccxt/async_support/alpaca.py +2 -1
- ccxt/async_support/ascendex.py +2 -1
- ccxt/async_support/base/exchange.py +6 -6
- ccxt/async_support/bequant.py +2 -1
- ccxt/async_support/bigone.py +2 -1
- ccxt/async_support/binance.py +4 -3
- ccxt/async_support/binancecoinm.py +2 -1
- ccxt/async_support/binanceus.py +2 -1
- ccxt/async_support/binanceusdm.py +2 -1
- ccxt/async_support/bit2c.py +2 -1
- ccxt/async_support/bitbank.py +2 -1
- ccxt/async_support/bitbay.py +2 -1
- ccxt/async_support/bitbns.py +2 -1
- ccxt/async_support/bitcoincom.py +2 -1
- ccxt/async_support/bitfinex.py +2 -1
- ccxt/async_support/bitfinex2.py +2 -1
- ccxt/async_support/bitflyer.py +2 -1
- ccxt/async_support/bitforex.py +2 -1
- ccxt/async_support/bitget.py +19 -3
- ccxt/async_support/bithumb.py +2 -1
- ccxt/async_support/bitmart.py +2 -1
- ccxt/async_support/bitmex.py +3 -2
- ccxt/async_support/bitopro.py +2 -1
- ccxt/async_support/bitpanda.py +2 -1
- ccxt/async_support/bitrue.py +3 -2
- ccxt/async_support/bitso.py +2 -1
- ccxt/async_support/bitstamp.py +2 -1
- ccxt/async_support/bitstamp1.py +2 -1
- ccxt/async_support/bittrex.py +2 -1
- ccxt/async_support/bitvavo.py +3 -2
- ccxt/async_support/bkex.py +2 -1
- ccxt/async_support/bl3p.py +2 -1
- ccxt/async_support/blockchaincom.py +2 -1
- ccxt/async_support/btcalpha.py +2 -1
- ccxt/async_support/btcbox.py +4 -3
- ccxt/async_support/btcex.py +2 -1
- ccxt/async_support/btcmarkets.py +2 -1
- ccxt/async_support/btctradeua.py +2 -1
- ccxt/async_support/btcturk.py +2 -1
- ccxt/async_support/bybit.py +2 -1
- ccxt/async_support/cex.py +2 -1
- ccxt/async_support/coinbase.py +2 -1
- ccxt/async_support/coinbaseprime.py +2 -1
- ccxt/async_support/coinbasepro.py +4 -3
- ccxt/async_support/coincheck.py +2 -1
- ccxt/async_support/coinex.py +3 -2
- ccxt/async_support/coinfalcon.py +2 -1
- ccxt/async_support/coinmate.py +2 -1
- ccxt/async_support/coinone.py +2 -1
- ccxt/async_support/coinsph.py +3 -2
- ccxt/async_support/coinspot.py +2 -1
- ccxt/async_support/cryptocom.py +2 -1
- ccxt/async_support/currencycom.py +2 -1
- ccxt/async_support/delta.py +2 -1
- ccxt/async_support/deribit.py +2 -1
- ccxt/async_support/digifinex.py +4 -3
- ccxt/async_support/exmo.py +2 -1
- ccxt/async_support/fmfwio.py +2 -1
- ccxt/async_support/gate.py +2 -1
- ccxt/async_support/gateio.py +2 -1
- ccxt/async_support/gemini.py +2 -1
- ccxt/async_support/hitbtc.py +2 -1
- ccxt/async_support/hitbtc3.py +2 -1
- ccxt/async_support/hollaex.py +2 -1
- ccxt/async_support/huobi.py +2 -1
- ccxt/async_support/huobijp.py +2 -1
- ccxt/async_support/huobipro.py +2 -1
- ccxt/async_support/idex.py +3 -2
- ccxt/async_support/independentreserve.py +2 -1
- ccxt/async_support/indodax.py +2 -1
- ccxt/async_support/kraken.py +2 -1
- ccxt/async_support/krakenfutures.py +2 -1
- ccxt/async_support/kucoin.py +3 -2
- ccxt/async_support/kucoinfutures.py +147 -8
- ccxt/async_support/kuna.py +2 -1
- ccxt/async_support/latoken.py +2 -1
- ccxt/async_support/lbank.py +2 -1
- ccxt/async_support/lbank2.py +2 -1
- ccxt/async_support/luno.py +2 -1
- ccxt/async_support/lykke.py +2 -1
- ccxt/async_support/mercado.py +2 -1
- ccxt/async_support/mexc.py +4 -1
- ccxt/async_support/mexc3.py +2 -1
- ccxt/async_support/ndax.py +2 -1
- ccxt/async_support/novadax.py +2 -1
- ccxt/async_support/oceanex.py +2 -1
- ccxt/async_support/okcoin.py +2 -1
- ccxt/async_support/okex.py +2 -1
- ccxt/async_support/okex5.py +2 -1
- ccxt/async_support/okx.py +5 -1
- ccxt/async_support/paymium.py +2 -1
- ccxt/async_support/phemex.py +2 -1
- ccxt/async_support/poloniex.py +3 -1
- ccxt/async_support/poloniexfutures.py +2 -1
- ccxt/async_support/probit.py +2 -1
- ccxt/async_support/stex.py +3 -2
- ccxt/async_support/tidex.py +2 -1
- ccxt/async_support/timex.py +2 -1
- ccxt/async_support/tokocrypto.py +3 -2
- ccxt/async_support/upbit.py +2 -1
- ccxt/async_support/wavesexchange.py +2 -1
- ccxt/async_support/wazirx.py +2 -1
- ccxt/async_support/whitebit.py +2 -1
- ccxt/async_support/woo.py +2 -1
- ccxt/async_support/xt.py +2 -1
- ccxt/async_support/yobit.py +2 -1
- ccxt/async_support/zaif.py +2 -1
- ccxt/async_support/zonda.py +2 -1
- ccxt/base/exchange.py +6 -74
- ccxt/base/types.py +24 -0
- ccxt/bequant.py +2 -1
- ccxt/bigone.py +2 -1
- ccxt/binance.py +4 -3
- ccxt/binancecoinm.py +2 -1
- ccxt/binanceus.py +2 -1
- ccxt/binanceusdm.py +2 -1
- ccxt/bit2c.py +2 -1
- ccxt/bitbank.py +2 -1
- ccxt/bitbay.py +2 -1
- ccxt/bitbns.py +2 -1
- ccxt/bitcoincom.py +2 -1
- ccxt/bitfinex.py +2 -1
- ccxt/bitfinex2.py +2 -1
- ccxt/bitflyer.py +2 -1
- ccxt/bitforex.py +2 -1
- ccxt/bitget.py +19 -3
- ccxt/bithumb.py +2 -1
- ccxt/bitmart.py +2 -1
- ccxt/bitmex.py +3 -2
- ccxt/bitopro.py +2 -1
- ccxt/bitpanda.py +2 -1
- ccxt/bitrue.py +3 -2
- ccxt/bitso.py +2 -1
- ccxt/bitstamp.py +2 -1
- ccxt/bitstamp1.py +2 -1
- ccxt/bittrex.py +2 -1
- ccxt/bitvavo.py +3 -2
- ccxt/bkex.py +2 -1
- ccxt/bl3p.py +2 -1
- ccxt/blockchaincom.py +2 -1
- ccxt/btcalpha.py +2 -1
- ccxt/btcbox.py +4 -3
- ccxt/btcex.py +2 -1
- ccxt/btcmarkets.py +2 -1
- ccxt/btctradeua.py +2 -1
- ccxt/btcturk.py +2 -1
- ccxt/bybit.py +2 -1
- ccxt/cex.py +2 -1
- ccxt/coinbase.py +2 -1
- ccxt/coinbaseprime.py +2 -1
- ccxt/coinbasepro.py +4 -3
- ccxt/coincheck.py +2 -1
- ccxt/coinex.py +3 -2
- ccxt/coinfalcon.py +2 -1
- ccxt/coinmate.py +2 -1
- ccxt/coinone.py +2 -1
- ccxt/coinsph.py +3 -2
- ccxt/coinspot.py +2 -1
- ccxt/cryptocom.py +2 -1
- ccxt/currencycom.py +2 -1
- ccxt/delta.py +2 -1
- ccxt/deribit.py +2 -1
- ccxt/digifinex.py +4 -3
- ccxt/exmo.py +2 -1
- ccxt/fmfwio.py +2 -1
- ccxt/gate.py +2 -1
- ccxt/gateio.py +2 -1
- ccxt/gemini.py +2 -1
- ccxt/hitbtc.py +2 -1
- ccxt/hitbtc3.py +2 -1
- ccxt/hollaex.py +2 -1
- ccxt/huobi.py +2 -1
- ccxt/huobijp.py +2 -1
- ccxt/huobipro.py +2 -1
- ccxt/idex.py +3 -2
- ccxt/independentreserve.py +2 -1
- ccxt/indodax.py +2 -1
- ccxt/kraken.py +2 -1
- ccxt/krakenfutures.py +2 -1
- ccxt/kucoin.py +3 -2
- ccxt/kucoinfutures.py +147 -8
- ccxt/kuna.py +2 -1
- ccxt/latoken.py +2 -1
- ccxt/lbank.py +2 -1
- ccxt/lbank2.py +2 -1
- ccxt/luno.py +2 -1
- ccxt/lykke.py +2 -1
- ccxt/mercado.py +2 -1
- ccxt/mexc.py +4 -1
- ccxt/mexc3.py +2 -1
- ccxt/ndax.py +2 -1
- ccxt/novadax.py +2 -1
- ccxt/oceanex.py +2 -1
- ccxt/okcoin.py +2 -1
- ccxt/okex.py +2 -1
- ccxt/okex5.py +2 -1
- ccxt/okx.py +5 -1
- ccxt/paymium.py +2 -1
- ccxt/phemex.py +2 -1
- ccxt/poloniex.py +3 -1
- ccxt/poloniexfutures.py +2 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/probit.py +2 -1
- ccxt/stex.py +3 -2
- ccxt/tidex.py +2 -1
- ccxt/timex.py +2 -1
- ccxt/tokocrypto.py +3 -2
- ccxt/upbit.py +2 -1
- ccxt/wavesexchange.py +2 -1
- ccxt/wazirx.py +2 -1
- ccxt/whitebit.py +2 -1
- ccxt/woo.py +2 -1
- ccxt/xt.py +2 -1
- ccxt/yobit.py +2 -1
- ccxt/zaif.py +2 -1
- ccxt/zonda.py +2 -1
- {ccxt-3.0.86.dist-info → ccxt-3.0.87.dist-info}/METADATA +4 -4
- ccxt-3.0.87.dist-info/RECORD +355 -0
- ccxt-3.0.86.dist-info/RECORD +0 -355
- {ccxt-3.0.86.dist-info → ccxt-3.0.87.dist-info}/WHEEL +0 -0
- {ccxt-3.0.86.dist-info → ccxt-3.0.87.dist-info}/top_level.txt +0 -0
ccxt/kucoinfutures.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.kucoin import kucoin
|
7
|
+
from ccxt.abstract.kucoinfutures import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -23,7 +24,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
23
24
|
from ccxt.base.precise import Precise
|
24
25
|
|
25
26
|
|
26
|
-
class kucoinfutures(kucoin):
|
27
|
+
class kucoinfutures(kucoin, ImplicitAPI):
|
27
28
|
|
28
29
|
def describe(self):
|
29
30
|
return self.deep_extend(super(kucoinfutures, self).describe(), {
|
@@ -1280,6 +1281,8 @@ class kucoinfutures(kucoin):
|
|
1280
1281
|
def fetch_orders_by_status(self, status, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
1281
1282
|
"""
|
1282
1283
|
fetches a list of orders placed on the exchange
|
1284
|
+
see https://docs.kucoin.com/futures/#get-order-list
|
1285
|
+
see https://docs.kucoin.com/futures/#get-untriggered-stop-order-list
|
1283
1286
|
:param str status: 'active' or 'closed', only 'active' is valid for stop orders
|
1284
1287
|
:param str|None symbol: unified symbol for the market to retrieve orders from
|
1285
1288
|
:param int|None since: timestamp in ms of the earliest order to retrieve
|
@@ -1314,6 +1317,57 @@ class kucoinfutures(kucoin):
|
|
1314
1317
|
request['endAt'] = until
|
1315
1318
|
method = 'futuresPrivateGetStopOrders' if stop else 'futuresPrivateGetOrders'
|
1316
1319
|
response = getattr(self, method)(self.extend(request, params))
|
1320
|
+
#
|
1321
|
+
# {
|
1322
|
+
# "code": "200000",
|
1323
|
+
# "data": {
|
1324
|
+
# "currentPage": 1,
|
1325
|
+
# "pageSize": 50,
|
1326
|
+
# "totalNum": 4,
|
1327
|
+
# "totalPage": 1,
|
1328
|
+
# "items": [
|
1329
|
+
# {
|
1330
|
+
# "id": "64507d02921f1c0001ff6892",
|
1331
|
+
# "symbol": "XBTUSDTM",
|
1332
|
+
# "type": "market",
|
1333
|
+
# "side": "buy",
|
1334
|
+
# "price": null,
|
1335
|
+
# "size": 1,
|
1336
|
+
# "value": "27.992",
|
1337
|
+
# "dealValue": "27.992",
|
1338
|
+
# "dealSize": 1,
|
1339
|
+
# "stp": "",
|
1340
|
+
# "stop": "",
|
1341
|
+
# "stopPriceType": "",
|
1342
|
+
# "stopTriggered": False,
|
1343
|
+
# "stopPrice": null,
|
1344
|
+
# "timeInForce": "GTC",
|
1345
|
+
# "postOnly": False,
|
1346
|
+
# "hidden": False,
|
1347
|
+
# "iceberg": False,
|
1348
|
+
# "leverage": "17",
|
1349
|
+
# "forceHold": False,
|
1350
|
+
# "closeOrder": False,
|
1351
|
+
# "visibleSize": null,
|
1352
|
+
# "clientOid": null,
|
1353
|
+
# "remark": null,
|
1354
|
+
# "tags": null,
|
1355
|
+
# "isActive": False,
|
1356
|
+
# "cancelExist": False,
|
1357
|
+
# "createdAt": 1682996482000,
|
1358
|
+
# "updatedAt": 1682996483062,
|
1359
|
+
# "endAt": 1682996483062,
|
1360
|
+
# "orderTime": 1682996482953900677,
|
1361
|
+
# "settleCurrency": "USDT",
|
1362
|
+
# "status": "done",
|
1363
|
+
# "filledValue": "27.992",
|
1364
|
+
# "filledSize": 1,
|
1365
|
+
# "reduceOnly": False
|
1366
|
+
# }
|
1367
|
+
# ]
|
1368
|
+
# }
|
1369
|
+
# }
|
1370
|
+
#
|
1317
1371
|
responseData = self.safe_value(response, 'data', {})
|
1318
1372
|
orders = self.safe_value(responseData, 'items', [])
|
1319
1373
|
return self.parse_orders(orders, market, since, limit)
|
@@ -1321,6 +1375,7 @@ class kucoinfutures(kucoin):
|
|
1321
1375
|
def fetch_closed_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
1322
1376
|
"""
|
1323
1377
|
fetches information on multiple closed orders made by the user
|
1378
|
+
see https://docs.kucoin.com/futures/#get-order-list
|
1324
1379
|
:param str|None symbol: unified market symbol of the market orders were made in
|
1325
1380
|
:param int|None since: the earliest time in ms to fetch orders for
|
1326
1381
|
:param int|None limit: the maximum number of orde structures to retrieve
|
@@ -1335,6 +1390,7 @@ class kucoinfutures(kucoin):
|
|
1335
1390
|
def fetch_order(self, id=None, symbol: Optional[str] = None, params={}):
|
1336
1391
|
"""
|
1337
1392
|
fetches information on an order made by the user
|
1393
|
+
see https://docs.kucoin.com/futures/#get-details-of-a-single-order
|
1338
1394
|
:param str|None symbol: unified symbol of the market the order was made in
|
1339
1395
|
:param dict params: extra parameters specific to the kucoinfutures api endpoint
|
1340
1396
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1352,11 +1408,96 @@ class kucoinfutures(kucoin):
|
|
1352
1408
|
else:
|
1353
1409
|
request['orderId'] = id
|
1354
1410
|
response = getattr(self, method)(self.extend(request, params))
|
1411
|
+
#
|
1412
|
+
# {
|
1413
|
+
# "code": "200000",
|
1414
|
+
# "data": {
|
1415
|
+
# "id": "64507d02921f1c0001ff6892",
|
1416
|
+
# "symbol": "XBTUSDTM",
|
1417
|
+
# "type": "market",
|
1418
|
+
# "side": "buy",
|
1419
|
+
# "price": null,
|
1420
|
+
# "size": 1,
|
1421
|
+
# "value": "27.992",
|
1422
|
+
# "dealValue": "27.992",
|
1423
|
+
# "dealSize": 1,
|
1424
|
+
# "stp": "",
|
1425
|
+
# "stop": "",
|
1426
|
+
# "stopPriceType": "",
|
1427
|
+
# "stopTriggered": False,
|
1428
|
+
# "stopPrice": null,
|
1429
|
+
# "timeInForce": "GTC",
|
1430
|
+
# "postOnly": False,
|
1431
|
+
# "hidden": False,
|
1432
|
+
# "iceberg": False,
|
1433
|
+
# "leverage": "17",
|
1434
|
+
# "forceHold": False,
|
1435
|
+
# "closeOrder": False,
|
1436
|
+
# "visibleSize": null,
|
1437
|
+
# "clientOid": null,
|
1438
|
+
# "remark": null,
|
1439
|
+
# "tags": null,
|
1440
|
+
# "isActive": False,
|
1441
|
+
# "cancelExist": False,
|
1442
|
+
# "createdAt": 1682996482000,
|
1443
|
+
# "updatedAt": 1682996483000,
|
1444
|
+
# "endAt": 1682996483000,
|
1445
|
+
# "orderTime": 1682996482953900677,
|
1446
|
+
# "settleCurrency": "USDT",
|
1447
|
+
# "status": "done",
|
1448
|
+
# "filledSize": 1,
|
1449
|
+
# "filledValue": "27.992",
|
1450
|
+
# "reduceOnly": False
|
1451
|
+
# }
|
1452
|
+
# }
|
1453
|
+
#
|
1355
1454
|
market = self.market(symbol) if (symbol is not None) else None
|
1356
1455
|
responseData = self.safe_value(response, 'data')
|
1357
1456
|
return self.parse_order(responseData, market)
|
1358
1457
|
|
1359
1458
|
def parse_order(self, order, market=None):
|
1459
|
+
#
|
1460
|
+
# fetchOrder, fetchOrdersByStatus
|
1461
|
+
#
|
1462
|
+
# {
|
1463
|
+
# "id": "64507d02921f1c0001ff6892",
|
1464
|
+
# "symbol": "XBTUSDTM",
|
1465
|
+
# "type": "market",
|
1466
|
+
# "side": "buy",
|
1467
|
+
# "price": null,
|
1468
|
+
# "size": 1,
|
1469
|
+
# "value": "27.992",
|
1470
|
+
# "dealValue": "27.992",
|
1471
|
+
# "dealSize": 1,
|
1472
|
+
# "stp": "",
|
1473
|
+
# "stop": "",
|
1474
|
+
# "stopPriceType": "",
|
1475
|
+
# "stopTriggered": False,
|
1476
|
+
# "stopPrice": null,
|
1477
|
+
# "timeInForce": "GTC",
|
1478
|
+
# "postOnly": False,
|
1479
|
+
# "hidden": False,
|
1480
|
+
# "iceberg": False,
|
1481
|
+
# "leverage": "17",
|
1482
|
+
# "forceHold": False,
|
1483
|
+
# "closeOrder": False,
|
1484
|
+
# "visibleSize": null,
|
1485
|
+
# "clientOid": null,
|
1486
|
+
# "remark": null,
|
1487
|
+
# "tags": null,
|
1488
|
+
# "isActive": False,
|
1489
|
+
# "cancelExist": False,
|
1490
|
+
# "createdAt": 1682996482000,
|
1491
|
+
# "updatedAt": 1682996483062,
|
1492
|
+
# "endAt": 1682996483062,
|
1493
|
+
# "orderTime": 1682996482953900677,
|
1494
|
+
# "settleCurrency": "USDT",
|
1495
|
+
# "status": "done",
|
1496
|
+
# "filledValue": "27.992",
|
1497
|
+
# "filledSize": 1,
|
1498
|
+
# "reduceOnly": False
|
1499
|
+
# }
|
1500
|
+
#
|
1360
1501
|
marketId = self.safe_string(order, 'symbol')
|
1361
1502
|
market = self.safe_market(marketId, market)
|
1362
1503
|
symbol = market['symbol']
|
@@ -1372,19 +1513,17 @@ class kucoinfutures(kucoin):
|
|
1372
1513
|
feeCurrency = self.safe_currency_code(feeCurrencyId)
|
1373
1514
|
feeCost = self.safe_number(order, 'fee')
|
1374
1515
|
amount = self.safe_string(order, 'size')
|
1375
|
-
filled = self.safe_string(order, '
|
1376
|
-
|
1377
|
-
leverage = self.safe_string(order, 'leverage')
|
1378
|
-
cost = Precise.string_div(rawCost, leverage)
|
1516
|
+
filled = self.safe_string(order, 'filledSize')
|
1517
|
+
cost = self.safe_string(order, 'filledValue')
|
1379
1518
|
average = None
|
1380
1519
|
if Precise.string_gt(filled, '0'):
|
1381
1520
|
contractSize = self.safe_string(market, 'contractSize')
|
1382
1521
|
if market['linear']:
|
1383
|
-
average = Precise.string_div(
|
1522
|
+
average = Precise.string_div(cost, Precise.string_mul(contractSize, filled))
|
1384
1523
|
else:
|
1385
|
-
average = Precise.string_div(Precise.string_mul(contractSize, filled),
|
1524
|
+
average = Precise.string_div(Precise.string_mul(contractSize, filled), cost)
|
1386
1525
|
# precision reported by their api is 8 d.p.
|
1387
|
-
# average = Precise.string_div(
|
1526
|
+
# average = Precise.string_div(cost, Precise.string_mul(filled, market['contractSize']))
|
1388
1527
|
# bool
|
1389
1528
|
isActive = self.safe_value(order, 'isActive', False)
|
1390
1529
|
cancelExist = self.safe_value(order, 'cancelExist', False)
|
ccxt/kuna.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.kuna import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -15,7 +16,7 @@ from ccxt.base.errors import NotSupported
|
|
15
16
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
16
17
|
|
17
18
|
|
18
|
-
class kuna(Exchange):
|
19
|
+
class kuna(Exchange, ImplicitAPI):
|
19
20
|
|
20
21
|
def describe(self):
|
21
22
|
return self.deep_extend(super(kuna, self).describe(), {
|
ccxt/latoken.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.latoken import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -23,7 +24,7 @@ from ccxt.base.errors import AuthenticationError
|
|
23
24
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
24
25
|
|
25
26
|
|
26
|
-
class latoken(Exchange):
|
27
|
+
class latoken(Exchange, ImplicitAPI):
|
27
28
|
|
28
29
|
def describe(self):
|
29
30
|
return self.deep_extend(super(latoken, self).describe(), {
|
ccxt/lbank.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.lbank import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -15,7 +16,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
15
16
|
from ccxt.base.precise import Precise
|
16
17
|
|
17
18
|
|
18
|
-
class lbank(Exchange):
|
19
|
+
class lbank(Exchange, ImplicitAPI):
|
19
20
|
|
20
21
|
def describe(self):
|
21
22
|
return self.deep_extend(super(lbank, self).describe(), {
|
ccxt/lbank2.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.lbank2 import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -24,7 +25,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
24
25
|
from ccxt.base.precise import Precise
|
25
26
|
|
26
27
|
|
27
|
-
class lbank2(Exchange):
|
28
|
+
class lbank2(Exchange, ImplicitAPI):
|
28
29
|
|
29
30
|
def describe(self):
|
30
31
|
return self.deep_extend(super(lbank2, self).describe(), {
|
ccxt/luno.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.luno import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -13,7 +14,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
13
14
|
from ccxt.base.precise import Precise
|
14
15
|
|
15
16
|
|
16
|
-
class luno(Exchange):
|
17
|
+
class luno(Exchange, ImplicitAPI):
|
17
18
|
|
18
19
|
def describe(self):
|
19
20
|
return self.deep_extend(super(luno, self).describe(), {
|
ccxt/lykke.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.lykke import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -17,7 +18,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
17
18
|
from ccxt.base.precise import Precise
|
18
19
|
|
19
20
|
|
20
|
-
class lykke(Exchange):
|
21
|
+
class lykke(Exchange, ImplicitAPI):
|
21
22
|
|
22
23
|
def describe(self):
|
23
24
|
return self.deep_extend(super(lykke, self).describe(), {
|
ccxt/mercado.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.mercado import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -13,7 +14,7 @@ from ccxt.base.errors import InvalidOrder
|
|
13
14
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
14
15
|
|
15
16
|
|
16
|
-
class mercado(Exchange):
|
17
|
+
class mercado(Exchange, ImplicitAPI):
|
17
18
|
|
18
19
|
def describe(self):
|
19
20
|
return self.deep_extend(super(mercado, self).describe(), {
|
ccxt/mexc.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.mexc import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -23,7 +24,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
23
24
|
from ccxt.base.precise import Precise
|
24
25
|
|
25
26
|
|
26
|
-
class mexc(Exchange):
|
27
|
+
class mexc(Exchange, ImplicitAPI):
|
27
28
|
|
28
29
|
def describe(self):
|
29
30
|
return self.deep_extend(super(mexc, self).describe(), {
|
@@ -2687,6 +2688,8 @@ class mexc(Exchange):
|
|
2687
2688
|
statuses = {
|
2688
2689
|
'BUY': 'buy',
|
2689
2690
|
'SELL': 'sell',
|
2691
|
+
'1': 'buy',
|
2692
|
+
'2': 'sell',
|
2690
2693
|
# contracts v1 : TODO
|
2691
2694
|
}
|
2692
2695
|
return self.safe_string(statuses, status, status)
|
ccxt/mexc3.py
CHANGED
@@ -4,9 +4,10 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.mexc import mexc
|
7
|
+
from ccxt.abstract.mexc3 import ImplicitAPI
|
7
8
|
|
8
9
|
|
9
|
-
class mexc3(mexc):
|
10
|
+
class mexc3(mexc, ImplicitAPI):
|
10
11
|
|
11
12
|
def describe(self):
|
12
13
|
return self.deep_extend(super(mexc3, self).describe(), {
|
ccxt/ndax.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.ndax import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
import json
|
9
10
|
from ccxt.base.types import OrderSide
|
@@ -17,7 +18,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
17
18
|
from ccxt.base.precise import Precise
|
18
19
|
|
19
20
|
|
20
|
-
class ndax(Exchange):
|
21
|
+
class ndax(Exchange, ImplicitAPI):
|
21
22
|
|
22
23
|
def describe(self):
|
23
24
|
return self.deep_extend(super(ndax, self).describe(), {
|
ccxt/novadax.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.novadax import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -25,7 +26,7 @@ from ccxt.base.errors import AuthenticationError
|
|
25
26
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
26
27
|
|
27
28
|
|
28
|
-
class novadax(Exchange):
|
29
|
+
class novadax(Exchange, ImplicitAPI):
|
29
30
|
|
30
31
|
def describe(self):
|
31
32
|
return self.deep_extend(super(novadax, self).describe(), {
|
ccxt/oceanex.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.oceanex import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -18,7 +19,7 @@ from ccxt.base.errors import AuthenticationError
|
|
18
19
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
19
20
|
|
20
21
|
|
21
|
-
class oceanex(Exchange):
|
22
|
+
class oceanex(Exchange, ImplicitAPI):
|
22
23
|
|
23
24
|
def describe(self):
|
24
25
|
return self.deep_extend(super(oceanex, self).describe(), {
|
ccxt/okcoin.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.okcoin import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -31,7 +32,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
31
32
|
from ccxt.base.precise import Precise
|
32
33
|
|
33
34
|
|
34
|
-
class okcoin(Exchange):
|
35
|
+
class okcoin(Exchange, ImplicitAPI):
|
35
36
|
|
36
37
|
def describe(self):
|
37
38
|
return self.deep_extend(super(okcoin, self).describe(), {
|
ccxt/okex.py
CHANGED
@@ -4,9 +4,10 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.okx import okx
|
7
|
+
from ccxt.abstract.okex import ImplicitAPI
|
7
8
|
|
8
9
|
|
9
|
-
class okex(okx):
|
10
|
+
class okex(okx, ImplicitAPI):
|
10
11
|
|
11
12
|
def describe(self):
|
12
13
|
return self.deep_extend(super(okex, self).describe(), {
|
ccxt/okex5.py
CHANGED
@@ -4,9 +4,10 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.okex import okex
|
7
|
+
from ccxt.abstract.okex5 import ImplicitAPI
|
7
8
|
|
8
9
|
|
9
|
-
class okex5(okex):
|
10
|
+
class okex5(okex, ImplicitAPI):
|
10
11
|
|
11
12
|
def describe(self):
|
12
13
|
return self.deep_extend(super(okex5, self).describe(), {
|
ccxt/okx.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.okx import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -32,7 +33,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
32
33
|
from ccxt.base.precise import Precise
|
33
34
|
|
34
35
|
|
35
|
-
class okx(Exchange):
|
36
|
+
class okx(Exchange, ImplicitAPI):
|
36
37
|
|
37
38
|
def describe(self):
|
38
39
|
return self.deep_extend(super(okx, self).describe(), {
|
@@ -271,6 +272,7 @@ class okx(Exchange):
|
|
271
272
|
'trade/orders-algo-history': 1,
|
272
273
|
'trade/order-algo': 1,
|
273
274
|
'account/subaccount/balances': 10,
|
275
|
+
'account/subaccount/interest-limits': 4,
|
274
276
|
'asset/subaccount/bills': 5 / 3,
|
275
277
|
'users/subaccount/list': 10,
|
276
278
|
'users/subaccount/apikey': 10,
|
@@ -331,6 +333,7 @@ class okx(Exchange):
|
|
331
333
|
'account/quick-margin-borrow-repay': 4,
|
332
334
|
'account/activate-option': 4,
|
333
335
|
'account/set-auto-loan': 4,
|
336
|
+
'account/subaccount/set-loan-allocation': 4,
|
334
337
|
'asset/transfer': 10,
|
335
338
|
'asset/withdrawal': 5 / 3,
|
336
339
|
'asset/withdrawal-lightning': 5,
|
@@ -342,6 +345,7 @@ class okx(Exchange):
|
|
342
345
|
'trade/cancel-batch-orders': 1 / 15,
|
343
346
|
'trade/amend-order': 1 / 3,
|
344
347
|
'trade/amend-batch-orders': 1 / 3,
|
348
|
+
'trade/amend-algos': 1,
|
345
349
|
'trade/close-position': 1,
|
346
350
|
'trade/order-algo': 1,
|
347
351
|
'trade/cancel-algos': 1,
|
ccxt/paymium.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.paymium import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -12,7 +13,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
12
13
|
from ccxt.base.precise import Precise
|
13
14
|
|
14
15
|
|
15
|
-
class paymium(Exchange):
|
16
|
+
class paymium(Exchange, ImplicitAPI):
|
16
17
|
|
17
18
|
def describe(self):
|
18
19
|
return self.deep_extend(super(paymium, self).describe(), {
|
ccxt/phemex.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.phemex import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
import numbers
|
9
10
|
from ccxt.base.types import OrderSide
|
@@ -28,7 +29,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
28
29
|
from ccxt.base.precise import Precise
|
29
30
|
|
30
31
|
|
31
|
-
class phemex(Exchange):
|
32
|
+
class phemex(Exchange, ImplicitAPI):
|
32
33
|
|
33
34
|
def describe(self):
|
34
35
|
return self.deep_extend(super(phemex, self).describe(), {
|
ccxt/poloniex.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.poloniex import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -27,7 +28,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
27
28
|
from ccxt.base.precise import Precise
|
28
29
|
|
29
30
|
|
30
|
-
class poloniex(Exchange):
|
31
|
+
class poloniex(Exchange, ImplicitAPI):
|
31
32
|
|
32
33
|
def describe(self):
|
33
34
|
return self.deep_extend(super(poloniex, self).describe(), {
|
@@ -686,6 +687,7 @@ class poloniex(Exchange):
|
|
686
687
|
'withdraw': None,
|
687
688
|
'fee': fee,
|
688
689
|
'precision': None,
|
690
|
+
'networks': {},
|
689
691
|
'limits': {
|
690
692
|
'amount': {
|
691
693
|
'min': None,
|
ccxt/poloniexfutures.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.poloniexfutures import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -22,7 +23,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
22
23
|
from ccxt.base.precise import Precise
|
23
24
|
|
24
25
|
|
25
|
-
class poloniexfutures(Exchange):
|
26
|
+
class poloniexfutures(Exchange, ImplicitAPI):
|
26
27
|
|
27
28
|
def describe(self):
|
28
29
|
return self.deep_extend(super(poloniexfutures, self).describe(), {
|
ccxt/pro/__init__.py
CHANGED
ccxt/probit.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.probit import ImplicitAPI
|
7
8
|
import math
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -25,7 +26,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
25
26
|
from ccxt.base.precise import Precise
|
26
27
|
|
27
28
|
|
28
|
-
class probit(Exchange):
|
29
|
+
class probit(Exchange, ImplicitAPI):
|
29
30
|
|
30
31
|
def describe(self):
|
31
32
|
return self.deep_extend(super(probit, self).describe(), {
|
ccxt/stex.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.stex import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -22,7 +23,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
22
23
|
from ccxt.base.precise import Precise
|
23
24
|
|
24
25
|
|
25
|
-
class stex(Exchange):
|
26
|
+
class stex(Exchange, ImplicitAPI):
|
26
27
|
|
27
28
|
def describe(self):
|
28
29
|
return self.deep_extend(super(stex, self).describe(), {
|
@@ -448,7 +449,7 @@ class stex(Exchange):
|
|
448
449
|
minPrice = Precise.string_max(minBuyPrice, minSellPrice)
|
449
450
|
buyFee = Precise.string_div(self.safe_string(market, 'buy_fee_percent'), '100')
|
450
451
|
sellFee = Precise.string_div(self.safe_string(market, 'sell_fee_percent'), '100')
|
451
|
-
fee = Precise.string_max(buyFee, sellFee)
|
452
|
+
fee = self.parse_number(Precise.string_max(buyFee, sellFee))
|
452
453
|
result.append({
|
453
454
|
'id': id,
|
454
455
|
'numericId': numericId,
|
ccxt/tidex.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.tidex import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -21,7 +22,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
21
22
|
from ccxt.base.precise import Precise
|
22
23
|
|
23
24
|
|
24
|
-
class tidex(Exchange):
|
25
|
+
class tidex(Exchange, ImplicitAPI):
|
25
26
|
|
26
27
|
def describe(self):
|
27
28
|
return self.deep_extend(super(tidex, self).describe(), {
|