ccxt 4.4.22__py2.py3-none-any.whl → 4.4.23__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.
Files changed (49) hide show
  1. ccxt/__init__.py +3 -1
  2. ccxt/abstract/binance.py +64 -43
  3. ccxt/abstract/binancecoinm.py +64 -43
  4. ccxt/abstract/binanceus.py +64 -43
  5. ccxt/abstract/binanceusdm.py +64 -43
  6. ccxt/abstract/coincatch.py +94 -0
  7. ccxt/async_support/__init__.py +3 -1
  8. ccxt/async_support/base/exchange.py +1 -1
  9. ccxt/async_support/binance.py +87 -62
  10. ccxt/async_support/bitfinex.py +4 -0
  11. ccxt/async_support/bitflyer.py +1 -0
  12. ccxt/async_support/bitrue.py +3 -0
  13. ccxt/async_support/bybit.py +2 -2
  14. ccxt/async_support/cex.py +4 -0
  15. ccxt/async_support/coinbase.py +1 -1
  16. ccxt/async_support/coinbaseexchange.py +3 -0
  17. ccxt/async_support/coincatch.py +4955 -0
  18. ccxt/async_support/coinex.py +60 -1
  19. ccxt/async_support/latoken.py +6 -0
  20. ccxt/async_support/mexc.py +1 -1
  21. ccxt/async_support/oceanex.py +2 -0
  22. ccxt/async_support/okcoin.py +1 -0
  23. ccxt/async_support/poloniex.py +5 -0
  24. ccxt/base/exchange.py +1 -1
  25. ccxt/binance.py +87 -62
  26. ccxt/bitfinex.py +4 -0
  27. ccxt/bitflyer.py +1 -0
  28. ccxt/bitrue.py +3 -0
  29. ccxt/bybit.py +2 -2
  30. ccxt/cex.py +4 -0
  31. ccxt/coinbase.py +1 -1
  32. ccxt/coinbaseexchange.py +3 -0
  33. ccxt/coincatch.py +4955 -0
  34. ccxt/coinex.py +60 -1
  35. ccxt/latoken.py +6 -0
  36. ccxt/mexc.py +1 -1
  37. ccxt/oceanex.py +2 -0
  38. ccxt/okcoin.py +1 -0
  39. ccxt/poloniex.py +5 -0
  40. ccxt/pro/__init__.py +3 -1
  41. ccxt/pro/coincatch.py +1429 -0
  42. ccxt/test/tests_async.py +15 -1
  43. ccxt/test/tests_sync.py +15 -1
  44. ccxt-4.4.23.dist-info/METADATA +636 -0
  45. {ccxt-4.4.22.dist-info → ccxt-4.4.23.dist-info}/RECORD +48 -44
  46. ccxt-4.4.22.dist-info/METADATA +0 -635
  47. {ccxt-4.4.22.dist-info → ccxt-4.4.23.dist-info}/LICENSE.txt +0 -0
  48. {ccxt-4.4.22.dist-info → ccxt-4.4.23.dist-info}/WHEEL +0 -0
  49. {ccxt-4.4.22.dist-info → ccxt-4.4.23.dist-info}/top_level.txt +0 -0
@@ -495,6 +495,7 @@ class binance(Exchange, ImplicitAPI):
495
495
  'portfolio/asset-index-price': 0.1,
496
496
  'portfolio/repay-futures-switch': 3, # Weight(IP): 30 => cost = 0.1 * 30 = 3
497
497
  'portfolio/margin-asset-leverage': 5, # Weight(IP): 50 => cost = 0.1 * 50 = 5
498
+ 'portfolio/balance': 2,
498
499
  # staking
499
500
  'staking/productList': 0.1,
500
501
  'staking/position': 0.1,
@@ -697,6 +698,7 @@ class binance(Exchange, ImplicitAPI):
697
698
  'loan/flexible/ltv/adjustment/history': 40, # Weight(IP): 400 => cost = 0.1 * 400 = 40
698
699
  'loan/flexible/loanable/data': 40, # Weight(IP): 400 => cost = 0.1 * 400 = 40
699
700
  'loan/flexible/collateral/data': 40, # Weight(IP): 400 => cost = 0.1 * 400 = 40
701
+ 'portfolio/account': 2,
700
702
  },
701
703
  'post': {
702
704
  'eth-staking/eth/stake': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
@@ -774,6 +776,10 @@ class binance(Exchange, ImplicitAPI):
774
776
  'commissionRate': 20,
775
777
  'income/asyn': 5,
776
778
  'income/asyn/id': 5,
779
+ 'trade/asyn': 0.5,
780
+ 'trade/asyn/id': 0.5,
781
+ 'order/asyn': 0.5,
782
+ 'order/asyn/id': 0.5,
777
783
  'pmExchangeInfo': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
778
784
  'pmAccountInfo': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
779
785
  },
