coinex-api 0.0.20__py3-none-any.whl → 0.0.22__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.
- coinex/ccxt/__init__.py +3 -2
- coinex/ccxt/async_support/__init__.py +3 -2
- coinex/ccxt/async_support/base/exchange.py +3 -3
- coinex/ccxt/async_support/coinex.py +1 -1
- coinex/ccxt/base/exchange.py +31 -4
- coinex/ccxt/base/types.py +28 -0
- coinex/ccxt/coinex.py +1 -1
- coinex/ccxt/pro/__init__.py +3 -2
- {coinex_api-0.0.20.dist-info → coinex_api-0.0.22.dist-info}/METADATA +1 -1
- {coinex_api-0.0.20.dist-info → coinex_api-0.0.22.dist-info}/RECORD +11 -11
- {coinex_api-0.0.20.dist-info → coinex_api-0.0.22.dist-info}/WHEEL +0 -0
coinex/ccxt/__init__.py
CHANGED
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
29
|
-
__version__ = '4.4.
|
29
|
+
__version__ = '4.4.72'
|
30
30
|
|
31
31
|
# ----------------------------------------------------------------------------
|
32
32
|
|
@@ -87,9 +87,10 @@ from ccxt.base.errors import CancelPending # noqa: F4
|
|
87
87
|
from ccxt.base.errors import UnsubscribeError # noqa: F401
|
88
88
|
from ccxt.base.errors import error_hierarchy # noqa: F401
|
89
89
|
|
90
|
+
from ccxt.bitfinex1 import bitfinex1 # noqa: F401
|
90
91
|
from ccxt.coinex import coinex # noqa: F401
|
91
92
|
|
92
|
-
exchanges = [ 'coinex',]
|
93
|
+
exchanges = [ 'bitfinex1', 'coinex',]
|
93
94
|
|
94
95
|
base = [
|
95
96
|
'Exchange',
|
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
11
|
-
__version__ = '4.4.
|
11
|
+
__version__ = '4.4.72'
|
12
12
|
|
13
13
|
# -----------------------------------------------------------------------------
|
14
14
|
|
@@ -67,9 +67,10 @@ from ccxt.base.errors import UnsubscribeError # noqa: F4
|
|
67
67
|
from ccxt.base.errors import error_hierarchy # noqa: F401
|
68
68
|
|
69
69
|
|
70
|
+
from ccxt.async_support.bitfinex1 import bitfinex1 # noqa: F401
|
70
71
|
from ccxt.async_support.coinex import coinex # noqa: F401
|
71
72
|
|
72
|
-
exchanges = [ 'coinex',]
|
73
|
+
exchanges = [ 'bitfinex1', 'coinex',]
|
73
74
|
|
74
75
|
base = [
|
75
76
|
'Exchange',
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.4.
|
5
|
+
__version__ = '4.4.72'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -25,7 +25,7 @@ from ccxt.async_support.base.throttler import Throttler
|
|
25
25
|
# -----------------------------------------------------------------------------
|
26
26
|
|
27
27
|
from ccxt.base.errors import BaseError, BadSymbol, BadRequest, BadResponse, ExchangeError, ExchangeNotAvailable, RequestTimeout, NotSupported, NullResponse, InvalidAddress, RateLimitExceeded, OperationFailed
|
28
|
-
from ccxt.base.types import OrderType, OrderSide, OrderRequest, CancellationRequest
|
28
|
+
from ccxt.base.types import ConstructorArgs, OrderType, OrderSide, OrderRequest, CancellationRequest
|
29
29
|
|
30
30
|
# -----------------------------------------------------------------------------
|
31
31
|
|
@@ -67,7 +67,7 @@ class Exchange(BaseExchange):
|
|
67
67
|
clients = {}
|
68
68
|
timeout_on_exit = 250 # needed for: https://github.com/ccxt/ccxt/pull/23470
|
69
69
|
|
70
|
-
def __init__(self, config={}):
|
70
|
+
def __init__(self, config: ConstructorArgs = {}):
|
71
71
|
if 'asyncio_loop' in config:
|
72
72
|
self.asyncio_loop = config['asyncio_loop']
|
73
73
|
self.aiohttp_trust_env = config.get('aiohttp_trust_env', self.aiohttp_trust_env)
|
@@ -3679,7 +3679,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3679
3679
|
"""
|
3680
3680
|
return await self.fetch_orders_by_status('finished', symbol, since, limit, params)
|
3681
3681
|
|
3682
|
-
async def create_deposit_address(self, code: str, params={}):
|
3682
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
3683
3683
|
"""
|
3684
3684
|
create a currency deposit address
|
3685
3685
|
|
coinex/ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.72'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -33,7 +33,7 @@ from ccxt.base.decimal_to_precision import decimal_to_precision
|
|
33
33
|
from ccxt.base.decimal_to_precision import DECIMAL_PLACES, TICK_SIZE, NO_PADDING, TRUNCATE, ROUND, ROUND_UP, ROUND_DOWN, SIGNIFICANT_DIGITS
|
34
34
|
from ccxt.base.decimal_to_precision import number_to_string
|
35
35
|
from ccxt.base.precise import Precise
|
36
|
-
from ccxt.base.types import BalanceAccount, Currency, IndexType, OrderSide, OrderType, Trade, OrderRequest, Market, MarketType, Str, Num, Strings, CancellationRequest, Bool
|
36
|
+
from ccxt.base.types import ConstructorArgs, BalanceAccount, Currency, IndexType, OrderSide, OrderType, Trade, OrderRequest, Market, MarketType, Str, Num, Strings, CancellationRequest, Bool
|
37
37
|
|
38
38
|
# -----------------------------------------------------------------------------
|
39
39
|
|
@@ -369,7 +369,7 @@ class Exchange(object):
|
|
369
369
|
}
|
370
370
|
synchronous = True
|
371
371
|
|
372
|
-
def __init__(self, config={}):
|
372
|
+
def __init__(self, config: ConstructorArgs = {}):
|
373
373
|
self.aiohttp_trust_env = self.aiohttp_trust_env or self.trust_env
|
374
374
|
self.requests_trust_env = self.requests_trust_env or self.trust_env
|
375
375
|
|
@@ -410,6 +410,9 @@ class Exchange(object):
|
|
410
410
|
|
411
411
|
self.after_construct()
|
412
412
|
|
413
|
+
if self.safe_bool(config, 'sandbox') or self.safe_bool(config, 'testnet'):
|
414
|
+
self.set_sandbox_mode(True)
|
415
|
+
|
413
416
|
# convert all properties from underscore notation foo_bar to camelcase notation fooBar
|
414
417
|
cls = type(self)
|
415
418
|
for name in dir(self):
|
@@ -2918,7 +2921,8 @@ class Exchange(object):
|
|
2918
2921
|
length = len(keys)
|
2919
2922
|
if length != 0:
|
2920
2923
|
for i in range(0, length):
|
2921
|
-
|
2924
|
+
key = keys[i]
|
2925
|
+
network = networks[key]
|
2922
2926
|
deposit = self.safe_bool(network, 'deposit')
|
2923
2927
|
if currencyDeposit is None or deposit:
|
2924
2928
|
currency['deposit'] = deposit
|
@@ -2928,6 +2932,12 @@ class Exchange(object):
|
|
2928
2932
|
active = self.safe_bool(network, 'active')
|
2929
2933
|
if currencyActive is None or active:
|
2930
2934
|
currency['active'] = active
|
2935
|
+
# set network 'active' to False if D or W is disabled
|
2936
|
+
if self.safe_bool(network, 'active') is None:
|
2937
|
+
if deposit and withdraw:
|
2938
|
+
currency['networks'][key]['active'] = True
|
2939
|
+
elif deposit is not None and withdraw is not None:
|
2940
|
+
currency['networks'][key]['active'] = False
|
2931
2941
|
# find lowest fee(which is more desired)
|
2932
2942
|
fee = self.safe_string(network, 'fee')
|
2933
2943
|
feeMain = self.safe_string(currency, 'fee')
|
@@ -4286,6 +4296,23 @@ class Exchange(object):
|
|
4286
4296
|
params = self.omit(params, [paramName1, paramName2])
|
4287
4297
|
return [value, params]
|
4288
4298
|
|
4299
|
+
def handle_request_network(self, params: dict, request: dict, exchangeSpecificKey: str, currencyCode: Str = None, isRequired: bool = False):
|
4300
|
+
"""
|
4301
|
+
:param dict params: - extra parameters
|
4302
|
+
:param dict request: - existing dictionary of request
|
4303
|
+
:param str exchangeSpecificKey: - the key for chain id to be set in request
|
4304
|
+
:param dict currencyCode: - (optional) existing dictionary of request
|
4305
|
+
:param boolean isRequired: - (optional) whether that param is required to be present
|
4306
|
+
:returns dict[]: - returns [request, params] where request is the modified request object and params is the modified params object
|
4307
|
+
"""
|
4308
|
+
networkCode = None
|
4309
|
+
networkCode, params = self.handle_network_code_and_params(params)
|
4310
|
+
if networkCode is not None:
|
4311
|
+
request[exchangeSpecificKey] = self.network_code_to_id(networkCode, currencyCode)
|
4312
|
+
elif isRequired:
|
4313
|
+
raise ArgumentsRequired(self.id + ' - "network" param is required for self request')
|
4314
|
+
return [request, params]
|
4315
|
+
|
4289
4316
|
def resolve_path(self, path, params):
|
4290
4317
|
return [
|
4291
4318
|
self.implode_params(path, params),
|
coinex/ccxt/base/types.py
CHANGED
@@ -575,3 +575,31 @@ LeverageTiers = Dict[Str, List[LeverageTier]]
|
|
575
575
|
|
576
576
|
Market = Optional[MarketInterface]
|
577
577
|
Currency = Optional[CurrencyInterface]
|
578
|
+
|
579
|
+
class ConstructorArgs(TypedDict, total=False):
|
580
|
+
apiKey: str
|
581
|
+
secret: str
|
582
|
+
passphrase: str
|
583
|
+
password: str
|
584
|
+
privateKey: str
|
585
|
+
walletAddress: str
|
586
|
+
uid: str
|
587
|
+
verbose: bool
|
588
|
+
testnet: bool
|
589
|
+
sandbox: bool # redudant but kept for backwards compatibility
|
590
|
+
options: Dict[str, Any]
|
591
|
+
enableRateLimit: bool
|
592
|
+
httpsProxy: str
|
593
|
+
socksProxy: str
|
594
|
+
wssProxy: str
|
595
|
+
proxy: str
|
596
|
+
rateLimit: Num
|
597
|
+
commonCurrencies: Dict[str, Any]
|
598
|
+
userAgent: str
|
599
|
+
userAgents: Dict[str, Any]
|
600
|
+
timeout: Num
|
601
|
+
markets: Dict[str, Any]
|
602
|
+
currencies: Dict[str, Any]
|
603
|
+
hostname: str
|
604
|
+
urls: Dict[str, Any]
|
605
|
+
headers: Dict[str, Any]
|
coinex/ccxt/coinex.py
CHANGED
@@ -3678,7 +3678,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3678
3678
|
"""
|
3679
3679
|
return self.fetch_orders_by_status('finished', symbol, since, limit, params)
|
3680
3680
|
|
3681
|
-
def create_deposit_address(self, code: str, params={}):
|
3681
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
3682
3682
|
"""
|
3683
3683
|
create a currency deposit address
|
3684
3684
|
|
coinex/ccxt/pro/__init__.py
CHANGED
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
8
8
|
|
9
9
|
# ----------------------------------------------------------------------------
|
10
10
|
|
11
|
-
__version__ = '4.4.
|
11
|
+
__version__ = '4.4.72'
|
12
12
|
|
13
13
|
# ----------------------------------------------------------------------------
|
14
14
|
|
@@ -16,6 +16,7 @@ from ccxt.async_support.base.exchange import Exchange # noqa: F401
|
|
16
16
|
|
17
17
|
# CCXT Pro exchanges (now this is mainly used for importing exchanges in WS tests)
|
18
18
|
|
19
|
+
from ccxt.pro.bitfinex1 import bitfinex1 # noqa: F401
|
19
20
|
from ccxt.pro.coinex import coinex # noqa: F401
|
20
21
|
|
21
|
-
exchanges = [ 'coinex',]
|
22
|
+
exchanges = [ 'bitfinex1', 'coinex',]
|
@@ -1,11 +1,11 @@
|
|
1
1
|
coinex/__init__.py,sha256=d633U2PpNFHvpDWLb3lItS0ObcBN0E2XgS5QkOEejI8,246
|
2
|
-
coinex/ccxt/__init__.py,sha256=
|
3
|
-
coinex/ccxt/coinex.py,sha256=
|
2
|
+
coinex/ccxt/__init__.py,sha256=i9MqcVrR6TfttF36s1GCy8jrgDuXIF4n887ujHDG5EM,6147
|
3
|
+
coinex/ccxt/coinex.py,sha256=Mvi_vVZJZNL9yqhJIPg3v2C69igyUYhmMPsnQFjwQeo,267224
|
4
4
|
coinex/ccxt/abstract/coinex.py,sha256=4TRXtWgONqkm3eSL55Y5T7Q4QxJrnOTuhP0ugsKHAWo,34856
|
5
|
-
coinex/ccxt/async_support/__init__.py,sha256=
|
6
|
-
coinex/ccxt/async_support/coinex.py,sha256=
|
5
|
+
coinex/ccxt/async_support/__init__.py,sha256=CMoNc8Rl3q_bnKrfkibT3nA3J1ALUXYQ0xnRBI_Te0Q,4890
|
6
|
+
coinex/ccxt/async_support/coinex.py,sha256=0JPbf9b12J3xP4--A1oJQF4cZ8-mm0bgnBiR_7zSOig,268512
|
7
7
|
coinex/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
|
8
|
-
coinex/ccxt/async_support/base/exchange.py,sha256=
|
8
|
+
coinex/ccxt/async_support/base/exchange.py,sha256=KAsKEfcM2w4vjLa0zmUEMXiBsNduSWfo1A6h15pOLGA,117223
|
9
9
|
coinex/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
|
10
10
|
coinex/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
|
11
11
|
coinex/ccxt/async_support/base/ws/aiohttp_client.py,sha256=Y5HxAVXyyYduj6b6SbbUZETlq3GrVMzrkW1r-TMgpb8,6329
|
@@ -19,10 +19,10 @@ coinex/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9pr
|
|
19
19
|
coinex/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
20
20
|
coinex/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
|
21
21
|
coinex/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
|
22
|
-
coinex/ccxt/base/exchange.py,sha256=
|
22
|
+
coinex/ccxt/base/exchange.py,sha256=Fr_Du0LL1ud6tVY0ldQ0Vl3PZVDAo_lkqkEIuQi-8hI,321957
|
23
23
|
coinex/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
24
|
-
coinex/ccxt/base/types.py,sha256=
|
25
|
-
coinex/ccxt/pro/__init__.py,sha256=
|
24
|
+
coinex/ccxt/base/types.py,sha256=SfxIKDSsxP7MPHWiOVI965Nr5NSEPpAno5fuveTRi3w,11423
|
25
|
+
coinex/ccxt/pro/__init__.py,sha256=roKjnviQcAJLyE2qG9dOG5L220dYXSexzcODMepUvO8,722
|
26
26
|
coinex/ccxt/pro/coinex.py,sha256=aQ6Xa4ML0PTCgGleDJuhjqntspAREz6XxQwX9IcD6OY,56616
|
27
27
|
coinex/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
|
28
28
|
coinex/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
|
@@ -283,6 +283,6 @@ coinex/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX
|
|
283
283
|
coinex/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
|
284
284
|
coinex/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
285
285
|
coinex/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
|
286
|
-
coinex_api-0.0.
|
287
|
-
coinex_api-0.0.
|
288
|
-
coinex_api-0.0.
|
286
|
+
coinex_api-0.0.22.dist-info/METADATA,sha256=NlYx2o40owDp4QS0HuN9GxlW8WguVekHBODN6D1gfoM,19757
|
287
|
+
coinex_api-0.0.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
288
|
+
coinex_api-0.0.22.dist-info/RECORD,,
|
File without changes
|