ccxt 4.4.14__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 +16 -6
- 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 +8 -7
- 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/vertex.py +8 -0
- 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 +16 -6
- 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 +8 -7
- 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/binance.py +1 -1
- ccxt/pro/upbit.py +42 -1
- ccxt/pro/vertex.py +11 -0
- 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/vertex.py +8 -0
- 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.14.dist-info → ccxt-4.4.16.dist-info}/METADATA +4 -4
- {ccxt-4.4.14.dist-info → ccxt-4.4.16.dist-info}/RECORD +150 -150
- {ccxt-4.4.14.dist-info → ccxt-4.4.16.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.14.dist-info → ccxt-4.4.16.dist-info}/WHEEL +0 -0
- {ccxt-4.4.14.dist-info → ccxt-4.4.16.dist-info}/top_level.txt +0 -0
ccxt/cryptocom.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
1605
|
+
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
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1662
|
+
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
|
ccxt/currencycom.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1750
|
+
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/delta.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposit_address(self, code: str, params={}):
|
2230
|
+
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
|
def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
ccxt/deribit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1024
|
+
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:
|
ccxt/digifinex.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.digifinex import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Int, LedgerEntry, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, DepositAddress, Int, LedgerEntry, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, 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,8 @@ class digifinex(Exchange, ImplicitAPI):
|
|
67
67
|
'fetchCrossBorrowRates': True,
|
68
68
|
'fetchCurrencies': True,
|
69
69
|
'fetchDepositAddress': True,
|
70
|
+
'fetchDepositAddresses': False,
|
71
|
+
'fetchDepositAddressesByNetwork': False,
|
70
72
|
'fetchDeposits': True,
|
71
73
|
'fetchDepositWithdrawFee': 'emulated',
|
72
74
|
'fetchDepositWithdrawFees': True,
|
@@ -2516,7 +2518,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2516
2518
|
ledger = self.safe_value(data, 'finance', [])
|
2517
2519
|
return self.parse_ledger(ledger, currency, since, limit)
|
2518
2520
|
|
2519
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
2521
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
2520
2522
|
#
|
2521
2523
|
# {
|
2522
2524
|
# "addressTag":"",
|
@@ -2532,12 +2534,12 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2532
2534
|
return {
|
2533
2535
|
'info': depositAddress,
|
2534
2536
|
'currency': code,
|
2537
|
+
'network': None,
|
2535
2538
|
'address': address,
|
2536
2539
|
'tag': tag,
|
2537
|
-
'network': None,
|
2538
2540
|
}
|
2539
2541
|
|
2540
|
-
def fetch_deposit_address(self, code: str, params={}):
|
2542
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2541
2543
|
"""
|
2542
2544
|
fetch the deposit address for a currency associated with self account
|
2543
2545
|
:param str code: unified currency code
|
ccxt/exmo.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.exmo import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, MarginModification, 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
|
@@ -54,6 +54,8 @@ class exmo(Exchange, ImplicitAPI):
|
|
54
54
|
'fetchCurrencies': True,
|
55
55
|
'fetchDeposit': True,
|
56
56
|
'fetchDepositAddress': True,
|
57
|
+
'fetchDepositAddresses': False,
|
58
|
+
'fetchDepositAddressesByNetwork': False,
|
57
59
|
'fetchDeposits': True,
|
58
60
|
'fetchDepositsWithdrawals': True,
|
59
61
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -1943,7 +1945,7 @@ class exmo(Exchange, ImplicitAPI):
|
|
1943
1945
|
response = self.privatePostMarginUserOrderUpdate(self.extend(request, params))
|
1944
1946
|
return self.parse_order(response)
|
1945
1947
|
|
1946
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1948
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1947
1949
|
"""
|
1948
1950
|
fetch the deposit address for a currency associated with self account
|
1949
1951
|
:see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#c8f9ced9-7ab6-4383-a6a4-bc54469ba60e
|
@@ -1970,11 +1972,11 @@ class exmo(Exchange, ImplicitAPI):
|
|
1970
1972
|
tag = addressAndTag[1]
|
1971
1973
|
self.check_address(address)
|
1972
1974
|
return {
|
1975
|
+
'info': response,
|
1973
1976
|
'currency': code,
|
1977
|
+
'network': None,
|
1974
1978
|
'address': address,
|
1975
1979
|
'tag': tag,
|
1976
|
-
'network': None,
|
1977
|
-
'info': response,
|
1978
1980
|
}
|
1979
1981
|
|
1980
1982
|
def get_market_from_trades(self, trades):
|
ccxt/gate.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.gate import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Greeks, Int, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, 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, Currencies, Currency, DepositAddress, FundingHistory, Greeks, Int, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, 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
|
@@ -124,6 +124,8 @@ class gate(Exchange, ImplicitAPI):
|
|
124
124
|
'fetchCrossBorrowRates': False,
|
125
125
|
'fetchCurrencies': True,
|
126
126
|
'fetchDepositAddress': True,
|
127
|
+
'fetchDepositAddresses': False,
|
128
|
+
'fetchDepositAddressesByNetwork': False,
|
127
129
|
'fetchDeposits': True,
|
128
130
|
'fetchDepositWithdrawFee': 'emulated',
|
129
131
|
'fetchDepositWithdrawFees': True,
|
@@ -1884,7 +1886,7 @@ class gate(Exchange, ImplicitAPI):
|
|
1884
1886
|
}
|
1885
1887
|
return result
|
1886
1888
|
|
1887
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1889
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1888
1890
|
"""
|
1889
1891
|
fetch the deposit address for a currency associated with self account
|
1890
1892
|
:see: https://www.gate.io/docs/developers/apiv4/en/#generate-currency-deposit-address
|
@@ -1949,11 +1951,10 @@ class gate(Exchange, ImplicitAPI):
|
|
1949
1951
|
self.check_address(address)
|
1950
1952
|
return {
|
1951
1953
|
'info': response,
|
1952
|
-
'code': code, # kept here for backward-compatibility, but will be removed soon
|
1953
1954
|
'currency': code,
|
1955
|
+
'network': network,
|
1954
1956
|
'address': address,
|
1955
1957
|
'tag': tag,
|
1956
|
-
'network': network,
|
1957
1958
|
}
|
1958
1959
|
|
1959
1960
|
def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
ccxt/gemini.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.gemini 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
|
@@ -61,6 +61,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
61
61
|
'fetchCrossBorrowRates': False,
|
62
62
|
'fetchCurrencies': True,
|
63
63
|
'fetchDepositAddress': True,
|
64
|
+
'fetchDepositAddresses': False,
|
64
65
|
'fetchDepositAddressesByNetwork': True,
|
65
66
|
'fetchDepositsWithdrawals': True,
|
66
67
|
'fetchFundingHistory': False,
|
@@ -1680,7 +1681,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1680
1681
|
'info': depositAddress,
|
1681
1682
|
}
|
1682
1683
|
|
1683
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1684
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1684
1685
|
"""
|
1685
1686
|
:see: https://docs.gemini.com/rest-api/#get-deposit-addresses
|
1686
1687
|
fetch the deposit address for a currency associated with self account
|
@@ -1696,7 +1697,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1696
1697
|
networkGroup = self.index_by(self.safe_value(groupedByNetwork, networkCode), 'currency')
|
1697
1698
|
return self.safe_value(networkGroup, code)
|
1698
1699
|
|
1699
|
-
def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
1700
|
+
def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
1700
1701
|
"""
|
1701
1702
|
fetch a dictionary of addresses for a currency, indexed by network
|
1702
1703
|
:see: https://docs.gemini.com/rest-api/#get-deposit-addresses
|
ccxt/hashkey.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.hashkey import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, Int, LastPrice, LastPrices, LedgerEntry, Leverage, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, DepositAddress, Int, LastPrice, LastPrices, LedgerEntry, Leverage, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, 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
|
@@ -90,6 +90,8 @@ class hashkey(Exchange, ImplicitAPI):
|
|
90
90
|
'fetchConvertTradeHistory': False,
|
91
91
|
'fetchCurrencies': True,
|
92
92
|
'fetchDepositAddress': True,
|
93
|
+
'fetchDepositAddresses': False,
|
94
|
+
'fetchDepositAddressesByNetwork': False,
|
93
95
|
'fetchDeposits': True,
|
94
96
|
'fetchDepositsWithdrawals': False,
|
95
97
|
'fetchFundingHistory': False,
|
@@ -1716,7 +1718,7 @@ class hashkey(Exchange, ImplicitAPI):
|
|
1716
1718
|
result[code] = account
|
1717
1719
|
return self.safe_balance(result)
|
1718
1720
|
|
1719
|
-
def fetch_deposit_address(self, code: str, params={}):
|
1721
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1720
1722
|
"""
|
1721
1723
|
fetch the deposit address for a currency associated with self account
|
1722
1724
|
:see: https://hashkeyglobal-apidoc.readme.io/reference/get-deposit-address
|
@@ -1752,7 +1754,7 @@ class hashkey(Exchange, ImplicitAPI):
|
|
1752
1754
|
depositAddress['network'] = networkCode
|
1753
1755
|
return depositAddress
|
1754
1756
|
|
1755
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1757
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1756
1758
|
#
|
1757
1759
|
# {
|
1758
1760
|
# "canDeposit": True,
|
@@ -1771,11 +1773,11 @@ class hashkey(Exchange, ImplicitAPI):
|
|
1771
1773
|
if tag == '':
|
1772
1774
|
tag = None
|
1773
1775
|
return {
|
1776
|
+
'info': depositAddress,
|
1774
1777
|
'currency': currency['code'],
|
1778
|
+
'network': None,
|
1775
1779
|
'address': address,
|
1776
1780
|
'tag': tag,
|
1777
|
-
'network': None,
|
1778
|
-
'info': depositAddress,
|
1779
1781
|
}
|
1780
1782
|
|
1781
1783
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
ccxt/hitbtc.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.hitbtc import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Leverage, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, 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
|
@@ -66,6 +66,8 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
66
66
|
'fetchCrossBorrowRates': False,
|
67
67
|
'fetchCurrencies': True,
|
68
68
|
'fetchDepositAddress': True,
|
69
|
+
'fetchDepositAddresses': False,
|
70
|
+
'fetchDepositAddressesByNetwork': False,
|
69
71
|
'fetchDeposits': True,
|
70
72
|
'fetchDepositsWithdrawals': True,
|
71
73
|
'fetchDepositWithdrawFee': 'emulated',
|
@@ -948,7 +950,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
948
950
|
'info': response,
|
949
951
|
}
|
950
952
|
|
951
|
-
def fetch_deposit_address(self, code: str, params={}):
|
953
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
952
954
|
"""
|
953
955
|
fetch the deposit address for a currency associated with self account
|
954
956
|
:see: https://api.hitbtc.com/#get-deposit-crypto-address
|
@@ -979,11 +981,10 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
979
981
|
parsedCode = self.safe_currency_code(currencyId)
|
980
982
|
return {
|
981
983
|
'info': response,
|
982
|
-
'address': address,
|
983
|
-
'tag': tag,
|
984
|
-
'code': parsedCode, # kept here for backward-compatibility, but will be removed soon
|
985
984
|
'currency': parsedCode,
|
986
985
|
'network': None,
|
986
|
+
'address': address,
|
987
|
+
'tag': tag,
|
987
988
|
}
|
988
989
|
|
989
990
|
def parse_balance(self, response) -> Balances:
|
ccxt/hollaex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.hollaex 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 AuthenticationError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -59,6 +59,7 @@ class hollaex(Exchange, ImplicitAPI):
|
|
59
59
|
'fetchCurrencies': True,
|
60
60
|
'fetchDepositAddress': 'emulated',
|
61
61
|
'fetchDepositAddresses': True,
|
62
|
+
'fetchDepositAddressesByNetwork': False,
|
62
63
|
'fetchDeposits': True,
|
63
64
|
'fetchFundingHistory': False,
|
64
65
|
'fetchFundingRate': False,
|
@@ -1270,7 +1271,7 @@ class hollaex(Exchange, ImplicitAPI):
|
|
1270
1271
|
data = self.safe_list(response, 'data', [])
|
1271
1272
|
return self.parse_trades(data, market, since, limit)
|
1272
1273
|
|
1273
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1274
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1274
1275
|
#
|
1275
1276
|
# {
|
1276
1277
|
# "currency":"usdt",
|
@@ -1292,14 +1293,14 @@ class hollaex(Exchange, ImplicitAPI):
|
|
1292
1293
|
currency = self.safe_currency(currencyId, currency)
|
1293
1294
|
network = self.safe_string(depositAddress, 'network')
|
1294
1295
|
return {
|
1296
|
+
'info': depositAddress,
|
1295
1297
|
'currency': currency['code'],
|
1298
|
+
'network': network,
|
1296
1299
|
'address': address,
|
1297
1300
|
'tag': tag,
|
1298
|
-
'network': network,
|
1299
|
-
'info': depositAddress,
|
1300
1301
|
}
|
1301
1302
|
|
1302
|
-
def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1303
|
+
def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
|
1303
1304
|
"""
|
1304
1305
|
fetch deposit addresses for multiple currencies and chain types
|
1305
1306
|
:see: https://apidocs.hollaex.com/#get-user
|
ccxt/htx.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.htx import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, 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
|
@@ -1248,7 +1248,7 @@ class htx(Exchange, ImplicitAPI):
|
|
1248
1248
|
'SBTC': 'SUPERBITCOIN',
|
1249
1249
|
'SOUL': 'SOULSAVER',
|
1250
1250
|
'BIFI': 'BITCOINFILE', # conflict with Beefy.Finance https://github.com/ccxt/ccxt/issues/8706
|
1251
|
-
'FUD': 'FTX Users
|
1251
|
+
'FUD': 'FTX Users Debt',
|
1252
1252
|
},
|
1253
1253
|
})
|
1254
1254
|
|
@@ -5778,7 +5778,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5778
5778
|
'info': depositAddress,
|
5779
5779
|
}
|
5780
5780
|
|
5781
|
-
def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
5781
|
+
def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
5782
5782
|
"""
|
5783
5783
|
:see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
|
5784
5784
|
fetch a dictionary of addresses for a currency, indexed by network
|
@@ -5809,10 +5809,10 @@ class htx(Exchange, ImplicitAPI):
|
|
5809
5809
|
parsed = self.parse_deposit_addresses(data, [currency['code']], False)
|
5810
5810
|
return self.index_by(parsed, 'network')
|
5811
5811
|
|
5812
|
-
def fetch_deposit_address(self, code: str, params={}):
|
5812
|
+
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
5813
5813
|
"""
|
5814
|
-
:see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
|
5815
5814
|
fetch the deposit address for a currency associated with self account
|
5815
|
+
:see: https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
|
5816
5816
|
:param str code: unified currency code
|
5817
5817
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5818
5818
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -6531,6 +6531,8 @@ class htx(Exchange, ImplicitAPI):
|
|
6531
6531
|
def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6532
6532
|
"""
|
6533
6533
|
fetch the interest owed by the user for borrowing currency for margin trading
|
6534
|
+
:see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-cross
|
6535
|
+
:see: https://huobiapi.github.io/docs/spot/v1/en/#search-past-margin-orders-isolated
|
6534
6536
|
:param str code: unified currency code
|
6535
6537
|
:param str symbol: unified market symbol when fetch interest in isolated markets
|
6536
6538
|
:param int [since]: the earliest time in ms to fetch borrrow interest for
|
@@ -7050,7 +7052,11 @@ class htx(Exchange, ImplicitAPI):
|
|
7050
7052
|
def fetch_positions(self, symbols: Strings = None, params={}):
|
7051
7053
|
"""
|
7052
7054
|
fetch all open positions
|
7053
|
-
:
|
7055
|
+
:see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-user-39-s-position-information
|
7056
|
+
:see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-user-s-position-information
|
7057
|
+
:see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-user-s-position-information
|
7058
|
+
:see: https://huobiapi.github.io/docs/dm/v1/en/#query-user-s-position-information
|
7059
|
+
:param str[] [symbols]: list of unified market symbols
|
7054
7060
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7055
7061
|
:param str [params.subType]: 'linear' or 'inverse'
|
7056
7062
|
:param str [params.type]: *inverse only* 'future', or 'swap'
|
@@ -7180,6 +7186,10 @@ class htx(Exchange, ImplicitAPI):
|
|
7180
7186
|
def fetch_position(self, symbol: str, params={}):
|
7181
7187
|
"""
|
7182
7188
|
fetch data on a single open contract trade position
|
7189
|
+
:see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-query-assets-and-positions
|
7190
|
+
:see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-query-assets-and-positions
|
7191
|
+
:see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-assets-and-positions
|
7192
|
+
:see: https://huobiapi.github.io/docs/dm/v1/en/#query-assets-and-positions
|
7183
7193
|
:param str symbol: unified market symbol of the market the position is held in, default is None
|
7184
7194
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7185
7195
|
:returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
ccxt/hyperliquid.py
CHANGED
@@ -2106,11 +2106,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2106
2106
|
market = self.safe_market(marketId, None)
|
2107
2107
|
symbol = market['symbol']
|
2108
2108
|
leverage = self.safe_dict(entry, 'leverage', {})
|
2109
|
-
|
2110
|
-
|
2109
|
+
marginMode = self.safe_string(leverage, 'type')
|
2110
|
+
isIsolated = (marginMode == 'isolated')
|
2111
|
+
size = self.safe_number(entry, 'szi')
|
2111
2112
|
side = None
|
2112
|
-
if
|
2113
|
-
side = '
|
2113
|
+
if size is not None:
|
2114
|
+
side = 'long' if (size > 0) else 'short'
|
2114
2115
|
unrealizedPnl = self.safe_number(entry, 'unrealizedPnl')
|
2115
2116
|
initialMargin = self.safe_number(entry, 'marginUsed')
|
2116
2117
|
percentage = unrealizedPnl / initialMargin * 100
|
@@ -2123,20 +2124,20 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2123
2124
|
'isolated': isIsolated,
|
2124
2125
|
'hedged': None,
|
2125
2126
|
'side': side,
|
2126
|
-
'contracts':
|
2127
|
+
'contracts': size,
|
2127
2128
|
'contractSize': None,
|
2128
2129
|
'entryPrice': self.safe_number(entry, 'entryPx'),
|
2129
2130
|
'markPrice': None,
|
2130
2131
|
'notional': self.safe_number(entry, 'positionValue'),
|
2131
2132
|
'leverage': self.safe_number(leverage, 'value'),
|
2132
|
-
'collateral':
|
2133
|
+
'collateral': self.safe_number(entry, 'marginUsed'),
|
2133
2134
|
'initialMargin': initialMargin,
|
2134
2135
|
'maintenanceMargin': None,
|
2135
2136
|
'initialMarginPercentage': None,
|
2136
2137
|
'maintenanceMarginPercentage': None,
|
2137
2138
|
'unrealizedPnl': unrealizedPnl,
|
2138
2139
|
'liquidationPrice': self.safe_number(entry, 'liquidationPx'),
|
2139
|
-
'marginMode':
|
2140
|
+
'marginMode': marginMode,
|
2140
2141
|
'percentage': percentage,
|
2141
2142
|
})
|
2142
2143
|
|
ccxt/idex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.idex 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
|
@@ -1655,7 +1655,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1655
1655
|
authenticated = hasApiKey and hasSecret and hasWalletAddress and hasPrivateKey
|
1656
1656
|
return(defaultCost / 2) if authenticated else defaultCost
|
1657
1657
|
|
1658
|
-
def fetch_deposit_address(self, code: Str = None, params={}):
|
1658
|
+
def fetch_deposit_address(self, code: Str = None, params={}) -> DepositAddress:
|
1659
1659
|
"""
|
1660
1660
|
fetch the Polygon address of the wallet
|
1661
1661
|
:see: https://api-docs-v3.idex.io/#get-wallets
|
@@ -1682,7 +1682,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1682
1682
|
#
|
1683
1683
|
return self.parse_deposit_address(response)
|
1684
1684
|
|
1685
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1685
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1686
1686
|
#
|
1687
1687
|
# [
|
1688
1688
|
# {
|
@@ -1704,9 +1704,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1704
1704
|
return {
|
1705
1705
|
'info': depositAddress,
|
1706
1706
|
'currency': None,
|
1707
|
+
'network': 'MATIC',
|
1707
1708
|
'address': address,
|
1708
1709
|
'tag': None,
|
1709
|
-
'network': 'MATIC',
|
1710
1710
|
}
|
1711
1711
|
|
1712
1712
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|