bitmart 0.0.75__py3-none-any.whl → 0.0.76__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.

Potentially problematic release.


This version of bitmart might be problematic. Click here for more details.

bitmart/ccxt/__init__.py CHANGED
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
29
- __version__ = '4.4.95'
29
+ __version__ = '4.4.96'
30
30
 
31
31
  # ----------------------------------------------------------------------------
32
32
 
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.95'
11
+ __version__ = '4.4.96'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.95'
5
+ __version__ = '4.4.96'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -231,6 +231,8 @@ class Exchange(BaseExchange):
231
231
  self.last_json_response = json_response
232
232
  if self.verbose:
233
233
  self.log("\nfetch Response:", self.id, method, url, http_status_code, "ResponseHeaders:", headers, "ResponseBody:", http_response)
234
+ if json_response and not isinstance(json_response, list) and self.returnResponseHeaders:
235
+ json_response['responseHeaders'] = headers
234
236
  self.logger.debug("%s %s, Response: %s %s %s", method, url, http_status_code, headers, http_response)
235
237
 
236
238
  except socket.gaierror as e:
@@ -1596,10 +1598,10 @@ class Exchange(BaseExchange):
1596
1598
  """
1597
1599
  raise NotSupported(self.id + ' fetchDepositsWithdrawals() is not supported yet')
1598
1600
 
1599
- async def fetch_deposits(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1601
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1600
1602
  raise NotSupported(self.id + ' fetchDeposits() is not supported yet')
1601
1603
 
1602
- async def fetch_withdrawals(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1604
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1603
1605
  raise NotSupported(self.id + ' fetchWithdrawals() is not supported yet')
1604
1606
 
1605
1607
  async def fetch_deposits_ws(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -1,6 +1,8 @@
1
1
  import asyncio
2
2
 
3
-
3
+ # Test by running:
4
+ # - python python/ccxt/pro/test/base/test_close.py
5
+ # - python python/ccxt/pro/test/base/test_future.py
4
6
  class Future(asyncio.Future):
5
7
 
6
8
  def resolve(self, result=None):
@@ -30,14 +32,14 @@ class Future(asyncio.Future):
30
32
  if err:
31
33
  exceptions.append(err)
32
34
  # if any exceptions return with first exception
35
+ if future.cancelled():
36
+ return
33
37
  if len(exceptions) > 0:
34
38
  future.set_exception(exceptions[0])
35
39
  # else return first result
36
40
  elif cancelled:
37
41
  future.cancel()
38
42
  else:
39
- if future.cancelled():
40
- return
41
43
  first_result = list(complete)[0].result()
42
44
  future.set_result(first_result)
43
45
  task.add_done_callback(callback)
@@ -3083,7 +3083,7 @@ class bitmart(Exchange, ImplicitAPI):
3083
3083
  # }
3084
3084
  #
3085
3085
  if market['swap']:
3086
- return response
3086
+ return self.safe_order({'info': response})
3087
3087
  data = self.safe_value(response, 'data')
3088
3088
  if data is True:
3089
3089
  return self.safe_order({'id': id}, market)
@@ -3200,7 +3200,7 @@ class bitmart(Exchange, ImplicitAPI):
3200
3200
  # "trace": "7f9c94e10f9d4513bc08a7bfc2a5559a.70.16954131323145323"
3201
3201
  # }
3202
3202
  #
3203
- return response
3203
+ return [self.safe_order({'info': response})]
3204
3204
 
3205
3205
  async def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3206
3206
  if symbol is None:
@@ -1,3 +1,9 @@
1
+ # ----------------------------------------------------------------------------
2
+
3
+ # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
+ # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
+ # EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
+
1
7
  error_hierarchy = {
2
8
  'BaseError': {
3
9
  'ExchangeError': {
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.95'
7
+ __version__ = '4.4.96'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -229,6 +229,7 @@ class Exchange(object):
229
229
  'chrome100': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36',
230
230
  }
231
231
  headers = None
232
+ returnResponseHeaders = False
232
233
  origin = '*' # CORS origin
233
234
  MAX_VALUE = float('inf')
234
235
  #
@@ -579,6 +580,8 @@ class Exchange(object):
579
580
  if self.verbose:
580
581
  self.log("\nfetch Response:", self.id, method, url, http_status_code, "ResponseHeaders:", headers, "ResponseBody:", http_response)
581
582
  self.logger.debug("%s %s, Response: %s %s %s", method, url, http_status_code, headers, http_response)
583
+ if json_response and not isinstance(json_response, list) and self.returnResponseHeaders:
584
+ json_response['responseHeaders'] = headers
582
585
  response.raise_for_status()
583
586
 
584
587
  except Timeout as e:
@@ -5495,10 +5498,10 @@ class Exchange(object):
5495
5498
  """
