ccxt 4.4.98__py2.py3-none-any.whl → 4.4.100__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 +1 -0
- ccxt/abstract/bitget.py +6 -0
- ccxt/abstract/hibachi.py +26 -0
- ccxt/alpaca.py +1 -1
- ccxt/apex.py +1 -1
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/apex.py +1 -1
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +44 -9
- ccxt/async_support/base/ws/client.py +3 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +10 -8
- ccxt/async_support/bingx.py +33 -4
- ccxt/async_support/bitbank.py +1 -1
- ccxt/async_support/bitfinex.py +4 -1
- ccxt/async_support/bitflyer.py +1 -1
- ccxt/async_support/bitget.py +2040 -561
- ccxt/async_support/bithumb.py +1 -1
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitmex.py +3 -2
- ccxt/async_support/bitopro.py +1 -1
- ccxt/async_support/bitrue.py +2 -2
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitstamp.py +1 -1
- ccxt/async_support/bittrade.py +1 -1
- ccxt/async_support/bitvavo.py +1 -1
- ccxt/async_support/blockchaincom.py +1 -1
- ccxt/async_support/blofin.py +1 -1
- ccxt/async_support/btcmarkets.py +1 -1
- ccxt/async_support/bybit.py +7 -3
- ccxt/async_support/coinbase.py +1 -1
- ccxt/async_support/coinbaseexchange.py +1 -1
- ccxt/async_support/coinbaseinternational.py +1 -1
- ccxt/async_support/coincatch.py +2 -2
- ccxt/async_support/coinex.py +67 -6
- ccxt/async_support/coinmate.py +1 -1
- ccxt/async_support/coinsph.py +1 -1
- ccxt/async_support/cryptocom.py +2 -2
- ccxt/async_support/defx.py +2 -2
- ccxt/async_support/delta.py +1 -1
- ccxt/async_support/deribit.py +1 -1
- ccxt/async_support/digifinex.py +2 -2
- ccxt/async_support/ellipx.py +1 -1
- ccxt/async_support/exmo.py +1 -1
- ccxt/async_support/foxbit.py +3 -3
- ccxt/async_support/gate.py +18 -4
- ccxt/async_support/gemini.py +1 -1
- ccxt/async_support/hashkey.py +2 -2
- ccxt/async_support/hibachi.py +2080 -0
- ccxt/async_support/hitbtc.py +2 -2
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +4 -3
- ccxt/async_support/hyperliquid.py +71 -29
- ccxt/async_support/independentreserve.py +1 -1
- ccxt/async_support/indodax.py +1 -1
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/krakenfutures.py +2 -1
- ccxt/async_support/kucoin.py +2 -2
- ccxt/async_support/kucoinfutures.py +2 -1
- ccxt/async_support/lbank.py +2 -2
- ccxt/async_support/mercado.py +1 -1
- ccxt/async_support/mexc.py +9 -2
- ccxt/async_support/modetrade.py +93 -2
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +35 -1
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +2 -2
- ccxt/async_support/onetrading.py +33 -0
- ccxt/async_support/oxfun.py +1 -1
- ccxt/async_support/p2b.py +32 -0
- ccxt/async_support/paradex.py +2 -1
- ccxt/async_support/phemex.py +2 -2
- ccxt/async_support/poloniex.py +2 -2
- ccxt/async_support/probit.py +36 -1
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/vertex.py +1 -1
- ccxt/async_support/wavesexchange.py +1 -1
- ccxt/async_support/whitebit.py +2 -2
- ccxt/async_support/woo.py +4 -4
- ccxt/async_support/woofipro.py +93 -2
- ccxt/async_support/xt.py +2 -2
- ccxt/async_support/yobit.py +1 -1
- ccxt/async_support/zaif.py +1 -1
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/errors.py +0 -6
- ccxt/base/exchange.py +11 -9
- ccxt/base/types.py +1 -0
- ccxt/bigone.py +1 -1
- ccxt/binance.py +10 -8
- ccxt/bingx.py +33 -4
- ccxt/bitbank.py +1 -1
- ccxt/bitfinex.py +4 -1
- ccxt/bitflyer.py +1 -1
- ccxt/bitget.py +2040 -561
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +2 -2
- ccxt/bitmex.py +3 -2
- ccxt/bitopro.py +1 -1
- ccxt/bitrue.py +2 -2
- ccxt/bitso.py +1 -1
- ccxt/bitstamp.py +1 -1
- ccxt/bittrade.py +1 -1
- ccxt/bitvavo.py +1 -1
- ccxt/blockchaincom.py +1 -1
- ccxt/blofin.py +1 -1
- ccxt/btcmarkets.py +1 -1
- ccxt/bybit.py +7 -3
- ccxt/coinbase.py +1 -1
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +1 -1
- ccxt/coincatch.py +2 -2
- ccxt/coinex.py +67 -6
- ccxt/coinmate.py +1 -1
- ccxt/coinsph.py +1 -1
- ccxt/cryptocom.py +2 -2
- ccxt/defx.py +2 -2
- ccxt/delta.py +1 -1
- ccxt/deribit.py +1 -1
- ccxt/digifinex.py +2 -2
- ccxt/ellipx.py +1 -1
- ccxt/exmo.py +1 -1
- ccxt/foxbit.py +3 -3
- ccxt/gate.py +18 -4
- ccxt/gemini.py +1 -1
- ccxt/hashkey.py +2 -2
- ccxt/hibachi.py +2079 -0
- ccxt/hitbtc.py +2 -2
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +4 -3
- ccxt/hyperliquid.py +71 -29
- ccxt/independentreserve.py +1 -1
- ccxt/indodax.py +1 -1
- ccxt/kraken.py +1 -1
- ccxt/krakenfutures.py +2 -1
- ccxt/kucoin.py +2 -2
- ccxt/kucoinfutures.py +2 -1
- ccxt/lbank.py +2 -2
- ccxt/mercado.py +1 -1
- ccxt/mexc.py +9 -2
- ccxt/modetrade.py +93 -2
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +35 -1
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +2 -2
- ccxt/onetrading.py +33 -0
- ccxt/oxfun.py +1 -1
- ccxt/p2b.py +32 -0
- ccxt/paradex.py +2 -1
- ccxt/phemex.py +2 -2
- ccxt/poloniex.py +2 -2
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +2 -2
- ccxt/pro/apex.py +2 -2
- ccxt/pro/ascendex.py +2 -2
- ccxt/pro/binance.py +4 -5
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bithumb.py +2 -2
- ccxt/pro/bitmart.py +2 -2
- ccxt/pro/bitmex.py +3 -3
- ccxt/pro/bitstamp.py +3 -3
- ccxt/pro/bittrade.py +2 -2
- ccxt/pro/bitvavo.py +5 -3
- ccxt/pro/bybit.py +5 -4
- ccxt/pro/cex.py +3 -2
- ccxt/pro/coinbaseexchange.py +4 -4
- ccxt/pro/coinbaseinternational.py +2 -2
- ccxt/pro/coincatch.py +1 -1
- ccxt/pro/coinex.py +1 -1
- ccxt/pro/coinone.py +2 -2
- ccxt/pro/cryptocom.py +2 -2
- ccxt/pro/derive.py +2 -2
- ccxt/pro/gate.py +3 -3
- ccxt/pro/hollaex.py +2 -2
- ccxt/pro/htx.py +3 -3
- ccxt/pro/hyperliquid.py +101 -14
- ccxt/pro/kraken.py +2 -2
- ccxt/pro/krakenfutures.py +4 -3
- ccxt/pro/kucoin.py +4 -3
- ccxt/pro/kucoinfutures.py +4 -3
- ccxt/pro/mexc.py +328 -139
- ccxt/pro/modetrade.py +2 -2
- ccxt/pro/okcoin.py +2 -2
- ccxt/pro/okx.py +7 -6
- ccxt/pro/onetrading.py +2 -2
- ccxt/pro/oxfun.py +1 -1
- ccxt/pro/p2b.py +2 -2
- ccxt/pro/paradex.py +2 -2
- ccxt/pro/poloniex.py +2 -2
- ccxt/pro/probit.py +2 -2
- ccxt/pro/vertex.py +2 -2
- ccxt/pro/whitebit.py +2 -2
- ccxt/pro/woo.py +2 -2
- ccxt/pro/woofipro.py +2 -2
- ccxt/probit.py +36 -1
- ccxt/protobuf/__init__.py +0 -0
- ccxt/protobuf/mexc/PrivateAccountV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PrivateDealsV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PrivateOrdersV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicAggreBookTickerV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicAggreDealsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicAggreDepthsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicBookTickerBatchV3Api_pb2.py +38 -0
- ccxt/protobuf/mexc/PublicBookTickerV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicDealsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicIncreaseDepthsBatchV3Api_pb2.py +38 -0
- ccxt/protobuf/mexc/PublicIncreaseDepthsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicLimitDepthsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicMiniTickerV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicMiniTickersV3Api_pb2.py +38 -0
- ccxt/protobuf/mexc/PublicSpotKlineV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PushDataV3ApiWrapper_pb2.py +52 -0
- ccxt/protobuf/mexc/__init__.py +0 -0
- ccxt/test/tests_async.py +1 -1
- ccxt/test/tests_sync.py +1 -1
- ccxt/tokocrypto.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/vertex.py +1 -1
- ccxt/wavesexchange.py +1 -1
- ccxt/whitebit.py +2 -2
- ccxt/woo.py +4 -4
- ccxt/woofipro.py +93 -2
- ccxt/xt.py +2 -2
- ccxt/yobit.py +1 -1
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +1 -1
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/METADATA +8 -7
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/RECORD +234 -213
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/WHEEL +0 -0
- {ccxt-4.4.98.dist-info → ccxt-4.4.100.dist-info}/top_level.txt +0 -0
ccxt/onetrading.py
CHANGED
@@ -42,6 +42,9 @@ class onetrading(Exchange, ImplicitAPI):
|
|
42
42
|
'future': False,
|
43
43
|
'option': False,
|
44
44
|
'addMargin': False,
|
45
|
+
'borrowCrossMargin': False,
|
46
|
+
'borrowIsolatedMargin': False,
|
47
|
+
'borrowMargin': False,
|
45
48
|
'cancelAllOrders': True,
|
46
49
|
'cancelOrder': True,
|
47
50
|
'cancelOrders': True,
|
@@ -54,9 +57,14 @@ class onetrading(Exchange, ImplicitAPI):
|
|
54
57
|
'createStopMarketOrder': False,
|
55
58
|
'createStopOrder': True,
|
56
59
|
'fetchAccounts': False,
|
60
|
+
'fetchAllGreeks': False,
|
57
61
|
'fetchBalance': True,
|
62
|
+
'fetchBorrowInterest': False,
|
63
|
+
'fetchBorrowRate': False,
|
58
64
|
'fetchBorrowRateHistories': False,
|
59
65
|
'fetchBorrowRateHistory': False,
|
66
|
+
'fetchBorrowRates': False,
|
67
|
+
'fetchBorrowRatesPerSymbol': False,
|
60
68
|
'fetchClosedOrders': True,
|
61
69
|
'fetchCrossBorrowRate': False,
|
62
70
|
'fetchCrossBorrowRates': False,
|
@@ -68,21 +76,41 @@ class onetrading(Exchange, ImplicitAPI):
|
|
68
76
|
'fetchDeposits': False,
|
69
77
|
'fetchDepositsWithdrawals': False,
|
70
78
|
'fetchFundingHistory': False,
|
79
|
+
'fetchFundingInterval': False,
|
80
|
+
'fetchFundingIntervals': False,
|
71
81
|
'fetchFundingRate': False,
|
72
82
|
'fetchFundingRateHistory': False,
|
73
83
|
'fetchFundingRates': False,
|
84
|
+
'fetchGreeks': False,
|
74
85
|
'fetchIndexOHLCV': False,
|
75
86
|
'fetchIsolatedBorrowRate': False,
|
76
87
|
'fetchIsolatedBorrowRates': False,
|
88
|
+
'fetchIsolatedPositions': False,
|
77
89
|
'fetchLedger': False,
|
78
90
|
'fetchLeverage': False,
|
91
|
+
'fetchLeverages': False,
|
92
|
+
'fetchLeverageTiers': False,
|
93
|
+
'fetchLiquidations': False,
|
94
|
+
'fetchLongShortRatio': False,
|
95
|
+
'fetchLongShortRatioHistory': False,
|
96
|
+
'fetchMarginAdjustmentHistory': False,
|
79
97
|
'fetchMarginMode': False,
|
98
|
+
'fetchMarginModes': False,
|
99
|
+
'fetchMarketLeverageTiers': False,
|
80
100
|
'fetchMarkets': True,
|
81
101
|
'fetchMarkOHLCV': False,
|
102
|
+
'fetchMarkPrice': False,
|
103
|
+
'fetchMarkPrices': False,
|
104
|
+
'fetchMyLiquidations': False,
|
105
|
+
'fetchMySettlementHistory': False,
|
82
106
|
'fetchMyTrades': True,
|
83
107
|
'fetchOHLCV': True,
|
108
|
+
'fetchOpenInterest': False,
|
84
109
|
'fetchOpenInterestHistory': False,
|
110
|
+
'fetchOpenInterests': False,
|
85
111
|
'fetchOpenOrders': True,
|
112
|
+
'fetchOption': False,
|
113
|
+
'fetchOptionChain': False,
|
86
114
|
'fetchOrder': True,
|
87
115
|
'fetchOrderBook': True,
|
88
116
|
'fetchOrders': False,
|
@@ -95,6 +123,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
95
123
|
'fetchPositionsHistory': False,
|
96
124
|
'fetchPositionsRisk': False,
|
97
125
|
'fetchPremiumIndexOHLCV': False,
|
126
|
+
'fetchSettlementHistory': False,
|
98
127
|
'fetchTicker': True,
|
99
128
|
'fetchTickers': True,
|
100
129
|
'fetchTime': True,
|
@@ -106,9 +135,13 @@ class onetrading(Exchange, ImplicitAPI):
|
|
106
135
|
'fetchTransactions': False,
|
107
136
|
'fetchTransfer': False,
|
108
137
|
'fetchTransfers': False,
|
138
|
+
'fetchUnderlyingAssets': False,
|
139
|
+
'fetchVolatilityHistory': False,
|
109
140
|
'fetchWithdrawal': False,
|
110
141
|
'fetchWithdrawals': False,
|
111
142
|
'reduceMargin': False,
|
143
|
+
'repayCrossMargin': False,
|
144
|
+
'repayIsolatedMargin': False,
|
112
145
|
'setLeverage': False,
|
113
146
|
'setMargin': False,
|
114
147
|
'setMarginMode': False,
|
ccxt/oxfun.py
CHANGED
@@ -2023,7 +2023,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
2023
2023
|
}
|
2024
2024
|
return self.safe_string(statuses, status, status)
|
2025
2025
|
|
2026
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2026
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2027
2027
|
"""
|
2028
2028
|
make a withdrawal
|
2029
2029
|
|
ccxt/p2b.py
CHANGED
@@ -34,6 +34,9 @@ class p2b(Exchange, ImplicitAPI):
|
|
34
34
|
'future': False,
|
35
35
|
'option': False,
|
36
36
|
'addMargin': False,
|
37
|
+
'borrowCrossMargin': False,
|
38
|
+
'borrowIsolatedMargin': False,
|
39
|
+
'borrowMargin': False,
|
37
40
|
'cancelAllOrders': False,
|
38
41
|
'cancelOrder': True,
|
39
42
|
'cancelOrders': False,
|
@@ -49,9 +52,14 @@ class p2b(Exchange, ImplicitAPI):
|
|
49
52
|
'createStopMarketOrder': False,
|
50
53
|
'createStopOrder': False,
|
51
54
|
'fetchAccounts': False,
|
55
|
+
'fetchAllGreeks': False,
|
52
56
|
'fetchBalance': True,
|
53
57
|
'fetchBorrowInterest': False,
|
58
|
+
'fetchBorrowRate': False,
|
59
|
+
'fetchBorrowRateHistories': False,
|
54
60
|
'fetchBorrowRateHistory': False,
|
61
|
+
'fetchBorrowRates': False,
|
62
|
+
'fetchBorrowRatesPerSymbol': False,
|
55
63
|
'fetchClosedOrders': True,
|
56
64
|
'fetchCrossBorrowRate': False,
|
57
65
|
'fetchCrossBorrowRates': False,
|
@@ -62,23 +70,42 @@ class p2b(Exchange, ImplicitAPI):
|
|
62
70
|
'fetchDeposits': False,
|
63
71
|
'fetchDepositsWithdrawals': False,
|
64
72
|
'fetchFundingHistory': False,
|
73
|
+
'fetchFundingInterval': False,
|
74
|
+
'fetchFundingIntervals': False,
|
65
75
|
'fetchFundingRate': False,
|
66
76
|
'fetchFundingRateHistory': False,
|
67
77
|
'fetchFundingRates': False,
|
78
|
+
'fetchGreeks': False,
|
68
79
|
'fetchIndexOHLCV': False,
|
69
80
|
'fetchIsolatedBorrowRate': False,
|
70
81
|
'fetchIsolatedBorrowRates': False,
|
82
|
+
'fetchIsolatedPositions': False,
|
71
83
|
'fetchLedger': False,
|
72
84
|
'fetchLedgerEntry': False,
|
85
|
+
'fetchLeverage': False,
|
86
|
+
'fetchLeverages': False,
|
73
87
|
'fetchLeverageTiers': False,
|
88
|
+
'fetchLiquidations': False,
|
89
|
+
'fetchLongShortRatio': False,
|
90
|
+
'fetchLongShortRatioHistory': False,
|
91
|
+
'fetchMarginAdjustmentHistory': False,
|
92
|
+
'fetchMarginMode': False,
|
93
|
+
'fetchMarginModes': False,
|
74
94
|
'fetchMarketLeverageTiers': False,
|
75
95
|
'fetchMarkets': True,
|
76
96
|
'fetchMarkOHLCV': False,
|
97
|
+
'fetchMarkPrice': False,
|
98
|
+
'fetchMarkPrices': False,
|
99
|
+
'fetchMyLiquidations': False,
|
100
|
+
'fetchMySettlementHistory': False,
|
77
101
|
'fetchMyTrades': True,
|
78
102
|
'fetchOHLCV': True,
|
79
103
|
'fetchOpenInterest': False,
|
80
104
|
'fetchOpenInterestHistory': False,
|
105
|
+
'fetchOpenInterests': False,
|
81
106
|
'fetchOpenOrders': True,
|
107
|
+
'fetchOption': False,
|
108
|
+
'fetchOptionChain': False,
|
82
109
|
'fetchOrderBook': True,
|
83
110
|
'fetchOrderBooks': False,
|
84
111
|
'fetchOrders': False,
|
@@ -91,6 +118,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
91
118
|
'fetchPositionsHistory': False,
|
92
119
|
'fetchPositionsRisk': False,
|
93
120
|
'fetchPremiumIndexOHLCV': False,
|
121
|
+
'fetchSettlementHistory': False,
|
94
122
|
'fetchTicker': True,
|
95
123
|
'fetchTickers': True,
|
96
124
|
'fetchTrades': True,
|
@@ -99,10 +127,14 @@ class p2b(Exchange, ImplicitAPI):
|
|
99
127
|
'fetchTransactionFees': False,
|
100
128
|
'fetchTransactions': False,
|
101
129
|
'fetchTransfers': False,
|
130
|
+
'fetchUnderlyingAssets': False,
|
131
|
+
'fetchVolatilityHistory': False,
|
102
132
|
'fetchWithdrawAddresses': False,
|
103
133
|
'fetchWithdrawal': False,
|
104
134
|
'fetchWithdrawals': False,
|
105
135
|
'reduceMargin': False,
|
136
|
+
'repayCrossMargin': False,
|
137
|
+
'repayIsolatedMargin': False,
|
106
138
|
'setLeverage': False,
|
107
139
|
'setMargin': False,
|
108
140
|
'setMarginMode': False,
|
ccxt/paradex.py
CHANGED
@@ -1971,6 +1971,7 @@ class paradex(Exchange, ImplicitAPI):
|
|
1971
1971
|
'contracts': None,
|
1972
1972
|
'contractSize': None,
|
1973
1973
|
'price': None,
|
1974
|
+
'side': None,
|
1974
1975
|
'baseValue': None,
|
1975
1976
|
'quoteValue': None,
|
1976
1977
|
'timestamp': timestamp,
|
@@ -2268,7 +2269,7 @@ class paradex(Exchange, ImplicitAPI):
|
|
2268
2269
|
}
|
2269
2270
|
return self.safe_string(modes, mode, mode)
|
2270
2271
|
|
2271
|
-
def set_leverage(self, leverage:
|
2272
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
2272
2273
|
"""
|
2273
2274
|
set the level of leverage for a market
|
2274
2275
|
|
ccxt/phemex.py
CHANGED
@@ -4331,7 +4331,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4331
4331
|
url = self.implode_hostname(self.urls['api'][api]) + url
|
4332
4332
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
4333
4333
|
|
4334
|
-
def set_leverage(self, leverage:
|
4334
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
4335
4335
|
"""
|
4336
4336
|
set the level of leverage for a market
|
4337
4337
|
|
@@ -4640,7 +4640,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4640
4640
|
sorted = self.sort_by(result, 'timestamp')
|
4641
4641
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
4642
4642
|
|
4643
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4643
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
4644
4644
|
"""
|
4645
4645
|
make a withdrawal
|
4646
4646
|
|
ccxt/poloniex.py
CHANGED
@@ -2730,7 +2730,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
2730
2730
|
'status': None,
|
2731
2731
|
}
|
2732
2732
|
|
2733
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2733
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2734
2734
|
"""
|
2735
2735
|
make a withdrawal
|
2736
2736
|
|
@@ -3125,7 +3125,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
3125
3125
|
},
|
3126
3126
|
}
|
3127
3127
|
|
3128
|
-
def set_leverage(self, leverage:
|
3128
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
3129
3129
|
"""
|
3130
3130
|
set the level of leverage for a market
|
3131
3131
|
|
ccxt/pro/__init__.py
CHANGED
ccxt/pro/alpaca.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheByTimestamp
|
8
|
-
from ccxt.base.types import Any, Int, Order, OrderBook, Str, Ticker, Trade
|
8
|
+
from ccxt.base.types import Any, Bool, Int, Order, OrderBook, Str, Ticker, Trade
|
9
9
|
from ccxt.async_support.base.ws.client import Client
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
@@ -579,7 +579,7 @@ class alpaca(ccxt.async_support.alpaca):
|
|
579
579
|
self.watch(url, messageHash, request, messageHash, future)
|
580
580
|
return await future
|
581
581
|
|
582
|
-
def handle_error_message(self, client: Client, message):
|
582
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
583
583
|
#
|
584
584
|
# {
|
585
585
|
# "T": "error",
|
ccxt/pro/apex.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById,
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import json
|
11
|
-
from ccxt.base.types import Any, Int, Order, OrderBook, Position, Str, Strings, Ticker, Tickers, Trade
|
11
|
+
from ccxt.base.types import Any, Bool, Int, Order, OrderBook, Position, Str, Strings, Ticker, Tickers, Trade
|
12
12
|
from ccxt.async_support.base.ws.client import Client
|
13
13
|
from typing import List
|
14
14
|
from ccxt.base.errors import ExchangeError
|
@@ -805,7 +805,7 @@ class apex(ccxt.async_support.apex):
|
|
805
805
|
self.watch(url, messageHash, message, messageHash)
|
806
806
|
return await future
|
807
807
|
|
808
|
-
def handle_error_message(self, client: Client, message):
|
808
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
809
809
|
#
|
810
810
|
# {
|
811
811
|
# "success": False,
|
ccxt/pro/ascendex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheByTimestamp
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Int, Order, OrderBook, Str, Trade
|
9
|
+
from ccxt.base.types import Any, Balances, Bool, Int, Order, OrderBook, Str, Trade
|
10
10
|
from ccxt.async_support.base.ws.client import Client
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -695,7 +695,7 @@ class ascendex(ccxt.async_support.ascendex):
|
|
695
695
|
'trades': None,
|
696
696
|
}, market)
|
697
697
|
|
698
|
-
def handle_error_message(self, client: Client, message):
|
698
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
699
699
|
#
|
700
700
|
# {
|
701
701
|
# "m": "disconnected",
|
ccxt/pro/binance.py
CHANGED
@@ -217,7 +217,7 @@ class binance(ccxt.async_support.binance):
|
|
217
217
|
"""
|
218
218
|
return await self.watch_liquidations_for_symbols([symbol], since, limit, params)
|
219
219
|
|
220
|
-
async def watch_liquidations_for_symbols(self, symbols: List[str]
|
220
|
+
async def watch_liquidations_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
|
221
221
|
"""
|
222
222
|
watch the public liquidations of a trading pair
|
223
223
|
|
@@ -409,6 +409,7 @@ class binance(ccxt.async_support.binance):
|
|
409
409
|
'contracts': self.safe_number(liquidation, 'l'),
|
410
410
|
'contractSize': self.safe_number(market, 'contractSize'),
|
411
411
|
'price': self.safe_number(liquidation, 'ap'),
|
412
|
+
'side': self.safe_string_lower(liquidation, 'S'),
|
412
413
|
'baseValue': None,
|
413
414
|
'quoteValue': None,
|
414
415
|
'timestamp': timestamp,
|
@@ -3729,7 +3730,7 @@ class binance(ccxt.async_support.binance):
|
|
3729
3730
|
trades = await self.watch(url, messageHash, message, messageHash, subscription)
|
3730
3731
|
return self.filter_by_symbol_since_limit(trades, symbol, since, limit)
|
3731
3732
|
|
3732
|
-
async def fetch_trades_ws(self, symbol:
|
3733
|
+
async def fetch_trades_ws(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
3733
3734
|
"""
|
3734
3735
|
fetch all trades made by the user
|
3735
3736
|
|
@@ -3745,8 +3746,6 @@ class binance(ccxt.async_support.binance):
|
|
3745
3746
|
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
3746
3747
|
"""
|
3747
3748
|
await self.load_markets()
|
3748
|
-
if symbol is None:
|
3749
|
-
raise BadRequest(self.id + ' fetchTradesWs() requires a symbol argument')
|
3750
3749
|
market = self.market(symbol)
|
3751
3750
|
type = self.get_market_type('fetchTradesWs', market, params)
|
3752
3751
|
if type != 'spot' and type != 'future':
|
@@ -3974,7 +3973,7 @@ class binance(ccxt.async_support.binance):
|
|
3974
3973
|
code = self.safe_integer(error, 'code')
|
3975
3974
|
msg = self.safe_string(error, 'msg')
|
3976
3975
|
try:
|
3977
|
-
self.handle_errors(code, msg, client.url,
|
3976
|
+
self.handle_errors(code, msg, client.url, '', {}, self.json(error), error, {}, {})
|
3978
3977
|
except Exception as e:
|
3979
3978
|
rejected = True
|
3980
3979
|
# private endpoint uses id
|
ccxt/pro/bitget.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheBySymbolBySide, ArrayCacheByTimestamp
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Int, Order, OrderBook, Position, Str, Strings, Ticker, Tickers, Trade
|
9
|
+
from ccxt.base.types import Any, Balances, Bool, Int, Order, OrderBook, Position, Str, Strings, Ticker, Tickers, Trade
|
10
10
|
from ccxt.async_support.base.ws.client import Client
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -1485,7 +1485,7 @@ class bitget(ccxt.async_support.bitget):
|
|
1485
1485
|
type, params = self.handle_market_type_and_params('watchMyTrades', market, params)
|
1486
1486
|
instType = None
|
1487
1487
|
if market is None and type == 'spot':
|
1488
|
-
instType = '
|
1488
|
+
instType = 'spot'
|
1489
1489
|
else:
|
1490
1490
|
instType, params = self.get_inst_type(market, params)
|
1491
1491
|
subscriptionHash = 'fill:' + instType
|
@@ -1800,7 +1800,7 @@ class bitget(ccxt.async_support.bitget):
|
|
1800
1800
|
future = self.safe_value(client.futures, messageHash)
|
1801
1801
|
future.resolve(True)
|
1802
1802
|
|
1803
|
-
def handle_error_message(self, client: Client, message):
|
1803
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
1804
1804
|
#
|
1805
1805
|
# {event: "error", code: 30015, msg: "Invalid sign"}
|
1806
1806
|
#
|
ccxt/pro/bithumb.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache
|
8
|
-
from ccxt.base.types import Any, Int, OrderBook, Strings, Ticker, Tickers, Trade
|
8
|
+
from ccxt.base.types import Any, Bool, Int, OrderBook, Strings, Ticker, Tickers, Trade
|
9
9
|
from ccxt.async_support.base.ws.client import Client
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
@@ -348,7 +348,7 @@ class bithumb(ccxt.async_support.bithumb):
|
|
348
348
|
'fee': None,
|
349
349
|
}, market)
|
350
350
|
|
351
|
-
def handle_error_message(self, client: Client, message):
|
351
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
352
352
|
#
|
353
353
|
# {
|
354
354
|
# "status" : "5100",
|
ccxt/pro/bitmart.py
CHANGED
@@ -7,7 +7,7 @@ import ccxt.async_support
|
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheBySymbolBySide, ArrayCacheByTimestamp
|
8
8
|
from ccxt.async_support.base.ws.order_book_side import Asks, Bids
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Any, Balances, Int, Market, Order, OrderBook, Position, Str, Strings, Ticker, Tickers, Trade
|
10
|
+
from ccxt.base.types import Any, Balances, Bool, Int, Market, Order, OrderBook, Position, Str, Strings, Ticker, Tickers, Trade
|
11
11
|
from ccxt.async_support.base.ws.client import Client
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
@@ -1462,7 +1462,7 @@ class bitmart(ccxt.async_support.bitmart):
|
|
1462
1462
|
future = self.safe_value(client.futures, messageHash)
|
1463
1463
|
future.resolve(True)
|
1464
1464
|
|
1465
|
-
def handle_error_message(self, client: Client, message):
|
1465
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
1466
1466
|
#
|
1467
1467
|
# {event: "error", message: "Invalid sign", errorCode: 30013}
|
1468
1468
|
# {"event":"error","message":"Unrecognized request: {\"event\":\"subscribe\",\"channel\":\"spot/depth:BTC-USDT\"}","errorCode":30039}
|
ccxt/pro/bitmex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheBySymbolBySide, ArrayCacheByTimestamp
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Int, Liquidation, Order, OrderBook, Position, Str, Strings, Ticker, Tickers, Trade
|
9
|
+
from ccxt.base.types import Any, Balances, Bool, Int, Liquidation, Order, OrderBook, Position, Str, Strings, Ticker, Tickers, Trade
|
10
10
|
from ccxt.async_support.base.ws.client import Client
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -374,7 +374,7 @@ class bitmex(ccxt.async_support.bitmex):
|
|
374
374
|
"""
|
375
375
|
return self.watch_liquidations_for_symbols([symbol], since, limit, params)
|
376
376
|
|
377
|
-
async def watch_liquidations_for_symbols(self, symbols: List[str]
|
377
|
+
async def watch_liquidations_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
|
378
378
|
"""
|
379
379
|
watch the public liquidations of a trading pair
|
380
380
|
|
@@ -1596,7 +1596,7 @@ class bitmex(ccxt.async_support.bitmex):
|
|
1596
1596
|
#
|
1597
1597
|
return message
|
1598
1598
|
|
1599
|
-
def handle_error_message(self, client: Client, message):
|
1599
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
1600
1600
|
#
|
1601
1601
|
# generic error format
|
1602
1602
|
#
|
ccxt/pro/bitstamp.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById
|
8
|
-
from ccxt.base.types import Any, Int, Order, OrderBook, Str, Trade
|
8
|
+
from ccxt.base.types import Any, Bool, Int, Order, OrderBook, Str, Trade
|
9
9
|
from ccxt.async_support.base.ws.client import Client
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -464,7 +464,7 @@ class bitstamp(ccxt.async_support.bitstamp):
|
|
464
464
|
method = methods[key]
|
465
465
|
method(client, message)
|
466
466
|
|
467
|
-
def handle_error_message(self, client: Client, message):
|
467
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
468
468
|
# {
|
469
469
|
# "event": "bts:error",
|
470
470
|
# "channel": '',
|
@@ -476,7 +476,7 @@ class bitstamp(ccxt.async_support.bitstamp):
|
|
476
476
|
data = self.safe_value(message, 'data', {})
|
477
477
|
code = self.safe_number(data, 'code')
|
478
478
|
self.throw_exactly_matched_exception(self.exceptions['exact'], code, feedback)
|
479
|
-
return
|
479
|
+
return True
|
480
480
|
|
481
481
|
def handle_message(self, client: Client, message):
|
482
482
|
if not self.handle_error_message(client, message):
|
ccxt/pro/bittrade.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheByTimestamp
|
8
|
-
from ccxt.base.types import Any, Int, OrderBook, Ticker, Trade
|
8
|
+
from ccxt.base.types import Any, Bool, Int, OrderBook, Ticker, Trade
|
9
9
|
from ccxt.async_support.base.ws.client import Client
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
@@ -521,7 +521,7 @@ class bittrade(ccxt.async_support.bittrade):
|
|
521
521
|
def handle_ping(self, client: Client, message):
|
522
522
|
self.spawn(self.pong, client, message)
|
523
523
|
|
524
|
-
def handle_error_message(self, client: Client, message):
|
524
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
525
525
|
#
|
526
526
|
# {
|
527
527
|
# "ts": 1586323747018,
|
ccxt/pro/bitvavo.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheByTimestamp
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Int, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
|
9
|
+
from ccxt.base.types import Any, Balances, Bool, Int, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
|
10
10
|
from ccxt.async_support.base.ws.client import Client
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -1277,7 +1277,7 @@ class bitvavo(ccxt.async_support.bitvavo):
|
|
1277
1277
|
if messageHash in client.subscriptions:
|
1278
1278
|
del client.subscriptions[messageHash]
|
1279
1279
|
|
1280
|
-
def handle_error_message(self, client: Client, message):
|
1280
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
1281
1281
|
#
|
1282
1282
|
# {
|
1283
1283
|
# action: 'privateCreateOrder',
|
@@ -1300,12 +1300,14 @@ class bitvavo(ccxt.async_support.bitvavo):
|
|
1300
1300
|
messageHash = self.safe_string(message, 'requestId', buildMessage)
|
1301
1301
|
rejected = False
|
1302
1302
|
try:
|
1303
|
-
self.handle_errors(code, error, client.url,
|
1303
|
+
self.handle_errors(code, error, client.url, '', {}, error, message, {}, {})
|
1304
1304
|
except Exception as e:
|
1305
1305
|
rejected = True
|
1306
1306
|
client.reject(e, messageHash)
|
1307
1307
|
if not rejected:
|
1308
1308
|
client.reject(message, messageHash)
|
1309
|
+
return True
|
1310
|
+
return None
|
1309
1311
|
|
1310
1312
|
def handle_message(self, client: Client, message):
|
1311
1313
|
#
|
ccxt/pro/bybit.py
CHANGED
@@ -7,7 +7,7 @@ import ccxt.async_support
|
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheBySymbolBySide, ArrayCacheByTimestamp
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Any, Balances, Int, Liquidation, Num, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
|
10
|
+
from ccxt.base.types import Any, Balances, Bool, Int, Liquidation, Num, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
|
11
11
|
from ccxt.async_support.base.ws.client import Client
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
@@ -870,7 +870,7 @@ class bybit(ccxt.async_support.bybit):
|
|
870
870
|
orderbook = await self.watch_topics(url, messageHashes, topics, params)
|
871
871
|
return orderbook.limit()
|
872
872
|
|
873
|
-
async def un_watch_order_book_for_symbols(self, symbols:
|
873
|
+
async def un_watch_order_book_for_symbols(self, symbols: List[str], params={}) -> Any:
|
874
874
|
"""
|
875
875
|
unsubscribe from the orderbook channel
|
876
876
|
|
@@ -1044,7 +1044,7 @@ class bybit(ccxt.async_support.bybit):
|
|
1044
1044
|
limit = trades.getLimit(tradeSymbol, limit)
|
1045
1045
|
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
1046
1046
|
|
1047
|
-
async def un_watch_trades_for_symbols(self, symbols:
|
1047
|
+
async def un_watch_trades_for_symbols(self, symbols: List[str], params={}) -> Any:
|
1048
1048
|
"""
|
1049
1049
|
unsubscribe from the trades channel
|
1050
1050
|
|
@@ -1631,6 +1631,7 @@ class bybit(ccxt.async_support.bybit):
|
|
1631
1631
|
'contracts': self.safe_number_2(liquidation, 'size', 'v'),
|
1632
1632
|
'contractSize': self.safe_number(market, 'contractSize'),
|
1633
1633
|
'price': self.safe_number_2(liquidation, 'price', 'p'),
|
1634
|
+
'side': self.safe_string_lower(liquidation, 'side', 'S'),
|
1634
1635
|
'baseValue': None,
|
1635
1636
|
'quoteValue': None,
|
1636
1637
|
'timestamp': timestamp,
|
@@ -2154,7 +2155,7 @@ class bybit(ccxt.async_support.bybit):
|
|
2154
2155
|
self.watch(url, messageHash, message, messageHash)
|
2155
2156
|
return await future
|
2156
2157
|
|
2157
|
-
def handle_error_message(self, client: Client, message):
|
2158
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
2158
2159
|
#
|
2159
2160
|
# {
|
2160
2161
|
# "success": False,
|
ccxt/pro/cex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById, ArrayCacheByTimestamp
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Int, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
9
|
+
from ccxt.base.types import Any, Balances, Bool, Int, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
10
10
|
from ccxt.async_support.base.ws.client import Client
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -1378,7 +1378,7 @@ class cex(ccxt.async_support.cex):
|
|
1378
1378
|
#
|
1379
1379
|
return message
|
1380
1380
|
|
1381
|
-
def handle_error_message(self, client: Client, message):
|
1381
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
1382
1382
|
#
|
1383
1383
|
# {
|
1384
1384
|
# "e": "get-balance",
|
@@ -1400,6 +1400,7 @@ class cex(ccxt.async_support.cex):
|
|
1400
1400
|
future = self.safe_value(client['futures'], messageHash)
|
1401
1401
|
if future is not None:
|
1402
1402
|
client.reject(error, messageHash)
|
1403
|
+
return True
|
1403
1404
|
else:
|
1404
1405
|
raise error
|
1405
1406
|
|
ccxt/pro/coinbaseexchange.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheBySymbolById
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Int, Order, OrderBook, Str, Strings, Ticker, Tickers, Trade
|
9
|
+
from ccxt.base.types import Any, Bool, Int, Order, OrderBook, Str, Strings, Ticker, Tickers, Trade
|
10
10
|
from ccxt.async_support.base.ws.client import Client
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -203,7 +203,7 @@ class coinbaseexchange(ccxt.async_support.coinbaseexchange):
|
|
203
203
|
limit = trades.getLimit(symbol, limit)
|
204
204
|
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
205
205
|
|
206
|
-
async def watch_my_trades_for_symbols(self, symbols:
|
206
|
+
async def watch_my_trades_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
207
207
|
"""
|
208
208
|
watches information on multiple trades made by the user
|
209
209
|
:param str[] symbols: unified symbol of the market to fetch trades for
|
@@ -224,7 +224,7 @@ class coinbaseexchange(ccxt.async_support.coinbaseexchange):
|
|
224
224
|
limit = trades.getLimit(tradeSymbol, limit)
|
225
225
|
return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
|
226
226
|
|
227
|
-
async def watch_orders_for_symbols(self, symbols:
|
227
|
+
async def watch_orders_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
228
228
|
"""
|
229
229
|
watches information on multiple orders made by the user
|
230
230
|
:param str[] symbols: unified symbol of the market to fetch orders for
|
@@ -841,7 +841,7 @@ class coinbaseexchange(ccxt.async_support.coinbaseexchange):
|
|
841
841
|
#
|
842
842
|
return message
|
843
843
|
|
844
|
-
def handle_error_message(self, client: Client, message):
|
844
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
845
845
|
#
|
846
846
|
# {
|
847
847
|
# "type": "error",
|
@@ -6,7 +6,7 @@
|
|
6
6
|
import ccxt.async_support
|
7
7
|
from ccxt.async_support.base.ws.cache import ArrayCache, ArrayCacheByTimestamp
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Int, Market, OrderBook, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade
|
9
|
+
from ccxt.base.types import Any, Bool, Int, Market, OrderBook, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade
|
10
10
|
from ccxt.async_support.base.ws.client import Client
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -729,7 +729,7 @@ class coinbaseinternational(ccxt.async_support.coinbaseinternational):
|
|
729
729
|
self.fundingRates[fundingRate['symbol']] = fundingRate
|
730
730
|
client.resolve(fundingRate, channel + '::' + fundingRate['symbol'])
|
731
731
|
|
732
|
-
def handle_error_message(self, client: Client, message):
|
732
|
+
def handle_error_message(self, client: Client, message) -> Bool:
|
733
733
|
#
|
734
734
|
# {
|
735
735
|
# message: 'Failed to subscribe',
|