bitmart 0.0.94__py3-none-any.whl → 0.0.96__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.5.9'
29
+ __version__ = '4.5.11'
30
30
 
31
31
  # ----------------------------------------------------------------------------
32
32
 
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.5.9'
11
+ __version__ = '4.5.11'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.5.9'
5
+ __version__ = '4.5.11'
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 ConstructorArgs, OrderType, OrderSide, OrderRequest, CancellationRequest
28
+ from ccxt.base.types import ConstructorArgs, OrderType, OrderSide, OrderRequest, CancellationRequest, Order
29
29
 
30
30
  # -----------------------------------------------------------------------------
31
31
 
@@ -711,6 +711,12 @@ class Exchange(BaseExchange):
711
711
  async def un_watch_ticker(self, symbol: str, params={}):
712
712
  raise NotSupported(self.id + ' unWatchTicker() is not supported yet')
713
713
 
714
+ async def un_watch_mark_price(self, symbol: str, params={}):
715
+ raise NotSupported(self.id + ' unWatchMarkPrice() is not supported yet')
716
+
717
+ async def un_watch_mark_prices(self, symbols: Strings = None, params={}):
718
+ raise NotSupported(self.id + ' unWatchMarkPrices() is not supported yet')
719
+
714
720
  async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
715
721
  raise NotSupported(self.id + ' fetchDepositAddresses() is not supported yet')
716
722
 
@@ -1539,6 +1545,9 @@ class Exchange(BaseExchange):
1539
1545
  async def cancel_order_ws(self, id: str, symbol: Str = None, params={}):
1540
1546
  raise NotSupported(self.id + ' cancelOrderWs() is not supported yet')
1541
1547
 
1548
+ async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
1549
+ raise NotSupported(self.id + ' cancelOrders() is not supported yet')
1550
+
1542
1551
  async def cancel_orders_ws(self, ids: List[str], symbol: Str = None, params={}):
1543
1552
  raise NotSupported(self.id + ' cancelOrdersWs() is not supported yet')
1544
1553
 
@@ -1554,7 +1563,7 @@ class Exchange(BaseExchange):
1554
1563
  async def cancel_all_orders_ws(self, symbol: Str = None, params={}):
1555
1564
  raise NotSupported(self.id + ' cancelAllOrdersWs() is not supported yet')
1556
1565
 
1557
- async def cancel_unified_order(self, order, params={}):
1566
+ async def cancel_unified_order(self, order: Order, params={}):
1558
1567
  return self.cancel_order(self.safe_string(order, 'id'), self.safe_string(order, 'symbol'), params)
1559
1568
 
1560
1569
  async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -2182,7 +2191,7 @@ class Exchange(BaseExchange):
2182
2191
  """
2183
2192
  raise NotSupported(self.id + ' fetchTransfers() is not supported yet')
2184
2193
 
2185
- async def un_watch_ohlcv(self, symbol: str, timeframe='1m', params={}):
2194
+ async def un_watch_ohlcv(self, symbol: str, timeframe: str = '1m', params={}):
2186
2195
  """
2187
2196
  watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
2188
2197
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -86,6 +86,9 @@ class Client(object):
86
86
  def reusable_future(self, message_hash):
87
87
  return self.future(message_hash) # only used in go
88
88
 
89
+ def reusableFuture(self, message_hash):
90
+ return self.future(message_hash) # only used in go
91
+
89
92
  def resolve(self, result, message_hash):
90
93
  if self.verbose and message_hash is None:
91
94
  self.log(iso8601(milliseconds()), 'resolve received None messageHash')
@@ -2048,7 +2048,7 @@ class bitmart(Exchange, ImplicitAPI):
2048
2048
  self.safe_number_2(ohlcv, 'volume', 'v'),
2049
2049
  ]
2050
2050
 
