ccxt 4.4.15__py2.py3-none-any.whl → 4.4.16__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 +1 -1
- ccxt/ascendex.py +5 -5
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ascendex.py +5 -5
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bigone.py +6 -4
- ccxt/async_support/binance.py +58 -7
- ccxt/async_support/bingx.py +7 -6
- ccxt/async_support/bit2c.py +6 -4
- ccxt/async_support/bitbank.py +6 -4
- ccxt/async_support/bitbns.py +6 -4
- ccxt/async_support/bitfinex.py +4 -2
- ccxt/async_support/bitfinex2.py +4 -2
- ccxt/async_support/bitget.py +6 -5
- ccxt/async_support/bitmart.py +5 -4
- ccxt/async_support/bitmex.py +4 -4
- ccxt/async_support/bitso.py +5 -4
- ccxt/async_support/bitstamp.py +6 -4
- ccxt/async_support/bitvavo.py +6 -4
- ccxt/async_support/blockchaincom.py +11 -8
- ccxt/async_support/blofin.py +21 -0
- ccxt/async_support/bybit.py +6 -6
- ccxt/async_support/cex.py +5 -4
- ccxt/async_support/coinbase.py +4 -4
- ccxt/async_support/coinex.py +5 -5
- ccxt/async_support/coinone.py +6 -3
- ccxt/async_support/coinsph.py +5 -5
- ccxt/async_support/cryptocom.py +5 -4
- ccxt/async_support/currencycom.py +5 -5
- ccxt/async_support/delta.py +7 -5
- ccxt/async_support/deribit.py +6 -4
- ccxt/async_support/digifinex.py +6 -4
- ccxt/async_support/exmo.py +6 -4
- ccxt/async_support/gate.py +5 -4
- ccxt/async_support/gemini.py +4 -3
- ccxt/async_support/hashkey.py +7 -5
- ccxt/async_support/hitbtc.py +6 -5
- ccxt/async_support/hollaex.py +6 -5
- ccxt/async_support/htx.py +15 -5
- ccxt/async_support/hyperliquid.py +8 -7
- ccxt/async_support/idex.py +4 -4
- ccxt/async_support/independentreserve.py +4 -4
- ccxt/async_support/indodax.py +3 -3
- ccxt/async_support/kraken.py +7 -5
- ccxt/async_support/kucoin.py +6 -5
- ccxt/async_support/kucoinfutures.py +5 -3
- ccxt/async_support/kuna.py +5 -3
- ccxt/async_support/lbank.py +14 -12
- ccxt/async_support/lykke.py +6 -4
- ccxt/async_support/mexc.py +6 -6
- ccxt/async_support/ndax.py +33 -5
- ccxt/async_support/oceanex.py +4 -4
- ccxt/async_support/okcoin.py +8 -6
- ccxt/async_support/okx.py +17 -6
- ccxt/async_support/onetrading.py +6 -5
- ccxt/async_support/oxfun.py +6 -6
- ccxt/async_support/paymium.py +6 -5
- ccxt/async_support/phemex.py +8 -6
- ccxt/async_support/poloniex.py +6 -4
- ccxt/async_support/probit.py +7 -6
- ccxt/async_support/timex.py +4 -4
- ccxt/async_support/tokocrypto.py +5 -5
- ccxt/async_support/upbit.py +7 -6
- ccxt/async_support/wavesexchange.py +9 -9
- ccxt/async_support/wazirx.py +24 -4
- ccxt/async_support/whitebit.py +6 -4
- ccxt/async_support/woo.py +6 -4
- ccxt/async_support/xt.py +7 -5
- ccxt/async_support/yobit.py +32 -23
- ccxt/async_support/zonda.py +31 -6
- ccxt/base/exchange.py +2 -2
- ccxt/base/types.py +8 -0
- ccxt/bigone.py +6 -4
- ccxt/binance.py +58 -7
- ccxt/bingx.py +7 -6
- ccxt/bit2c.py +6 -4
- ccxt/bitbank.py +6 -4
- ccxt/bitbns.py +6 -4
- ccxt/bitfinex.py +4 -2
- ccxt/bitfinex2.py +4 -2
- ccxt/bitget.py +6 -5
- ccxt/bitmart.py +5 -4
- ccxt/bitmex.py +4 -4
- ccxt/bitso.py +5 -4
- ccxt/bitstamp.py +6 -4
- ccxt/bitvavo.py +6 -4
- ccxt/blockchaincom.py +11 -8
- ccxt/blofin.py +21 -0
- ccxt/bybit.py +6 -6
- ccxt/cex.py +5 -4
- ccxt/coinbase.py +4 -4
- ccxt/coinex.py +5 -5
- ccxt/coinone.py +6 -3
- ccxt/coinsph.py +5 -5
- ccxt/cryptocom.py +5 -4
- ccxt/currencycom.py +5 -5
- ccxt/delta.py +7 -5
- ccxt/deribit.py +6 -4
- ccxt/digifinex.py +6 -4
- ccxt/exmo.py +6 -4
- ccxt/gate.py +5 -4
- ccxt/gemini.py +4 -3
- ccxt/hashkey.py +7 -5
- ccxt/hitbtc.py +6 -5
- ccxt/hollaex.py +6 -5
- ccxt/htx.py +15 -5
- ccxt/hyperliquid.py +8 -7
- ccxt/idex.py +4 -4
- ccxt/independentreserve.py +4 -4
- ccxt/indodax.py +3 -3
- ccxt/kraken.py +7 -5
- ccxt/kucoin.py +6 -5
- ccxt/kucoinfutures.py +5 -3
- ccxt/kuna.py +5 -3
- ccxt/lbank.py +14 -12
- ccxt/lykke.py +6 -4
- ccxt/mexc.py +6 -6
- ccxt/ndax.py +33 -5
- ccxt/oceanex.py +4 -4
- ccxt/okcoin.py +8 -6
- ccxt/okx.py +17 -6
- ccxt/onetrading.py +6 -5
- ccxt/oxfun.py +6 -6
- ccxt/paymium.py +6 -5
- ccxt/phemex.py +8 -6
- ccxt/poloniex.py +6 -4
- ccxt/pro/__init__.py +1 -1
- ccxt/probit.py +7 -6
- ccxt/test/tests_async.py +1 -0
- ccxt/test/tests_sync.py +1 -0
- ccxt/timex.py +4 -4
- ccxt/tokocrypto.py +5 -5
- ccxt/upbit.py +7 -6
- ccxt/wavesexchange.py +9 -9
- ccxt/wazirx.py +24 -4
- ccxt/whitebit.py +6 -4
- ccxt/woo.py +6 -4
- ccxt/xt.py +7 -5
- ccxt/yobit.py +32 -23
- ccxt/zonda.py +31 -6
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/METADATA +4 -4
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/RECORD +145 -145
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/WHEEL +0 -0
- {ccxt-4.4.15.dist-info → ccxt-4.4.16.dist-info}/top_level.txt +0 -0
ccxt/onetrading.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.onetrading import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
8
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -63,6 +63,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
63
63
|
'fetchDeposit': False,
|
64
64
|
'fetchDepositAddress': True,
|
65
65
|
'fetchDepositAddresses': False,
|
66
|
+
'fetchDepositAddressesByNetwork': False,
|
66
67
|
'fetchDeposits': True,
|
67
68
|
'fetchDepositsWithdrawals': False,
|
68
69
|
'fetchFundingHistory': False,
|
@@ -1003,7 +1004,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1003
1004
|
#
|
1004
1005
|
return self.parse_balance(response)
|
1005
1006
|
|
1006
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1007
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1007
1008
|
code = None
|
1008
1009
|
if currency is not None:
|
1009
1010
|
code = currency['code']
|
@@ -1011,11 +1012,11 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1011
1012
|
tag = self.safe_string(depositAddress, 'destination_tag')
|
1012
1013
|
self.check_address(address)
|
1013
1014
|
return {
|
1015
|
+
'info': depositAddress,
|
1014
1016
|
'currency': code,
|
1017
|
+
'network': None,
|
1015
1018
|
'address': address,
|
1016
1019
|
'tag': tag,
|
1017
|
-
'network': None,
|
1018
|
-
'info': depositAddress,
|
1019
1020
|
}
|
1020
1021
|
|
1021
1022
|
def create_deposit_address(self, code: str, params={}):
|
@@ -1041,7 +1042,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1041
1042
|
#
|
1042
1043
|
return self.parse_deposit_address(response, currency)
|
1043
1044
|
|
1044
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1045
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1045
1046
|
"""
|
1046
1047
|
fetch the deposit address for a currency associated with self account
|
1047
1048
|
:param str code: unified currency code
|
ccxt/oxfun.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.oxfun import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -76,7 +76,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
76
76
|
'fetchCrossBorrowRates': False,
|
77
77
|
'fetchCurrencies': True,
|
78
78
|
'fetchDeposit': False,
|
79
|
-
'fetchDepositAddress':
|
79
|
+
'fetchDepositAddress': True,
|
80
80
|
'fetchDepositAddresses': False,
|
81
81
|
'fetchDepositAddressesByNetwork': False,
|
82
82
|
'fetchDeposits': True,
|
@@ -1709,7 +1709,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
1709
1709
|
}
|
1710
1710
|
return self.safe_string(statuses, status, status)
|
1711
1711
|
|
1712
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1712
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1713
1713
|
"""
|
1714
1714
|
fetch the deposit address for a currency associated with self account
|
1715
1715
|
:see: https://docs.ox.fun/?json#get-v3-deposit-addresses
|
@@ -1736,18 +1736,18 @@ class oxfun(Exchange, ImplicitAPI):
|
|
1736
1736
|
data = self.safe_dict(response, 'data', {})
|
1737
1737
|
return self.parse_deposit_address(data, currency)
|
1738
1738
|
|
1739
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1739
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1740
1740
|
#
|
1741
1741
|
# {"address":"0x998dEc76151FB723963Bd8AFD517687b38D33dE8"}
|
1742
1742
|
#
|
1743
1743
|
address = self.safe_string(depositAddress, 'address')
|
1744
1744
|
self.check_address(address)
|
1745
1745
|
return {
|
1746
|
+
'info': depositAddress,
|
1746
1747
|
'currency': currency['code'],
|
1748
|
+
'network': None,
|
1747
1749
|
'address': address,
|
1748
1750
|
'tag': None,
|
1749
|
-
'network': None,
|
1750
|
-
'info': depositAddress,
|
1751
1751
|
}
|
1752
1752
|
|
1753
1753
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
ccxt/paymium.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.paymium import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
@@ -35,6 +35,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
35
35
|
'fetchBalance': True,
|
36
36
|
'fetchDepositAddress': True,
|
37
37
|
'fetchDepositAddresses': True,
|
38
|
+
'fetchDepositAddressesByNetwork': False,
|
38
39
|
'fetchFundingHistory': False,
|
39
40
|
'fetchFundingRate': False,
|
40
41
|
'fetchFundingRateHistory': False,
|
@@ -302,7 +303,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
302
303
|
#
|
303
304
|
return self.parse_deposit_address(response)
|
304
305
|
|
305
|
-
def fetch_deposit_address(self, code: str, params={}):
|
306
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
306
307
|
"""
|
307
308
|
fetch the deposit address for a currency associated with self account
|
308
309
|
:see: https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses~1%7Baddress%7D/get
|
@@ -325,7 +326,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
325
326
|
#
|
326
327
|
return self.parse_deposit_address(response)
|
327
328
|
|
328
|
-
def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
329
|
+
def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
|
329
330
|
"""
|
330
331
|
fetch deposit addresses for multiple currencies and chain types
|
331
332
|
:see: https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses/get
|
@@ -347,7 +348,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
347
348
|
#
|
348
349
|
return self.parse_deposit_addresses(response, codes)
|
349
350
|
|
350
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
351
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
351
352
|
#
|
352
353
|
# {
|
353
354
|
# "address": "1HdjGr6WCTcnmW1tNNsHX7fh4Jr5C2PeKe",
|
@@ -361,9 +362,9 @@ class paymium(Exchange, ImplicitAPI):
|
|
361
362
|
return {
|
362
363
|
'info': depositAddress,
|
363
364
|
'currency': self.safe_currency_code(currencyId, currency),
|
365
|
+
'network': None,
|
364
366
|
'address': address,
|
365
367
|
'tag': None,
|
366
|
-
'network': None,
|
367
368
|
}
|
368
369
|
|
369
370
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
ccxt/phemex.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.phemex import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import numbers
|
10
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -64,6 +64,8 @@ class phemex(Exchange, ImplicitAPI):
|
|
64
64
|
'fetchCrossBorrowRates': False,
|
65
65
|
'fetchCurrencies': True,
|
66
66
|
'fetchDepositAddress': True,
|
67
|
+
'fetchDepositAddresses': False,
|
68
|
+
'fetchDepositAddressesByNetwork': False,
|
67
69
|
'fetchDeposits': True,
|
68
70
|
'fetchFundingHistory': True,
|
69
71
|
'fetchFundingRate': True,
|
@@ -3145,7 +3147,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
3145
3147
|
data = self.safe_value(data, 'rows', [])
|
3146
3148
|
return self.parse_trades(data, market, since, limit)
|
3147
3149
|
|
3148
|
-
def fetch_deposit_address(self, code: str, params={}):
|
3150
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
3149
3151
|
"""
|
3150
3152
|
fetch the deposit address for a currency associated with self account
|
3151
3153
|
:param str code: unified currency code
|
@@ -3157,9 +3159,9 @@ class phemex(Exchange, ImplicitAPI):
|
|
3157
3159
|
request: dict = {
|
3158
3160
|
'currency': currency['id'],
|
3159
3161
|
}
|
3160
|
-
defaultNetworks = self.
|
3162
|
+
defaultNetworks = self.safe_dict(self.options, 'defaultNetworks')
|
3161
3163
|
defaultNetwork = self.safe_string_upper(defaultNetworks, code)
|
3162
|
-
networks = self.
|
3164
|
+
networks = self.safe_dict(self.options, 'networks', {})
|
3163
3165
|
network = self.safe_string_upper(params, 'network', defaultNetwork)
|
3164
3166
|
network = self.safe_string(networks, network, network)
|
3165
3167
|
if network is None:
|
@@ -3182,11 +3184,11 @@ class phemex(Exchange, ImplicitAPI):
|
|
3182
3184
|
tag = self.safe_string(data, 'tag')
|
3183
3185
|
self.check_address(address)
|
3184
3186
|
return {
|
3187
|
+
'info': response,
|
3185
3188
|
'currency': code,
|
3189
|
+
'network': None,
|
3186
3190
|
'address': address,
|
3187
3191
|
'tag': tag,
|
3188
|
-
'network': None,
|
3189
|
-
'info': response,
|
3190
3192
|
}
|
3191
3193
|
|
3192
3194
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
ccxt/poloniex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.poloniex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -56,6 +56,8 @@ class poloniex(Exchange, ImplicitAPI):
|
|
56
56
|
'fetchClosedOrder': False,
|
57
57
|
'fetchCurrencies': True,
|
58
58
|
'fetchDepositAddress': True,
|
59
|
+
'fetchDepositAddresses': False,
|
60
|
+
'fetchDepositAddressesByNetwork': False,
|
59
61
|
'fetchDeposits': True,
|
60
62
|
'fetchDepositsWithdrawals': True,
|
61
63
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -1700,7 +1702,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1700
1702
|
'info': response,
|
1701
1703
|
}
|
1702
1704
|
|
1703
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1705
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1704
1706
|
"""
|
1705
1707
|
fetch the deposit address for a currency associated with self account
|
1706
1708
|
:see: https://api-docs.poloniex.com/spot/api/private/wallet#deposit-addresses
|
@@ -1737,11 +1739,11 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1737
1739
|
tag = address
|
1738
1740
|
address = depositAddress
|
1739
1741
|
return {
|
1742
|
+
'info': response,
|
1740
1743
|
'currency': code,
|
1744
|
+
'network': network,
|
1741
1745
|
'address': address,
|
1742
1746
|
'tag': tag,
|
1743
|
-
'network': network,
|
1744
|
-
'info': response,
|
1745
1747
|
}
|
1746
1748
|
|
1747
1749
|
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
ccxt/pro/__init__.py
CHANGED
ccxt/probit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.probit import ImplicitAPI
|
8
8
|
import math
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -62,6 +62,7 @@ class probit(Exchange, ImplicitAPI):
|
|
62
62
|
'fetchCurrencies': True,
|
63
63
|
'fetchDepositAddress': True,
|
64
64
|
'fetchDepositAddresses': True,
|
65
|
+
'fetchDepositAddressesByNetwork': False,
|
65
66
|
'fetchDeposits': True,
|
66
67
|
'fetchDepositsWithdrawals': True,
|
67
68
|
'fetchFundingHistory': False,
|
@@ -1232,7 +1233,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1232
1233
|
data = self.safe_dict(response, 'data')
|
1233
1234
|
return self.parse_order(data)
|
1234
1235
|
|
1235
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1236
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1236
1237
|
address = self.safe_string(depositAddress, 'address')
|
1237
1238
|
tag = self.safe_string(depositAddress, 'destination_tag')
|
1238
1239
|
currencyId = self.safe_string(depositAddress, 'currency_id')
|
@@ -1241,14 +1242,14 @@ class probit(Exchange, ImplicitAPI):
|
|
1241
1242
|
network = self.safe_string(depositAddress, 'platform_id')
|
1242
1243
|
self.check_address(address)
|
1243
1244
|
return {
|
1245
|
+
'info': depositAddress,
|
1244
1246
|
'currency': code,
|
1247
|
+
'network': network,
|
1245
1248
|
'address': address,
|
1246
1249
|
'tag': tag,
|
1247
|
-
'network': network,
|
1248
|
-
'info': depositAddress,
|
1249
1250
|
}
|
1250
1251
|
|
1251
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1252
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1252
1253
|
"""
|
1253
1254
|
:see: https://docs-en.probit.com/reference/deposit_address
|
1254
1255
|
fetch the deposit address for a currency associated with self account
|
@@ -1298,7 +1299,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1298
1299
|
raise InvalidAddress(self.id + ' fetchDepositAddress() returned an empty response')
|
1299
1300
|
return self.parse_deposit_address(firstAddress, currency)
|
1300
1301
|
|
1301
|
-
def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1302
|
+
def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
|
1302
1303
|
"""
|
1303
1304
|
:see: https://docs-en.probit.com/reference/deposit_address
|
1304
1305
|
fetch deposit addresses for multiple currencies and chain types
|
ccxt/test/tests_async.py
CHANGED
ccxt/test/tests_sync.py
CHANGED
ccxt/timex.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.timex import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
|
8
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -1514,7 +1514,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1514
1514
|
'trades': rawTrades,
|
1515
1515
|
}, market)
|
1516
1516
|
|
1517
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1517
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1518
1518
|
"""
|
1519
1519
|
fetch the deposit address for a currency associated with self account, does not accept params["network"]
|
1520
1520
|
:see: https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Currency/selectCurrencyBySymbol
|
@@ -1548,7 +1548,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1548
1548
|
data = self.safe_dict(response, 'currency', {})
|
1549
1549
|
return self.parse_deposit_address(data, currency)
|
1550
1550
|
|
1551
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1551
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1552
1552
|
#
|
1553
1553
|
# {
|
1554
1554
|
# symbol: 'BTC',
|
@@ -1567,9 +1567,9 @@ class timex(Exchange, ImplicitAPI):
|
|
1567
1567
|
return {
|
1568
1568
|
'info': depositAddress,
|
1569
1569
|
'currency': self.safe_currency_code(currencyId, currency),
|
1570
|
+
'network': None,
|
1570
1571
|
'address': self.safe_string(depositAddress, 'address'),
|
1571
1572
|
'tag': None,
|
1572
|
-
'network': None,
|
1573
1573
|
}
|
1574
1574
|
|
1575
1575
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
ccxt/tokocrypto.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.tokocrypto import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -1950,10 +1950,10 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1950
1950
|
trades = self.safe_list(data, 'list', [])
|
1951
1951
|
return self.parse_trades(trades, market, since, limit)
|
1952
1952
|
|
1953
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1953
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1954
1954
|
"""
|
1955
|
-
:see: https://www.tokocrypto.com/apidocs/#deposit-address-signed
|
1956
1955
|
fetch the deposit address for a currency associated with self account
|
1956
|
+
:see: https://www.tokocrypto.com/apidocs/#deposit-address-signed
|
1957
1957
|
:param str code: unified currency code
|
1958
1958
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1959
1959
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -1995,11 +1995,11 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1995
1995
|
tag = None
|
1996
1996
|
self.check_address(address)
|
1997
1997
|
return {
|
1998
|
+
'info': response,
|
1998
1999
|
'currency': code,
|
2000
|
+
'network': self.safe_string(data, 'network'),
|
1999
2001
|
'address': address,
|
2000
2002
|
'tag': tag,
|
2001
|
-
'network': self.safe_string(data, 'network'),
|
2002
|
-
'info': response,
|
2003
2003
|
}
|
2004
2004
|
|
2005
2005
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
ccxt/upbit.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.upbit import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
|
8
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -51,6 +51,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
51
51
|
'fetchDeposit': True,
|
52
52
|
'fetchDepositAddress': True,
|
53
53
|
'fetchDepositAddresses': True,
|
54
|
+
'fetchDepositAddressesByNetwork': False,
|
54
55
|
'fetchDeposits': True,
|
55
56
|
'fetchFundingHistory': False,
|
56
57
|
'fetchFundingRate': False,
|
@@ -1696,7 +1697,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1696
1697
|
#
|
1697
1698
|
return self.parse_order(response)
|
1698
1699
|
|
1699
|
-
def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1700
|
+
def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
|
1700
1701
|
"""
|
1701
1702
|
:see: https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%A1%B0%ED%9A%8C
|
1702
1703
|
fetch deposit addresses for multiple currencies and chain types
|
@@ -1727,7 +1728,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1727
1728
|
#
|
1728
1729
|
return self.parse_deposit_addresses(response, codes)
|
1729
1730
|
|
1730
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1731
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1731
1732
|
#
|
1732
1733
|
# {
|
1733
1734
|
# currency: 'XRP',
|
@@ -1743,14 +1744,14 @@ class upbit(Exchange, ImplicitAPI):
|
|
1743
1744
|
networkId = self.safe_string(depositAddress, 'net_type')
|
1744
1745
|
self.check_address(address)
|
1745
1746
|
return {
|
1747
|
+
'info': depositAddress,
|
1746
1748
|
'currency': code,
|
1749
|
+
'network': self.network_id_to_code(networkId),
|
1747
1750
|
'address': address,
|
1748
1751
|
'tag': tag,
|
1749
|
-
'network': self.network_id_to_code(networkId),
|
1750
|
-
'info': depositAddress,
|
1751
1752
|
}
|
1752
1753
|
|
1753
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1754
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1754
1755
|
"""
|
1755
1756
|
:see: https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%A1%B0%ED%9A%8C
|
1756
1757
|
fetch the deposit address for a currency associated with self account
|
ccxt/wavesexchange.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.wavesexchange import ImplicitAPI
|
8
8
|
import json
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from typing import Any
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -58,6 +58,8 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
58
58
|
'fetchCrossBorrowRate': False,
|
59
59
|
'fetchCrossBorrowRates': False,
|
60
60
|
'fetchDepositAddress': True,
|
61
|
+
'fetchDepositAddresses': None,
|
62
|
+
'fetchDepositAddressesByNetwork': None,
|
61
63
|
'fetchDepositWithdrawFee': 'emulated',
|
62
64
|
'fetchDepositWithdrawFees': True,
|
63
65
|
'fetchFundingHistory': False,
|
@@ -1018,7 +1020,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1018
1020
|
self.safe_number(data, 'volume', 0),
|
1019
1021
|
]
|
1020
1022
|
|
1021
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1023
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1022
1024
|
"""
|
1023
1025
|
fetch the deposit address for a currency associated with self account
|
1024
1026
|
:param str code: unified currency code
|
@@ -1097,12 +1099,11 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1097
1099
|
responseInner = self.nodeGetAddressesPublicKeyPublicKey(self.extend(request, request))
|
1098
1100
|
addressInner = self.safe_string(response, 'address')
|
1099
1101
|
return {
|
1100
|
-
'
|
1101
|
-
'code': code, # kept here for backward-compatibility, but will be removed soon
|
1102
|
+
'info': responseInner,
|
1102
1103
|
'currency': code,
|
1103
1104
|
'network': network,
|
1105
|
+
'address': addressInner,
|
1104
1106
|
'tag': None,
|
1105
|
-
'info': responseInner,
|
1106
1107
|
}
|
1107
1108
|
else:
|
1108
1109
|
request: dict = {
|
@@ -1140,12 +1141,11 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1140
1141
|
addresses = self.safe_value(response, 'deposit_addresses')
|
1141
1142
|
address = self.safe_string(addresses, 0)
|
1142
1143
|
return {
|
1143
|
-
'
|
1144
|
-
'code': code, # kept here for backward-compatibility, but will be removed soon
|
1144
|
+
'info': response,
|
1145
1145
|
'currency': code,
|
1146
|
-
'tag': None,
|
1147
1146
|
'network': unifiedNetwork,
|
1148
|
-
'
|
1147
|
+
'address': address,
|
1148
|
+
'tag': None,
|
1149
1149
|
}
|
1150
1150
|
|
1151
1151
|
def get_matcher_public_key(self):
|
ccxt/wazirx.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.wazirx import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -50,34 +50,51 @@ class wazirx(Exchange, ImplicitAPI):
|
|
50
50
|
'fetchBalance': True,
|
51
51
|
'fetchBidsAsks': False,
|
52
52
|
'fetchBorrowInterest': False,
|
53
|
+
'fetchBorrowRate': False,
|
53
54
|
'fetchBorrowRateHistories': False,
|
54
55
|
'fetchBorrowRateHistory': False,
|
56
|
+
'fetchBorrowRates': False,
|
57
|
+
'fetchBorrowRatesPerSymbol': False,
|
55
58
|
'fetchClosedOrders': False,
|
56
59
|
'fetchCrossBorrowRate': False,
|
57
60
|
'fetchCrossBorrowRates': False,
|
58
61
|
'fetchCurrencies': True,
|
59
62
|
'fetchDepositAddress': True,
|
63
|
+
'fetchDepositAddresses': False,
|
60
64
|
'fetchDepositAddressesByNetwork': False,
|
61
65
|
'fetchDeposits': True,
|
62
66
|
'fetchDepositsWithdrawals': False,
|
63
67
|
'fetchFundingHistory': False,
|
68
|
+
'fetchFundingInterval': False,
|
69
|
+
'fetchFundingIntervals': False,
|
64
70
|
'fetchFundingRate': False,
|
65
71
|
'fetchFundingRateHistory': False,
|
66
72
|
'fetchFundingRates': False,
|
73
|
+
'fetchGreeks': False,
|
67
74
|
'fetchIndexOHLCV': False,
|
68
75
|
'fetchIsolatedBorrowRate': False,
|
69
76
|
'fetchIsolatedBorrowRates': False,
|
70
77
|
'fetchIsolatedPositions': False,
|
71
78
|
'fetchLeverage': False,
|
79
|
+
'fetchLeverages': False,
|
72
80
|
'fetchLeverageTiers': False,
|
81
|
+
'fetchLiquidations': False,
|
82
|
+
'fetchMarginAdjustmentHistory': False,
|
73
83
|
'fetchMarginMode': False,
|
84
|
+
'fetchMarginModes': False,
|
74
85
|
'fetchMarketLeverageTiers': False,
|
75
86
|
'fetchMarkets': True,
|
76
87
|
'fetchMarkOHLCV': False,
|
88
|
+
'fetchMarkPrices': False,
|
89
|
+
'fetchMyLiquidations': False,
|
90
|
+
'fetchMySettlementHistory': False,
|
77
91
|
'fetchMyTrades': False,
|
78
92
|
'fetchOHLCV': True,
|
93
|
+
'fetchOpenInterest': False,
|
79
94
|
'fetchOpenInterestHistory': False,
|
80
95
|
'fetchOpenOrders': True,
|
96
|
+
'fetchOption': False,
|
97
|
+
'fetchOptionChain': False,
|
81
98
|
'fetchOrder': False,
|
82
99
|
'fetchOrderBook': True,
|
83
100
|
'fetchOrders': True,
|
@@ -89,6 +106,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
89
106
|
'fetchPositionsHistory': False,
|
90
107
|
'fetchPositionsRisk': False,
|
91
108
|
'fetchPremiumIndexOHLCV': False,
|
109
|
+
'fetchSettlementHistory': False,
|
92
110
|
'fetchStatus': True,
|
93
111
|
'fetchTicker': True,
|
94
112
|
'fetchTickers': True,
|
@@ -99,6 +117,8 @@ class wazirx(Exchange, ImplicitAPI):
|
|
99
117
|
'fetchTransactionFees': False,
|
100
118
|
'fetchTransactions': False,
|
101
119
|
'fetchTransfers': False,
|
120
|
+
'fetchUnderlyingAssets': False,
|
121
|
+
'fetchVolatilityHistory': False,
|
102
122
|
'fetchWithdrawals': True,
|
103
123
|
'reduceMargin': False,
|
104
124
|
'repayCrossMargin': False,
|
@@ -1049,7 +1069,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
1049
1069
|
}
|
1050
1070
|
return result
|
1051
1071
|
|
1052
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1072
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1053
1073
|
"""
|
1054
1074
|
fetch the deposit address for a currency associated with self account
|
1055
1075
|
:see: https://docs.wazirx.com/#deposit-address-supporting-network-user_data
|
@@ -1077,11 +1097,11 @@ class wazirx(Exchange, ImplicitAPI):
|
|
1077
1097
|
# }
|
1078
1098
|
#
|
1079
1099
|
return {
|
1100
|
+
'info': response,
|
1080
1101
|
'currency': code,
|
1102
|
+
'network': self.network_code_to_id(networkCode, code),
|
1081
1103
|
'address': self.safe_string(response, 'address'),
|
1082
1104
|
'tag': None,
|
1083
|
-
'network': self.network_code_to_id(networkCode, code),
|
1084
|
-
'info': response,
|
1085
1105
|
}
|
1086
1106
|
|
1087
1107
|
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
ccxt/whitebit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.whitebit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Bool, Currencies, Currency, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Bool, Currencies, Currency, DepositAddress, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -62,6 +62,8 @@ class whitebit(Exchange, ImplicitAPI):
|
|
62
62
|
'fetchCurrencies': True,
|
63
63
|
'fetchDeposit': True,
|
64
64
|
'fetchDepositAddress': True,
|
65
|
+
'fetchDepositAddresses': False,
|
66
|
+
'fetchDepositAddressesByNetwork': False,
|
65
67
|
'fetchDeposits': True,
|
66
68
|
'fetchDepositsWithdrawals': True,
|
67
69
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -1758,7 +1760,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1758
1760
|
data = self.safe_list(response, 'records', [])
|
1759
1761
|
return self.parse_trades(data, market)
|
1760
1762
|
|
1761
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1763
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1762
1764
|
"""
|
1763
1765
|
fetch the deposit address for a currency associated with self account
|
1764
1766
|
:see: https://docs.whitebit.com/private/http-main-v4/#get-fiat-deposit-address
|
@@ -1820,11 +1822,11 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1820
1822
|
tag = self.safe_string(account, 'memo')
|
1821
1823
|
self.check_address(address)
|
1822
1824
|
return {
|
1825
|
+
'info': response,
|
1823
1826
|
'currency': code,
|
1827
|
+
'network': None,
|
1824
1828
|
'address': address,
|
1825
1829
|
'tag': tag,
|
1826
|
-
'network': None,
|
1827
|
-
'info': response,
|
1828
1830
|
}
|
1829
1831
|
|
1830
1832
|
def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|