@@ -1052,99 +1058,118 @@ class binance(Exchange, ImplicitAPI):
1052
1058
  },
1053
1059
  },
1054
1060
  'papi': {
1061
+ # IP(papi) request rate limit of 6000 per minute
1062
+ # 1 IP(papi) => cost = 0.2 =>(1000 / (50 * 0.2)) * 60 = 6000
1063
+ # Order(papi) request rate limit of 1200 per minute
1064
+ # 1 Order(papi) => cost = 1 =>(1000 / (50 * 1)) * 60 = 1200
1055
1065
  'get': {
1056
- 'ping': 1,
1057
- 'um/order': 1, # 1
1058
- 'um/openOrder': 1, # 1
1066
+ 'ping': 0.2,
1067
+ 'um/order': 1,
1068
+ 'um/openOrder': 1,
1059
1069
  'um/openOrders': {'cost': 1, 'noSymbol': 40},
1060
- 'um/allOrders': 5, # 5
1061
- 'cm/order': 1, # 1
1062
- 'cm/openOrder': 1, # 1
1070
+ 'um/allOrders': 5,
1071
+ 'cm/order': 1,
1072
+ 'cm/openOrder': 1,
1063
1073
  'cm/openOrders': {'cost': 1, 'noSymbol': 40},
1064
- 'cm/allOrders': 20, # 20
1074
+ 'cm/allOrders': 20,
1065
1075
  'um/conditional/openOrder': 1,
1066
1076
  'um/conditional/openOrders': {'cost': 1, 'noSymbol': 40},
1067
1077
  'um/conditional/orderHistory': 1,
1068
- 'um/conditional/allOrders': 40,
1078
+ 'um/conditional/allOrders': {'cost': 1, 'noSymbol': 40},
1069
1079
  'cm/conditional/openOrder': 1,
1070
1080
  'cm/conditional/openOrders': {'cost': 1, 'noSymbol': 40},
1071
1081
  'cm/conditional/orderHistory': 1,
1072
1082
  'cm/conditional/allOrders': 40,
1073
- 'margin/order': 5,
1083
+ 'margin/order': 10,
1074
1084
  'margin/openOrders': 5,
1075
1085
  'margin/allOrders': 100,
1076
1086
  'margin/orderList': 5,
1077
1087
  'margin/allOrderList': 100,
1078
1088
  'margin/openOrderList': 5,
1079
1089
  'margin/myTrades': 5,
1080
- 'balance': 20, # 20
1081
- 'account': 20, # 20
1082
- 'margin/maxBorrowable': 5, # 5
1083
- 'margin/maxWithdraw': 5, # 5
1084
- 'um/positionRisk': 5, # 5
1085
- 'cm/positionRisk': 1, # 1
1086
- 'um/positionSide/dual': 30, # 30
1087
- 'cm/positionSide/dual': 30, # 30
1088
- 'um/userTrades': 5, # 5
1089
- 'cm/userTrades': 20, # 20
1090
- 'um/leverageBracket': 1, # 1
1091
- 'cm/leverageBracket': 1, # 1
1092
- 'margin/forceOrders': 1, # 1
1093
- 'um/forceOrders': 20, # 20
1094
- 'cm/forceOrders': 20, # 20
1095
- 'um/apiTradingStatus': 1, # 1
1096
- 'um/commissionRate': 20, # 20
1097
- 'cm/commissionRate': 20, # 20
1098
- 'margin/marginLoan': 10,
1099
- 'margin/repayLoan': 10,
1100
- 'margin/marginInterestHistory': 1,
1101
- 'portfolio/interest-history': 50, # 50
1102
- 'um/income': 30,
1103
- 'cm/income': 30,
1104
- 'um/account': 5,
1105
- 'cm/account': 5,
1106
- 'repay-futures-switch': 3, # Weight(IP): 30 => cost = 0.1 * 30 = 3
1090
+ 'balance': 4,
1091
+ 'account': 4,
1092
+ 'margin/maxBorrowable': 1,
1093
+ 'margin/maxWithdraw': 1,
1094
+ 'um/positionRisk': 1,
1095
+ 'cm/positionRisk': 0.2,
1096
+ 'um/positionSide/dual': 6,
1097
+ 'cm/positionSide/dual': 6,
1098
+ 'um/userTrades': 5,
1099
+ 'cm/userTrades': 20,
1100
+ 'um/leverageBracket': 0.2,
1101
+ 'cm/leverageBracket': 0.2,
1102
+ 'margin/forceOrders': 1,
1103
+ 'um/forceOrders': {'cost': 20, 'noSymbol': 50},
1104
+ 'cm/forceOrders': {'cost': 20, 'noSymbol': 50},
1105
+ 'um/apiTradingStatus': {'cost': 0.2, 'noSymbol': 2},
1106
+ 'um/commissionRate': 4,
1107
+ 'cm/commissionRate': 4,
1108
+ 'margin/marginLoan': 2,
1109
+ 'margin/repayLoan': 2,
1110
+ 'margin/marginInterestHistory': 0.2,
1111
+ 'portfolio/interest-history': 10,
1112
+ 'um/income': 6,
1113
+ 'cm/income': 6,
1114
+ 'um/account': 1,
1115
+ 'cm/account': 1,
1116
+ 'repay-futures-switch': 6,
1107
1117
  'um/adlQuantile': 5,
1108
1118
  'cm/adlQuantile': 5,
1119
+ 'um/trade/asyn': 300,
1120
+ 'um/trade/asyn/id': 2,
1121
+ 'um/order/asyn/': 300,
1122
+ 'um/order/asyn/id': 2,
1123
+ 'um/income/asyn': 300,
1124
+ 'um/income/asyn/id': 2,
1125
+ 'um/orderAmendment': 1,
1126
+ 'cm/orderAmendment': 1,
1127
+ 'um/feeBurn': 30,
1128
+ 'um/accountConfig': 1,
1129
+ 'um/symbolConfig': 1,
1130
+ 'cm/accountConfig': 1,
1131
+ 'cm/symbolConfig': 1,
1109
1132
  },
1110
1133
  'post': {
1111
- 'um/order': 1, # 0
1134
+ 'um/order': 1,
1112
1135
  'um/conditional/order': 1,
1113
- 'cm/order': 1, # 0
1136
+ 'cm/order': 1,
1114
1137
  'cm/conditional/order': 1,
1115
- 'margin/order': 0.0133, # Weight(UID): 2 => cost = 0.006667 * 2 = 0.013334
1116
- 'marginLoan': 0.1333, # Weight(UID): 20 => cost = 0.006667 * 20 = 0.13334
1117
- 'repayLoan': 0.1333, # Weight(UID): 20 => cost = 0.006667 * 20 = 0.13334
1118
- 'margin/order/oco': 0.0400, # Weight(UID): 6 => cost = 0.006667 * 6 = 0.040002
1119
- 'um/leverage': 1, # 1
1120
- 'cm/leverage': 1, # 1
1121
- 'um/positionSide/dual': 1, # 1
1122
- 'cm/positionSide/dual': 1, # 1
1123
- 'auto-collection': 0.6667, # Weight(UID): 100 => cost = 0.006667 * 100 = 0.6667
1124
- 'bnb-transfer': 0.6667, # Weight(UID): 100 => cost = 0.006667 * 100 = 0.6667
1125
- 'repay-futures-switch': 150, # Weight(IP): 1500 => cost = 0.1 * 1500 = 150
1126
- 'repay-futures-negative-balance': 150, # Weight(IP): 1500 => cost = 0.1 * 1500 = 150
1127
- 'listenKey': 1, # 1
1128
- 'asset-collection': 3,
1129
- 'margin/repay-debt': 0.4, # Weight(Order): 0.4 =>(1000 / (50 * 0.4)) * 60 = 3000
1138
+ 'margin/order': 1,
1139
+ 'marginLoan': 100,
1140
+ 'repayLoan': 100,
1141
+ 'margin/order/oco': 1,
1142
+ 'um/leverage': 0.2,
1143
+ 'cm/leverage': 0.2,
1144
+ 'um/positionSide/dual': 0.2,
1145
+ 'cm/positionSide/dual': 0.2,
1146
+ 'auto-collection': 150,
1147
+ 'bnb-transfer': 150,
1148
+ 'repay-futures-switch': 150,
1149
+ 'repay-futures-negative-balance': 150,
1150
+ 'listenKey': 0.2,
1151
+ 'asset-collection': 6,
1152
+ 'margin/repay-debt': 3000,
1130
1153
  'um/feeBurn': 1,
1131
1154
  },
1132
1155
  'put': {
1133
- 'listenKey': 1, # 1
1156
+ 'listenKey': 0.2,
1157
+ 'um/order': 1,
1158
+ 'cm/order': 1,
1134
1159
  },
1135
1160
  'delete': {
1136
- 'um/order': 1, # 1
1161
+ 'um/order': 1,
1137
1162
  'um/conditional/order': 1,
1138
- 'um/allOpenOrders': 1, # 1
1163
+ 'um/allOpenOrders': 1,
1139
1164
  'um/conditional/allOpenOrders': 1,
1140
- 'cm/order': 1, # 1
1165
+ 'cm/order': 1,
1141
1166
  'cm/conditional/order': 1,
1142
- 'cm/allOpenOrders': 1, # 1
1167
+ 'cm/allOpenOrders': 1,
1143
1168
  'cm/conditional/allOpenOrders': 1,
1144
- 'margin/order': 1, # Weight(IP): 10 => cost = 0.1 * 10 = 1
1145
- 'margin/allOpenOrders': 5, # 5
1146
- 'margin/orderList': 2, # 2
1147
- 'listenKey': 1, # 1
1169
+ 'margin/order': 2,
1170
+ 'margin/allOpenOrders': 5,
1171
+ 'margin/orderList': 2,
1172
+ 'listenKey': 0.2,
1148
1173
  },
1149
1174
  },
