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/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,
|
@@ -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
|
@@ -5248,7 +5248,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5248
5248
|
trades = self.add_pagination_cursor_to_result(response)
|
5249
5249
|
return self.parse_trades(trades, market, since, limit)
|
5250
5250
|
|
5251
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
5251
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
5252
5252
|
#
|
5253
5253
|
# {
|
5254
5254
|
# "chainType": "ERC20",
|
@@ -5263,14 +5263,14 @@ class bybit(Exchange, ImplicitAPI):
|
|
5263
5263
|
chain = self.safe_string(depositAddress, 'chain')
|
5264
5264
|
self.check_address(address)
|
5265
5265
|
return {
|
5266
|
+
'info': depositAddress,
|
5266
5267
|
'currency': code,
|
5268
|
+
'network': chain,
|
5267
5269
|
'address': address,
|
5268
5270
|
'tag': tag,
|
5269
|
-
'network': chain,
|
5270
|
-
'info': depositAddress,
|
5271
5271
|
}
|
5272
5272
|
|
5273
|
-
async def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
5273
|
+
async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
5274
5274
|
"""
|
5275
5275
|
fetch a dictionary of addresses for a currency, indexed by network
|
5276
5276
|
:see: https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
|
@@ -5312,7 +5312,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5312
5312
|
})
|
5313
5313
|
return self.index_by(parsed, 'network')
|
5314
5314
|
|
5315
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
5315
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
5316
5316
|
"""
|
5317
5317
|
fetch the deposit address for a currency associated with self account
|
5318
5318
|
: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={}):
|
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={}):
|
ccxt/async_support/cryptocom.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.cryptocom import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currency, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Account, Balances, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, CancellationRequest, 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
|
@@ -69,6 +69,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
69
69
|
'fetchCrossBorrowRates': False,
|
70
70
|
'fetchCurrencies': False,
|
71
71
|
'fetchDepositAddress': True,
|
72
|
+
'fetchDepositAddresses': False,
|
72
73
|
'fetchDepositAddressesByNetwork': True,
|
73
74
|
'fetchDeposits': True,
|
74
75
|
'fetchDepositsWithdrawals': False,
|
@@ -1601,7 +1602,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1601
1602
|
result = self.safe_dict(response, 'result')
|
1602
1603
|
return self.parse_transaction(result, currency)
|
1603
1604
|
|
1604
|
-
async def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
1605
|
+
async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
1605
1606
|
"""
|
1606
1607
|
fetch a dictionary of addresses for a currency, indexed by network
|
1607
1608
|
:see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address
|
@@ -1652,13 +1653,13 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1652
1653
|
result[network] = {
|
1653
1654
|
'info': value,
|
1654
1655
|
'currency': responseCode,
|
1656
|
+
'network': network,
|
1655
1657
|
'address': address,
|
1656
1658
|
'tag': tag,
|
1657
|
-
'network': network,
|
1658
1659
|
}
|
1659
1660
|
return result
|
1660
1661
|
|
1661
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1662
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1662
1663
|
"""
|
1663
1664
|
fetch the deposit address for a currency associated with self account
|
1664
1665
|
:see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address
|
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.currencycom import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, LedgerEntry, Leverage, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Int, LedgerEntry, Leverage, 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
|
@@ -1747,7 +1747,7 @@ class currencycom(Exchange, ImplicitAPI):
|
|
1747
1747
|
'shortLeverage': leverageValue,
|
1748
1748
|
}
|
1749
1749
|
|
1750
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1750
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1751
1751
|
"""
|
1752
1752
|
fetch the deposit address for a currency associated with self account
|
1753
1753
|
:see: https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getDepositAddressUsingGET
|
@@ -1766,16 +1766,16 @@ class currencycom(Exchange, ImplicitAPI):
|
|
1766
1766
|
#
|
1767
1767
|
return self.parse_deposit_address(response, currency)
|
1768
1768
|
|
1769
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1769
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1770
1770
|
address = self.safe_string(depositAddress, 'address')
|
1771
1771
|
self.check_address(address)
|
1772
1772
|
currency = self.safe_currency(None, currency)
|
1773
1773
|
return {
|
1774
|
+
'info': depositAddress,
|
1774
1775
|
'currency': currency['code'],
|
1776
|
+
'network': None,
|
1775
1777
|
'address': address,
|
1776
1778
|
'tag': None,
|
1777
|
-
'network': None,
|
1778
|
-
'info': depositAddress,
|
1779
1779
|
}
|
1780
1780
|
|
1781
1781
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
ccxt/async_support/delta.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.delta import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Greeks, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -51,6 +51,8 @@ class delta(Exchange, ImplicitAPI):
|
|
51
51
|
'fetchCurrencies': True,
|
52
52
|
'fetchDeposit': None,
|
53
53
|
'fetchDepositAddress': True,
|
54
|
+
'fetchDepositAddresses': False,
|
55
|
+
'fetchDepositAddressesByNetwork': False,
|
54
56
|
'fetchDeposits': None,
|
55
57
|
'fetchFundingHistory': False,
|
56
58
|
'fetchFundingRate': True,
|
@@ -2225,7 +2227,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2225
2227
|
'fee': None,
|
2226
2228
|
}, currency)
|
2227
2229
|
|
2228
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
2230
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2229
2231
|
"""
|
2230
2232
|
fetch the deposit address for a currency associated with self account
|
2231
2233
|
:param str code: unified currency code
|
@@ -2263,7 +2265,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2263
2265
|
result = self.safe_dict(response, 'result', {})
|
2264
2266
|
return self.parse_deposit_address(result, currency)
|
2265
2267
|
|
2266
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
2268
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
2267
2269
|
#
|
2268
2270
|
# {
|
2269
2271
|
# "id": 1915615,
|
@@ -2283,11 +2285,11 @@ class delta(Exchange, ImplicitAPI):
|
|
2283
2285
|
networkId = self.safe_string(depositAddress, 'network')
|
2284
2286
|
self.check_address(address)
|
2285
2287
|
return {
|
2288
|
+
'info': depositAddress,
|
2286
2289
|
'currency': self.safe_currency_code(marketId, currency),
|
2290
|
+
'network': self.network_id_to_code(networkId),
|
2287
2291
|
'address': address,
|
2288
2292
|
'tag': self.safe_string(depositAddress, 'memo'),
|
2289
|
-
'network': self.network_id_to_code(networkId),
|
2290
|
-
'info': depositAddress,
|
2291
2293
|
}
|
2292
2294
|
|
2293
2295
|
async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
ccxt/async_support/deribit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.deribit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, 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
|
@@ -65,6 +65,8 @@ class deribit(Exchange, ImplicitAPI):
|
|
65
65
|
'fetchCurrencies': True,
|
66
66
|
'fetchDeposit': False,
|
67
67
|
'fetchDepositAddress': True,
|
68
|
+
'fetchDepositAddresses': False,
|
69
|
+
'fetchDepositAddressesByNetwork': False,
|
68
70
|
'fetchDeposits': True,
|
69
71
|
'fetchDepositWithdrawFees': True,
|
70
72
|
'fetchFundingRate': True,
|
@@ -1019,7 +1021,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1019
1021
|
'info': response,
|
1020
1022
|
}
|
1021
1023
|
|
1022
|
-
async def fetch_deposit_address(self, code: str, params={}):
|
1024
|
+
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1023
1025
|
"""
|
1024
1026
|
fetch the deposit address for a currency associated with self account
|
1025
1027
|
:see: https://docs.deribit.com/#private-get_current_deposit_address
|
@@ -1054,11 +1056,11 @@ class deribit(Exchange, ImplicitAPI):
|
|
1054
1056
|
address = self.safe_string(result, 'address')
|
1055
1057
|
self.check_address(address)
|
1056
1058
|
return {
|
1059
|
+
'info': response,
|
1057
1060
|
'currency': code,
|
1061
|
+
'network': None,
|
1058
1062
|
'address': address,
|
1059
1063
|
'tag': None,
|
1060
|
-
'network': None,
|
1061
|
-
'info': response,
|
1062
1064
|
}
|
1063
1065
|
|
1064
1066
|
def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
|