5496
5499
  raise NotSupported(self.id + ' fetchDepositsWithdrawals() is not supported yet')
5497
5500
 
5498
- def fetch_deposits(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
5501
+ def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
5499
5502
  raise NotSupported(self.id + ' fetchDeposits() is not supported yet')
5500
5503
 
5501
- def fetch_withdrawals(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
5504
+ def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
5502
5505
  raise NotSupported(self.id + ' fetchWithdrawals() is not supported yet')
5503
5506
 
5504
5507
  def fetch_deposits_ws(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
bitmart/ccxt/bitmart.py CHANGED
@@ -3083,7 +3083,7 @@ class bitmart(Exchange, ImplicitAPI):
3083
3083
  # }
3084
3084
  #
3085
3085
  if market['swap']:
3086
- return response
3086
+ return self.safe_order({'info': response})
3087
3087
  data = self.safe_value(response, 'data')
3088
3088
  if data is True:
3089
3089
  return self.safe_order({'id': id}, market)
@@ -3200,7 +3200,7 @@ class bitmart(Exchange, ImplicitAPI):
3200
3200
  # "trace": "7f9c94e10f9d4513bc08a7bfc2a5559a.70.16954131323145323"
3201
3201
  # }
3202
3202
  #
3203
- return response
3203
+ return [self.safe_order({'info': response})]
3204
3204
 
3205
3205
  def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3206
3206
  if symbol is None:
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.95'
11
+ __version__ = '4.4.96'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bitmart
3
- Version: 0.0.75
3
+ Version: 0.0.76
4
4
  Summary: bitmart crypto exchange api client
5
5
  Project-URL: Homepage, https://github.com/ccxt/ccxt
6
6
  Project-URL: Issues, https://github.com/ccxt/ccxt
@@ -1,26 +1,26 @@
1
1
  bitmart/__init__.py,sha256=DRRGWQ_AXzv_ztbAPzIZ0ID_zHfKYZID66sOb-SJ3eM,258
2
- bitmart/ccxt/__init__.py,sha256=JkU9foA5TitQ0dz98_kaeNTazQLcbbt7bZRYQfmVhYA,6050
3
- bitmart/ccxt/bitmart.py,sha256=4MG2T1wLN7FaUMlMwx2lYdio16Ur-mWqmNQ-8_Srcgk,249281
2
+ bitmart/ccxt/__init__.py,sha256=L7ObzKgPaPOZWW-6tbNvnYX4APZS7azL64UwOthleik,6050
3
+ bitmart/ccxt/bitmart.py,sha256=s3XXIBeFJ5wxlkQ8FCvMBiEEB59FcycZx-uD0xuiUAU,249337
4
4
  bitmart/ccxt/abstract/bitmart.py,sha256=er1v0vWmX1-eus1XP5EyQCsmDS5LHVCUGEHqwvZuxyU,17395
5
- bitmart/ccxt/async_support/__init__.py,sha256=DFbANyz8lcyAniSGqH1xhPxu8kKZvx0OJPKktLL_S7E,4783
6
- bitmart/ccxt/async_support/bitmart.py,sha256=PkmPIZj_tVUwmAotVSfdw9fkY53AGAsgKmJZrqFGyj0,250405
5
+ bitmart/ccxt/async_support/__init__.py,sha256=2zhmRgUGOYa3RqemhtpEHygxoPjjKoIETSnVYPLgdJw,4783
6
+ bitmart/ccxt/async_support/bitmart.py,sha256=yiFwdael2gfr0nhi9sub13DaACwojOeCGb6CPt2ZKuU,250461
7
7
  bitmart/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- bitmart/ccxt/async_support/base/exchange.py,sha256=rlXug7vYV2ke2rjNRzkakqbw4H7gzN3oUoeSldxBheY,119440
8
+ bitmart/ccxt/async_support/base/exchange.py,sha256=Ov3ySIOFH_PGlKGNFfPqF_RywDiSLp9Je64KanBTMDY,119604
9
9
  bitmart/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
10
10
  bitmart/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
11
11
  bitmart/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
12
12
  bitmart/ccxt/async_support/base/ws/client.py,sha256=ekIN5HNgeQgMG3tLZMsE889Aoxs960DLwQnwkTGhdi8,13624
13
13
  bitmart/ccxt/async_support/base/ws/functions.py,sha256=qwvEnjtINWL5ZU-dbbeIunjyBxzFqbGWHfVhxqAcKug,1499
14
- bitmart/ccxt/async_support/base/ws/future.py,sha256=2zrEB7Xinq14N05jaewNtbR_2ZiE5GQZNQV4CBW7qTA,1337
14
+ bitmart/ccxt/async_support/base/ws/future.py,sha256=hjdQ42zkfju5nar0GpTLJ4zXQBtgBU8DzYM5uPFcjsE,1450
15
15
  bitmart/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_HozS6VxhEs8x-Kbj-NI,2894
16
16
  bitmart/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9produGjmBJLCI5FHIRdMz1O-g,6551
17
17
  bitmart/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
18
18
  bitmart/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
19
- bitmart/ccxt/base/errors.py,sha256=Pad-6ugvGUwhoYuKUliX-N7FTrcnKCQGFjsaq2tMn0I,4610
20
- bitmart/ccxt/base/exchange.py,sha256=1Hb7swmJX38Qzt6t7TayO0U-jw0cQ5AbACLZoYoM-9I,331665
19
+ bitmart/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
20
+ bitmart/ccxt/base/exchange.py,sha256=uJ-9MHGpRUufv0rcn7X9QmQSnSKuWj8OjA5poA_qc_s,331855
21
21
  bitmart/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
22
22
  bitmart/ccxt/base/types.py,sha256=vMQfFDVntED4YHrRJt0Q98YaM7OtGhK-DkbkqXFTYHc,11485
23
- bitmart/ccxt/pro/__init__.py,sha256=2Ds7nbnfGw-8XhQdRHjVlgtDeVj02gqYz-FagmzYqtc,4097
23
+ bitmart/ccxt/pro/__init__.py,sha256=uQz92UEri3H6tbpjeOCP5ksrf51Cyf85OWvX4yTcV1o,4097
24
24
  bitmart/ccxt/pro/bitmart.py,sha256=-iCp2w0UXeNrro_TcyVyJvsaTFXtq92nEP4h7hq-F-w,67253
25
25
  bitmart/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  bitmart/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
@@ -281,6 +281,6 @@ bitmart/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWn
281
281
  bitmart/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
282
282
  bitmart/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
283
283
  bitmart/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
284
- bitmart-0.0.75.dist-info/METADATA,sha256=dBGbpHivsNSJH3wqiWBVlM7OowTPAtY8BPzUcXiv53E,15156
285
- bitmart-0.0.75.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- bitmart-0.0.75.dist-info/RECORD,,
284
+ bitmart-0.0.76.dist-info/METADATA,sha256=ySwgBj0w0A9YgLNQPrmTUmfjK_IgJiQ7uMfUJKjtJ1o,15156
285
+ bitmart-0.0.76.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ bitmart-0.0.76.dist-info/RECORD,,