1150
1175
  },
@@ -61,6 +61,10 @@ class bitfinex(Exchange, ImplicitAPI):
61
61
  'fetchDepositsWithdrawals': True,
62
62
  'fetchDepositWithdrawFee': 'emulated',
63
63
  'fetchDepositWithdrawFees': True,
64
+ 'fetchFundingHistory': False,
65
+ 'fetchFundingRate': False, # Endpoint 'lendbook/{currency}' is related to interest rates on spot margin lending
66
+ 'fetchFundingRateHistory': False,
67
+ 'fetchFundingRates': False,
64
68
  'fetchIndexOHLCV': False,
65
69
  'fetchLeverageTiers': False,
66
70
  'fetchMarginMode': False,
@@ -41,6 +41,7 @@ class bitflyer(Exchange, ImplicitAPI):
41
41
  'fetchDeposits': True,
42
42
  'fetchFundingRate': True,
43
43
  'fetchFundingRateHistory': False,
44
+ 'fetchFundingRates': False,
44
45
  'fetchMarginMode': False,
45
46
  'fetchMarkets': True,
46
47
  'fetchMyTrades': True,
@@ -73,7 +73,10 @@ class bitrue(Exchange, ImplicitAPI):
73
73
  'fetchDepositsWithdrawals': False,
