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/binance.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.binance import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, Greeks, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, 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, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, 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
|
@@ -134,6 +134,7 @@ class binance(Exchange, ImplicitAPI):
|
|
134
134
|
'fetchMarketLeverageTiers': 'emulated',
|
135
135
|
'fetchMarkets': True,
|
136
136
|
'fetchMarkOHLCV': True,
|
137
|
+
'fetchMarkPrice': True,
|
137
138
|
'fetchMarkPrices': True,
|
138
139
|
'fetchMyLiquidations': True,
|
139
140
|
'fetchMySettlementHistory': True,
|
@@ -2661,11 +2662,16 @@ class binance(Exchange, ImplicitAPI):
|
|
2661
2662
|
apiBackup = self.safe_value(self.urls, 'apiBackup')
|
2662
2663
|
if apiBackup is not None:
|
2663
2664
|
return None
|
2664
|
-
promises = [self.sapiGetCapitalConfigGetall(params)
|
2665
|
+
promises = [self.sapiGetCapitalConfigGetall(params)]
|
2666
|
+
fetchMargins = self.safe_bool(self.options, 'fetchMargins', False)
|
2667
|
+
if fetchMargins:
|
2668
|
+
promises.append(self.sapiGetMarginAllPairs(params))
|
2665
2669
|
results = promises
|
2666
2670
|
responseCurrencies = results[0]
|
2667
|
-
|
2668
|
-
|
2671
|
+
marginablesById = None
|
2672
|
+
if fetchMargins:
|
2673
|
+
responseMarginables = results[1]
|
2674
|
+
marginablesById = self.index_by(responseMarginables, 'assetName')
|
2669
2675
|
result: dict = {}
|
2670
2676
|
for i in range(0, len(responseCurrencies)):
|
2671
2677
|
#
|
@@ -4108,10 +4114,41 @@ class binance(Exchange, ImplicitAPI):
|
|
4108
4114
|
raise NotSupported(self.id + ' fetchTickers() does not support ' + type + ' markets yet')
|
4109
4115
|
return self.parse_tickers(response, symbols)
|
4110
4116
|
|
4117
|
+
def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
|
4118
|
+
"""
|
4119
|
+
fetches mark price for the market
|
4120
|
+
:see: https://binance-docs.github.io/apidocs/futures/en/#mark-price
|
4121
|
+
:see: https://binance-docs.github.io/apidocs/delivery/en/#index-price-and-mark-price
|
4122
|
+
:param str symbol: unified symbol of the market to fetch the ticker for
|
4123
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4124
|
+
:param str [params.subType]: "linear" or "inverse"
|
4125
|
+
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
4126
|
+
"""
|
4127
|
+
self.load_markets()
|
4128
|
+
market = self.market(symbol)
|
4129
|
+
type = None
|
4130
|
+
type, params = self.handle_market_type_and_params('fetchMarkPrice', market, params, 'swap')
|
4131
|
+
subType = None
|
4132
|
+
subType, params = self.handle_sub_type_and_params('fetchMarkPrice', market, params, 'linear')
|
4133
|
+
request = {
|
4134
|
+
'symbol': market['id'],
|
4135
|
+
}
|
4136
|
+
response = None
|
4137
|
+
if self.is_linear(type, subType):
|
4138
|
+
response = self.fapiPublicGetPremiumIndex(self.extend(request, params))
|
4139
|
+
elif self.is_inverse(type, subType):
|
4140
|
+
response = self.dapiPublicGetPremiumIndex(self.extend(request, params))
|
4141
|
+
else:
|
4142
|
+
raise NotSupported(self.id + ' fetchMarkPrice() does not support ' + type + ' markets yet')
|
4143
|
+
if isinstance(response, list):
|
4144
|
+
return self.parse_ticker(self.safe_dict(response, 0, {}), market)
|
4145
|
+
return self.parse_ticker(response, market)
|
4146
|
+
|
4111
4147
|
def fetch_mark_prices(self, symbols: Strings = None, params={}) -> Tickers:
|
4112
4148
|
"""
|
4113
4149
|
fetches mark prices for multiple markets
|
4114
4150
|
:see: https://binance-docs.github.io/apidocs/futures/en/#mark-price
|
4151
|
+
:see: https://binance-docs.github.io/apidocs/delivery/en/#index-price-and-mark-price
|
4115
4152
|
:param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
4116
4153
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4117
4154
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -4121,9 +4158,9 @@ class binance(Exchange, ImplicitAPI):
|
|
4121
4158
|
symbols = self.market_symbols(symbols, None, True, True, True)
|
4122
4159
|
market = self.get_market_from_symbols(symbols)
|
4123
4160
|
type = None
|
4124
|
-
type, params = self.handle_market_type_and_params('
|
4161
|
+
type, params = self.handle_market_type_and_params('fetchMarkPrices', market, params, 'swap')
|
4125
4162
|
subType = None
|
4126
|
-
subType, params = self.handle_sub_type_and_params('
|
4163
|
+
subType, params = self.handle_sub_type_and_params('fetchMarkPrices', market, params, 'linear')
|
4127
4164
|
response = None
|
4128
4165
|
if self.is_linear(type, subType):
|
4129
4166
|
response = self.fapiPublicGetPremiumIndex(params)
|
@@ -8078,7 +8115,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8078
8115
|
rows = self.safe_list_2(response, 'rows', 'data', [])
|
8079
8116
|
return self.parse_transfers(rows, currency, since, limit)
|
8080
8117
|
|
8081
|
-
def fetch_deposit_address(self, code: str, params={}):
|
8118
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
8082
8119
|
"""
|
8083
8120
|
fetch the deposit address for a currency associated with self account
|
8084
8121
|
:see: https://developers.binance.com/docs/wallet/capital/deposite-address
|
@@ -8113,8 +8150,27 @@ class binance(Exchange, ImplicitAPI):
|
|
8113
8150
|
# }
|
8114
8151
|
# }
|
8115
8152
|
#
|
8153
|
+
return self.parse_deposit_address(response, currency)
|
8154
|
+
|
8155
|
+
def parse_deposit_address(self, response, currency: Currency = None) -> DepositAddress:
|
8156
|
+
#
|
8157
|
+
# {
|
8158
|
+
# "currency": "XRP",
|
8159
|
+
# "address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
|
8160
|
+
# "tag": "108618262",
|
8161
|
+
# "info": {
|
8162
|
+
# "coin": "XRP",
|
8163
|
+
# "address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
|
8164
|
+
# "tag": "108618262",
|
8165
|
+
# "url": "https://bithomp.com/explorer/rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh"
|
8166
|
+
# }
|
8167
|
+
# }
|
8168
|
+
#
|
8169
|
+
info = self.safe_dict(response, 'info', {})
|
8170
|
+
url = self.safe_string(info, 'url')
|
8116
8171
|
address = self.safe_string(response, 'address')
|
8117
|
-
|
8172
|
+
currencyId = self.safe_string(response, 'currency')
|
8173
|
+
code = self.safe_currency_code(currencyId, currency)
|
8118
8174
|
impliedNetwork = None
|
8119
8175
|
if url is not None:
|
8120
8176
|
reverseNetworks = self.safe_dict(self.options, 'reverseNetworks', {})
|
@@ -8137,11 +8193,11 @@ class binance(Exchange, ImplicitAPI):
|
|
8137
8193
|
tag = None
|
8138
8194
|
self.check_address(address)
|
8139
8195
|
return {
|
8196
|
+
'info': response,
|
8140
8197
|
'currency': code,
|
8198
|
+
'network': impliedNetwork,
|
8141
8199
|
'address': address,
|
8142
8200
|
'tag': tag,
|
8143
|
-
'network': impliedNetwork,
|
8144
|
-
'info': response,
|
8145
8201
|
}
|
8146
8202
|
|
8147
8203
|
def fetch_transaction_fees(self, codes: Strings = None, params={}):
|
ccxt/bingx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bingx import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import numbers
|
10
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -67,6 +67,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
67
67
|
'fetchClosedOrders': True,
|
68
68
|
'fetchCurrencies': True,
|
69
69
|
'fetchDepositAddress': True,
|
70
|
+
'fetchDepositAddresses': False,
|
70
71
|
'fetchDepositAddressesByNetwork': True,
|
71
72
|
'fetchDeposits': True,
|
72
73
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -80,6 +81,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
80
81
|
'fetchMarginMode': True,
|
81
82
|
'fetchMarkets': True,
|
82
83
|
'fetchMarkOHLCV': True,
|
84
|
+
'fetchMarkPrice': True,
|
83
85
|
'fetchMarkPrices': True,
|
84
86
|
'fetchMyLiquidations': True,
|
85
87
|
'fetchOHLCV': True,
|
@@ -1655,6 +1657,59 @@ class bingx(Exchange, ImplicitAPI):
|
|
1655
1657
|
tickers = self.safe_list(response, 'data')
|
1656
1658
|
return self.parse_tickers(tickers, symbols)
|
1657
1659
|
|
1660
|
+
def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
|
1661
|
+
"""
|
1662
|
+
fetches mark prices for the market
|
1663
|
+
:see: https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20and%20Funding%20Rate
|
1664
|
+
:param str symbol: unified symbol of the market to fetch the ticker for
|
1665
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1666
|
+
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
1667
|
+
"""
|
1668
|
+
self.load_markets()
|
1669
|
+
market = self.market(symbol)
|
1670
|
+
subType = None
|
1671
|
+
subType, params = self.handle_sub_type_and_params('fetchMarkPrice', market, params, 'linear')
|
1672
|
+
request = {
|
1673
|
+
'symbol': market['id'],
|
1674
|
+
}
|
1675
|
+
response = None
|
1676
|
+
if subType == 'inverse':
|
1677
|
+
response = self.cswapV1PublicGetMarketPremiumIndex(self.extend(request, params))
|
1678
|
+
#
|
1679
|
+
# {
|
1680
|
+
# "code": 0,
|
1681
|
+
# "msg": "",
|
1682
|
+
# "timestamp": 1728577213289,
|
1683
|
+
# "data": [
|
1684
|
+
# {
|
1685
|
+
# "symbol": "ETH-USD",
|
1686
|
+
# "lastFundingRate": "0.0001",
|
1687
|
+
# "markPrice": "2402.68",
|
1688
|
+
# "indexPrice": "2404.92",
|
1689
|
+
# "nextFundingTime": 1728604800000
|
1690
|
+
# }
|
1691
|
+
# ]
|
1692
|
+
# }
|
1693
|
+
#
|
1694
|
+
else:
|
1695
|
+
response = self.swapV2PublicGetQuotePremiumIndex(self.extend(request, params))
|
1696
|
+
#
|
1697
|
+
# {
|
1698
|
+
# "code": 0,
|
1699
|
+
# "msg": "",
|
1700
|
+
# "data": {
|
1701
|
+
# "symbol": "ETH-USDT",
|
1702
|
+
# "markPrice": "2408.40",
|
1703
|
+
# "indexPrice": "2409.62",
|
1704
|
+
# "lastFundingRate": "0.00009900",
|
1705
|
+
# "nextFundingTime": 1728604800000
|
1706
|
+
# }
|
1707
|
+
# }
|
1708
|
+
#
|
1709
|
+
if isinstance(response['data'], list):
|
1710
|
+
return self.parse_ticker(self.safe_dict(response['data'], 0, {}), market)
|
1711
|
+
return self.parse_ticker(response['data'], market)
|
1712
|
+
|
1658
1713
|
def fetch_mark_prices(self, symbols: Strings = None, params={}) -> Tickers:
|
1659
1714
|
"""
|
1660
1715
|
fetches mark prices for multiple markets
|
@@ -4170,7 +4225,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4170
4225
|
'status': status,
|
4171
4226
|
}
|
4172
4227
|
|
4173
|
-
def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
4228
|
+
def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
4174
4229
|
"""
|
4175
4230
|
fetch the deposit addresses for a currency associated with self account
|
4176
4231
|
:see: https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
|
@@ -4211,7 +4266,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4211
4266
|
parsed = self.parse_deposit_addresses(data, [currency['code']], False)
|
4212
4267
|
return self.index_by(parsed, 'network')
|
4213
4268
|
|
4214
|
-
def fetch_deposit_address(self, code: str, params={}):
|
4269
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
4215
4270
|
"""
|
4216
4271
|
fetch the deposit address for a currency associated with self account
|
4217
4272
|
:see: https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
|
@@ -4235,7 +4290,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4235
4290
|
key = self.safe_string(keys, 0)
|
4236
4291
|
return self.safe_dict(addressStructures, key)
|
4237
4292
|
|
4238
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
4293
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
4239
4294
|
#
|
4240
4295
|
# {
|
4241
4296
|
# "coinId": "799",
|
@@ -4265,11 +4320,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
4265
4320
|
address = '0x' + address
|
4266
4321
|
self.check_address(address)
|
4267
4322
|
return {
|
4323
|
+
'info': depositAddress,
|
4268
4324
|
'currency': code,
|
4325
|
+
'network': networkCode,
|
4269
4326
|
'address': address,
|
4270
4327
|
'tag': tag,
|
4271
|
-
'network': networkCode,
|
4272
|
-
'info': depositAddress,
|
4273
4328
|
}
|
4274
4329
|
|
4275
4330
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
ccxt/bit2c.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bit2c import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees
|
9
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -48,6 +48,8 @@ class bit2c(Exchange, ImplicitAPI):
|
|
48
48
|
'fetchCrossBorrowRate': False,
|
49
49
|
'fetchCrossBorrowRates': False,
|
50
50
|
'fetchDepositAddress': True,
|
51
|
+
'fetchDepositAddresses': False,
|
52
|
+
'fetchDepositAddressesByNetwork': False,
|
51
53
|
'fetchFundingHistory': False,
|
52
54
|
'fetchFundingRate': False,
|
53
55
|
'fetchFundingRateHistory': False,
|
@@ -779,7 +781,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
779
781
|
def is_fiat(self, code):
|
780
782
|
return code == 'NIS'
|
781
783
|
|
782
|
-
def fetch_deposit_address(self, code: str, params={}):
|
784
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
783
785
|
"""
|
784
786
|
fetch the deposit address for a currency associated with self account
|
785
787
|
:see: https://bit2c.co.il/home/api#addc
|
@@ -803,7 +805,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
803
805
|
#
|
804
806
|
return self.parse_deposit_address(response, currency)
|
805
807
|
|
806
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
808
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
807
809
|
#
|
808
810
|
# {
|
809
811
|
# "address": "0xf14b94518d74aff2b1a6d3429471bcfcd3881d42",
|
@@ -814,11 +816,11 @@ class bit2c(Exchange, ImplicitAPI):
|
|
814
816
|
self.check_address(address)
|
815
817
|
code = self.safe_currency_code(None, currency)
|
816
818
|
return {
|
819
|
+
'info': depositAddress,
|
817
820
|
'currency': code,
|
818
821
|
'network': None,
|
819
822
|
'address': address,
|
820
823
|
'tag': None,
|
821
|
-
'info': depositAddress,
|
822
824
|
}
|
823
825
|
|
824
826
|
def nonce(self):
|
ccxt/bitbank.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitbank import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, 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
|
@@ -46,6 +46,8 @@ class bitbank(Exchange, ImplicitAPI):
|
|
46
46
|
'fetchCrossBorrowRate': False,
|
47
47
|
'fetchCrossBorrowRates': False,
|
48
48
|
'fetchDepositAddress': True,
|
49
|
+
'fetchDepositAddresses': False,
|
50
|
+
'fetchDepositAddressesByNetwork': False,
|
49
51
|
'fetchFundingHistory': False,
|
50
52
|
'fetchFundingRate': False,
|
51
53
|
'fetchFundingRateHistory': False,
|
@@ -785,7 +787,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
785
787
|
trades = self.safe_list(data, 'trades', [])
|
786
788
|
return self.parse_trades(trades, market, since, limit)
|
787
789
|
|
788
|
-
def fetch_deposit_address(self, code: str, params={}):
|
790
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
789
791
|
"""
|
790
792
|
fetch the deposit address for a currency associated with self account
|
791
793
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-withdrawal-accounts
|
@@ -805,11 +807,11 @@ class bitbank(Exchange, ImplicitAPI):
|
|
805
807
|
firstAccount = self.safe_value(accounts, 0, {})
|
806
808
|
address = self.safe_string(firstAccount, 'address')
|
807
809
|
return {
|
810
|
+
'info': response,
|
808
811
|
'currency': currency,
|
812
|
+
'network': None,
|
809
813
|
'address': address,
|
810
814
|
'tag': None,
|
811
|
-
'network': None,
|
812
|
-
'info': response,
|
813
815
|
}
|
814
816
|
|
815
817
|
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
ccxt/bitbns.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitbns 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, 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 ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -41,6 +41,8 @@ class bitbns(Exchange, ImplicitAPI):
|
|
41
41
|
'createOrder': True,
|
42
42
|
'fetchBalance': True,
|
43
43
|
'fetchDepositAddress': True,
|
44
|
+
'fetchDepositAddresses': False,
|
45
|
+
'fetchDepositAddressesByNetwork': False,
|
44
46
|
'fetchDeposits': True,
|
45
47
|
'fetchFundingHistory': False,
|
46
48
|
'fetchFundingRate': False,
|
@@ -1065,7 +1067,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
1065
1067
|
'fee': fee,
|
1066
1068
|
}
|
1067
1069
|
|
1068
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1070
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1069
1071
|
"""
|
1070
1072
|
fetch the deposit address for a currency associated with self account
|
1071
1073
|
:param str code: unified currency code
|
@@ -1093,11 +1095,11 @@ class bitbns(Exchange, ImplicitAPI):
|
|
1093
1095
|
tag = self.safe_string(data, 'tag')
|
1094
1096
|
self.check_address(address)
|
1095
1097
|
return {
|
1098
|
+
'info': response,
|
1096
1099
|
'currency': code,
|
1100
|
+
'network': None,
|
1097
1101
|
'address': address,
|
1098
1102
|
'tag': tag,
|
1099
|
-
'network': None,
|
1100
|
-
'info': response,
|
1101
1103
|
}
|
1102
1104
|
|
1103
1105
|
def nonce(self):
|
ccxt/bitfinex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex 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, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, 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
|
@@ -54,6 +54,8 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
54
54
|
'fetchBalance': True,
|
55
55
|
'fetchClosedOrders': True,
|
56
56
|
'fetchDepositAddress': True,
|
57
|
+
'fetchDepositAddresses': False,
|
58
|
+
'fetchDepositAddressesByNetwork': False,
|
57
59
|
'fetchDeposits': False,
|
58
60
|
'fetchDepositsWithdrawals': True,
|
59
61
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -1361,7 +1363,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1361
1363
|
}
|
1362
1364
|
return self.fetch_deposit_address(code, self.extend(request, params))
|
1363
1365
|
|
1364
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1366
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1365
1367
|
"""
|
1366
1368
|
fetch the deposit address for a currency associated with self account
|
1367
1369
|
:see: https://docs.bitfinex.com/v1/reference/rest-auth-deposit
|
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={}):
|