bitget 0.0.64__py3-none-any.whl → 0.0.65__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.
- bitget/ccxt/__init__.py +2 -3
- bitget/ccxt/async_support/__init__.py +2 -3
- bitget/ccxt/async_support/base/exchange.py +26 -22
- bitget/ccxt/async_support/bitget.py +4 -4
- bitget/ccxt/base/exchange.py +1 -1
- bitget/ccxt/bitget.py +4 -4
- bitget/ccxt/pro/__init__.py +61 -1
- {bitget-0.0.64.dist-info → bitget-0.0.65.dist-info}/METADATA +1 -1
- {bitget-0.0.64.dist-info → bitget-0.0.65.dist-info}/RECORD +10 -10
- {bitget-0.0.64.dist-info → bitget-0.0.65.dist-info}/WHEEL +0 -0
bitget/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.86'
|
30
30
|
|
31
31
|
# ----------------------------------------------------------------------------
|
32
32
|
|
@@ -88,9 +88,8 @@ from ccxt.base.errors import UnsubscribeError # noqa: F4
|
|
88
88
|
from ccxt.base.errors import error_hierarchy # noqa: F401
|
89
89
|
|
90
90
|
from ccxt.bitget import bitget # noqa: F401
|
91
|
-
from ccxt.kuna import kuna # noqa: F401
|
92
91
|
|
93
|
-
exchanges = [ 'bitget',
|
92
|
+
exchanges = [ 'bitget',]
|
94
93
|
|
95
94
|
base = [
|
96
95
|
'Exchange',
|
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
11
|
-
__version__ = '4.4.
|
11
|
+
__version__ = '4.4.86'
|
12
12
|
|
13
13
|
# -----------------------------------------------------------------------------
|
14
14
|
|
@@ -68,9 +68,8 @@ from ccxt.base.errors import error_hierarchy # noqa: F4
|
|
68
68
|
|
69
69
|
|
70
70
|
from ccxt.async_support.bitget import bitget # noqa: F401
|
71
|
-
from ccxt.async_support.kuna import kuna # noqa: F401
|
72
71
|
|
73
|
-
exchanges = [ 'bitget',
|
72
|
+
exchanges = [ 'bitget',]
|
74
73
|
|
75
74
|
base = [
|
76
75
|
'Exchange',
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.4.
|
5
|
+
__version__ = '4.4.86'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -176,15 +176,7 @@ class Exchange(BaseExchange):
|
|
176
176
|
if (socksProxy not in self.socks_proxy_sessions):
|
177
177
|
# Create our SSL context object with our CA cert file
|
178
178
|
self.open() # ensure `asyncio_loop` is set
|
179
|
-
|
180
|
-
socksProxy,
|
181
|
-
# extra args copied from self.open()
|
182
|
-
ssl=self.ssl_context,
|
183
|
-
loop=self.asyncio_loop,
|
184
|
-
enable_cleanup_closed=True
|
185
|
-
)
|
186
|
-
self.socks_proxy_sessions[socksProxy] = aiohttp.ClientSession(loop=self.asyncio_loop, connector=self.aiohttp_socks_connector, trust_env=self.aiohttp_trust_env)
|
187
|
-
proxy_session = self.socks_proxy_sessions[socksProxy]
|
179
|
+
proxy_session = self.get_socks_proxy_session(socksProxy)
|
188
180
|
# add aiohttp_proxy for python as exclusion
|
189
181
|
elif self.aiohttp_proxy:
|
190
182
|
final_proxy = self.aiohttp_proxy
|
@@ -267,6 +259,20 @@ class Exchange(BaseExchange):
|
|
267
259
|
return http_response
|
268
260
|
return response.content
|
269
261
|
|
262
|
+
def get_socks_proxy_session(self, socksProxy):
|
263
|
+
if (self.socks_proxy_sessions is None):
|
264
|
+
self.socks_proxy_sessions = {}
|
265
|
+
if (socksProxy not in self.socks_proxy_sessions):
|
266
|
+
self.aiohttp_socks_connector = ProxyConnector.from_url(
|
267
|
+
socksProxy,
|
268
|
+
# extra args copied from self.open()
|
269
|
+
ssl=self.ssl_context,
|
270
|
+
loop=self.asyncio_loop,
|
271
|
+
enable_cleanup_closed=True
|
272
|
+
)
|
273
|
+
self.socks_proxy_sessions[socksProxy] = aiohttp.ClientSession(loop=self.asyncio_loop, connector=self.aiohttp_socks_connector, trust_env=self.aiohttp_trust_env)
|
274
|
+
return self.socks_proxy_sessions[socksProxy]
|
275
|
+
|
270
276
|
async def load_markets_helper(self, reload=False, params={}):
|
271
277
|
if not reload:
|
272
278
|
if self.markets:
|
@@ -411,19 +417,12 @@ class Exchange(BaseExchange):
|
|
411
417
|
# we use aiohttp instead of fastClient now because of this
|
412
418
|
# https://github.com/ccxt/ccxt/pull/25995
|
413
419
|
self.clients[url] = AiohttpClient(url, on_message, on_error, on_close, on_connected, options)
|
414
|
-
|
420
|
+
# set http/s proxy (socks proxy should be set in other place)
|
421
|
+
httpProxy, httpsProxy, socksProxy = self.check_ws_proxy_settings()
|
422
|
+
if (httpProxy or httpsProxy):
|
423
|
+
self.clients[url].proxy = httpProxy if httpProxy else httpsProxy
|
415
424
|
return self.clients[url]
|
416
425
|
|
417
|
-
def get_ws_proxy(self):
|
418
|
-
httpProxy, httpsProxy, socksProxy = self.check_ws_proxy_settings()
|
419
|
-
if httpProxy:
|
420
|
-
return httpProxy
|
421
|
-
elif httpsProxy:
|
422
|
-
return httpsProxy
|
423
|
-
elif socksProxy:
|
424
|
-
return socksProxy
|
425
|
-
return None
|
426
|
-
|
427
426
|
def delay(self, timeout, method, *args):
|
428
427
|
return self.asyncio_loop.call_later(timeout / 1000, self.spawn, method, *args)
|
429
428
|
|
@@ -486,8 +485,13 @@ class Exchange(BaseExchange):
|
|
486
485
|
if not subscribed:
|
487
486
|
client.subscriptions[subscribe_hash] = subscription or True
|
488
487
|
|
488
|
+
selected_session = self.session
|
489
|
+
# http/s proxy is being set in other places
|
490
|
+
httpProxy, httpsProxy, socksProxy = self.check_ws_proxy_settings()
|
491
|
+
if (socksProxy):
|
492
|
+
selected_session = self.get_socks_proxy_session(socksProxy)
|
489
493
|
connected = client.connected if client.connected.done() \
|
490
|
-
else asyncio.ensure_future(client.connect(
|
494
|
+
else asyncio.ensure_future(client.connect(selected_session, backoff_delay))
|
491
495
|
|
492
496
|
def after(fut):
|
493
497
|
# todo: decouple signing from subscriptions
|
@@ -2371,7 +2371,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2371
2371
|
'coin': currency['id'],
|
2372
2372
|
'address': address,
|
2373
2373
|
'chain': networkId,
|
2374
|
-
'size': amount,
|
2374
|
+
'size': self.currency_to_precision(code, amount, networkCode),
|
2375
2375
|
'transferType': 'on_chain',
|
2376
2376
|
}
|
2377
2377
|
if tag is not None:
|
@@ -2395,8 +2395,6 @@ class bitget(Exchange, ImplicitAPI):
|
|
2395
2395
|
fillResponseFromRequest = self.safe_bool(withdrawOptions, 'fillResponseFromRequest', True)
|
2396
2396
|
if fillResponseFromRequest:
|
2397
2397
|
result['currency'] = code
|
2398
|
-
result['timestamp'] = self.milliseconds()
|
2399
|
-
result['datetime'] = self.iso8601(self.milliseconds())
|
2400
2398
|
result['amount'] = amount
|
2401
2399
|
result['tag'] = tag
|
2402
2400
|
result['address'] = address
|
@@ -2514,7 +2512,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
2514
2512
|
status = self.safe_string(transaction, 'status')
|
2515
2513
|
tag = self.safe_string(transaction, 'tag')
|
2516
2514
|
feeCostString = self.safe_string(transaction, 'fee')
|
2517
|
-
feeCostAbsString =
|
2515
|
+
feeCostAbsString = None
|
2516
|
+
if feeCostString is not None:
|
2517
|
+
feeCostAbsString = Precise.string_abs(feeCostString)
|
2518
2518
|
fee = None
|
2519
2519
|
amountString = self.safe_string(transaction, 'size')
|
2520
2520
|
if feeCostAbsString is not None:
|
bitget/ccxt/base/exchange.py
CHANGED
bitget/ccxt/bitget.py
CHANGED
@@ -2370,7 +2370,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2370
2370
|
'coin': currency['id'],
|
2371
2371
|
'address': address,
|
2372
2372
|
'chain': networkId,
|
2373
|
-
'size': amount,
|
2373
|
+
'size': self.currency_to_precision(code, amount, networkCode),
|
2374
2374
|
'transferType': 'on_chain',
|
2375
2375
|
}
|
2376
2376
|
if tag is not None:
|
@@ -2394,8 +2394,6 @@ class bitget(Exchange, ImplicitAPI):
|
|
2394
2394
|
fillResponseFromRequest = self.safe_bool(withdrawOptions, 'fillResponseFromRequest', True)
|
2395
2395
|
if fillResponseFromRequest:
|
2396
2396
|
result['currency'] = code
|
2397
|
-
result['timestamp'] = self.milliseconds()
|
2398
|
-
result['datetime'] = self.iso8601(self.milliseconds())
|
2399
2397
|
result['amount'] = amount
|
2400
2398
|
result['tag'] = tag
|
2401
2399
|
result['address'] = address
|
@@ -2513,7 +2511,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
2513
2511
|
status = self.safe_string(transaction, 'status')
|
2514
2512
|
tag = self.safe_string(transaction, 'tag')
|
2515
2513
|
feeCostString = self.safe_string(transaction, 'fee')
|
2516
|
-
feeCostAbsString =
|
2514
|
+
feeCostAbsString = None
|
2515
|
+
if feeCostString is not None:
|
2516
|
+
feeCostAbsString = Precise.string_abs(feeCostString)
|
2517
2517
|
fee = None
|
2518
2518
|
amountString = self.safe_string(transaction, 'size')
|
2519
2519
|
if feeCostAbsString is not None:
|
bitget/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.86'
|
12
12
|
|
13
13
|
# ----------------------------------------------------------------------------
|
14
14
|
|
@@ -79,6 +79,66 @@ from ccxt.base.errors import error_hierarchy # noqa: F4
|
|
79
79
|
|
80
80
|
|
81
81
|
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
82
142
|
|
83
143
|
|
84
144
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
bitget/__init__.py,sha256=D5tG1_AjwXjMim3CPnCuWSheOXtq4vlSwVCS5ZG1bMQ,246
|
2
|
-
bitget/ccxt/__init__.py,sha256=
|
3
|
-
bitget/ccxt/bitget.py,sha256=
|
2
|
+
bitget/ccxt/__init__.py,sha256=amw7xOqpMvpvHiVn-JKtQ1gIOQDaYCFIwEu-TQJrXtI,6048
|
3
|
+
bitget/ccxt/bitget.py,sha256=5oswdgoL6ERHNzGe95VCQ4zlvyZ-8pO2D8dfuOtCJSo,439144
|
4
4
|
bitget/ccxt/abstract/bitget.py,sha256=jbL-2S9MlDloP2yACzptr6DkUwzoWH5ALpcjPCHInj0,91042
|
5
|
-
bitget/ccxt/async_support/__init__.py,sha256=
|
6
|
-
bitget/ccxt/async_support/bitget.py,sha256=
|
5
|
+
bitget/ccxt/async_support/__init__.py,sha256=LXYB9k-e_XhkM8TVi5SDbmQKLHd38Z_Xm28LtTUOHgs,4781
|
6
|
+
bitget/ccxt/async_support/bitget.py,sha256=K0BhZ7L8NOrM9h8cQX9dpc96PCTy9wp5xeooqdsdYjk,440840
|
7
7
|
bitget/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
|
8
|
-
bitget/ccxt/async_support/base/exchange.py,sha256=
|
8
|
+
bitget/ccxt/async_support/base/exchange.py,sha256=v6BUnxiy1aNvGfPIY_Uoc8bO81Hc2KixZhFYLUZtdgc,119007
|
9
9
|
bitget/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
|
10
10
|
bitget/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
|
11
11
|
bitget/ccxt/async_support/base/ws/aiohttp_client.py,sha256=Y5HxAVXyyYduj6b6SbbUZETlq3GrVMzrkW1r-TMgpb8,6329
|
@@ -18,10 +18,10 @@ bitget/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9pr
|
|
18
18
|
bitget/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
19
19
|
bitget/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
|
20
20
|
bitget/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
|
21
|
-
bitget/ccxt/base/exchange.py,sha256=
|
21
|
+
bitget/ccxt/base/exchange.py,sha256=0eWsLPmC7XqT192_2CilEsKFbcNtDqQktuknty6v8zE,328021
|
22
22
|
bitget/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
23
23
|
bitget/ccxt/base/types.py,sha256=IbLO7Ni-plO36xlOdJQFqujSJBq0q9qll009ShZ0M_U,11468
|
24
|
-
bitget/ccxt/pro/__init__.py,sha256=
|
24
|
+
bitget/ccxt/pro/__init__.py,sha256=vBwu5okpxvHEr5Wjko4oBjkQc-01aoEsBEVuhj_WJus,4183
|
25
25
|
bitget/ccxt/pro/bitget.py,sha256=g8SkdhTze-idsChWiGIBi1twpiDfRlJyvnG2NL9VsR0,90372
|
26
26
|
bitget/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
|
27
27
|
bitget/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
|
@@ -282,6 +282,6 @@ bitget/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX
|
|
282
282
|
bitget/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
|
283
283
|
bitget/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
284
284
|
bitget/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
|
285
|
-
bitget-0.0.
|
286
|
-
bitget-0.0.
|
287
|
-
bitget-0.0.
|
285
|
+
bitget-0.0.65.dist-info/METADATA,sha256=U7jjJtDxmDo172efSCf0YBHLHI33B7p7aeSIXxzgLT0,40991
|
286
|
+
bitget-0.0.65.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
287
|
+
bitget-0.0.65.dist-info/RECORD,,
|
File without changes
|