ccxt 4.4.15__py2.py3-none-any.whl → 4.4.17__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/abstract/mexc.py +1 -0
- 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 +66 -10
- ccxt/async_support/bingx.py +61 -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 +8 -6
- ccxt/async_support/blockchaincom.py +11 -8
- ccxt/async_support/blofin.py +21 -0
- ccxt/async_support/bybit.py +12 -9
- ccxt/async_support/cex.py +5 -4
- ccxt/async_support/coinbase.py +4 -4
- ccxt/async_support/coinbaseinternational.py +4 -8
- 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 +9 -15
- ccxt/async_support/lbank.py +14 -12
- ccxt/async_support/lykke.py +6 -4
- ccxt/async_support/mexc.py +7 -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 +50 -7
- 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 +8 -12
- 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 +14 -2
- ccxt/base/types.py +8 -0
- ccxt/bigone.py +6 -4
- ccxt/binance.py +66 -10
- ccxt/bingx.py +61 -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 +8 -6
- ccxt/blockchaincom.py +11 -8
- ccxt/blofin.py +21 -0
- ccxt/bybit.py +12 -9
- ccxt/cex.py +5 -4
- ccxt/coinbase.py +4 -4
- ccxt/coinbaseinternational.py +4 -8
- 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 +9 -15
- ccxt/lbank.py +14 -12
- ccxt/lykke.py +6 -4
- ccxt/mexc.py +7 -6
- ccxt/ndax.py +33 -5
- ccxt/oceanex.py +4 -4
- ccxt/okcoin.py +8 -6
- ccxt/okx.py +50 -7
- 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/pro/bitvavo.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 +8 -12
- 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.17.dist-info}/METADATA +4 -4
- {ccxt-4.4.15.dist-info → ccxt-4.4.17.dist-info}/RECORD +149 -149
- {ccxt-4.4.15.dist-info → ccxt-4.4.17.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.15.dist-info → ccxt-4.4.17.dist-info}/WHEEL +0 -0
- {ccxt-4.4.15.dist-info → ccxt-4.4.17.dist-info}/top_level.txt +0 -0
ccxt/async_support/bitmart.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitmart import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, IsolatedBorrowRate, IsolatedBorrowRates, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, IsolatedBorrowRate, IsolatedBorrowRates, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -1292,6 +1292,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1292
1292
|
'average': average,
|
1293
1293
|
'baseVolume': baseVolume,
|
1294
1294
|
'quoteVolume': quoteVolume,
|
1295
|
+
'indexPrice': self.safe_string(ticker, 'index_price'),
|
1295
1296
|
'info': ticker,
|
1296
1297
|
}, market)
|
1297
1298
|
|
@@ -3206,7 +3207,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3206
3207
|
data = self.safe_dict(response, 'data', {})
|
3207
3208
|
return self.parse_order(data, market)
|
3208
3209
|
|
3209
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
3210
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
3210
3211
|
"""
|
3211
3212
|
fetch the deposit address for a currency associated with self account
|
3212
3213
|
:see: https://developer-pro.bitmart.com/en/spot/#deposit-address-keyed
|
@@ -3245,7 +3246,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3245
3246
|
data = self.safe_dict(response, 'data', {})
|
3246
3247
|
return self.parse_deposit_address(data, currency)
|
3247
3248
|
|
3248
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
3249
|
+
def parse_deposit_address(self, depositAddress, currency=None) -> DepositAddress:
|
3249
3250
|
#
|
3250
3251
|
# {
|
3251
3252
|
# currency: 'ETH',
|
@@ -3271,9 +3272,9 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3271
3272
|
return {
|
3272
3273
|
'info': depositAddress,
|
3273
3274
|
'currency': self.safe_string(currency, 'code'),
|
3275
|
+
'network': network,
|
3274
3276
|
'address': address,
|
3275
3277
|
'tag': self.safe_string(depositAddress, 'address_memo'),
|
3276
|
-
'network': network,
|
3277
3278
|
}
|
3278
3279
|
|
3279
3280
|
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
ccxt/async_support/bitmex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitmex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, LedgerEntry, Leverage, Leverages, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, LedgerEntry, Leverage, Leverages, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -2505,7 +2505,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2505
2505
|
}
|
2506
2506
|
return await self.privatePostPositionIsolate(self.extend(request, params))
|
2507
2507
|
|
2508
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
2508
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2509
2509
|
"""
|
2510
2510
|
fetch the deposit address for a currency associated with self account
|
2511
2511
|
:see: https://www.bitmex.com/api/explorer/#not /User/User_getDepositAddress
|
@@ -2530,11 +2530,11 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2530
2530
|
# '"bc1qmex3puyrzn2gduqcnlu70c2uscpyaa9nm2l2j9le2lt2wkgmw33sy7ndjg"'
|
2531
2531
|
#
|
2532
2532
|
return {
|
2533
|
+
'info': response,
|
2533
2534
|
'currency': code,
|
2535
|
+
'network': networkCode,
|
2534
2536
|
'address': response.replace('"', '').replace('"', ''), # Done twice because some languages only replace the first instance
|
2535
2537
|
'tag': None,
|
2536
|
-
'network': networkCode,
|
2537
|
-
'info': response,
|
2538
2538
|
}
|
2539
2539
|
|
2540
2540
|
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
ccxt/async_support/bitso.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitso import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -53,6 +53,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
53
53
|
'fetchDeposit': True,
|
54
54
|
'fetchDepositAddress': True,
|
55
55
|
'fetchDepositAddresses': False,
|
56
|
+
'fetchDepositAddressesByNetwork': False,
|
56
57
|
'fetchDeposits': True,
|
57
58
|
'fetchDepositsWithdrawals': False,
|
58
59
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -1247,7 +1248,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1247
1248
|
transactions = self.safe_list(response, 'payload', [])
|
1248
1249
|
return self.parse_transactions(transactions, currency, since, limit, params)
|
1249
1250
|
|
1250
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1251
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1251
1252
|
"""
|
1252
1253
|
fetch the deposit address for a currency associated with self account
|
1253
1254
|
:param str code: unified currency code
|
@@ -1268,11 +1269,11 @@ class bitso(Exchange, ImplicitAPI):
|
|
1268
1269
|
tag = self.safe_string(parts, 1)
|
1269
1270
|
self.check_address(address)
|
1270
1271
|
return {
|
1272
|
+
'info': response,
|
1271
1273
|
'currency': code,
|
1274
|
+
'network': None,
|
1272
1275
|
'address': address,
|
1273
1276
|
'tag': tag,
|
1274
|
-
'network': None,
|
1275
|
-
'info': response,
|
1276
1277
|
}
|
1277
1278
|
|
1278
1279
|
async def fetch_transaction_fees(self, codes: Strings = None, params={}):
|
ccxt/async_support/bitstamp.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitstamp import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, 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
|
@@ -60,6 +60,8 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
60
60
|
'fetchCrossBorrowRates': False,
|
61
61
|
'fetchCurrencies': True,
|
62
62
|
'fetchDepositAddress': True,
|
63
|
+
'fetchDepositAddresses': False,
|
64
|
+
'fetchDepositAddressesByNetwork': False,
|
63
65
|
'fetchDepositsWithdrawals': True,
|
64
66
|
'fetchDepositWithdrawFee': 'emulated',
|
65
67
|
'fetchDepositWithdrawFees': True,
|
@@ -1983,7 +1985,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1983
1985
|
def is_fiat(self, code):
|
1984
1986
|
return code == 'USD' or code == 'EUR' or code == 'GBP'
|
1985
1987
|
|
1986
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1988
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1987
1989
|
"""
|
1988
1990
|
fetch the deposit address for a currency associated with self account
|
1989
1991
|
:see: https://www.bitstamp.net/api/#tag/Deposits/operation/GetCryptoDepositAddress
|
@@ -2000,11 +2002,11 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
2000
2002
|
tag = self.safe_string_2(response, 'memo_id', 'destination_tag')
|
2001
2003
|
self.check_address(address)
|
2002
2004
|
return {
|
2005
|
+
'info': response,
|
2003
2006
|
'currency': code,
|
2007
|
+
'network': None,
|
2004
2008
|
'address': address,
|
2005
2009
|
'tag': tag,
|
2006
|
-
'network': None,
|
2007
|
-
'info': response,
|
2008
2010
|
}
|
2009
2011
|
|
2010
2012
|
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
ccxt/async_support/bitvavo.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitvavo 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
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -65,6 +65,8 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
65
65
|
'fetchCrossBorrowRates': False,
|
66
66
|
'fetchCurrencies': True,
|
67
67
|
'fetchDepositAddress': True,
|
68
|
+
'fetchDepositAddresses': False,
|
69
|
+
'fetchDepositAddressesByNetwork': False,
|
68
70
|
'fetchDeposits': True,
|
69
71
|
'fetchDepositWithdrawFee': 'emulated',
|
70
72
|
'fetchDepositWithdrawFees': True,
|
@@ -456,9 +458,9 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
456
458
|
# },
|
457
459
|
# ]
|
458
460
|
#
|
459
|
-
return self.
|
461
|
+
return self.parse_currencies_custom(response)
|
460
462
|
|
461
|
-
def
|
463
|
+
def parse_currencies_custom(self, currencies):
|
462
464
|
#
|
463
465
|
# [
|
464
466
|
# {
|
@@ -998,7 +1000,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
998
1000
|
#
|
999
1001
|
return self.parse_balance(response)
|
1000
1002
|
|
1001
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1003
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1002
1004
|
"""
|
1003
1005
|
fetch the deposit address for a currency associated with self account
|
1004
1006
|
:param str code: unified currency code
|
@@ -1021,11 +1023,11 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1021
1023
|
tag = self.safe_string(response, 'paymentId')
|
1022
1024
|
self.check_address(address)
|
1023
1025
|
return {
|
1026
|
+
'info': response,
|
1024
1027
|
'currency': code,
|
1028
|
+
'network': None,
|
1025
1029
|
'address': address,
|
1026
1030
|
'tag': tag,
|
1027
|
-
'network': None,
|
1028
|
-
'info': response,
|
1029
1031
|
}
|
1030
1032
|
|
1031
1033
|
def create_order_request(self, symbol: Str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.blockchaincom import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
8
|
+
from ccxt.base.types import Balances, 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
|
@@ -45,6 +45,8 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
45
45
|
'fetchClosedOrders': True,
|
46
46
|
'fetchDeposit': True,
|
47
47
|
'fetchDepositAddress': True,
|
48
|
+
'fetchDepositAddresses': False,
|
49
|
+
'fetchDepositAddressesByNetwork': False,
|
48
50
|
'fetchDeposits': True,
|
49
51
|
'fetchFundingHistory': False,
|
50
52
|
'fetchFundingRate': False,
|
@@ -770,7 +772,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
770
772
|
trades = await self.privateGetFills(self.extend(request, params))
|
771
773
|
return self.parse_trades(trades, market, since, limit, params) # need to define
|
772
774
|
|
773
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
775
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
774
776
|
"""
|
775
777
|
fetch the deposit address for a currency associated with self account
|
776
778
|
:see: https://api.blockchain.com/v3/#getdepositaddress
|
@@ -792,12 +794,13 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
792
794
|
# if a tag or memo is used it is separated by a colon in the 'address' value
|
793
795
|
tag = self.safe_string(addressParts, 0)
|
794
796
|
address = self.safe_string(addressParts, 1)
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
797
|
+
return {
|
798
|
+
'info': response,
|
799
|
+
'currency': currency['code'],
|
800
|
+
'network': None,
|
801
|
+
'address': address,
|
802
|
+
'tag': tag,
|
803
|
+
}
|
801
804
|
|
802
805
|
def parse_transaction_state(self, state):
|
803
806
|
states: dict = {
|
ccxt/async_support/blofin.py
CHANGED
@@ -543,6 +543,8 @@ class blofin(Exchange, ImplicitAPI):
|
|
543
543
|
'average': None,
|
544
544
|
'baseVolume': baseVolume,
|
545
545
|
'quoteVolume': quoteVolume,
|
546
|
+
'indexPrice': self.safe_string(ticker, 'indexPrice'),
|
547
|
+
'markPrice': self.safe_string(ticker, 'markPrice'),
|
546
548
|
'info': ticker,
|
547
549
|
}, market)
|
548
550
|
|
@@ -564,6 +566,25 @@ class blofin(Exchange, ImplicitAPI):
|
|
564
566
|
first = self.safe_dict(data, 0, {})
|
565
567
|
return self.parse_ticker(first, market)
|
566
568
|
|
569
|
+
async def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
|
570
|
+
"""
|
571
|
+
fetches mark price for the market
|
572
|
+
:see: https://docs.blofin.com/index.html#get-mark-price
|
573
|
+
:param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
574
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
575
|
+
:param str [params.subType]: "linear" or "inverse"
|
576
|
+
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
577
|
+
"""
|
578
|
+
await self.load_markets()
|
579
|
+
market = self.market(symbol)
|
580
|
+
request = {
|
581
|
+
'symbol': market['id'],
|
582
|
+
}
|
583
|
+
response = await self.publicGetMarketMarkPrice(self.extend(request, params))
|
584
|
+
data = self.safe_list(response, 'data', [])
|
585
|
+
first = self.safe_dict(data, 0, {})
|
586
|
+
return self.parse_ticker(first, market)
|
587
|
+
|
567
588
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
568
589
|
"""
|
569
590
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
ccxt/async_support/bybit.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bybit import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, Greeks, Int, LedgerEntry, Leverage, LeverageTier, LeverageTiers, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, LeverageTier, LeverageTiers, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -4539,7 +4539,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
4539
4539
|
length = len(result)
|
4540
4540
|
if length == 0:
|
4541
4541
|
isTrigger = self.safe_bool_n(params, ['trigger', 'stop'], False)
|
4542
|
-
extra = '' if isTrigger else 'If you are trying to fetch SL/TP conditional order, you might try setting params["trigger"] = True'
|
4542
|
+
extra = '' if isTrigger else ' If you are trying to fetch SL/TP conditional order, you might try setting params["trigger"] = True'
|
4543
4543
|
raise OrderNotFound('Order ' + str(id) + ' was not found.' + extra)
|
4544
4544
|
if length > 1:
|
4545
4545
|
raise InvalidOrder(self.id + ' returned more than one order')
|
@@ -4628,6 +4628,9 @@ class bybit(Exchange, ImplicitAPI):
|
|
4628
4628
|
#
|
4629
4629
|
result = self.safe_dict(response, 'result', {})
|
4630
4630
|
innerList = self.safe_list(result, 'list', [])
|
4631
|
+
if len(innerList) == 0:
|
4632
|
+
extra = '' if isTrigger else ' If you are trying to fetch SL/TP conditional order, you might try setting params["trigger"] = True'
|
4633
|
+
raise OrderNotFound('Order ' + str(id) + ' was not found.' + extra)
|
4631
4634
|
order = self.safe_dict(innerList, 0, {})
|
4632
4635
|
return self.parse_order(order, market)
|
4633
4636
|
|
@@ -4778,7 +4781,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
4778
4781
|
length = len(result)
|
4779
4782
|
if length == 0:
|
4780
4783
|
isTrigger = self.safe_bool_n(params, ['trigger', 'stop'], False)
|
4781
|
-
extra = '' if isTrigger else 'If you are trying to fetch SL/TP conditional order, you might try setting params["trigger"] = True'
|
4784
|
+
extra = '' if isTrigger else ' If you are trying to fetch SL/TP conditional order, you might try setting params["trigger"] = True'
|
4782
4785
|
raise OrderNotFound('Order ' + str(id) + ' was not found.' + extra)
|
4783
4786
|
if length > 1:
|
4784
4787
|
raise InvalidOrder(self.id + ' returned more than one order')
|
@@ -4807,7 +4810,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
4807
4810
|
length = len(result)
|
4808
4811
|
if length == 0:
|
4809
4812
|
isTrigger = self.safe_bool_n(params, ['trigger', 'stop'], False)
|
4810
|
-
extra = '' if isTrigger else 'If you are trying to fetch SL/TP conditional order, you might try setting params["trigger"] = True'
|
4813
|
+
extra = '' if isTrigger else ' If you are trying to fetch SL/TP conditional order, you might try setting params["trigger"] = True'
|
4811
4814
|
raise OrderNotFound('Order ' + str(id) + ' was not found.' + extra)
|
4812
4815
|
if length > 1:
|
4813
4816
|
raise InvalidOrder(self.id + ' returned more than one order')
|
@@ -5248,7 +5251,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5248
5251
|
trades = self.add_pagination_cursor_to_result(response)
|
5249
5252
|
return self.parse_trades(trades, market, since, limit)
|
5250
5253
|
|
5251
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
5254
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
5252
5255
|
#
|
5253
5256
|
# {
|
5254
5257
|
# "chainType": "ERC20",
|
@@ -5263,14 +5266,14 @@ class bybit(Exchange, ImplicitAPI):
|
|
5263
5266
|
chain = self.safe_string(depositAddress, 'chain')
|
5264
5267
|
self.check_address(address)
|
5265
5268
|
return {
|
5269
|
+
'info': depositAddress,
|
5266
5270
|
'currency': code,
|
5271
|
+
'network': chain,
|
5267
5272
|
'address': address,
|
5268
5273
|
'tag': tag,
|
5269
|
-
'network': chain,
|
5270
|
-
'info': depositAddress,
|
5271
5274
|
}
|
5272
5275
|
|
5273
|
-
async def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
5276
|
+
async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
5274
5277
|
"""
|
5275
5278
|
fetch a dictionary of addresses for a currency, indexed by network
|
5276
5279
|
:see: https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
|
@@ -5312,7 +5315,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5312
5315
|
})
|
5313
5316
|
return self.index_by(parsed, 'network')
|
5314
5317
|
|
5315
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
5318
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
5316
5319
|
"""
|
5317
5320
|
fetch the deposit address for a currency associated with self account
|
5318
5321
|
:see: https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
|
ccxt/async_support/cex.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.cex import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Currencies, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
|
10
|
+
from ccxt.base.types import Balances, Currencies, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -59,6 +59,7 @@ class cex(Exchange, ImplicitAPI):
|
|
59
59
|
'fetchDeposit': False,
|
60
60
|
'fetchDepositAddress': True,
|
61
61
|
'fetchDepositAddresses': False,
|
62
|
+
'fetchDepositAddressesByNetwork': False,
|
62
63
|
'fetchDeposits': False,
|
63
64
|
'fetchDepositsWithdrawals': False,
|
64
65
|
'fetchFundingHistory': False,
|
@@ -1511,7 +1512,7 @@ class cex(Exchange, ImplicitAPI):
|
|
1511
1512
|
response = await self.privatePostCancelReplaceOrderPair(self.extend(request, params))
|
1512
1513
|
return self.parse_order(response, market)
|
1513
1514
|
|
1514
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1515
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1515
1516
|
"""
|
1516
1517
|
:see: https://docs.cex.io/#get-crypto-address
|
1517
1518
|
fetch the deposit address for a currency associated with self account
|
@@ -1555,11 +1556,11 @@ class cex(Exchange, ImplicitAPI):
|
|
1555
1556
|
address = self.safe_string_2(addressObject, 'address', 'destination')
|
1556
1557
|
self.check_address(address)
|
1557
1558
|
return {
|
1559
|
+
'info': data,
|
1558
1560
|
'currency': code,
|
1561
|
+
'network': self.network_id_to_code(selectedNetworkId),
|
1559
1562
|
'address': address,
|
1560
1563
|
'tag': self.safe_string_2(addressObject, 'destinationTag', 'memo'),
|
1561
|
-
'network': self.network_id_to_code(selectedNetworkId),
|
1562
|
-
'info': data,
|
1563
1564
|
}
|
1564
1565
|
|
1565
1566
|
def nonce(self):
|
ccxt/async_support/coinbase.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.coinbase import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Account, Balances, Conversion, Currencies, Currency, Int, LedgerEntry, Market, MarketInterface, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
|
+
from ccxt.base.types import Account, Balances, Conversion, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market, MarketInterface, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -3715,7 +3715,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3715
3715
|
data = self.safe_dict(response, 'data', {})
|
3716
3716
|
return self.parse_transaction(data, currency)
|
3717
3717
|
|
3718
|
-
async def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
3718
|
+
async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
3719
3719
|
"""
|
3720
3720
|
fetch the deposit address for a currency associated with self account
|
3721
3721
|
:see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
|
@@ -3787,7 +3787,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3787
3787
|
addressStructures = self.parse_deposit_addresses(data, None, False)
|
3788
3788
|
return self.index_by(addressStructures, 'network')
|
3789
3789
|
|
3790
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
3790
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
3791
3791
|
#
|
3792
3792
|
# {
|
3793
3793
|
# id: '64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
|
@@ -3842,9 +3842,9 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3842
3842
|
return {
|
3843
3843
|
'info': depositAddress,
|
3844
3844
|
'currency': self.safe_currency_code(marketId, currency),
|
3845
|
+
'network': self.network_id_to_code(networkId, code),
|
3845
3846
|
'address': address,
|
3846
3847
|
'tag': self.safe_string(addressInfo, 'destination_tag'),
|
3847
|
-
'network': self.network_id_to_code(networkId, code),
|
3848
3848
|
}
|
3849
3849
|
|
3850
3850
|
async def deposit(self, code: str, amount: float, id: str, params={}):
|
@@ -1315,13 +1315,9 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1315
1315
|
# ...
|
1316
1316
|
# ]
|
1317
1317
|
#
|
1318
|
-
|
1319
|
-
for i in range(0, len(currencies)):
|
1320
|
-
currency = self.parse_currency(currencies[i])
|
1321
|
-
result[currency['code']] = currency
|
1322
|
-
return result
|
1318
|
+
return self.parse_currencies(currencies)
|
1323
1319
|
|
1324
|
-
def parse_currency(self, currency: dict):
|
1320
|
+
def parse_currency(self, currency: dict) -> Currency:
|
1325
1321
|
#
|
1326
1322
|
# {
|
1327
1323
|
# "asset_id":"1",
|
@@ -1335,7 +1331,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1335
1331
|
id = self.safe_string(currency, 'asset_name')
|
1336
1332
|
code = self.safe_currency_code(id)
|
1337
1333
|
statusId = self.safe_string(currency, 'status')
|
1338
|
-
return {
|
1334
|
+
return self.safe_currency_structure({
|
1339
1335
|
'id': id,
|
1340
1336
|
'name': code,
|
1341
1337
|
'code': code,
|
@@ -1348,7 +1344,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1348
1344
|
'fee': None,
|
1349
1345
|
'fees': None,
|
1350
1346
|
'limits': self.limits,
|
1351
|
-
}
|
1347
|
+
})
|
1352
1348
|
|
1353
1349
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
1354
1350
|
"""
|
ccxt/async_support/coinex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinex import ImplicitAPI
|
8
8
|
import asyncio
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, IsolatedBorrowRate, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, IsolatedBorrowRate, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, 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
|
@@ -79,8 +79,8 @@ class coinex(Exchange, ImplicitAPI):
|
|
79
79
|
'fetchCrossBorrowRates': False,
|
80
80
|
'fetchCurrencies': True,
|
81
81
|
'fetchDepositAddress': True,
|
82
|
-
'fetchDepositAddressByNetwork': False,
|
83
82
|
'fetchDepositAddresses': False,
|
83
|
+
'fetchDepositAddressesByNetwork': False,
|
84
84
|
'fetchDeposits': True,
|
85
85
|
'fetchDepositWithdrawFee': True,
|
86
86
|
'fetchDepositWithdrawFees': False,
|
@@ -3534,7 +3534,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3534
3534
|
data = self.safe_dict(response, 'data', {})
|
3535
3535
|
return self.parse_deposit_address(data, currency)
|
3536
3536
|
|
3537
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
3537
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
3538
3538
|
"""
|
3539
3539
|
fetch the deposit address for a currency associated with self account
|
3540
3540
|
:see: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-address
|
@@ -3578,7 +3578,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3578
3578
|
depositAddress['network'] = self.network_id_to_code(network, currency).upper()
|
3579
3579
|
return depositAddress
|
3580
3580
|
|
3581
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
3581
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
3582
3582
|
#
|
3583
3583
|
# {
|
3584
3584
|
# "address": "1P1JqozxioQwaqPwgMAQdNDYNyaVSqgARq",
|
@@ -3598,9 +3598,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
3598
3598
|
return {
|
3599
3599
|
'info': depositAddress,
|
3600
3600
|
'currency': self.safe_currency_code(None, currency),
|
3601
|
+
'network': None,
|
3601
3602
|
'address': address,
|
3602
3603
|
'tag': tag,
|
3603
|
-
'network': None,
|
3604
3604
|
}
|
3605
3605
|
|
3606
3606
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
ccxt/async_support/coinone.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinone import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
9
|
+
from ccxt.base.types import Balances, Currencies, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -52,7 +52,9 @@ class coinone(Exchange, ImplicitAPI):
|
|
52
52
|
'fetchCrossBorrowRate': False,
|
53
53
|
'fetchCrossBorrowRates': False,
|
54
54
|
'fetchCurrencies': True,
|
55
|
+
'fetchDepositAddress': False,
|
55
56
|
'fetchDepositAddresses': True,
|
57
|
+
'fetchDepositAddressesByNetwork': False,
|
56
58
|
'fetchFundingHistory': False,
|
57
59
|
'fetchFundingRate': False,
|
58
60
|
'fetchFundingRateHistory': False,
|
@@ -1021,7 +1023,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
1021
1023
|
#
|
1022
1024
|
return self.safe_order(response)
|
1023
1025
|
|
1024
|
-
async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1026
|
+
async def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
|
1025
1027
|
"""
|
1026
1028
|
fetch deposit addresses for multiple currencies and chain types
|
1027
1029
|
:param str[]|None codes: list of unified currency codes, default is None
|
@@ -1059,10 +1061,11 @@ class coinone(Exchange, ImplicitAPI):
|
|
1059
1061
|
depositAddress = self.safe_value(result, code)
|
1060
1062
|
if depositAddress is None:
|
1061
1063
|
depositAddress = {
|
1064
|
+
'info': value,
|
1062
1065
|
'currency': code,
|
1066
|
+
'network': None,
|
1063
1067
|
'address': None,
|
1064
1068
|
'tag': None,
|
1065
|
-
'info': value,
|
1066
1069
|
}
|
1067
1070
|
address = self.safe_string(depositAddress, 'address', value)
|
1068
1071
|
self.check_address(address)
|
ccxt/async_support/coinsph.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinsph import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -1740,7 +1740,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1740
1740
|
}
|
1741
1741
|
return self.safe_string(statuses, status, status)
|
1742
1742
|
|
1743
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1743
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1744
1744
|
"""
|
1745
1745
|
fetch the deposit address for a currency associated with self account
|
1746
1746
|
:see: https://coins-docs.github.io/rest-api/#deposit-address-user_data
|
@@ -1770,7 +1770,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1770
1770
|
#
|
1771
1771
|
return self.parse_deposit_address(response, currency)
|
1772
1772
|
|
1773
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1773
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1774
1774
|
#
|
1775
1775
|
# {
|
1776
1776
|
# "coin": "ETH",
|
@@ -1781,11 +1781,11 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1781
1781
|
currencyId = self.safe_string(depositAddress, 'coin')
|
1782
1782
|
parsedCurrency = self.safe_currency_code(currencyId, currency)
|
1783
1783
|
return {
|
1784
|
+
'info': depositAddress,
|
1784
1785
|
'currency': parsedCurrency,
|
1786
|
+
'network': None,
|
1785
1787
|
'address': self.safe_string(depositAddress, 'address'),
|
1786
1788
|
'tag': self.safe_string(depositAddress, 'addressTag'),
|
1787
|
-
'network': None,
|
1788
|
-
'info': depositAddress,
|
1789
1789
|
}
|
1790
1790
|
|
1791
1791
|
def url_encode_query(self, query={}):
|