ccxt 4.4.94__py2.py3-none-any.whl → 4.4.96__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 -1
- ccxt/abstract/bingx.py +3 -0
- ccxt/abstract/foxbit.py +26 -0
- ccxt/abstract/hyperliquid.py +1 -1
- ccxt/abstract/woo.py +59 -4
- ccxt/apex.py +3 -3
- ccxt/ascendex.py +2 -2
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/apex.py +3 -3
- ccxt/async_support/ascendex.py +2 -2
- ccxt/async_support/base/exchange.py +5 -3
- ccxt/async_support/base/ws/future.py +5 -1
- ccxt/async_support/bingx.py +129 -92
- ccxt/async_support/bitget.py +31 -144
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitrue.py +13 -8
- ccxt/async_support/bitstamp.py +2 -0
- ccxt/async_support/blofin.py +6 -1
- ccxt/async_support/bybit.py +15 -6
- ccxt/async_support/coinbase.py +36 -0
- ccxt/async_support/coinbaseexchange.py +4 -2
- ccxt/async_support/coinbaseinternational.py +2 -2
- ccxt/async_support/coinmate.py +34 -0
- ccxt/async_support/coinone.py +34 -0
- ccxt/async_support/coinsph.py +29 -0
- ccxt/async_support/coinspot.py +36 -1
- ccxt/async_support/cryptocom.py +2 -1
- ccxt/async_support/cryptomus.py +41 -1
- ccxt/async_support/defx.py +1 -1
- ccxt/async_support/derive.py +1 -1
- ccxt/async_support/ellipx.py +40 -0
- ccxt/async_support/foxbit.py +1935 -0
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/hyperliquid.py +3 -2
- ccxt/async_support/kucoin.py +1 -1
- ccxt/async_support/kucoinfutures.py +3 -2
- ccxt/async_support/mexc.py +28 -13
- ccxt/async_support/modetrade.py +3 -3
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +10 -3
- ccxt/async_support/onetrading.py +1 -1
- ccxt/async_support/oxfun.py +2 -1
- ccxt/async_support/paradex.py +2 -2
- ccxt/async_support/vertex.py +3 -2
- ccxt/async_support/woo.py +1255 -875
- ccxt/async_support/woofipro.py +2 -2
- ccxt/base/exchange.py +8 -5
- ccxt/bingx.py +129 -92
- ccxt/bitget.py +31 -144
- ccxt/bitmart.py +2 -2
- ccxt/bitrue.py +13 -8
- ccxt/bitstamp.py +2 -0
- ccxt/blofin.py +6 -1
- ccxt/bybit.py +15 -6
- ccxt/coinbase.py +36 -0
- ccxt/coinbaseexchange.py +4 -2
- ccxt/coinbaseinternational.py +2 -2
- ccxt/coinmate.py +34 -0
- ccxt/coinone.py +34 -0
- ccxt/coinsph.py +29 -0
- ccxt/coinspot.py +36 -1
- ccxt/cryptocom.py +2 -1
- ccxt/cryptomus.py +41 -1
- ccxt/defx.py +1 -1
- ccxt/derive.py +1 -1
- ccxt/ellipx.py +40 -0
- ccxt/foxbit.py +1935 -0
- ccxt/gate.py +1 -1
- ccxt/hyperliquid.py +3 -2
- ccxt/kucoin.py +1 -1
- ccxt/kucoinfutures.py +3 -2
- ccxt/mexc.py +28 -13
- ccxt/modetrade.py +3 -3
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +10 -3
- ccxt/onetrading.py +1 -1
- ccxt/oxfun.py +2 -1
- ccxt/paradex.py +2 -2
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/hyperliquid.py +6 -6
- ccxt/pro/kraken.py +17 -16
- ccxt/pro/mexc.py +10 -10
- ccxt/test/tests_async.py +17 -2
- ccxt/test/tests_sync.py +17 -2
- ccxt/vertex.py +3 -2
- ccxt/woo.py +1255 -875
- ccxt/woofipro.py +2 -2
- {ccxt-4.4.94.dist-info → ccxt-4.4.96.dist-info}/METADATA +8 -8
- {ccxt-4.4.94.dist-info → ccxt-4.4.96.dist-info}/RECORD +92 -89
- {ccxt-4.4.94.dist-info → ccxt-4.4.96.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.94.dist-info → ccxt-4.4.96.dist-info}/WHEEL +0 -0
- {ccxt-4.4.94.dist-info → ccxt-4.4.96.dist-info}/top_level.txt +0 -0
ccxt/async_support/gate.py
CHANGED
@@ -3755,7 +3755,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3755
3755
|
start = self.parse_to_int(since / 1000)
|
3756
3756
|
request['from'] = start
|
3757
3757
|
request['to'] = self.sum(start, 30 * 24 * 60 * 60)
|
3758
|
-
request, params = self.handle_until_option('to', request, params)
|
3758
|
+
request, params = self.handle_until_option('to', request, params, 0.001)
|
3759
3759
|
response = await self.privateWalletGetDeposits(self.extend(request, params))
|
3760
3760
|
return self.parse_transactions(response, currency)
|
3761
3761
|
|
@@ -174,6 +174,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
174
174
|
'orderStatus': 2,
|
175
175
|
'spotClearinghouseState': 2,
|
176
176
|
'exchangeStatus': 2,
|
177
|
+
'candleSnapshot': 4,
|
177
178
|
},
|
178
179
|
},
|
179
180
|
},
|
@@ -1810,7 +1811,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1810
1811
|
# }
|
1811
1812
|
# }
|
1812
1813
|
#
|
1813
|
-
return response
|
1814
|
+
return [self.safe_order({'info': response})]
|
1814
1815
|
|
1815
1816
|
async def cancel_all_orders_after(self, timeout: Int, params={}):
|
1816
1817
|
"""
|
@@ -3600,7 +3601,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
3600
3601
|
def coin_to_market_id(self, coin: Str):
|
3601
3602
|
if coin.find('/') > -1 or coin.find('@') > -1:
|
3602
3603
|
return coin # spot
|
3603
|
-
return coin + '/USDC:USDC'
|
3604
|
+
return self.safe_currency_code(coin) + '/USDC:USDC'
|
3604
3605
|
|
3605
3606
|
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
3606
3607
|
if not response:
|
ccxt/async_support/kucoin.py
CHANGED
@@ -2647,7 +2647,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2647
2647
|
response = await self.privateDeleteHfOrders(self.extend(request, query))
|
2648
2648
|
else:
|
2649
2649
|
response = await self.privateDeleteOrders(self.extend(request, query))
|
2650
|
-
return response
|
2650
|
+
return [self.safe_order({'info': response})]
|
2651
2651
|
|
2652
2652
|
async def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2653
2653
|
"""
|
@@ -1719,7 +1719,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1719
1719
|
# },
|
1720
1720
|
# }
|
1721
1721
|
#
|
1722
|
-
return self.
|
1722
|
+
return self.safe_order({'info': response})
|
1723
1723
|
|
1724
1724
|
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
1725
1725
|
"""
|
@@ -1811,7 +1811,8 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1811
1811
|
# },
|
1812
1812
|
# }
|
1813
1813
|
#
|
1814
|
-
|
1814
|
+
data = self.safe_dict(response, 'data')
|
1815
|
+
return [self.safe_order({'info': data})]
|
1815
1816
|
|
1816
1817
|
async def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
1817
1818
|
"""
|
ccxt/async_support/mexc.py
CHANGED
@@ -4652,11 +4652,14 @@ class mexc(Exchange, ImplicitAPI):
|
|
4652
4652
|
# "network": "TRX",
|
4653
4653
|
# "status": "5",
|
4654
4654
|
# "address": "TSMcEDDvkqY9dz8RkFnrS86U59GwEZjfvh",
|
4655
|
-
# "txId": "51a8f49e6f03f2c056e71fe3291aa65e1032880be855b65cecd0595a1b8af95b",
|
4655
|
+
# "txId": "51a8f49e6f03f2c056e71fe3291aa65e1032880be855b65cecd0595a1b8af95b:0",
|
4656
4656
|
# "insertTime": "1664805021000",
|
4657
4657
|
# "unlockConfirm": "200",
|
4658
4658
|
# "confirmTimes": "203",
|
4659
|
-
# "memo": "xxyy1122"
|
4659
|
+
# "memo": "xxyy1122",
|
4660
|
+
# "transHash": "51a8f49e6f03f2c056e71fe3291aa65e1032880be855b65cecd0595a1b8af95b",
|
4661
|
+
# "updateTime": "1664805621000",
|
4662
|
+
# "netWork: "TRX"
|
4660
4663
|
# }
|
4661
4664
|
# ]
|
4662
4665
|
#
|
@@ -4697,7 +4700,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4697
4700
|
# [
|
4698
4701
|
# {
|
4699
4702
|
# "id": "adcd1c8322154de691b815eedcd10c42",
|
4700
|
-
# "txId": "0xc8c918cd69b2246db493ef6225a72ffdc664f15b08da3e25c6879b271d05e9d0",
|
4703
|
+
# "txId": "0xc8c918cd69b2246db493ef6225a72ffdc664f15b08da3e25c6879b271d05e9d0:0",
|
4701
4704
|
# "coin": "USDC-MATIC",
|
4702
4705
|
# "network": "MATIC",
|
4703
4706
|
# "address": "0xeE6C7a415995312ED52c53a0f8f03e165e0A5D62",
|
@@ -4708,7 +4711,11 @@ class mexc(Exchange, ImplicitAPI):
|
|
4708
4711
|
# "confirmNo": null,
|
4709
4712
|
# "applyTime": "1664882739000",
|
4710
4713
|
# "remark": '',
|
4711
|
-
# "memo": null
|
4714
|
+
# "memo": null,
|
4715
|
+
# "explorerUrl": "https://etherscan.io/tx/0xc8c918cd69b2246db493ef6225a72ffdc664f15b08da3e25c6879b271d05e9d0",
|
4716
|
+
# "transHash": "0xc8c918cd69b2246db493ef6225a72ffdc664f15b08da3e25c6879b271d05e9d0",
|
4717
|
+
# "updateTime": "1664882799000",
|
4718
|
+
# "netWork: "MATIC"
|
4712
4719
|
# }
|
4713
4720
|
# ]
|
4714
4721
|
#
|
@@ -4724,18 +4731,21 @@ class mexc(Exchange, ImplicitAPI):
|
|
4724
4731
|
# "network": "TRX",
|
4725
4732
|
# "status": "5",
|
4726
4733
|
# "address": "TSMcEDDvkqY9dz8RkFnrS86U59GwEZjfvh",
|
4727
|
-
# "txId": "51a8f49e6f03f2c056e71fe3291aa65e1032880be855b65cecd0595a1b8af95b",
|
4734
|
+
# "txId": "51a8f49e6f03f2c056e71fe3291aa65e1032880be855b65cecd0595a1b8af95b:0",
|
4728
4735
|
# "insertTime": "1664805021000",
|
4729
4736
|
# "unlockConfirm": "200",
|
4730
4737
|
# "confirmTimes": "203",
|
4731
|
-
# "memo": "xxyy1122"
|
4738
|
+
# "memo": "xxyy1122",
|
4739
|
+
# "transHash": "51a8f49e6f03f2c056e71fe3291aa65e1032880be855b65cecd0595a1b8af95b",
|
4740
|
+
# "updateTime": "1664805621000",
|
4741
|
+
# "netWork: "TRX"
|
4732
4742
|
# }
|
4733
4743
|
#
|
4734
4744
|
# fetchWithdrawals
|
4735
4745
|
#
|
4736
4746
|
# {
|
4737
4747
|
# "id": "adcd1c8322154de691b815eedcd10c42",
|
4738
|
-
# "txId": "0xc8c918cd69b2246db493ef6225a72ffdc664f15b08da3e25c6879b271d05e9d0",
|
4748
|
+
# "txId": "0xc8c918cd69b2246db493ef6225a72ffdc664f15b08da3e25c6879b271d05e9d0:0",
|
4739
4749
|
# "coin": "USDC-MATIC",
|
4740
4750
|
# "network": "MATIC",
|
4741
4751
|
# "address": "0xeE6C7a415995312ED52c53a0f8f03e165e0A5D62",
|
@@ -4745,8 +4755,12 @@ class mexc(Exchange, ImplicitAPI):
|
|
4745
4755
|
# "transactionFee": "1",
|
4746
4756
|
# "confirmNo": null,
|
4747
4757
|
# "applyTime": "1664882739000",
|
4748
|
-
# "remark":
|
4749
|
-
# "memo": null
|
4758
|
+
# "remark": "",
|
4759
|
+
# "memo": null,
|
4760
|
+
# "explorerUrl": "https://etherscan.io/tx/0xc8c918cd69b2246db493ef6225a72ffdc664f15b08da3e25c6879b271d05e9d0",
|
4761
|
+
# "transHash": "0xc8c918cd69b2246db493ef6225a72ffdc664f15b08da3e25c6879b271d05e9d0",
|
4762
|
+
# "updateTime": "1664882799000",
|
4763
|
+
# "netWork: "MATIC"
|
4750
4764
|
# }
|
4751
4765
|
#
|
4752
4766
|
# withdraw
|
@@ -4758,6 +4772,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4758
4772
|
id = self.safe_string(transaction, 'id')
|
4759
4773
|
type = 'deposit' if (id is None) else 'withdrawal'
|
4760
4774
|
timestamp = self.safe_integer_2(transaction, 'insertTime', 'applyTime')
|
4775
|
+
updated = self.safe_integer(transaction, 'updateTime')
|
4761
4776
|
currencyId = None
|
4762
4777
|
currencyWithNetwork = self.safe_string(transaction, 'coin')
|
4763
4778
|
if currencyWithNetwork is not None:
|
@@ -4770,7 +4785,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4770
4785
|
status = self.parse_transaction_status_by_type(self.safe_string(transaction, 'status'), type)
|
4771
4786
|
amountString = self.safe_string(transaction, 'amount')
|
4772
4787
|
address = self.safe_string(transaction, 'address')
|
4773
|
-
txid = self.
|
4788
|
+
txid = self.safe_string_2(transaction, 'transHash', 'txId')
|
4774
4789
|
fee = None
|
4775
4790
|
feeCostString = self.safe_string(transaction, 'transactionFee')
|
4776
4791
|
if feeCostString is not None:
|
@@ -4798,8 +4813,8 @@ class mexc(Exchange, ImplicitAPI):
|
|
4798
4813
|
'amount': self.parse_number(amountString),
|
4799
4814
|
'currency': code,
|
4800
4815
|
'status': status,
|
4801
|
-
'updated':
|
4802
|
-
'comment':
|
4816
|
+
'updated': updated,
|
4817
|
+
'comment': self.safe_string(transaction, 'remark'),
|
4803
4818
|
'internal': None,
|
4804
4819
|
'fee': fee,
|
4805
4820
|
}
|
@@ -5705,7 +5720,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
5705
5720
|
#
|
5706
5721
|
# {success: True, code: '0'}
|
5707
5722
|
#
|
5708
|
-
return self.parse_leverage(response, market)
|
5723
|
+
return self.parse_leverage(response, market) # tmp revert type
|
5709
5724
|
|
5710
5725
|
def nonce(self):
|
5711
5726
|
return self.milliseconds() - self.safe_integer(self.options, 'timeDifference', 0)
|
ccxt/async_support/modetrade.py
CHANGED
@@ -29,7 +29,7 @@ class modetrade(Exchange, ImplicitAPI):
|
|
29
29
|
'countries': ['KY'], # Cayman Islands
|
30
30
|
'rateLimit': 100,
|
31
31
|
'version': 'v1',
|
32
|
-
'certified':
|
32
|
+
'certified': False,
|
33
33
|
'pro': True,
|
34
34
|
'dex': True,
|
35
35
|
'hostname': 'trade.mode.network',
|
@@ -1750,9 +1750,9 @@ class modetrade(Exchange, ImplicitAPI):
|
|
1750
1750
|
# }
|
1751
1751
|
#
|
1752
1752
|
return [
|
1753
|
-
{
|
1753
|
+
self.safe_order({
|
1754
1754
|
'info': response,
|
1755
|
-
},
|
1755
|
+
}),
|
1756
1756
|
]
|
1757
1757
|
|
1758
1758
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
ccxt/async_support/okcoin.py
CHANGED
@@ -1650,7 +1650,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
1650
1650
|
advanced = self.safe_value(params, 'advanced')
|
1651
1651
|
if trigger or advanced:
|
1652
1652
|
orderInner = await self.cancel_orders([id], symbol, params)
|
1653
|
-
return self.
|
1653
|
+
return self.safe_dict(orderInner, 0)
|
1654
1654
|
market = self.market(symbol)
|
1655
1655
|
request: dict = {
|
1656
1656
|
'instId': market['id'],
|
ccxt/async_support/okx.py
CHANGED
@@ -1173,7 +1173,9 @@ class okx(Exchange, ImplicitAPI):
|
|
1173
1173
|
},
|
1174
1174
|
'createOrder': 'privatePostTradeBatchOrders', # or 'privatePostTradeOrder' or 'privatePostTradeOrderAlgo'
|
1175
1175
|
'createMarketBuyOrderRequiresPrice': False,
|
1176
|
-
'fetchMarkets':
|
1176
|
+
'fetchMarkets': {
|
1177
|
+
'types': ['spot', 'future', 'swap', 'option'], # spot, future, swap, option
|
1178
|
+
},
|
1177
1179
|
'timeDifference': 0, # the difference between system clock and exchange server clock
|
1178
1180
|
'adjustForTimeDifference': False, # controls the adjustment logic upon instantiation
|
1179
1181
|
'defaultType': 'spot', # 'funding', 'spot', 'margin', 'future', 'swap', 'option'
|
@@ -1559,7 +1561,12 @@ class okx(Exchange, ImplicitAPI):
|
|
1559
1561
|
"""
|
1560
1562
|
if self.options['adjustForTimeDifference']:
|
1561
1563
|
await self.load_time_difference()
|
1562
|
-
types =
|
1564
|
+
types = ['spot', 'future', 'swap', 'option']
|
1565
|
+
fetchMarketsOption = self.safe_dict(self.options, 'fetchMarkets')
|
1566
|
+
if fetchMarketsOption is not None:
|
1567
|
+
types = self.safe_list(fetchMarketsOption, 'types', types)
|
1568
|
+
else:
|
1569
|
+
types = self.safe_list(self.options, 'fetchMarkets', types) # backward-support
|
1563
1570
|
promises = []
|
1564
1571
|
result = []
|
1565
1572
|
for i in range(0, len(types)):
|
@@ -3325,7 +3332,7 @@ class okx(Exchange, ImplicitAPI):
|
|
3325
3332
|
trailing = self.safe_bool(params, 'trailing', False)
|
3326
3333
|
if trigger or trailing:
|
3327
3334
|
orderInner = await self.cancel_orders([id], symbol, params)
|
3328
|
-
return self.
|
3335
|
+
return self.safe_dict(orderInner, 0)
|
3329
3336
|
await self.load_markets()
|
3330
3337
|
market = self.market(symbol)
|
3331
3338
|
request: dict = {
|
ccxt/async_support/onetrading.py
CHANGED
@@ -1321,7 +1321,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1321
1321
|
# "a10e9bd1-8f72-4cfe-9f1b-7f1c8a9bd8ee"
|
1322
1322
|
# ]
|
1323
1323
|
#
|
1324
|
-
return response
|
1324
|
+
return [self.safe_order({'info': response})]
|
1325
1325
|
|
1326
1326
|
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
1327
1327
|
"""
|
ccxt/async_support/oxfun.py
CHANGED
@@ -2585,7 +2585,8 @@ class oxfun(Exchange, ImplicitAPI):
|
|
2585
2585
|
# "data": {"notice": "No working orders found"}
|
2586
2586
|
# }
|
2587
2587
|
#
|
2588
|
-
|
2588
|
+
response = await self.privateDeleteV3OrdersCancelAll(self.extend(request, params))
|
2589
|
+
return [self.safe_order({'info': response})]
|
2589
2590
|
|
2590
2591
|
async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
|
2591
2592
|
"""
|
ccxt/async_support/paradex.py
CHANGED
@@ -1249,7 +1249,7 @@ class paradex(Exchange, ImplicitAPI):
|
|
1249
1249
|
cancelReason = self.safe_string(order, 'cancel_reason')
|
1250
1250
|
status = self.safe_string(order, 'status')
|
1251
1251
|
if cancelReason is not None:
|
1252
|
-
if cancelReason == 'NOT_ENOUGH_MARGIN':
|
1252
|
+
if cancelReason == 'NOT_ENOUGH_MARGIN' or cancelReason == 'ORDER_EXCEEDS_POSITION_LIMIT':
|
1253
1253
|
status = 'rejected'
|
1254
1254
|
else:
|
1255
1255
|
status = 'canceled'
|
@@ -1527,7 +1527,7 @@ class paradex(Exchange, ImplicitAPI):
|
|
1527
1527
|
#
|
1528
1528
|
# if success, no response...
|
1529
1529
|
#
|
1530
|
-
return response
|
1530
|
+
return [self.safe_order({'info': response})]
|
1531
1531
|
|
1532
1532
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1533
1533
|
"""
|
ccxt/async_support/vertex.py
CHANGED
@@ -2351,7 +2351,7 @@ class vertex(Exchange, ImplicitAPI):
|
|
2351
2351
|
# "request_type": "execute_cancel_product_orders"
|
2352
2352
|
# }
|
2353
2353
|
#
|
2354
|
-
return response
|
2354
|
+
return [self.safe_order({'info': response})]
|
2355
2355
|
|
2356
2356
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
2357
2357
|
"""
|
@@ -2365,7 +2365,8 @@ class vertex(Exchange, ImplicitAPI):
|
|
2365
2365
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2366
2366
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2367
2367
|
"""
|
2368
|
-
|
2368
|
+
order = await self.cancel_orders([id], symbol, params)
|
2369
|
+
return self.safe_order({'info': order})
|
2369
2370
|
|
2370
2371
|
async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
|
2371
2372
|
"""
|