2051
- async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
2051
+ async def fetch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
2052
2052
  """
2053
2053
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
2054
2054
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.5.9'
7
+ __version__ = '4.5.11'
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 ConstructorArgs, 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, Order
37
37
 
38
38
  # -----------------------------------------------------------------------------
39
39
 
@@ -2673,6 +2673,12 @@ class Exchange(object):
2673
2673
  def un_watch_ticker(self, symbol: str, params={}):
2674
2674
  raise NotSupported(self.id + ' unWatchTicker() is not supported yet')
2675
2675
 
2676
+ def un_watch_mark_price(self, symbol: str, params={}):
2677
+ raise NotSupported(self.id + ' unWatchMarkPrice() is not supported yet')
2678
+
2679
+ def un_watch_mark_prices(self, symbols: Strings = None, params={}):
2680
+ raise NotSupported(self.id + ' unWatchMarkPrices() is not supported yet')
2681
+
2676
2682
  def fetch_deposit_addresses(self, codes: Strings = None, params={}):
2677
2683
  raise NotSupported(self.id + ' fetchDepositAddresses() is not supported yet')
2678
2684
 
@@ -3049,6 +3055,8 @@ class Exchange(object):
3049
3055
  # if exchange does not yet have features manually implemented
3050
3056
  if self.features is None:
3051
3057
  return defaultValue
3058
+ if marketType is None:
3059
+ return defaultValue # marketType is required
3052
3060
  # if marketType(e.g. 'option') does not exist in features
3053
3061
  if not (marketType in self.features):
3054
3062
  return defaultValue # unsupported marketType, check "exchange.features" for details
@@ -3068,7 +3076,7 @@ class Exchange(object):
3068
3076
  methodsContainer = self.features[marketType][subType]
3069
3077
  # if user wanted only marketType and didn't provide methodName, eg: featureIsSupported('spot')
3070
3078
  if methodName is None:
3071
- return methodsContainer
3079
+ return defaultValue if (defaultValue is not None) else methodsContainer
3072
3080
  if not (methodName in methodsContainer):
3073
3081
  return defaultValue # unsupported method, check "exchange.features" for details')
3074
3082
  methodDict = methodsContainer[methodName]
@@ -3076,7 +3084,7 @@ class Exchange(object):
3076
3084
  return defaultValue
3077
3085
  # if user wanted only method and didn't provide `paramName`, eg: featureIsSupported('swap', 'linear', 'createOrder')
3078
3086
  if paramName is None:
3079
- return methodDict
3087
+ return defaultValue if (defaultValue is not None) else methodDict
3080
3088
  splited = paramName.split('.') # can be only parent key(`stopLoss`) or with child(`stopLoss.triggerPrice`)
3081
3089
  parentKey = splited[0]
3082
3090
  subKey = self.safe_string(splited, 1)
@@ -5591,6 +5599,9 @@ class Exchange(object):
5591
5599
  def cancel_order_ws(self, id: str, symbol: Str = None, params={}):
5592
5600
  raise NotSupported(self.id + ' cancelOrderWs() is not supported yet')
5593
5601
 
5602
+ def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
5603
+ raise NotSupported(self.id + ' cancelOrders() is not supported yet')
5604
+
5594
5605
  def cancel_orders_ws(self, ids: List[str], symbol: Str = None, params={}):
5595
5606
  raise NotSupported(self.id + ' cancelOrdersWs() is not supported yet')
5596
5607
 
@@ -5606,7 +5617,7 @@ class Exchange(object):
5606
5617
  def cancel_all_orders_ws(self, symbol: Str = None, params={}):
5607
5618
  raise NotSupported(self.id + ' cancelAllOrdersWs() is not supported yet')
5608
5619
 
5609
- def cancel_unified_order(self, order, params={}):
5620
+ def cancel_unified_order(self, order: Order, params={}):
5610
5621
  return self.cancel_order(self.safe_string(order, 'id'), self.safe_string(order, 'symbol'), params)
5611
5622
 
5612
5623
  def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -7165,7 +7176,7 @@ class Exchange(object):
7165
7176
  """
7166
7177
  raise NotSupported(self.id + ' fetchTransfers() is not supported yet')
7167
7178
 
7168
- def un_watch_ohlcv(self, symbol: str, timeframe='1m', params={}):
7179
+ def un_watch_ohlcv(self, symbol: str, timeframe: str = '1m', params={}):
7169
7180
  """
7170
7181
  watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
7171
7182
  :param str symbol: unified symbol of the market to fetch OHLCV data for
bitmart/ccxt/bitmart.py CHANGED
@@ -2048,7 +2048,7 @@ class bitmart(Exchange, ImplicitAPI):
2048
2048
  self.safe_number_2(ohlcv, 'volume', 'v'),
2049
2049
  ]
2050
2050
 
2051
- def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
2051
+ def fetch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
2052
2052
  """
2053
2053
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
2054
2054
 
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.5.9'
11
+ __version__ = '4.5.11'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
@@ -1055,7 +1055,7 @@ class bitmart(bitmartAsync):
1055
1055
  'indexPrice': self.safe_string(ticker, 'index_price'),
1056
1056
  }, market)
1057
1057
 
