ccxt 4.3.41__py2.py3-none-any.whl → 4.3.43__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/abstract/coinex.py +2 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +163 -42
- ccxt/async_support/bitmart.py +191 -100
- ccxt/async_support/blockchaincom.py +11 -7
- ccxt/async_support/btcmarkets.py +31 -2
- ccxt/async_support/coinex.py +104 -104
- ccxt/async_support/kraken.py +30 -3
- ccxt/async_support/krakenfutures.py +55 -1
- ccxt/async_support/kucoin.py +59 -2
- ccxt/async_support/phemex.py +4 -4
- ccxt/async_support/tradeogre.py +10 -4
- ccxt/async_support/wavesexchange.py +2 -2
- ccxt/async_support/wazirx.py +38 -15
- ccxt/async_support/zonda.py +9 -1
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +163 -42
- ccxt/bitmart.py +191 -100
- ccxt/blockchaincom.py +11 -7
- ccxt/btcmarkets.py +31 -2
- ccxt/coinex.py +104 -104
- ccxt/kraken.py +30 -3
- ccxt/krakenfutures.py +55 -1
- ccxt/kucoin.py +59 -2
- ccxt/phemex.py +4 -4
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitget.py +32 -20
- ccxt/pro/bybit.py +1 -1
- ccxt/pro/mexc.py +2 -2
- ccxt/pro/upbit.py +8 -4
- ccxt/pro/woo.py +1 -1
- ccxt/tradeogre.py +10 -4
- ccxt/wavesexchange.py +2 -2
- ccxt/wazirx.py +38 -15
- ccxt/zonda.py +9 -1
- {ccxt-4.3.41.dist-info → ccxt-4.3.43.dist-info}/METADATA +6 -6
- {ccxt-4.3.41.dist-info → ccxt-4.3.43.dist-info}/RECORD +41 -41
- {ccxt-4.3.41.dist-info → ccxt-4.3.43.dist-info}/WHEEL +0 -0
- {ccxt-4.3.41.dist-info → ccxt-4.3.43.dist-info}/top_level.txt +0 -0
ccxt/async_support/wazirx.py
CHANGED
@@ -763,7 +763,26 @@ class wazirx(Exchange, ImplicitAPI):
|
|
763
763
|
request: dict = {
|
764
764
|
'symbol': market['id'],
|
765
765
|
}
|
766
|
-
|
766
|
+
response = await self.privateDeleteOpenOrders(self.extend(request, params))
|
767
|
+
#
|
768
|
+
# [
|
769
|
+
# {
|
770
|
+
# id: "4565421197",
|
771
|
+
# symbol: "adausdt",
|
772
|
+
# type: "limit",
|
773
|
+
# side: "buy",
|
774
|
+
# status: "wait",
|
775
|
+
# price: "0.41",
|
776
|
+
# origQty: "11.00",
|
777
|
+
# executedQty: "0.00",
|
778
|
+
# avgPrice: "0.00",
|
779
|
+
# createdTime: "1718089507000",
|
780
|
+
# updatedTime: "1718089507000",
|
781
|
+
# clientOrderId: "93d2a838-e272-405d-91e7-3a7bc6d3a003"
|
782
|
+
# }
|
783
|
+
# ]
|
784
|
+
#
|
785
|
+
return self.parse_orders(response)
|
767
786
|
|
768
787
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
769
788
|
"""
|
@@ -831,18 +850,22 @@ class wazirx(Exchange, ImplicitAPI):
|
|
831
850
|
return self.parse_order(response, market)
|
832
851
|
|
833
852
|
def parse_order(self, order: dict, market: Market = None) -> Order:
|
834
|
-
#
|
835
|
-
#
|
836
|
-
#
|
837
|
-
#
|
838
|
-
#
|
839
|
-
#
|
840
|
-
#
|
841
|
-
#
|
842
|
-
#
|
843
|
-
#
|
844
|
-
#
|
845
|
-
#
|
853
|
+
#
|
854
|
+
# {
|
855
|
+
# "id": 1949417813,
|
856
|
+
# "symbol": "ltcusdt",
|
857
|
+
# "type": "limit",
|
858
|
+
# "side": "sell",
|
859
|
+
# "status": "done",
|
860
|
+
# "price": "146.2",
|
861
|
+
# "origQty": "0.05",
|
862
|
+
# "executedQty": "0.05",
|
863
|
+
# "avgPrice": "0.00",
|
864
|
+
# "createdTime": 1641252564000,
|
865
|
+
# "updatedTime": 1641252564000
|
866
|
+
# "clientOrderId": "93d2a838-e272-405d-91e7-3a7bc6d3a003"
|
867
|
+
# }
|
868
|
+
#
|
846
869
|
created = self.safe_integer(order, 'createdTime')
|
847
870
|
updated = self.safe_integer(order, 'updatedTime')
|
848
871
|
marketId = self.safe_string(order, 'symbol')
|
@@ -857,7 +880,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
857
880
|
return self.safe_order({
|
858
881
|
'info': order,
|
859
882
|
'id': id,
|
860
|
-
'clientOrderId':
|
883
|
+
'clientOrderId': self.safe_string(order, 'clientOrderId'),
|
861
884
|
'timestamp': created,
|
862
885
|
'datetime': self.iso8601(created),
|
863
886
|
'lastTradeTimestamp': updated,
|
@@ -873,7 +896,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
873
896
|
'remaining': None,
|
874
897
|
'cost': None,
|
875
898
|
'fee': None,
|
876
|
-
'average':
|
899
|
+
'average': self.safe_string(order, 'avgPrice'),
|
877
900
|
'trades': [],
|
878
901
|
}, market)
|
879
902
|
|
ccxt/async_support/zonda.py
CHANGED
@@ -449,6 +449,13 @@ class zonda(Exchange, ImplicitAPI):
|
|
449
449
|
# "secondBalanceId": "ab43023b-4079-414c-b340-056e3430a3af"
|
450
450
|
# }
|
451
451
|
#
|
452
|
+
# cancelOrder
|
453
|
+
#
|
454
|
+
# {
|
455
|
+
# status: "Ok",
|
456
|
+
# errors: []
|
457
|
+
# }
|
458
|
+
#
|
452
459
|
marketId = self.safe_string(order, 'market')
|
453
460
|
symbol = self.safe_symbol(marketId, market, '-')
|
454
461
|
timestamp = self.safe_integer(order, 'time')
|
@@ -1455,9 +1462,10 @@ class zonda(Exchange, ImplicitAPI):
|
|
1455
1462
|
'side': side,
|
1456
1463
|
'price': price,
|
1457
1464
|
}
|
1465
|
+
response = await self.v1_01PrivateDeleteTradingOfferSymbolIdSidePrice(self.extend(request, params))
|
1458
1466
|
# {status: "Fail", errors: ["NOT_RECOGNIZED_OFFER_TYPE"]} -- if required params are missing
|
1459
1467
|
# {status: "Ok", errors: []}
|
1460
|
-
return
|
1468
|
+
return self.parse_order(response)
|
1461
1469
|
|
1462
1470
|
def is_fiat(self, currency):
|
1463
1471
|
fiatCurrencies: dict = {
|
ccxt/base/exchange.py
CHANGED
ccxt/binance.py
CHANGED
@@ -7556,8 +7556,56 @@ class binance(Exchange, ImplicitAPI):
|
|
7556
7556
|
# "tranId": 43000126248
|
7557
7557
|
# }
|
7558
7558
|
#
|
7559
|
-
|
7560
|
-
|
7559
|
+
# {
|
7560
|
+
# "orderType": "C2C", # Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment), REMITTANCE(Send cash)
|
7561
|
+
# "transactionId": "M_P_71505104267788288",
|
7562
|
+
# "transactionTime": 1610090460133, #trade timestamp
|
7563
|
+
# "amount": "23.72469206", #order amount(up to 8 decimal places), positive is income, negative is expenditure
|
7564
|
+
# "currency": "BNB",
|
7565
|
+
# "walletType": 1, #main wallet type, 1 for funding wallet, 2 for spot wallet, 3 for fiat wallet, 4 or 6 for card payment, 5 for earn wallet
|
7566
|
+
# "walletTypes": [1,2], #array format,there are multiple values when using combination payment
|
7567
|
+
# "fundsDetail": [ # details
|
7568
|
+
# {
|
7569
|
+
# "currency": "USDT", #asset
|
7570
|
+
# "amount": "1.2",
|
7571
|
+
# "walletAssetCost":[ #details of asset cost per wallet
|
7572
|
+
# {"1":"0.6"},
|
7573
|
+
# {"2":"0.6"}
|
7574
|
+
# ]
|
7575
|
+
# },
|
7576
|
+
# {
|
7577
|
+
# "currency": "ETH",
|
7578
|
+
# "amount": "0.0001",
|
7579
|
+
# "walletAssetCost":[
|
7580
|
+
# {"1":"0.00005"},
|
7581
|
+
# {"2":"0.00005"}
|
7582
|
+
# ]
|
7583
|
+
# }
|
7584
|
+
# ],
|
7585
|
+
# "payerInfo":{
|
7586
|
+
# "name":"Jack", #nickname or merchant name
|
7587
|
+
# "type":"USER", #account type,USER for personal,MERCHANT for merchant
|
7588
|
+
# "binanceId":"12345678", #binance uid
|
7589
|
+
# "accountId":"67736251" #binance pay id
|
7590
|
+
# },
|
7591
|
+
# "receiverInfo":{
|
7592
|
+
# "name":"Alan", #nickname or merchant name
|
7593
|
+
# "type":"MERCHANT", #account type,USER for personal,MERCHANT for merchant
|
7594
|
+
# "email":"alan@binance.com", #email
|
7595
|
+
# "binanceId":"34355667", #binance uid
|
7596
|
+
# "accountId":"21326891", #binance pay id
|
7597
|
+
# "countryCode":"1", #International area code
|
7598
|
+
# "phoneNumber":"8057651210",
|
7599
|
+
# "mobileCode":"US", #country code
|
7600
|
+
# "extend":[ #extension field
|
7601
|
+
# "institutionName": "",
|
7602
|
+
# "cardNumber": "",
|
7603
|
+
# "digitalWalletId": ""
|
7604
|
+
# ]
|
7605
|
+
# }
|
7606
|
+
# }
|
7607
|
+
id = self.safe_string_2(transfer, 'tranId', 'transactionId')
|
7608
|
+
currencyId = self.safe_string_2(transfer, 'asset', 'currency')
|
7561
7609
|
code = self.safe_currency_code(currencyId, currency)
|
7562
7610
|
amount = self.safe_number(transfer, 'amount')
|
7563
7611
|
type = self.safe_string(transfer, 'type')
|
@@ -7570,7 +7618,13 @@ class binance(Exchange, ImplicitAPI):
|
|
7570
7618
|
toAccount = self.safe_value(parts, 1)
|
7571
7619
|
fromAccount = self.safe_string(accountsById, fromAccount, fromAccount)
|
7572
7620
|
toAccount = self.safe_string(accountsById, toAccount, toAccount)
|
7573
|
-
|
7621
|
+
walletType = self.safe_integer(transfer, 'walletType')
|
7622
|
+
if walletType is not None:
|
7623
|
+
payer = self.safe_dict(transfer, 'payerInfo', {})
|
7624
|
+
receiver = self.safe_dict(transfer, 'receiverInfo', {})
|
7625
|
+
fromAccount = self.safe_string(payer, 'accountId')
|
7626
|
+
toAccount = self.safe_string(receiver, 'accountId')
|
7627
|
+
timestamp = self.safe_integer_2(transfer, 'timestamp', 'transactionTime')
|
7574
7628
|
status = self.parse_transfer_status(self.safe_string(transfer, 'status'))
|
7575
7629
|
return {
|
7576
7630
|
'info': transfer,
|
@@ -7699,66 +7753,133 @@ class binance(Exchange, ImplicitAPI):
|
|
7699
7753
|
"""
|
7700
7754
|
fetch a history of internal transfers made on an account
|
7701
7755
|
:see: https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history-user_data
|
7756
|
+
:see: https://binance-docs.github.io/apidocs/spot/en/#pay-endpoints
|
7702
7757
|
:param str code: unified currency code of the currency transferred
|
7703
7758
|
:param int [since]: the earliest time in ms to fetch transfers for
|
7704
7759
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
7705
7760
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7706
7761
|
:param int [params.until]: the latest time in ms to fetch transfers for
|
7707
7762
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
7763
|
+
:param boolean [params.internal]: default False, when True will fetch pay trade history
|
7708
7764
|
:returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
|
7709
7765
|
"""
|
7710
7766
|
self.load_markets()
|
7767
|
+
internal = self.safe_bool(params, 'internal')
|
7768
|
+
params = self.omit(params, 'internal')
|
7711
7769
|
paginate = False
|
7712
7770
|
paginate, params = self.handle_option_and_params(params, 'fetchTransfers', 'paginate')
|
7713
|
-
if paginate:
|
7771
|
+
if paginate and not internal:
|
7714
7772
|
return self.fetch_paginated_call_dynamic('fetchTransfers', code, since, limit, params)
|
7715
7773
|
currency = None
|
7716
7774
|
if code is not None:
|
7717
7775
|
currency = self.currency(code)
|
7718
|
-
|
7719
|
-
|
7720
|
-
|
7721
|
-
|
7722
|
-
|
7723
|
-
|
7724
|
-
|
7725
|
-
|
7726
|
-
|
7727
|
-
|
7728
|
-
|
7729
|
-
|
7730
|
-
|
7731
|
-
|
7732
|
-
|
7733
|
-
|
7734
|
-
|
7735
|
-
|
7736
|
-
|
7776
|
+
request: dict = {}
|
7777
|
+
limitKey = 'limit'
|
7778
|
+
if not internal:
|
7779
|
+
defaultType = self.safe_string_2(self.options, 'fetchTransfers', 'defaultType', 'spot')
|
7780
|
+
fromAccount = self.safe_string(params, 'fromAccount', defaultType)
|
7781
|
+
defaultTo = 'spot' if (fromAccount == 'future') else 'future'
|
7782
|
+
toAccount = self.safe_string(params, 'toAccount', defaultTo)
|
7783
|
+
type = self.safe_string(params, 'type')
|
7784
|
+
accountsByType = self.safe_dict(self.options, 'accountsByType', {})
|
7785
|
+
fromId = self.safe_string(accountsByType, fromAccount)
|
7786
|
+
toId = self.safe_string(accountsByType, toAccount)
|
7787
|
+
if type is None:
|
7788
|
+
if fromId is None:
|
7789
|
+
keys = list(accountsByType.keys())
|
7790
|
+
raise ExchangeError(self.id + ' fromAccount parameter must be one of ' + ', '.join(keys))
|
7791
|
+
if toId is None:
|
7792
|
+
keys = list(accountsByType.keys())
|
7793
|
+
raise ExchangeError(self.id + ' toAccount parameter must be one of ' + ', '.join(keys))
|
7794
|
+
type = fromId + '_' + toId
|
7795
|
+
request['type'] = type
|
7796
|
+
limitKey = 'size'
|
7797
|
+
if limit is not None:
|
7798
|
+
request[limitKey] = limit
|
7737
7799
|
if since is not None:
|
7738
7800
|
request['startTime'] = since
|
7739
|
-
if limit is not None:
|
7740
|
-
request['size'] = limit
|
7741
7801
|
until = self.safe_integer(params, 'until')
|
7742
7802
|
if until is not None:
|
7743
7803
|
params = self.omit(params, 'until')
|
7744
7804
|
request['endTime'] = until
|
7745
|
-
response =
|
7746
|
-
|
7747
|
-
|
7748
|
-
|
7749
|
-
|
7750
|
-
|
7751
|
-
|
7752
|
-
|
7753
|
-
|
7754
|
-
|
7755
|
-
|
7756
|
-
|
7757
|
-
|
7758
|
-
|
7759
|
-
|
7760
|
-
|
7761
|
-
|
7805
|
+
response = None
|
7806
|
+
if internal:
|
7807
|
+
response = self.sapiGetPayTransactions(self.extend(request, params))
|
7808
|
+
#
|
7809
|
+
# {
|
7810
|
+
# "code": "000000",
|
7811
|
+
# "message": "success",
|
7812
|
+
# "data": [
|
7813
|
+
# {
|
7814
|
+
# "orderType": "C2C", # Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment), REMITTANCE(Send cash)
|
7815
|
+
# "transactionId": "M_P_71505104267788288",
|
7816
|
+
# "transactionTime": 1610090460133, #trade timestamp
|
7817
|
+
# "amount": "23.72469206", #order amount(up to 8 decimal places), positive is income, negative is expenditure
|
7818
|
+
# "currency": "BNB",
|
7819
|
+
# "walletType": 1, #main wallet type, 1 for funding wallet, 2 for spot wallet, 3 for fiat wallet, 4 or 6 for card payment, 5 for earn wallet
|
7820
|
+
# "walletTypes": [1,2], #array format,there are multiple values when using combination payment
|
7821
|
+
# "fundsDetail": [ # details
|
7822
|
+
# {
|
7823
|
+
# "currency": "USDT", #asset
|
7824
|
+
# "amount": "1.2",
|
7825
|
+
# "walletAssetCost":[ #details of asset cost per wallet
|
7826
|
+
# {"1":"0.6"},
|
7827
|
+
# {"2":"0.6"}
|
7828
|
+
# ]
|
7829
|
+
# },
|
7830
|
+
# {
|
7831
|
+
# "currency": "ETH",
|
7832
|
+
# "amount": "0.0001",
|
7833
|
+
# "walletAssetCost":[
|
7834
|
+
# {"1":"0.00005"},
|
7835
|
+
# {"2":"0.00005"}
|
7836
|
+
# ]
|
7837
|
+
# }
|
7838
|
+
# ],
|
7839
|
+
# "payerInfo":{
|
7840
|
+
# "name":"Jack", #nickname or merchant name
|
7841
|
+
# "type":"USER", #account type,USER for personal,MERCHANT for merchant
|
7842
|
+
# "binanceId":"12345678", #binance uid
|
7843
|
+
# "accountId":"67736251" #binance pay id
|
7844
|
+
# },
|
7845
|
+
# "receiverInfo":{
|
7846
|
+
# "name":"Alan", #nickname or merchant name
|
7847
|
+
# "type":"MERCHANT", #account type,USER for personal,MERCHANT for merchant
|
7848
|
+
# "email":"alan@binance.com", #email
|
7849
|
+
# "binanceId":"34355667", #binance uid
|
7850
|
+
# "accountId":"21326891", #binance pay id
|
7851
|
+
# "countryCode":"1", #International area code
|
7852
|
+
# "phoneNumber":"8057651210",
|
7853
|
+
# "mobileCode":"US", #country code
|
7854
|
+
# "extend":[ #extension field
|
7855
|
+
# "institutionName": "",
|
7856
|
+
# "cardNumber": "",
|
7857
|
+
# "digitalWalletId": ""
|
7858
|
+
# ]
|
7859
|
+
# }
|
7860
|
+
# }
|
7861
|
+
# ],
|
7862
|
+
# "success": True
|
7863
|
+
# }
|
7864
|
+
#
|
7865
|
+
else:
|
7866
|
+
response = self.sapiGetAssetTransfer(self.extend(request, params))
|
7867
|
+
#
|
7868
|
+
# {
|
7869
|
+
# "total": 3,
|
7870
|
+
# "rows": [
|
7871
|
+
# {
|
7872
|
+
# "timestamp": 1614640878000,
|
7873
|
+
# "asset": "USDT",
|
7874
|
+
# "amount": "25",
|
7875
|
+
# "type": "MAIN_UMFUTURE",
|
7876
|
+
# "status": "CONFIRMED",
|
7877
|
+
# "tranId": 43000126248
|
7878
|
+
# },
|
7879
|
+
# ]
|
7880
|
+
# }
|
7881
|
+
#
|
7882
|
+
rows = self.safe_list_2(response, 'rows', 'data', [])
|
7762
7883
|
return self.parse_transfers(rows, currency, since, limit)
|
7763
7884
|
|
7764
7885
|
def fetch_deposit_address(self, code: str, params={}):
|