74
74
  'fetchDepositWithdrawFee': 'emulated',
75
75
  'fetchDepositWithdrawFees': True,
76
+ 'fetchFundingHistory': False,
76
77
  'fetchFundingRate': False,
78
+ 'fetchFundingRateHistory': False,
79
+ 'fetchFundingRates': False,
77
80
  'fetchIsolatedBorrowRate': False,
78
81
  'fetchIsolatedBorrowRates': False,
79
82
  'fetchMarginMode': False,
@@ -7088,13 +7088,13 @@ class bybit(Exchange, ImplicitAPI):
7088
7088
 
7089
7089
  def parse_margin_loan(self, info, currency: Currency = None):
7090
7090
  #
7091
- # borrowMargin
7091
+ # borrowCrossMargin
7092
7092
  #
7093
7093
  # {
7094
7094
  # "transactId": "14143"
7095
7095
  # }
7096
7096
  #
7097
- # repayMargin
7097
+ # repayCrossMargin
7098
7098
  #
7099
7099
  # {
7100
7100
  # "repayId": "12128"
ccxt/async_support/cex.py CHANGED
@@ -44,6 +44,10 @@ class cex(Exchange, ImplicitAPI):
44
44
  'fetchCurrencies': True,
45
45
  'fetchDepositAddress': True,
46
46
  'fetchDepositsWithdrawals': True,
47
+ 'fetchFundingHistory': False,
48
+ 'fetchFundingRate': False,
49
+ 'fetchFundingRateHistory': False,
50
+ 'fetchFundingRates': False,
47
51
  'fetchLedger': True,
48
52
  'fetchMarkets': True,
49
53
  'fetchOHLCV': True,
@@ -3492,7 +3492,7 @@ class coinbase(Exchange, ImplicitAPI):
3492
3492
  paginate = False
3493
3493
  paginate, params = self.handle_option_and_params(params, 'fetchMyTrades', 'paginate')
3494
3494
  if paginate:
3495
- return await self.fetch_paginated_call_cursor('fetchMyTrades', symbol, since, limit, params, 'cursor', 'cursor', None, 100)
3495
+ return await self.fetch_paginated_call_cursor('fetchMyTrades', symbol, since, limit, params, 'cursor', 'cursor', None, 250)
3496
3496
  market = None
3497
3497
  if symbol is not None:
3498
3498
  market = self.market(symbol)
@@ -53,7 +53,10 @@ class coinbaseexchange(Exchange, ImplicitAPI):
53
53
  'fetchDepositAddress': False, # the exchange does not have self method, only createDepositAddress, see https://github.com/ccxt/ccxt/pull/7405
54
54
  'fetchDeposits': True,
55
55
  'fetchDepositsWithdrawals': True,
56
+ 'fetchFundingHistory': False,
56
57
  'fetchFundingRate': False,
58
+ 'fetchFundingRateHistory': False,
59
+ 'fetchFundingRates': False,
57
60
  'fetchLedger': True,
58
61
  'fetchMarginMode': False,
59
62
  'fetchMarkets': True,