ccxt 3.0.85__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.

Files changed (227) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ace.py +2 -1
  3. ccxt/alpaca.py +2 -1
  4. ccxt/ascendex.py +2 -1
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +2 -1
  7. ccxt/async_support/alpaca.py +2 -1
  8. ccxt/async_support/ascendex.py +2 -1
  9. ccxt/async_support/base/exchange.py +6 -6
  10. ccxt/async_support/bequant.py +2 -1
  11. ccxt/async_support/bigone.py +2 -1
  12. ccxt/async_support/binance.py +4 -3
  13. ccxt/async_support/binancecoinm.py +2 -1
  14. ccxt/async_support/binanceus.py +2 -1
  15. ccxt/async_support/binanceusdm.py +2 -1
  16. ccxt/async_support/bit2c.py +2 -1
  17. ccxt/async_support/bitbank.py +2 -1
  18. ccxt/async_support/bitbay.py +2 -1
  19. ccxt/async_support/bitbns.py +2 -1
  20. ccxt/async_support/bitcoincom.py +2 -1
  21. ccxt/async_support/bitfinex.py +2 -1
  22. ccxt/async_support/bitfinex2.py +2 -1
  23. ccxt/async_support/bitflyer.py +2 -1
  24. ccxt/async_support/bitforex.py +2 -1
  25. ccxt/async_support/bitget.py +19 -3
  26. ccxt/async_support/bithumb.py +2 -1
  27. ccxt/async_support/bitmart.py +2 -1
  28. ccxt/async_support/bitmex.py +3 -2
  29. ccxt/async_support/bitopro.py +2 -1
  30. ccxt/async_support/bitpanda.py +2 -1
  31. ccxt/async_support/bitrue.py +3 -2
  32. ccxt/async_support/bitso.py +2 -1
  33. ccxt/async_support/bitstamp.py +2 -1
  34. ccxt/async_support/bitstamp1.py +2 -1
  35. ccxt/async_support/bittrex.py +2 -1
  36. ccxt/async_support/bitvavo.py +3 -2
  37. ccxt/async_support/bkex.py +2 -1
  38. ccxt/async_support/bl3p.py +2 -1
  39. ccxt/async_support/blockchaincom.py +2 -1
  40. ccxt/async_support/btcalpha.py +2 -1
  41. ccxt/async_support/btcbox.py +4 -3
  42. ccxt/async_support/btcex.py +2 -1
  43. ccxt/async_support/btcmarkets.py +2 -1
  44. ccxt/async_support/btctradeua.py +2 -1
  45. ccxt/async_support/btcturk.py +2 -1
  46. ccxt/async_support/bybit.py +2 -1
  47. ccxt/async_support/cex.py +2 -1
  48. ccxt/async_support/coinbase.py +2 -1
  49. ccxt/async_support/coinbaseprime.py +2 -1
  50. ccxt/async_support/coinbasepro.py +4 -3
  51. ccxt/async_support/coincheck.py +2 -1
  52. ccxt/async_support/coinex.py +3 -2
  53. ccxt/async_support/coinfalcon.py +2 -1
  54. ccxt/async_support/coinmate.py +2 -1
  55. ccxt/async_support/coinone.py +2 -1
  56. ccxt/async_support/coinsph.py +3 -2
  57. ccxt/async_support/coinspot.py +2 -1
  58. ccxt/async_support/cryptocom.py +2 -1
  59. ccxt/async_support/currencycom.py +2 -1
  60. ccxt/async_support/delta.py +2 -1
  61. ccxt/async_support/deribit.py +2 -1
  62. ccxt/async_support/digifinex.py +4 -3
  63. ccxt/async_support/exmo.py +2 -1
  64. ccxt/async_support/fmfwio.py +2 -1
  65. ccxt/async_support/gate.py +2 -1
  66. ccxt/async_support/gateio.py +2 -1
  67. ccxt/async_support/gemini.py +2 -1
  68. ccxt/async_support/hitbtc.py +2 -1
  69. ccxt/async_support/hitbtc3.py +2 -1
  70. ccxt/async_support/hollaex.py +2 -1
  71. ccxt/async_support/huobi.py +2 -1
  72. ccxt/async_support/huobijp.py +2 -1
  73. ccxt/async_support/huobipro.py +2 -1
  74. ccxt/async_support/idex.py +3 -2
  75. ccxt/async_support/independentreserve.py +2 -1
  76. ccxt/async_support/indodax.py +2 -1
  77. ccxt/async_support/kraken.py +2 -1
  78. ccxt/async_support/krakenfutures.py +2 -1
  79. ccxt/async_support/kucoin.py +3 -2
  80. ccxt/async_support/kucoinfutures.py +147 -8
  81. ccxt/async_support/kuna.py +2 -1
  82. ccxt/async_support/latoken.py +2 -1
  83. ccxt/async_support/lbank.py +2 -1
  84. ccxt/async_support/lbank2.py +2 -1
  85. ccxt/async_support/luno.py +2 -1
  86. ccxt/async_support/lykke.py +2 -1
  87. ccxt/async_support/mercado.py +2 -1
  88. ccxt/async_support/mexc.py +4 -1
  89. ccxt/async_support/mexc3.py +2 -1
  90. ccxt/async_support/ndax.py +2 -1
  91. ccxt/async_support/novadax.py +2 -1
  92. ccxt/async_support/oceanex.py +2 -1
  93. ccxt/async_support/okcoin.py +2 -1
  94. ccxt/async_support/okex.py +2 -1
  95. ccxt/async_support/okex5.py +2 -1
  96. ccxt/async_support/okx.py +5 -1
  97. ccxt/async_support/paymium.py +2 -1
  98. ccxt/async_support/phemex.py +3 -1
  99. ccxt/async_support/poloniex.py +3 -1
  100. ccxt/async_support/poloniexfutures.py +2 -1
  101. ccxt/async_support/probit.py +2 -1
  102. ccxt/async_support/stex.py +3 -2
  103. ccxt/async_support/tidex.py +2 -1
  104. ccxt/async_support/timex.py +2 -1
  105. ccxt/async_support/tokocrypto.py +3 -2
  106. ccxt/async_support/upbit.py +2 -1
  107. ccxt/async_support/wavesexchange.py +2 -1
  108. ccxt/async_support/wazirx.py +2 -1
  109. ccxt/async_support/whitebit.py +2 -1
  110. ccxt/async_support/woo.py +2 -1
  111. ccxt/async_support/xt.py +7 -2
  112. ccxt/async_support/yobit.py +2 -1
  113. ccxt/async_support/zaif.py +2 -1
  114. ccxt/async_support/zonda.py +2 -1
  115. ccxt/base/exchange.py +6 -74
  116. ccxt/base/types.py +24 -0
  117. ccxt/bequant.py +2 -1
  118. ccxt/bigone.py +2 -1
  119. ccxt/binance.py +4 -3
  120. ccxt/binancecoinm.py +2 -1
  121. ccxt/binanceus.py +2 -1
  122. ccxt/binanceusdm.py +2 -1
  123. ccxt/bit2c.py +2 -1
  124. ccxt/bitbank.py +2 -1
  125. ccxt/bitbay.py +2 -1
  126. ccxt/bitbns.py +2 -1
  127. ccxt/bitcoincom.py +2 -1
  128. ccxt/bitfinex.py +2 -1
  129. ccxt/bitfinex2.py +2 -1
  130. ccxt/bitflyer.py +2 -1
  131. ccxt/bitforex.py +2 -1
  132. ccxt/bitget.py +19 -3
  133. ccxt/bithumb.py +2 -1
  134. ccxt/bitmart.py +2 -1
  135. ccxt/bitmex.py +3 -2
  136. ccxt/bitopro.py +2 -1
  137. ccxt/bitpanda.py +2 -1
  138. ccxt/bitrue.py +3 -2
  139. ccxt/bitso.py +2 -1
  140. ccxt/bitstamp.py +2 -1
  141. ccxt/bitstamp1.py +2 -1
  142. ccxt/bittrex.py +2 -1
  143. ccxt/bitvavo.py +3 -2
  144. ccxt/bkex.py +2 -1
  145. ccxt/bl3p.py +2 -1
  146. ccxt/blockchaincom.py +2 -1
  147. ccxt/btcalpha.py +2 -1
  148. ccxt/btcbox.py +4 -3
  149. ccxt/btcex.py +2 -1
  150. ccxt/btcmarkets.py +2 -1
  151. ccxt/btctradeua.py +2 -1
  152. ccxt/btcturk.py +2 -1
  153. ccxt/bybit.py +2 -1
  154. ccxt/cex.py +2 -1
  155. ccxt/coinbase.py +2 -1
  156. ccxt/coinbaseprime.py +2 -1
  157. ccxt/coinbasepro.py +4 -3
  158. ccxt/coincheck.py +2 -1
  159. ccxt/coinex.py +3 -2
  160. ccxt/coinfalcon.py +2 -1
  161. ccxt/coinmate.py +2 -1
  162. ccxt/coinone.py +2 -1
  163. ccxt/coinsph.py +3 -2
  164. ccxt/coinspot.py +2 -1
  165. ccxt/cryptocom.py +2 -1
  166. ccxt/currencycom.py +2 -1
  167. ccxt/delta.py +2 -1
  168. ccxt/deribit.py +2 -1
  169. ccxt/digifinex.py +4 -3
  170. ccxt/exmo.py +2 -1
  171. ccxt/fmfwio.py +2 -1
  172. ccxt/gate.py +2 -1
  173. ccxt/gateio.py +2 -1
  174. ccxt/gemini.py +2 -1
  175. ccxt/hitbtc.py +2 -1
  176. ccxt/hitbtc3.py +2 -1
  177. ccxt/hollaex.py +2 -1
  178. ccxt/huobi.py +2 -1
  179. ccxt/huobijp.py +2 -1
  180. ccxt/huobipro.py +2 -1
  181. ccxt/idex.py +3 -2
  182. ccxt/independentreserve.py +2 -1
  183. ccxt/indodax.py +2 -1
  184. ccxt/kraken.py +2 -1
  185. ccxt/krakenfutures.py +2 -1
  186. ccxt/kucoin.py +3 -2
  187. ccxt/kucoinfutures.py +147 -8
  188. ccxt/kuna.py +2 -1
  189. ccxt/latoken.py +2 -1
  190. ccxt/lbank.py +2 -1
  191. ccxt/lbank2.py +2 -1
  192. ccxt/luno.py +2 -1
  193. ccxt/lykke.py +2 -1
  194. ccxt/mercado.py +2 -1
  195. ccxt/mexc.py +4 -1
  196. ccxt/mexc3.py +2 -1
  197. ccxt/ndax.py +2 -1
  198. ccxt/novadax.py +2 -1
  199. ccxt/oceanex.py +2 -1
  200. ccxt/okcoin.py +2 -1
  201. ccxt/okex.py +2 -1
  202. ccxt/okex5.py +2 -1
  203. ccxt/okx.py +5 -1
  204. ccxt/paymium.py +2 -1
  205. ccxt/phemex.py +3 -1
  206. ccxt/poloniex.py +3 -1
  207. ccxt/poloniexfutures.py +2 -1
  208. ccxt/pro/__init__.py +1 -1
  209. ccxt/probit.py +2 -1
  210. ccxt/stex.py +3 -2
  211. ccxt/tidex.py +2 -1
  212. ccxt/timex.py +2 -1
  213. ccxt/tokocrypto.py +3 -2
  214. ccxt/upbit.py +2 -1
  215. ccxt/wavesexchange.py +2 -1
  216. ccxt/wazirx.py +2 -1
  217. ccxt/whitebit.py +2 -1
  218. ccxt/woo.py +2 -1
  219. ccxt/xt.py +7 -2
  220. ccxt/yobit.py +2 -1
  221. ccxt/zaif.py +2 -1
  222. ccxt/zonda.py +2 -1
  223. {ccxt-3.0.85.dist-info → ccxt-3.0.87.dist-info}/METADATA +4 -4
  224. ccxt-3.0.87.dist-info/RECORD +355 -0
  225. ccxt-3.0.85.dist-info/RECORD +0 -355
  226. {ccxt-3.0.85.dist-info → ccxt-3.0.87.dist-info}/WHEEL +0 -0
  227. {ccxt-3.0.85.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, 'dealSize')
1376
- rawCost = self.safe_string_2(order, 'dealFunds', 'filledValue')
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(rawCost, Precise.string_mul(contractSize, filled))
1522
+ average = Precise.string_div(cost, Precise.string_mul(contractSize, filled))
1384
1523
  else:
1385
- average = Precise.string_div(Precise.string_mul(contractSize, filled), rawCost)
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(rawCost, Precise.string_mul(filled, market['contractSize']))
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(), {
@@ -3549,6 +3550,7 @@ class phemex(Exchange):
3549
3550
  :returns dict: response from the exchange
3550
3551
  """
3551
3552
  self.check_required_argument('setPositionMode', symbol, 'symbol')
3553
+ self.load_markets()
3552
3554
  market = self.market(symbol)
3553
3555
  if market['settle'] != 'USDT':
3554
3556
  raise BadSymbol(self.id + ' setPositionMode() supports USDT settled markets only')
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
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '3.0.85'
7
+ __version__ = '3.0.87'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
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,