1058
- async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
1058
+ async def watch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
1059
1059
  """
1060
1060
 
1061
1061
  https://developer-pro.bitmart.com/en/spot/#public-kline-channel
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bitmart
3
- Version: 0.0.94
3
+ Version: 0.0.96
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
@@ -150,7 +150,7 @@ You can also construct custom requests to available "implicit" endpoints
150
150
  - `fetch_markets(self, params={})`
151
151
  - `fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
152
152
  - `fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
153
- - `fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={})`
153
+ - `fetch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={})`
154
154
  - `fetch_open_interest(self, symbol: str, params={})`
155
155
  - `fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
156
156
  - `fetch_order_book(self, symbol: str, limit: Int = None, params={})`
@@ -321,7 +321,7 @@ You can also construct custom requests to available "implicit" endpoints
321
321
  - `watch_bids_asks(self, symbols: Strings = None, params={})`
322
322
  - `watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
323
323
  - `watch_positions(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={})`
324
- - `watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={})`
324
+ - `watch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={})`
325
325
  - `watch_order_book(self, symbol: str, limit: Int = None, params={})`
326
326
  - `watch_order_book_for_symbols(self, symbols: List[str], limit: Int = None, params={})`
327
327
  - `authenticate(self, type, params={})`
@@ -1,15 +1,15 @@
1
1
  bitmart/__init__.py,sha256=DRRGWQ_AXzv_ztbAPzIZ0ID_zHfKYZID66sOb-SJ3eM,258
2
- bitmart/ccxt/__init__.py,sha256=ENpB_4gZNPVXUFDKAVFKvVl5FOXQKrWonYhJNS6-TVg,6132
3
- bitmart/ccxt/bitmart.py,sha256=Ga9w7UrbcCqrYwvVqWJreUrYYTqwf2AjaZMrhW6on0s,249344
2
+ bitmart/ccxt/__init__.py,sha256=wKruXZrvv599QdMrbwHuRJ6C9rO6R7zvDC0NVAS1QzM,6133
3
+ bitmart/ccxt/bitmart.py,sha256=3fKw1ze_lx-v3FB6spL0wbsHloIIQJUb_8I6SvpNcEE,249351
4
4
  bitmart/ccxt/abstract/bitmart.py,sha256=er1v0vWmX1-eus1XP5EyQCsmDS5LHVCUGEHqwvZuxyU,17395
5
- bitmart/ccxt/async_support/__init__.py,sha256=nszeT0MQisQRiXK7gwcnmGjI1Evu2OvHiv2ws9MyMGw,4865
6
- bitmart/ccxt/async_support/bitmart.py,sha256=ofWMsd-q3nCWoztRppPl4muuWJ4nSSM8kc-IrtmzReI,250468
5
+ bitmart/ccxt/async_support/__init__.py,sha256=to7FROeJUcktZtSadR-DmQ_ylgTzgQriTnEVkbrVfv4,4866
6
+ bitmart/ccxt/async_support/bitmart.py,sha256=PvmmZsl_he1qiL3VhP1eQn0Ac9QxdgK7u0uGwm7v6Yc,250475
7
7
  bitmart/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- bitmart/ccxt/async_support/base/exchange.py,sha256=pTMxjDanueHt_kGil2cNH2gVettnmaDYORYt49eky4c,125893
8
+ bitmart/ccxt/async_support/base/exchange.py,sha256=zLAED6HVOk2HJxbeS7XPV_FnCqL-_tb3DdTO67oBHn0,126383
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
- bitmart/ccxt/async_support/base/ws/client.py,sha256=TNcgR6zTQks4G57HcFbBQyOhjALevuTLkoleL3zFhXY,13841
12
+ bitmart/ccxt/async_support/base/ws/client.py,sha256=5eVs_896IJFZOewdyvf7H-lior529AXQ0Cu6ID4AwBI,13946
13
13
  bitmart/ccxt/async_support/base/ws/functions.py,sha256=qwvEnjtINWL5ZU-dbbeIunjyBxzFqbGWHfVhxqAcKug,1499
14
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
@@ -17,11 +17,11 @@ bitmart/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9p
17
17
  bitmart/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
18
18
  bitmart/ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
19
19
  bitmart/ccxt/base/errors.py,sha256=OGhWNvNtRlJOzFx-n1x3ZjTnaPpfWH0Vc0xACS-MeDw,5012
20
- bitmart/ccxt/base/exchange.py,sha256=82RGoXZXMLF0mfbYoRqM-dC7QRulQr9r4Ys0NBJ7Xto,348995
20
+ bitmart/ccxt/base/exchange.py,sha256=xWXowZzzxVdgS30rLOR_Lgt9lnkAeByeXd_VdwI5_oQ,349652
21
21
  bitmart/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
22
22
  bitmart/ccxt/base/types.py,sha256=Gvbogh9i7pPH7Z18xesYeDPribqqwq8uKpOv-YODFBs,11505
23
- bitmart/ccxt/pro/__init__.py,sha256=8I4J-6N3KYt-NAwbzJJnsSqrIpUE2TinKL_oi_iZBig,4179
24
- bitmart/ccxt/pro/bitmart.py,sha256=D4B14nh-2hbDQUE4s2QIUg8HiTzD9v8oINFmovU-nqA,67275
23
+ bitmart/ccxt/pro/__init__.py,sha256=quGUm9g4gHlAjqfo7ANx5M9Scwee9qZvKzb6OuBlXfk,4180
24
+ bitmart/ccxt/pro/bitmart.py,sha256=3Xo_6_pPDnVoWvS4jonJZ60_63RVSlFhnUcXRDRnwgc,67282
25
25
  bitmart/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  bitmart/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
27
27
  bitmart/ccxt/static_dependencies/ecdsa/__init__.py,sha256=Xaj0G79BLtBt2YZcOOMV8qOlQZ7fIJznNiHhiEEZfQA,594
@@ -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.94.dist-info/METADATA,sha256=LpGsQ8aE0c5TbHjBnKfCsDAv2tcwNCQwtz6nFdk_phg,15163
285
- bitmart-0.0.94.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- bitmart-0.0.94.dist-info/RECORD,,
284
+ bitmart-0.0.96.dist-info/METADATA,sha256=u7dVQZX0LBU1crZ7eYKBI0K5vyCzCIYaOaaR3dBS0nk,15177
285
+ bitmart-0.0.96.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ bitmart-0.0.96.dist-info/RECORD,,