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/__init__.py
CHANGED
ccxt/abstract/coinex.py
CHANGED
@@ -145,6 +145,8 @@ class ImplicitAPI:
|
|
145
145
|
v2_public_get_futures_position_level = v2PublicGetFuturesPositionLevel = Entry('futures/position-level', ['v2', 'public'], 'GET', {'cost': 1})
|
146
146
|
v2_public_get_futures_liquidation_history = v2PublicGetFuturesLiquidationHistory = Entry('futures/liquidation-history', ['v2', 'public'], 'GET', {'cost': 1})
|
147
147
|
v2_public_get_futures_basis_history = v2PublicGetFuturesBasisHistory = Entry('futures/basis-history', ['v2', 'public'], 'GET', {'cost': 1})
|
148
|
+
v2_public_get_assets_deposit_withdraw_config = v2PublicGetAssetsDepositWithdrawConfig = Entry('assets/deposit-withdraw-config', ['v2', 'public'], 'GET', {'cost': 1})
|
149
|
+
v2_public_get_assets_all_deposit_withdraw_config = v2PublicGetAssetsAllDepositWithdrawConfig = Entry('assets/all-deposit-withdraw-config', ['v2', 'public'], 'GET', {'cost': 1})
|
148
150
|
v2_private_get_account_subs = v2PrivateGetAccountSubs = Entry('account/subs', ['v2', 'private'], 'GET', {'cost': 1})
|
149
151
|
v2_private_get_account_subs_api_detail = v2PrivateGetAccountSubsApiDetail = Entry('account/subs/api-detail', ['v2', 'private'], 'GET', {'cost': 40})
|
150
152
|
v2_private_get_account_subs_info = v2PrivateGetAccountSubsInfo = Entry('account/subs/info', ['v2', 'private'], 'GET', {'cost': 1})
|
@@ -163,7 +165,6 @@ class ImplicitAPI:
|
|
163
165
|
v2_private_get_assets_deposit_address = v2PrivateGetAssetsDepositAddress = Entry('assets/deposit-address', ['v2', 'private'], 'GET', {'cost': 40})
|
164
166
|
v2_private_get_assets_deposit_history = v2PrivateGetAssetsDepositHistory = Entry('assets/deposit-history', ['v2', 'private'], 'GET', {'cost': 40})
|
165
167
|
v2_private_get_assets_withdraw = v2PrivateGetAssetsWithdraw = Entry('assets/withdraw', ['v2', 'private'], 'GET', {'cost': 40})
|
166
|
-
v2_private_get_assets_deposit_withdraw_config = v2PrivateGetAssetsDepositWithdrawConfig = Entry('assets/deposit-withdraw-config', ['v2', 'private'], 'GET', {'cost': 1})
|
167
168
|
v2_private_get_assets_transfer_history = v2PrivateGetAssetsTransferHistory = Entry('assets/transfer-history', ['v2', 'private'], 'GET', {'cost': 40})
|
168
169
|
v2_private_get_spot_order_status = v2PrivateGetSpotOrderStatus = Entry('spot/order-status', ['v2', 'private'], 'GET', {'cost': 8})
|
169
170
|
v2_private_get_spot_batch_order_status = v2PrivateGetSpotBatchOrderStatus = Entry('spot/batch-order-status', ['v2', 'private'], 'GET', {'cost': 8})
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/binance.py
CHANGED
@@ -7557,8 +7557,56 @@ class binance(Exchange, ImplicitAPI):
|
|
7557
7557
|
# "tranId": 43000126248
|
7558
7558
|
# }
|
7559
7559
|
#
|
7560
|
-
|
7561
|
-
|
7560
|
+
# {
|
7561
|
+
# "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)
|
7562
|
+
# "transactionId": "M_P_71505104267788288",
|
7563
|
+
# "transactionTime": 1610090460133, #trade timestamp
|
7564
|
+
# "amount": "23.72469206", #order amount(up to 8 decimal places), positive is income, negative is expenditure
|
7565
|
+
# "currency": "BNB",
|
7566
|
+
# "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
|
7567
|
+
# "walletTypes": [1,2], #array format,there are multiple values when using combination payment
|
7568
|
+
# "fundsDetail": [ # details
|
7569
|
+
# {
|
7570
|
+
# "currency": "USDT", #asset
|
7571
|
+
# "amount": "1.2",
|
7572
|
+
# "walletAssetCost":[ #details of asset cost per wallet
|
7573
|
+
# {"1":"0.6"},
|
7574
|
+
# {"2":"0.6"}
|
7575
|
+
# ]
|
7576
|
+
# },
|
7577
|
+
# {
|
7578
|
+
# "currency": "ETH",
|
7579
|
+
# "amount": "0.0001",
|
7580
|
+
# "walletAssetCost":[
|
7581
|
+
# {"1":"0.00005"},
|
7582
|
+
# {"2":"0.00005"}
|
7583
|
+
# ]
|
7584
|
+
# }
|
7585
|
+
# ],
|
7586
|
+
# "payerInfo":{
|
7587
|
+
# "name":"Jack", #nickname or merchant name
|
7588
|
+
# "type":"USER", #account type,USER for personal,MERCHANT for merchant
|
7589
|
+
# "binanceId":"12345678", #binance uid
|
7590
|
+
# "accountId":"67736251" #binance pay id
|
7591
|
+
# },
|
7592
|
+
# "receiverInfo":{
|
7593
|
+
# "name":"Alan", #nickname or merchant name
|
7594
|
+
# "type":"MERCHANT", #account type,USER for personal,MERCHANT for merchant
|
7595
|
+
# "email":"alan@binance.com", #email
|
7596
|
+
# "binanceId":"34355667", #binance uid
|
7597
|
+
# "accountId":"21326891", #binance pay id
|
7598
|
+
# "countryCode":"1", #International area code
|
7599
|
+
# "phoneNumber":"8057651210",
|
7600
|
+
# "mobileCode":"US", #country code
|
7601
|
+
# "extend":[ #extension field
|
7602
|
+
# "institutionName": "",
|
7603
|
+
# "cardNumber": "",
|
7604
|
+
# "digitalWalletId": ""
|
7605
|
+
# ]
|
7606
|
+
# }
|
7607
|
+
# }
|
7608
|
+
id = self.safe_string_2(transfer, 'tranId', 'transactionId')
|
7609
|
+
currencyId = self.safe_string_2(transfer, 'asset', 'currency')
|
7562
7610
|
code = self.safe_currency_code(currencyId, currency)
|
7563
7611
|
amount = self.safe_number(transfer, 'amount')
|
7564
7612
|
type = self.safe_string(transfer, 'type')
|
@@ -7571,7 +7619,13 @@ class binance(Exchange, ImplicitAPI):
|
|
7571
7619
|
toAccount = self.safe_value(parts, 1)
|
7572
7620
|
fromAccount = self.safe_string(accountsById, fromAccount, fromAccount)
|
7573
7621
|
toAccount = self.safe_string(accountsById, toAccount, toAccount)
|
7574
|
-
|
7622
|
+
walletType = self.safe_integer(transfer, 'walletType')
|
7623
|
+
if walletType is not None:
|
7624
|
+
payer = self.safe_dict(transfer, 'payerInfo', {})
|
7625
|
+
receiver = self.safe_dict(transfer, 'receiverInfo', {})
|
7626
|
+
fromAccount = self.safe_string(payer, 'accountId')
|
7627
|
+
toAccount = self.safe_string(receiver, 'accountId')
|
7628
|
+
timestamp = self.safe_integer_2(transfer, 'timestamp', 'transactionTime')
|
7575
7629
|
status = self.parse_transfer_status(self.safe_string(transfer, 'status'))
|
7576
7630
|
return {
|
7577
7631
|
'info': transfer,
|
@@ -7700,66 +7754,133 @@ class binance(Exchange, ImplicitAPI):
|
|
7700
7754
|
"""
|
7701
7755
|
fetch a history of internal transfers made on an account
|
7702
7756
|
:see: https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history-user_data
|
7757
|
+
:see: https://binance-docs.github.io/apidocs/spot/en/#pay-endpoints
|
7703
7758
|
:param str code: unified currency code of the currency transferred
|
7704
7759
|
:param int [since]: the earliest time in ms to fetch transfers for
|
7705
7760
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
7706
7761
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7707
7762
|
:param int [params.until]: the latest time in ms to fetch transfers for
|
7708
7763
|
: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)
|
7764
|
+
:param boolean [params.internal]: default False, when True will fetch pay trade history
|
7709
7765
|
:returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
|
7710
7766
|
"""
|
7711
7767
|
await self.load_markets()
|
7768
|
+
internal = self.safe_bool(params, 'internal')
|
7769
|
+
params = self.omit(params, 'internal')
|
7712
7770
|
paginate = False
|
7713
7771
|
paginate, params = self.handle_option_and_params(params, 'fetchTransfers', 'paginate')
|
7714
|
-
if paginate:
|
7772
|
+
if paginate and not internal:
|
7715
7773
|
return await self.fetch_paginated_call_dynamic('fetchTransfers', code, since, limit, params)
|
7716
7774
|
currency = None
|
7717
7775
|
if code is not None:
|
7718
7776
|
currency = self.currency(code)
|
7719
|
-
|
7720
|
-
|
7721
|
-
|
7722
|
-
|
7723
|
-
|
7724
|
-
|
7725
|
-
|
7726
|
-
|
7727
|
-
|
7728
|
-
|
7729
|
-
|
7730
|
-
|
7731
|
-
|
7732
|
-
|
7733
|
-
|
7734
|
-
|
7735
|
-
|
7736
|
-
|
7737
|
-
|
7777
|
+
request: dict = {}
|
7778
|
+
limitKey = 'limit'
|
7779
|
+
if not internal:
|
7780
|
+
defaultType = self.safe_string_2(self.options, 'fetchTransfers', 'defaultType', 'spot')
|
7781
|
+
fromAccount = self.safe_string(params, 'fromAccount', defaultType)
|
7782
|
+
defaultTo = 'spot' if (fromAccount == 'future') else 'future'
|
7783
|
+
toAccount = self.safe_string(params, 'toAccount', defaultTo)
|
7784
|
+
type = self.safe_string(params, 'type')
|
7785
|
+
accountsByType = self.safe_dict(self.options, 'accountsByType', {})
|
7786
|
+
fromId = self.safe_string(accountsByType, fromAccount)
|
7787
|
+
toId = self.safe_string(accountsByType, toAccount)
|
7788
|
+
if type is None:
|
7789
|
+
if fromId is None:
|
7790
|
+
keys = list(accountsByType.keys())
|
7791
|
+
raise ExchangeError(self.id + ' fromAccount parameter must be one of ' + ', '.join(keys))
|
7792
|
+
if toId is None:
|
7793
|
+
keys = list(accountsByType.keys())
|
7794
|
+
raise ExchangeError(self.id + ' toAccount parameter must be one of ' + ', '.join(keys))
|
7795
|
+
type = fromId + '_' + toId
|
7796
|
+
request['type'] = type
|
7797
|
+
limitKey = 'size'
|
7798
|
+
if limit is not None:
|
7799
|
+
request[limitKey] = limit
|
7738
7800
|
if since is not None:
|
7739
7801
|
request['startTime'] = since
|
7740
|
-
if limit is not None:
|
7741
|
-
request['size'] = limit
|
7742
7802
|
until = self.safe_integer(params, 'until')
|
7743
7803
|
if until is not None:
|
7744
7804
|
params = self.omit(params, 'until')
|
7745
7805
|
request['endTime'] = until
|
7746
|
-
response =
|
7747
|
-
|
7748
|
-
|
7749
|
-
|
7750
|
-
|
7751
|
-
|
7752
|
-
|
7753
|
-
|
7754
|
-
|
7755
|
-
|
7756
|
-
|
7757
|
-
|
7758
|
-
|
7759
|
-
|
7760
|
-
|
7761
|
-
|
7762
|
-
|
7806
|
+
response = None
|
7807
|
+
if internal:
|
7808
|
+
response = await self.sapiGetPayTransactions(self.extend(request, params))
|
7809
|
+
#
|
7810
|
+
# {
|
7811
|
+
# "code": "000000",
|
7812
|
+
# "message": "success",
|
7813
|
+
# "data": [
|
7814
|
+
# {
|
7815
|
+
# "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)
|
7816
|
+
# "transactionId": "M_P_71505104267788288",
|
7817
|
+
# "transactionTime": 1610090460133, #trade timestamp
|
7818
|
+
# "amount": "23.72469206", #order amount(up to 8 decimal places), positive is income, negative is expenditure
|
7819
|
+
# "currency": "BNB",
|
7820
|
+
# "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
|
7821
|
+
# "walletTypes": [1,2], #array format,there are multiple values when using combination payment
|
7822
|
+
# "fundsDetail": [ # details
|
7823
|
+
# {
|
7824
|
+
# "currency": "USDT", #asset
|
7825
|
+
# "amount": "1.2",
|
7826
|
+
# "walletAssetCost":[ #details of asset cost per wallet
|
7827
|
+
# {"1":"0.6"},
|
7828
|
+
# {"2":"0.6"}
|
7829
|
+
# ]
|
7830
|
+
# },
|
7831
|
+
# {
|
7832
|
+
# "currency": "ETH",
|
7833
|
+
# "amount": "0.0001",
|
7834
|
+
# "walletAssetCost":[
|
7835
|
+
# {"1":"0.00005"},
|
7836
|
+
# {"2":"0.00005"}
|
7837
|
+
# ]
|
7838
|
+
# }
|
7839
|
+
# ],
|
7840
|
+
# "payerInfo":{
|
7841
|
+
# "name":"Jack", #nickname or merchant name
|
7842
|
+
# "type":"USER", #account type,USER for personal,MERCHANT for merchant
|
7843
|
+
# "binanceId":"12345678", #binance uid
|
7844
|
+
# "accountId":"67736251" #binance pay id
|
7845
|
+
# },
|
7846
|
+
# "receiverInfo":{
|
7847
|
+
# "name":"Alan", #nickname or merchant name
|
7848
|
+
# "type":"MERCHANT", #account type,USER for personal,MERCHANT for merchant
|
7849
|
+
# "email":"alan@binance.com", #email
|
7850
|
+
# "binanceId":"34355667", #binance uid
|
7851
|
+
# "accountId":"21326891", #binance pay id
|
7852
|
+
# "countryCode":"1", #International area code
|
7853
|
+
# "phoneNumber":"8057651210",
|
7854
|
+
# "mobileCode":"US", #country code
|
7855
|
+
# "extend":[ #extension field
|
7856
|
+
# "institutionName": "",
|
7857
|
+
# "cardNumber": "",
|
7858
|
+
# "digitalWalletId": ""
|
7859
|
+
# ]
|
7860
|
+
# }
|
7861
|
+
# }
|
7862
|
+
# ],
|
7863
|
+
# "success": True
|
7864
|
+
# }
|
7865
|
+
#
|
7866
|
+
else:
|
7867
|
+
response = await self.sapiGetAssetTransfer(self.extend(request, params))
|
7868
|
+
#
|
7869
|
+
# {
|
7870
|
+
# "total": 3,
|
7871
|
+
# "rows": [
|
7872
|
+
# {
|
7873
|
+
# "timestamp": 1614640878000,
|
7874
|
+
# "asset": "USDT",
|
7875
|
+
# "amount": "25",
|
7876
|
+
# "type": "MAIN_UMFUTURE",
|
7877
|
+
# "status": "CONFIRMED",
|
7878
|
+
# "tranId": 43000126248
|
7879
|
+
# },
|
7880
|
+
# ]
|
7881
|
+
# }
|
7882
|
+
#
|
7883
|
+
rows = self.safe_list_2(response, 'rows', 'data', [])
|
7763
7884
|
return self.parse_transfers(rows, currency, since, limit)
|
7764
7885
|
|
7765
7886
|
async def fetch_deposit_address(self, code: str, params={}):
|