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/bitfinex2.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex2 import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, LedgerEntry, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, LedgerEntry, MarginModification, Market, Num, Order, OrderBook, OrderRequest, 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
|
@@ -80,6 +80,8 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
80
80
|
'fetchCrossBorrowRates': False,
|
81
81
|
'fetchCurrencies': True,
|
82
82
|
'fetchDepositAddress': True,
|
83
|
+
'fetchDepositAddresses': False,
|
84
|
+
'fetchDepositAddressesByNetwork': False,
|
83
85
|
'fetchDepositsWithdrawals': True,
|
84
86
|
'fetchFundingHistory': False,
|
85
87
|
'fetchFundingRate': 'emulated', # emulated in exchange
|
@@ -2089,7 +2091,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2089
2091
|
}
|
2090
2092
|
return self.fetch_deposit_address(code, self.extend(request, params))
|
2091
2093
|
|
2092
|
-
def fetch_deposit_address(self, code: str, params={}):
|
2094
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2093
2095
|
"""
|
2094
2096
|
fetch the deposit address for a currency associated with self account
|
2095
2097
|
:see: https://docs.bitfinex.com/reference/rest-auth-deposit-address
|
ccxt/bitget.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bitget import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, FundingHistory, Int, IsolatedBorrowRate, LedgerEntry, Leverage, LeverageTier, Liquidation, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, FundingHistory, Int, IsolatedBorrowRate, LedgerEntry, Leverage, LeverageTier, Liquidation, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, 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
|
@@ -95,6 +95,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
95
95
|
'fetchDeposit': False,
|
96
96
|
'fetchDepositAddress': True,
|
97
97
|
'fetchDepositAddresses': False,
|
98
|
+
'fetchDepositAddressesByNetwork': False,
|
98
99
|
'fetchDeposits': True,
|
99
100
|
'fetchDepositsWithdrawals': False,
|
100
101
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -2358,7 +2359,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2358
2359
|
}
|
2359
2360
|
return self.safe_string(statuses, status, status)
|
2360
2361
|
|
2361
|
-
def fetch_deposit_address(self, code: str, params={}):
|
2362
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2362
2363
|
"""
|
2363
2364
|
fetch the deposit address for a currency associated with self account
|
2364
2365
|
:see: https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address
|
@@ -2396,7 +2397,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2396
2397
|
data = self.safe_dict(response, 'data', {})
|
2397
2398
|
return self.parse_deposit_address(data, currency)
|
2398
2399
|
|
2399
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
2400
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
2400
2401
|
#
|
2401
2402
|
# {
|
2402
2403
|
# "coin": "BTC",
|
@@ -2413,11 +2414,11 @@ class bitget(Exchange, ImplicitAPI):
|
|
2413
2414
|
if networkId is not None:
|
2414
2415
|
network = self.network_id_to_code(networkId, parsedCurrency)
|
2415
2416
|
return {
|
2417
|
+
'info': depositAddress,
|
2416
2418
|
'currency': parsedCurrency,
|
2419
|
+
'network': network,
|
2417
2420
|
'address': self.safe_string(depositAddress, 'address'),
|
2418
2421
|
'tag': self.safe_string(depositAddress, 'tag'),
|
2419
|
-
'network': network,
|
2420
|
-
'info': depositAddress,
|
2421
2422
|
}
|
2422
2423
|
|
2423
2424
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
ccxt/bitmart.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposit_address(self, code: str, params={}):
|
3210
|
+
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
|
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
ccxt/bitmex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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 self.privatePostPositionIsolate(self.extend(request, params))
|
2507
2507
|
|
2508
|
-
def fetch_deposit_address(self, code: str, params={}):
|
2508
|
+
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/bitso.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1251
|
+
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
|
def fetch_transaction_fees(self, codes: Strings = None, params={}):
|
ccxt/bitstamp.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1988
|
+
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
|
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
ccxt/bitvavo.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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,
|
@@ -998,7 +1000,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
998
1000
|
#
|
999
1001
|
return self.parse_balance(response)
|
1000
1002
|
|
1001
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1003
|
+
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={}):
|
ccxt/blockchaincom.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.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 = self.privateGetFills(self.extend(request, params))
|
771
773
|
return self.parse_trades(trades, market, since, limit, params) # need to define
|
772
774
|
|
773
|
-
def fetch_deposit_address(self, code: str, params={}):
|
775
|
+
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/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
|
+
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
|
+
self.load_markets()
|
579
|
+
market = self.market(symbol)
|
580
|
+
request = {
|
581
|
+
'symbol': market['id'],
|
582
|
+
}
|
583
|
+
response = 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
|
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/bybit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bybit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
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
|
9
|
+
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
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -5247,7 +5247,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5247
5247
|
trades = self.add_pagination_cursor_to_result(response)
|
5248
5248
|
return self.parse_trades(trades, market, since, limit)
|
5249
5249
|
|
5250
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
5250
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
5251
5251
|
#
|
5252
5252
|
# {
|
5253
5253
|
# "chainType": "ERC20",
|
@@ -5262,14 +5262,14 @@ class bybit(Exchange, ImplicitAPI):
|
|
5262
5262
|
chain = self.safe_string(depositAddress, 'chain')
|
5263
5263
|
self.check_address(address)
|
5264
5264
|
return {
|
5265
|
+
'info': depositAddress,
|
5265
5266
|
'currency': code,
|
5267
|
+
'network': chain,
|
5266
5268
|
'address': address,
|
5267
5269
|
'tag': tag,
|
5268
|
-
'network': chain,
|
5269
|
-
'info': depositAddress,
|
5270
5270
|
}
|
5271
5271
|
|
5272
|
-
def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
5272
|
+
def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
5273
5273
|
"""
|
5274
5274
|
fetch a dictionary of addresses for a currency, indexed by network
|
5275
5275
|
:see: https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
|
@@ -5311,7 +5311,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5311
5311
|
})
|
5312
5312
|
return self.index_by(parsed, 'network')
|
5313
5313
|
|
5314
|
-
def fetch_deposit_address(self, code: str, params={}):
|
5314
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
5315
5315
|
"""
|
5316
5316
|
fetch the deposit address for a currency associated with self account
|
5317
5317
|
:see: https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
|
ccxt/cex.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.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 = self.privatePostCancelReplaceOrderPair(self.extend(request, params))
|
1512
1513
|
return self.parse_order(response, market)
|
1513
1514
|
|
1514
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1515
|
+
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/coinbase.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinbase import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
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
|
9
|
+
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
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -3714,7 +3714,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3714
3714
|
data = self.safe_dict(response, 'data', {})
|
3715
3715
|
return self.parse_transaction(data, currency)
|
3716
3716
|
|
3717
|
-
def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
3717
|
+
def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
3718
3718
|
"""
|
3719
3719
|
fetch the deposit address for a currency associated with self account
|
3720
3720
|
:see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
|
@@ -3786,7 +3786,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3786
3786
|
addressStructures = self.parse_deposit_addresses(data, None, False)
|
3787
3787
|
return self.index_by(addressStructures, 'network')
|
3788
3788
|
|
3789
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
3789
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
3790
3790
|
#
|
3791
3791
|
# {
|
3792
3792
|
# id: '64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
|
@@ -3841,9 +3841,9 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3841
3841
|
return {
|
3842
3842
|
'info': depositAddress,
|
3843
3843
|
'currency': self.safe_currency_code(marketId, currency),
|
3844
|
+
'network': self.network_id_to_code(networkId, code),
|
3844
3845
|
'address': address,
|
3845
3846
|
'tag': self.safe_string(addressInfo, 'destination_tag'),
|
3846
|
-
'network': self.network_id_to_code(networkId, code),
|
3847
3847
|
}
|
3848
3848
|
|
3849
3849
|
def deposit(self, code: str, amount: float, id: str, params={}):
|
ccxt/coinex.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinex import ImplicitAPI
|
8
|
-
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
|
8
|
+
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
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -78,8 +78,8 @@ class coinex(Exchange, ImplicitAPI):
|
|
78
78
|
'fetchCrossBorrowRates': False,
|
79
79
|
'fetchCurrencies': True,
|
80
80
|
'fetchDepositAddress': True,
|
81
|
-
'fetchDepositAddressByNetwork': False,
|
82
81
|
'fetchDepositAddresses': False,
|
82
|
+
'fetchDepositAddressesByNetwork': False,
|
83
83
|
'fetchDeposits': True,
|
84
84
|
'fetchDepositWithdrawFee': True,
|
85
85
|
'fetchDepositWithdrawFees': False,
|
@@ -3533,7 +3533,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3533
3533
|
data = self.safe_dict(response, 'data', {})
|
3534
3534
|
return self.parse_deposit_address(data, currency)
|
3535
3535
|
|
3536
|
-
def fetch_deposit_address(self, code: str, params={}):
|
3536
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
3537
3537
|
"""
|
3538
3538
|
fetch the deposit address for a currency associated with self account
|
3539
3539
|
:see: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-address
|
@@ -3577,7 +3577,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3577
3577
|
depositAddress['network'] = self.network_id_to_code(network, currency).upper()
|
3578
3578
|
return depositAddress
|
3579
3579
|
|
3580
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
3580
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
3581
3581
|
#
|
3582
3582
|
# {
|
3583
3583
|
# "address": "1P1JqozxioQwaqPwgMAQdNDYNyaVSqgARq",
|
@@ -3597,9 +3597,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
3597
3597
|
return {
|
3598
3598
|
'info': depositAddress,
|
3599
3599
|
'currency': self.safe_currency_code(None, currency),
|
3600
|
+
'network': None,
|
3600
3601
|
'address': address,
|
3601
3602
|
'tag': tag,
|
3602
|
-
'network': None,
|
3603
3603
|
}
|
3604
3604
|
|
3605
3605
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
ccxt/coinone.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1026
|
+
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/coinsph.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1743
|
+
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={}):
|