ccxt 4.1.48__py2.py3-none-any.whl → 4.1.49__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.

Potentially problematic release.


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

ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.1.48'
25
+ __version__ = '4.1.49'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.1.48'
7
+ __version__ = '4.1.49'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.1.48'
5
+ __version__ = '4.1.49'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -297,6 +297,7 @@ class coinex(Exchange, ImplicitAPI):
297
297
  },
298
298
  },
299
299
  'options': {
300
+ 'brokerId': 'x-167673045',
300
301
  'createMarketBuyOrderRequiresPrice': True,
301
302
  'defaultType': 'spot', # spot, swap, margin
302
303
  'defaultSubType': 'linear', # linear, inverse
@@ -316,6 +317,26 @@ class coinex(Exchange, ImplicitAPI):
316
317
  'ACM': 'Actinium',
317
318
  },
318
319
  'precisionMode': TICK_SIZE,
320
+ 'exceptions': {
321
+ 'exact': {
322
+ # https://github.com/coinexcom/coinex_exchange_api/wiki/013error_code
323
+ '23': PermissionDenied, # IP Prohibited
324
+ '24': AuthenticationError,
325
+ '25': AuthenticationError,
326
+ '34': AuthenticationError, # Access id is expires
327
+ '35': ExchangeNotAvailable, # Service unavailable
328
+ '36': RequestTimeout, # Service timeout
329
+ '213': RateLimitExceeded, # Too many requests
330
+ '107': InsufficientFunds,
331
+ '600': OrderNotFound,
332
+ '601': InvalidOrder,
333
+ '602': InvalidOrder,
334
+ '606': InvalidOrder,
335
+ },
336
+ 'broad': {
337
+ 'ip not allow visit': PermissionDenied,
338
+ },
339
+ },
319
340
  })
320
341
 
321
342
  async def fetch_currencies(self, params={}):
@@ -1500,6 +1521,7 @@ class coinex(Exchange, ImplicitAPI):
1500
1521
  # "status": "done",
1501
1522
  # "taker_fee_rate": "0.0005",
1502
1523
  # "type": "sell",
1524
+ # "client_id": "",
1503
1525
  # }
1504
1526
  #
1505
1527
  # Spot and Margin createOrder, cancelOrder, fetchOrder
@@ -1527,6 +1549,7 @@ class coinex(Exchange, ImplicitAPI):
1527
1549
  # "stock_fee":"0",
1528
1550
  # "taker_fee_rate":"0.002",
1529
1551
  # "type":"buy"
1552
+ # "client_id": "",
1530
1553
  # }
1531
1554
  #
1532
1555
  # Swap createOrder, cancelOrder, fetchOrder
@@ -1734,9 +1757,12 @@ class coinex(Exchange, ImplicitAPI):
1734
1757
  type = 'market'
1735
1758
  else:
1736
1759
  type = rawType
1760
+ clientOrderId = self.safe_string(order, 'client_id')
1761
+ if clientOrderId == '':
1762
+ clientOrderId = None
1737
1763
  return self.safe_order({
1738
1764
  'id': self.safe_string_2(order, 'id', 'order_id'),
1739
- 'clientOrderId': None,
1765
+ 'clientOrderId': clientOrderId,
1740
1766
  'datetime': self.iso8601(timestamp),
1741
1767
  'timestamp': timestamp,
1742
1768
  'lastTradeTimestamp': self.safe_timestamp(order, 'update_time'),
@@ -1791,6 +1817,7 @@ class coinex(Exchange, ImplicitAPI):
1791
1817
  await self.load_markets()
1792
1818
  market = self.market(symbol)
1793
1819
  swap = market['swap']
1820
+ clientOrderId = self.safe_string_2(params, 'client_id', 'clientOrderId')
1794
1821
  stopPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
1795
1822
  stopLossPrice = self.safe_value(params, 'stopLossPrice')
1796
1823
  takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
@@ -1809,6 +1836,12 @@ class coinex(Exchange, ImplicitAPI):
1809
1836
  request = {
1810
1837
  'market': market['id'],
1811
1838
  }
1839
+ if clientOrderId is None:
1840
+ defaultId = 'x-167673045'
1841
+ brokerId = self.safe_string(self.options, 'brokerId', defaultId)
1842
+ request['client_id'] = brokerId + '-' + self.uuid16()
1843
+ else:
1844
+ request['client_id'] = clientOrderId
1812
1845
  if swap:
1813
1846
  if stopLossPrice or takeProfitPrice:
1814
1847
  request['stop_type'] = self.safe_integer(params, 'stop_type', 1) # 1: triggered by the latest transaction, 2: mark price, 3: index price
@@ -4499,6 +4532,29 @@ class coinex(Exchange, ImplicitAPI):
4499
4532
  url = self.urls['api'][api] + '/' + self.version + '/' + path
4500
4533
  query = self.omit(params, self.extract_params(path))
4501
4534
  nonce = str(self.nonce())
4535
+ if method == 'POST':
4536
+ parts = path.split('/')
4537
+ firstPart = self.safe_string(parts, 0, '')
4538
+ numParts = len(parts)
4539
+ lastPart = self.safe_string(parts, numParts - 1, '')
4540
+ lastWords = lastPart.split('_')
4541
+ numWords = len(lastWords)
4542
+ lastWord = self.safe_string(lastWords, numWords - 1, '')
4543
+ if (firstPart == 'order') and (lastWord == 'limit' or lastWord == 'market'):
4544
+ # inject in implicit API calls
4545
+ # POST /order/limit - Place limit orders
4546
+ # POST /order/market - Place market orders
4547
+ # POST /order/stop/limit - Place stop limit orders
4548
+ # POST /order/stop/market - Place stop market orders
4549
+ # POST /perpetual/v1/order/put_limit - Place limit orders
4550
+ # POST /perpetual/v1/order/put_market - Place market orders
4551
+ # POST /perpetual/v1/order/put_stop_limit - Place stop limit orders
4552
+ # POST /perpetual/v1/order/put_stop_market - Place stop market orders
4553
+ clientOrderId = self.safe_string(params, 'client_id')
4554
+ if clientOrderId is None:
4555
+ defaultId = 'x-167673045'
4556
+ brokerId = self.safe_value(self.options, 'brokerId', defaultId)
4557
+ query['client_id'] = brokerId + '_' + self.uuid16()
4502
4558
  if api == 'perpetualPrivate' or url == 'https://api.coinex.com/perpetual/v1/market/user_deals':
4503
4559
  self.check_required_credentials()
4504
4560
  query = self.extend({
@@ -4546,21 +4602,8 @@ class coinex(Exchange, ImplicitAPI):
4546
4602
  data = self.safe_value(response, 'data')
4547
4603
  message = self.safe_string(response, 'message')
4548
4604
  if (code != '0') or ((message != 'Success') and (message != 'Succeeded') and (message != 'Ok') and not data):
4549
- responseCodes = {
4550
- # https://github.com/coinexcom/coinex_exchange_api/wiki/013error_code
4551
- '23': PermissionDenied, # IP Prohibited
4552
- '24': AuthenticationError,
4553
- '25': AuthenticationError,
4554
- '34': AuthenticationError, # Access id is expires
4555
- '35': ExchangeNotAvailable, # Service unavailable
4556
- '36': RequestTimeout, # Service timeout
4557
- '213': RateLimitExceeded, # Too many requests
4558
- '107': InsufficientFunds,
4559
- '600': OrderNotFound,
4560
- '601': InvalidOrder,
4561
- '602': InvalidOrder,
4562
- '606': InvalidOrder,
4563
- }
4564
- ErrorClass = self.safe_value(responseCodes, code, ExchangeError)
4565
- raise ErrorClass(response['message'])
4605
+ feedback = self.id + ' ' + message
4606
+ self.throw_broadly_matched_exception(self.exceptions['broad'], message, feedback)
4607
+ self.throw_exactly_matched_exception(self.exceptions['exact'], code, feedback)
4608
+ raise ExchangeError(feedback)
4566
4609
  return None
@@ -145,8 +145,8 @@ class mexc(Exchange, ImplicitAPI):
145
145
  },
146
146
  'www': 'https://www.mexc.com/',
147
147
  'doc': [
148
- 'https://mxcdevelop.github.io/apidocs/spot_v3_en/',
149
- 'https://mxcdevelop.github.io/APIDoc/', # v1 & v2 : soon to be deprecated
148
+ 'https://mexcdevelop.github.io/apidocs/spot_v3_en/',
149
+ 'https://mexcdevelop.github.io/APIDoc/', # v1 & v2 : soon to be deprecated
150
150
  ],
151
151
  'fees': [
152
152
  'https://www.mexc.com/fee',
@@ -888,7 +888,7 @@ class mexc(Exchange, ImplicitAPI):
888
888
  async def fetch_currencies(self, params={}):
889
889
  """
890
890
  fetches all available currencies on an exchange
891
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
891
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
892
892
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
893
893
  :returns dict: an associative dictionary of currencies
894
894
  """
@@ -1271,8 +1271,8 @@ class mexc(Exchange, ImplicitAPI):
1271
1271
 
1272
1272
  async def fetch_order_book(self, symbol: str, limit: Optional[int] = None, params={}) -> OrderBook:
1273
1273
  """
1274
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#order-book
1275
- :see: https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
1274
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#order-book
1275
+ :see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
1276
1276
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
1277
1277
  :param str symbol: unified symbol of the market to fetch the order book for
1278
1278
  :param int [limit]: the maximum amount of order book entries to return
@@ -3332,9 +3332,9 @@ class mexc(Exchange, ImplicitAPI):
3332
3332
  async def fetch_balance(self, params={}) -> Balances:
3333
3333
  """
3334
3334
  query for balance and get the amount of funds available for trading or funds locked in orders
3335
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#account-information
3336
- :see: https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3337
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
3335
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
3336
+ :see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3337
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
3338
3338
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
3339
3339
  :param str [params.symbols]: # required for margin, market id's separated by commas
3340
3340
  :returns dict: a `balance structure <https://github.com/ccxt/ccxt/wiki/Manual#balance-structure>`
@@ -3985,7 +3985,7 @@ class mexc(Exchange, ImplicitAPI):
3985
3985
  async def fetch_deposit_addresses_by_network(self, code: str, params={}):
3986
3986
  """
3987
3987
  fetch a dictionary of addresses for a currency, indexed by network
3988
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
3988
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
3989
3989
  :param str code: unified currency code of the currency for the deposit address
3990
3990
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
3991
3991
  :returns dict: a dictionary of `address structures <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>` indexed by the network
@@ -4020,7 +4020,7 @@ class mexc(Exchange, ImplicitAPI):
4020
4020
 
4021
4021
  async def create_deposit_address(self, code: str, params={}):
4022
4022
  """
4023
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4023
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4024
4024
  create a currency deposit address
4025
4025
  :param str code: unified currency code of the currency for the deposit address
4026
4026
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
@@ -4057,7 +4057,7 @@ class mexc(Exchange, ImplicitAPI):
4057
4057
  async def fetch_deposit_address(self, code: str, params={}):
4058
4058
  """
4059
4059
  fetch the deposit address for a currency associated with self account
4060
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4060
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4061
4061
  :param str code: unified currency code
4062
4062
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
4063
4063
  :returns dict: an `address structure <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>`
@@ -4079,7 +4079,7 @@ class mexc(Exchange, ImplicitAPI):
4079
4079
  async def fetch_deposits(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}) -> List[Transaction]:
4080
4080
  """
4081
4081
  fetch all deposits made to an account
4082
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
4082
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
4083
4083
  :param str code: unified currency code
4084
4084
  :param int [since]: the earliest time in ms to fetch deposits for
4085
4085
  :param int [limit]: the maximum number of deposits structures to retrieve
@@ -4132,7 +4132,7 @@ class mexc(Exchange, ImplicitAPI):
4132
4132
  async def fetch_withdrawals(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}) -> List[Transaction]:
4133
4133
  """
4134
4134
  fetch all withdrawals made from an account
4135
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
4135
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
4136
4136
  :param str code: unified currency code
4137
4137
  :param int [since]: the earliest time in ms to fetch withdrawals for
4138
4138
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -4526,7 +4526,7 @@ class mexc(Exchange, ImplicitAPI):
4526
4526
  async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
4527
4527
  """
4528
4528
  transfer currency internally between wallets on the same account
4529
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
4529
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
4530
4530
  :param str code: unified currency code
4531
4531
  :param float amount: amount to transfer
4532
4532
  :param str fromAccount: account to transfer from
@@ -4651,7 +4651,7 @@ class mexc(Exchange, ImplicitAPI):
4651
4651
  async def withdraw(self, code: str, amount, address, tag=None, params={}):
4652
4652
  """
4653
4653
  make a withdrawal
4654
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw
4654
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw
4655
4655
  :param str code: unified currency code
4656
4656
  :param float amount: the amount to withdraw
4657
4657
  :param str address: the address to withdraw to
@@ -4661,7 +4661,7 @@ class mexc(Exchange, ImplicitAPI):
4661
4661
  """
4662
4662
  tag, params = self.handle_withdraw_tag_and_params(tag, params)
4663
4663
  networks = self.safe_value(self.options, 'networks', {})
4664
- network = self.safe_string_upper_2(params, 'network', 'chain') # self line allows the user to specify either ERC20 or ETH
4664
+ network = self.safe_string_2(params, 'network', 'chain') # self line allows the user to specify either ERC20 or ETH
4665
4665
  network = self.safe_string(networks, network, network) # handle ETH > ERC-20 alias
4666
4666
  self.check_address(address)
4667
4667
  await self.load_markets()
@@ -4675,7 +4675,7 @@ class mexc(Exchange, ImplicitAPI):
4675
4675
  request['memo'] = tag
4676
4676
  if network is not None:
4677
4677
  request['network'] = network
4678
- params = self.omit(params, 'network')
4678
+ params = self.omit(params, ['network', 'chain'])
4679
4679
  response = await self.spotPrivatePostCapitalWithdrawApply(self.extend(request, params))
4680
4680
  #
4681
4681
  # {
@@ -4715,7 +4715,7 @@ class mexc(Exchange, ImplicitAPI):
4715
4715
  async def borrow_margin(self, code: str, amount, symbol: Optional[str] = None, params={}):
4716
4716
  """
4717
4717
  create a loan to borrow margin
4718
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#loan
4718
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#loan
4719
4719
  :param str code: unified currency code of the currency to borrow
4720
4720
  :param float amount: the amount to borrow
4721
4721
  :param str symbol: unified market symbol
@@ -4746,7 +4746,7 @@ class mexc(Exchange, ImplicitAPI):
4746
4746
  async def repay_margin(self, code: str, amount, symbol: Optional[str] = None, params={}):
4747
4747
  """
4748
4748
  repay borrowed margin and interest
4749
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#repayment
4749
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#repayment
4750
4750
  :param str code: unified currency code of the currency to repay
4751
4751
  :param float amount: the amount to repay
4752
4752
  :param str symbol: unified market symbol
@@ -4782,7 +4782,7 @@ class mexc(Exchange, ImplicitAPI):
4782
4782
  async def fetch_transaction_fees(self, codes=None, params={}):
4783
4783
  """
4784
4784
  fetch deposit and withdrawal fees
4785
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
4785
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
4786
4786
  :param str[]|None codes: returns fees for all currencies if None
4787
4787
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
4788
4788
  :returns dict[]: a list of `fee structures <https://github.com/ccxt/ccxt/wiki/Manual#fee-structure>`
@@ -4875,7 +4875,7 @@ class mexc(Exchange, ImplicitAPI):
4875
4875
  async def fetch_deposit_withdraw_fees(self, codes: Optional[List[str]] = None, params={}):
4876
4876
  """
4877
4877
  fetch deposit and withdrawal fees
4878
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
4878
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
4879
4879
  :param str[]|None codes: returns fees for all currencies if None
4880
4880
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
4881
4881
  :returns dict[]: a list of `fee structures <https://github.com/ccxt/ccxt/wiki/Manual#fee-structure>`
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.1.48'
7
+ __version__ = '4.1.49'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/coinex.py CHANGED
@@ -296,6 +296,7 @@ class coinex(Exchange, ImplicitAPI):
296
296
  },
297
297
  },
298
298
  'options': {
299
+ 'brokerId': 'x-167673045',
299
300
  'createMarketBuyOrderRequiresPrice': True,
300
301
  'defaultType': 'spot', # spot, swap, margin
301
302
  'defaultSubType': 'linear', # linear, inverse
@@ -315,6 +316,26 @@ class coinex(Exchange, ImplicitAPI):
315
316
  'ACM': 'Actinium',
316
317
  },
317
318
  'precisionMode': TICK_SIZE,
319
+ 'exceptions': {
320
+ 'exact': {
321
+ # https://github.com/coinexcom/coinex_exchange_api/wiki/013error_code
322
+ '23': PermissionDenied, # IP Prohibited
323
+ '24': AuthenticationError,
324
+ '25': AuthenticationError,
325
+ '34': AuthenticationError, # Access id is expires
326
+ '35': ExchangeNotAvailable, # Service unavailable
327
+ '36': RequestTimeout, # Service timeout
328
+ '213': RateLimitExceeded, # Too many requests
329
+ '107': InsufficientFunds,
330
+ '600': OrderNotFound,
331
+ '601': InvalidOrder,
332
+ '602': InvalidOrder,
333
+ '606': InvalidOrder,
334
+ },
335
+ 'broad': {
336
+ 'ip not allow visit': PermissionDenied,
337
+ },
338
+ },
318
339
  })
319
340
 
320
341
  def fetch_currencies(self, params={}):
@@ -1499,6 +1520,7 @@ class coinex(Exchange, ImplicitAPI):
1499
1520
  # "status": "done",
1500
1521
  # "taker_fee_rate": "0.0005",
1501
1522
  # "type": "sell",
1523
+ # "client_id": "",
1502
1524
  # }
1503
1525
  #
1504
1526
  # Spot and Margin createOrder, cancelOrder, fetchOrder
@@ -1526,6 +1548,7 @@ class coinex(Exchange, ImplicitAPI):
1526
1548
  # "stock_fee":"0",
1527
1549
  # "taker_fee_rate":"0.002",
1528
1550
  # "type":"buy"
1551
+ # "client_id": "",
1529
1552
  # }
1530
1553
  #
1531
1554
  # Swap createOrder, cancelOrder, fetchOrder
@@ -1733,9 +1756,12 @@ class coinex(Exchange, ImplicitAPI):
1733
1756
  type = 'market'
1734
1757
  else:
1735
1758
  type = rawType
1759
+ clientOrderId = self.safe_string(order, 'client_id')
1760
+ if clientOrderId == '':
1761
+ clientOrderId = None
1736
1762
  return self.safe_order({
1737
1763
  'id': self.safe_string_2(order, 'id', 'order_id'),
1738
- 'clientOrderId': None,
1764
+ 'clientOrderId': clientOrderId,
1739
1765
  'datetime': self.iso8601(timestamp),
1740
1766
  'timestamp': timestamp,
1741
1767
  'lastTradeTimestamp': self.safe_timestamp(order, 'update_time'),
@@ -1790,6 +1816,7 @@ class coinex(Exchange, ImplicitAPI):
1790
1816
  self.load_markets()
1791
1817
  market = self.market(symbol)
1792
1818
  swap = market['swap']
1819
+ clientOrderId = self.safe_string_2(params, 'client_id', 'clientOrderId')
1793
1820
  stopPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
1794
1821
  stopLossPrice = self.safe_value(params, 'stopLossPrice')
1795
1822
  takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
@@ -1808,6 +1835,12 @@ class coinex(Exchange, ImplicitAPI):
1808
1835
  request = {
1809
1836
  'market': market['id'],
1810
1837
  }
1838
+ if clientOrderId is None:
1839
+ defaultId = 'x-167673045'
1840
+ brokerId = self.safe_string(self.options, 'brokerId', defaultId)
1841
+ request['client_id'] = brokerId + '-' + self.uuid16()
1842
+ else:
1843
+ request['client_id'] = clientOrderId
1811
1844
  if swap:
1812
1845
  if stopLossPrice or takeProfitPrice:
1813
1846
  request['stop_type'] = self.safe_integer(params, 'stop_type', 1) # 1: triggered by the latest transaction, 2: mark price, 3: index price
@@ -4498,6 +4531,29 @@ class coinex(Exchange, ImplicitAPI):
4498
4531
  url = self.urls['api'][api] + '/' + self.version + '/' + path
4499
4532
  query = self.omit(params, self.extract_params(path))
4500
4533
  nonce = str(self.nonce())
4534
+ if method == 'POST':
4535
+ parts = path.split('/')
4536
+ firstPart = self.safe_string(parts, 0, '')
4537
+ numParts = len(parts)
4538
+ lastPart = self.safe_string(parts, numParts - 1, '')
4539
+ lastWords = lastPart.split('_')
4540
+ numWords = len(lastWords)
4541
+ lastWord = self.safe_string(lastWords, numWords - 1, '')
4542
+ if (firstPart == 'order') and (lastWord == 'limit' or lastWord == 'market'):
4543
+ # inject in implicit API calls
4544
+ # POST /order/limit - Place limit orders
4545
+ # POST /order/market - Place market orders
4546
+ # POST /order/stop/limit - Place stop limit orders
4547
+ # POST /order/stop/market - Place stop market orders
4548
+ # POST /perpetual/v1/order/put_limit - Place limit orders
4549
+ # POST /perpetual/v1/order/put_market - Place market orders
4550
+ # POST /perpetual/v1/order/put_stop_limit - Place stop limit orders
4551
+ # POST /perpetual/v1/order/put_stop_market - Place stop market orders
4552
+ clientOrderId = self.safe_string(params, 'client_id')
4553
+ if clientOrderId is None:
4554
+ defaultId = 'x-167673045'
4555
+ brokerId = self.safe_value(self.options, 'brokerId', defaultId)
4556
+ query['client_id'] = brokerId + '_' + self.uuid16()
4501
4557
  if api == 'perpetualPrivate' or url == 'https://api.coinex.com/perpetual/v1/market/user_deals':
4502
4558
  self.check_required_credentials()
4503
4559
  query = self.extend({
@@ -4545,21 +4601,8 @@ class coinex(Exchange, ImplicitAPI):
4545
4601
  data = self.safe_value(response, 'data')
4546
4602
  message = self.safe_string(response, 'message')
4547
4603
  if (code != '0') or ((message != 'Success') and (message != 'Succeeded') and (message != 'Ok') and not data):
4548
- responseCodes = {
4549
- # https://github.com/coinexcom/coinex_exchange_api/wiki/013error_code
4550
- '23': PermissionDenied, # IP Prohibited
4551
- '24': AuthenticationError,
4552
- '25': AuthenticationError,
4553
- '34': AuthenticationError, # Access id is expires
4554
- '35': ExchangeNotAvailable, # Service unavailable
4555
- '36': RequestTimeout, # Service timeout
4556
- '213': RateLimitExceeded, # Too many requests
4557
- '107': InsufficientFunds,
4558
- '600': OrderNotFound,
4559
- '601': InvalidOrder,
4560
- '602': InvalidOrder,
4561
- '606': InvalidOrder,
4562
- }
4563
- ErrorClass = self.safe_value(responseCodes, code, ExchangeError)
4564
- raise ErrorClass(response['message'])
4604
+ feedback = self.id + ' ' + message
4605
+ self.throw_broadly_matched_exception(self.exceptions['broad'], message, feedback)
4606
+ self.throw_exactly_matched_exception(self.exceptions['exact'], code, feedback)
4607
+ raise ExchangeError(feedback)
4565
4608
  return None
ccxt/mexc.py CHANGED
@@ -145,8 +145,8 @@ class mexc(Exchange, ImplicitAPI):
145
145
  },
146
146
  'www': 'https://www.mexc.com/',
147
147
  'doc': [
148
- 'https://mxcdevelop.github.io/apidocs/spot_v3_en/',
149
- 'https://mxcdevelop.github.io/APIDoc/', # v1 & v2 : soon to be deprecated
148
+ 'https://mexcdevelop.github.io/apidocs/spot_v3_en/',
149
+ 'https://mexcdevelop.github.io/APIDoc/', # v1 & v2 : soon to be deprecated
150
150
  ],
151
151
  'fees': [
152
152
  'https://www.mexc.com/fee',
@@ -888,7 +888,7 @@ class mexc(Exchange, ImplicitAPI):
888
888
  def fetch_currencies(self, params={}):
889
889
  """
890
890
  fetches all available currencies on an exchange
891
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
891
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
892
892
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
893
893
  :returns dict: an associative dictionary of currencies
894
894
  """
@@ -1271,8 +1271,8 @@ class mexc(Exchange, ImplicitAPI):
1271
1271
 
1272
1272
  def fetch_order_book(self, symbol: str, limit: Optional[int] = None, params={}) -> OrderBook:
1273
1273
  """
1274
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#order-book
1275
- :see: https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
1274
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#order-book
1275
+ :see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
1276
1276
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
1277
1277
  :param str symbol: unified symbol of the market to fetch the order book for
1278
1278
  :param int [limit]: the maximum amount of order book entries to return
@@ -3332,9 +3332,9 @@ class mexc(Exchange, ImplicitAPI):
3332
3332
  def fetch_balance(self, params={}) -> Balances:
3333
3333
  """
3334
3334
  query for balance and get the amount of funds available for trading or funds locked in orders
3335
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#account-information
3336
- :see: https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3337
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
3335
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
3336
+ :see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3337
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
3338
3338
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
3339
3339
  :param str [params.symbols]: # required for margin, market id's separated by commas
3340
3340
  :returns dict: a `balance structure <https://github.com/ccxt/ccxt/wiki/Manual#balance-structure>`
@@ -3985,7 +3985,7 @@ class mexc(Exchange, ImplicitAPI):
3985
3985
  def fetch_deposit_addresses_by_network(self, code: str, params={}):
3986
3986
  """
3987
3987
  fetch a dictionary of addresses for a currency, indexed by network
3988
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
3988
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
3989
3989
  :param str code: unified currency code of the currency for the deposit address
3990
3990
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
3991
3991
  :returns dict: a dictionary of `address structures <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>` indexed by the network
@@ -4020,7 +4020,7 @@ class mexc(Exchange, ImplicitAPI):
4020
4020
 
4021
4021
  def create_deposit_address(self, code: str, params={}):
4022
4022
  """
4023
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4023
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4024
4024
  create a currency deposit address
4025
4025
  :param str code: unified currency code of the currency for the deposit address
4026
4026
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
@@ -4057,7 +4057,7 @@ class mexc(Exchange, ImplicitAPI):
4057
4057
  def fetch_deposit_address(self, code: str, params={}):
4058
4058
  """
4059
4059
  fetch the deposit address for a currency associated with self account
4060
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4060
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4061
4061
  :param str code: unified currency code
4062
4062
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
4063
4063
  :returns dict: an `address structure <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>`
@@ -4079,7 +4079,7 @@ class mexc(Exchange, ImplicitAPI):
4079
4079
  def fetch_deposits(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}) -> List[Transaction]:
4080
4080
  """
4081
4081
  fetch all deposits made to an account
4082
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
4082
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
4083
4083
  :param str code: unified currency code
4084
4084
  :param int [since]: the earliest time in ms to fetch deposits for
4085
4085
  :param int [limit]: the maximum number of deposits structures to retrieve
@@ -4132,7 +4132,7 @@ class mexc(Exchange, ImplicitAPI):
4132
4132
  def fetch_withdrawals(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}) -> List[Transaction]:
4133
4133
  """
4134
4134
  fetch all withdrawals made from an account
4135
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
4135
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
4136
4136
  :param str code: unified currency code
4137
4137
  :param int [since]: the earliest time in ms to fetch withdrawals for
4138
4138
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -4526,7 +4526,7 @@ class mexc(Exchange, ImplicitAPI):
4526
4526
  def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
4527
4527
  """
4528
4528
  transfer currency internally between wallets on the same account
4529
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
4529
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
4530
4530
  :param str code: unified currency code
4531
4531
  :param float amount: amount to transfer
4532
4532
  :param str fromAccount: account to transfer from
@@ -4651,7 +4651,7 @@ class mexc(Exchange, ImplicitAPI):
4651
4651
  def withdraw(self, code: str, amount, address, tag=None, params={}):
4652
4652
  """
4653
4653
  make a withdrawal
4654
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw
4654
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw
4655
4655
  :param str code: unified currency code
4656
4656
  :param float amount: the amount to withdraw
4657
4657
  :param str address: the address to withdraw to
@@ -4661,7 +4661,7 @@ class mexc(Exchange, ImplicitAPI):
4661
4661
  """
4662
4662
  tag, params = self.handle_withdraw_tag_and_params(tag, params)
4663
4663
  networks = self.safe_value(self.options, 'networks', {})
4664
- network = self.safe_string_upper_2(params, 'network', 'chain') # self line allows the user to specify either ERC20 or ETH
4664
+ network = self.safe_string_2(params, 'network', 'chain') # self line allows the user to specify either ERC20 or ETH
4665
4665
  network = self.safe_string(networks, network, network) # handle ETH > ERC-20 alias
4666
4666
  self.check_address(address)
4667
4667
  self.load_markets()
@@ -4675,7 +4675,7 @@ class mexc(Exchange, ImplicitAPI):
4675
4675
  request['memo'] = tag
4676
4676
  if network is not None:
4677
4677
  request['network'] = network
4678
- params = self.omit(params, 'network')
4678
+ params = self.omit(params, ['network', 'chain'])
4679
4679
  response = self.spotPrivatePostCapitalWithdrawApply(self.extend(request, params))
4680
4680
  #
4681
4681
  # {
@@ -4715,7 +4715,7 @@ class mexc(Exchange, ImplicitAPI):
4715
4715
  def borrow_margin(self, code: str, amount, symbol: Optional[str] = None, params={}):
4716
4716
  """
4717
4717
  create a loan to borrow margin
4718
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#loan
4718
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#loan
4719
4719
  :param str code: unified currency code of the currency to borrow
4720
4720
  :param float amount: the amount to borrow
4721
4721
  :param str symbol: unified market symbol
@@ -4746,7 +4746,7 @@ class mexc(Exchange, ImplicitAPI):
4746
4746
  def repay_margin(self, code: str, amount, symbol: Optional[str] = None, params={}):
4747
4747
  """
4748
4748
  repay borrowed margin and interest
4749
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#repayment
4749
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#repayment
4750
4750
  :param str code: unified currency code of the currency to repay
4751
4751
  :param float amount: the amount to repay
4752
4752
  :param str symbol: unified market symbol
@@ -4782,7 +4782,7 @@ class mexc(Exchange, ImplicitAPI):
4782
4782
  def fetch_transaction_fees(self, codes=None, params={}):
4783
4783
  """
4784
4784
  fetch deposit and withdrawal fees
4785
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
4785
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
4786
4786
  :param str[]|None codes: returns fees for all currencies if None
4787
4787
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
4788
4788
  :returns dict[]: a list of `fee structures <https://github.com/ccxt/ccxt/wiki/Manual#fee-structure>`
@@ -4875,7 +4875,7 @@ class mexc(Exchange, ImplicitAPI):
4875
4875
  def fetch_deposit_withdraw_fees(self, codes: Optional[List[str]] = None, params={}):
4876
4876
  """
4877
4877
  fetch deposit and withdrawal fees
4878
- :see: https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
4878
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
4879
4879
  :param str[]|None codes: returns fees for all currencies if None
4880
4880
  :param dict [params]: extra parameters specific to the mexc3 api endpoint
4881
4881
  :returns dict[]: a list of `fee structures <https://github.com/ccxt/ccxt/wiki/Manual#fee-structure>`
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.1.48'
7
+ __version__ = '4.1.49'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.1.48
3
+ Version: 4.1.49
4
4
  Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 130+ exchanges
5
5
  Home-page: https://ccxt.com
6
6
  Author: Igor Kroitor
@@ -96,7 +96,7 @@ Current feature list:
96
96
  | [![htx](https://user-images.githubusercontent.com/1294454/76137448-22748a80-604e-11ea-8069-6e389271911d.jpg)](https://www.huobi.com/en-us/v/register/double-invite/?inviter_id=11343840&invite_code=6rmm2223) | htx | [HTX](https://www.huobi.com/en-us/v/register/double-invite/?inviter_id=11343840&invite_code=6rmm2223) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://huobiapi.github.io/docs/spot/v1/en/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with HTX using CCXT's referral link for a 15% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d15%25&color=orange)](https://www.huobi.com/en-us/v/register/double-invite/?inviter_id=11343840&invite_code=6rmm2223) |
97
97
  | [![kucoin](https://user-images.githubusercontent.com/51840849/87295558-132aaf80-c50e-11ea-9801-a2fb0c57c799.jpg)](https://www.kucoin.com/ucenter/signup?rcode=E5wkqe) | kucoin | [KuCoin](https://www.kucoin.com/ucenter/signup?rcode=E5wkqe) | [![API Version 2](https://img.shields.io/badge/2-lightgray)](https://docs.kucoin.com) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | |
98
98
  | [![kucoinfutures](https://user-images.githubusercontent.com/1294454/147508995-9e35030a-d046-43a1-a006-6fabd981b554.jpg)](https://futures.kucoin.com/?rcode=E5wkqe) | kucoinfutures | [KuCoin Futures](https://futures.kucoin.com/?rcode=E5wkqe) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://docs.kucoin.com/futures) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | |
99
- | [![mexc](https://user-images.githubusercontent.com/1294454/137283979-8b2a818d-8633-461b-bfca-de89e8c446b2.jpg)](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | mexc | [MEXC Global](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | [![API Version 3](https://img.shields.io/badge/3-lightgray)](https://mxcdevelop.github.io/apidocs/spot_v3_en/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | |
99
+ | [![mexc](https://user-images.githubusercontent.com/1294454/137283979-8b2a818d-8633-461b-bfca-de89e8c446b2.jpg)](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | mexc | [MEXC Global](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | [![API Version 3](https://img.shields.io/badge/3-lightgray)](https://mexcdevelop.github.io/apidocs/spot_v3_en/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | |
100
100
  | [![okx](https://user-images.githubusercontent.com/1294454/152485636-38b19e4a-bece-4dec-979a-5982859ffc04.jpg)](https://www.okx.com/activities/ccxt-trade-and-earn?channelid=CCXT2023) | okx | [OKX](https://www.okx.com/activities/ccxt-trade-and-earn?channelid=CCXT2023) | [![API Version 5](https://img.shields.io/badge/5-lightgray)](https://www.okx.com/docs-v5/en/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with OKX using CCXT's referral link for a 20% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d20%25&color=orange)](https://www.okx.com/activities/ccxt-trade-and-earn?channelid=CCXT2023) |
101
101
  | [![wavesexchange](https://user-images.githubusercontent.com/1294454/84547058-5fb27d80-ad0b-11ea-8711-78ac8b3c7f31.jpg)](https://wx.network) | wavesexchange | [Waves.Exchange](https://wx.network) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://docs.wx.network) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | | |
102
102
  | [![woo](https://user-images.githubusercontent.com/1294454/150730761-1a00e5e0-d28c-480f-9e65-089ce3e6ef3b.jpg)](https://x.woo.org/register?ref=YWOWC96B) | woo | [WOO X](https://x.woo.org/register?ref=YWOWC96B) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://docs.woo.org/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with WOO X using CCXT's referral link for a 35% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d35%25&color=orange)](https://x.woo.org/register?ref=YWOWC96B) |
@@ -183,7 +183,7 @@ The CCXT library currently supports the following 98 cryptocurrency exchange mar
183
183
  | [![luno](https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg)](https://www.luno.com/invite/44893A) | luno | [luno](https://www.luno.com/invite/44893A) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://www.luno.com/en/api) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
184
184
  | [![lykke](https://user-images.githubusercontent.com/1294454/155840500-1ea4fdf0-47c0-4daa-9597-c6c1cd51b9ec.jpg)](https://www.lykke.com) | lykke | [Lykke](https://www.lykke.com) | [![API Version 2](https://img.shields.io/badge/2-lightgray)](https://hft-apiv2.lykke.com/swagger/ui/index.html) | | |
185
185
  | [![mercado](https://user-images.githubusercontent.com/1294454/27837060-e7c58714-60ea-11e7-9192-f05e86adb83f.jpg)](https://www.mercadobitcoin.com.br) | mercado | [Mercado Bitcoin](https://www.mercadobitcoin.com.br) | [![API Version 3](https://img.shields.io/badge/3-lightgray)](https://www.mercadobitcoin.com.br/api-doc) | | |
186
- | [![mexc](https://user-images.githubusercontent.com/1294454/137283979-8b2a818d-8633-461b-bfca-de89e8c446b2.jpg)](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | mexc | [MEXC Global](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | [![API Version 3](https://img.shields.io/badge/3-lightgray)](https://mxcdevelop.github.io/apidocs/spot_v3_en/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
186
+ | [![mexc](https://user-images.githubusercontent.com/1294454/137283979-8b2a818d-8633-461b-bfca-de89e8c446b2.jpg)](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | mexc | [MEXC Global](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | [![API Version 3](https://img.shields.io/badge/3-lightgray)](https://mexcdevelop.github.io/apidocs/spot_v3_en/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
187
187
  | [![ndax](https://user-images.githubusercontent.com/1294454/108623144-67a3ef00-744e-11eb-8140-75c6b851e945.jpg)](https://one.ndax.io/bfQiSL) | ndax | [NDAX](https://one.ndax.io/bfQiSL) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://apidoc.ndax.io/) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
188
188
  | [![novadax](https://user-images.githubusercontent.com/1294454/92337550-2b085500-f0b3-11ea-98e7-5794fb07dd3b.jpg)](https://www.novadax.com.br/?s=ccxt) | novadax | [NovaDAX](https://www.novadax.com.br/?s=ccxt) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://doc.novadax.com/pt-BR/) | | |
189
189
  | [![oceanex](https://user-images.githubusercontent.com/1294454/58385970-794e2d80-8001-11e9-889c-0567cd79b78e.jpg)](https://oceanex.pro/signup?referral=VE24QX) | oceanex | [OceanEx](https://oceanex.pro/signup?referral=VE24QX) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://api.oceanex.pro/doc/v1) | | |
@@ -262,13 +262,13 @@ console.log(version, Object.keys(exchanges));
262
262
 
263
263
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
264
264
 
265
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.48/dist/ccxt.browser.js
266
- * unpkg: https://unpkg.com/ccxt@4.1.48/dist/ccxt.browser.js
265
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.49/dist/ccxt.browser.js
266
+ * unpkg: https://unpkg.com/ccxt@4.1.49/dist/ccxt.browser.js
267
267
 
268
268
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
269
269
 
270
270
  ```HTML
271
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.48/dist/ccxt.browser.js"></script>
271
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.49/dist/ccxt.browser.js"></script>
272
272
  ```
273
273
 
274
274
  Creates a global `ccxt` object:
@@ -1,4 +1,4 @@
1
- ccxt/__init__.py,sha256=xXf6nob1-OwYWh8tIvSvg7ipqHlK108l6E1rh1VkYqs,15868
1
+ ccxt/__init__.py,sha256=ullEup_A4MLRj-1IwQMI154HGgwgrIRnDxaGJApp1WE,15868
2
2
  ccxt/ace.py,sha256=K8Y_qzEyNDKUBxhnprctivOZWdD2elOdVk_se8ij0OQ,41571
3
3
  ccxt/alpaca.py,sha256=Mqr3DJFS1j1mrE-uJRqhbY7LuOlBNaZoR7Ez2TVO-fE,33786
4
4
  ccxt/ascendex.py,sha256=a20Dcrtpj852UUjTsdI6lcxqmy4-2uoUL1XXmvACEXU,142741
@@ -43,7 +43,7 @@ ccxt/coinbase.py,sha256=g3SFel3HBls0ufqOqU3OIjlNRXUNoDT2T9zbAJkuJAk,136249
43
43
  ccxt/coinbaseprime.py,sha256=Ygvljulxb2uKdei5yimCj1LMjLlUJNvP-G7ns1HpUFk,1219
44
44
  ccxt/coinbasepro.py,sha256=ioH7WBNWiojo4mNDgJCNFI_f3JXBGXNAb9ojfUmrt3E,79175
45
45
  ccxt/coincheck.py,sha256=qJAL7NK4RxuhB3uywQDSiGsM6ckZdy0kymP7sy5iSNQ,34727
46
- ccxt/coinex.py,sha256=CpMMPbJDYYU48EYAhAJeO-3Zz2jilfh4a7fAOIqvjjo,198419
46
+ ccxt/coinex.py,sha256=1PdUT6CJFPTxmRu_0AVGx07Z2lg5uwPbvOco9kGlPpg,200769
47
47
  ccxt/coinfalcon.py,sha256=L3G1buMq8WRf7_fkF4_UBSnm7ivdG211kxHjXikh-sw,39388
48
48
  ccxt/coinlist.py,sha256=MVEL2KVby1u_vawsIqyxGW3WgRI9uKwlwBu_9PMJPbk,102860
49
49
  ccxt/coinmate.py,sha256=yNGfjq9_PLNbbhWzQ9VPDu_R99Oy4xMpXZAj6Mc7DmI,39981
@@ -82,7 +82,7 @@ ccxt/lbank2.py,sha256=-MhVygTjgfUuqK4_O5ksE30jSUYGqe2WTvE4k7GG4Us,111914
82
82
  ccxt/luno.py,sha256=Ax9IRhEDeiQSU8AOZLBfhtd04CiXT_6rrTyhK8FznqA,40994
83
83
  ccxt/lykke.py,sha256=kHspxt047n-T2KQpvJGi4d0tm3REM1p8zbE2waNEnfQ,49065
84
84
  ccxt/mercado.py,sha256=e6qJ5YQsqW13GS9CgRM79TH0kIuGt7hnFOt5u2FJvW8,34761
85
- ccxt/mexc.py,sha256=tNktHKfy8cySGRIxCO5scxgtkTqbOx4QkT3HCl9SQpg,226424
85
+ ccxt/mexc.py,sha256=L6F2akLaEa4JL4Wf-gie9oRMaJIuur0-RGnFXhBAqww,226448
86
86
  ccxt/mexc3.py,sha256=sEif-cT2AIBMl0C3T6dgfRh8HHWarzXfEEGPZOahrGs,441
87
87
  ccxt/ndax.py,sha256=O3frJm8mHcKFnI6dzaSuXJNxaGvyPKv7av2c3F_35i4,107641
88
88
  ccxt/novadax.py,sha256=nl33LPG2fTWIYzskoEfKuzOcu-d5s0b-HLAsCZWEFyo,63797
@@ -215,7 +215,7 @@ ccxt/abstract/woo.py,sha256=Z3ua45hKE0Tf9rtfSEYYgGEztaTO1Ri3mKl_hIo3OHs,8768
215
215
  ccxt/abstract/yobit.py,sha256=8ycfCO8ORFly9hc0Aa47sZyX4_ZKPXS9h9yJzI-uQ7Q,1339
216
216
  ccxt/abstract/zaif.py,sha256=m15WHdl3gYy0GOXNZ8NEH8eE7sVh8c0T_ITNuU8vXeU,3935
217
217
  ccxt/abstract/zonda.py,sha256=aSfewvRojzmuymX6QbOnDR8v9VFqWTULMHX9Y7kKD1M,5820
218
- ccxt/async_support/__init__.py,sha256=pix8A4gxXXZ8RuPhGuynRc4JnoAnqocsheMFcAKf8bM,15661
218
+ ccxt/async_support/__init__.py,sha256=Ew9VAE7v7UAfr04AJj6G058tctu24M4Dl7KNBni2Fi8,15661
219
219
  ccxt/async_support/ace.py,sha256=hKnHqsC-UnsZh2wgQZQaLsztm9FkyA1aClvRTREUJiw,41795
220
220
  ccxt/async_support/alpaca.py,sha256=ZyDFYuo_omKO05mFkTd_AI0zFBxhzLTb74R6P8uEWyo,33932
221
221
  ccxt/async_support/ascendex.py,sha256=BY5qgodWwACinn_d3_3PTTFpt5zjvBULJENjjcATVYg,143439
@@ -260,7 +260,7 @@ ccxt/async_support/coinbase.py,sha256=4OuSzDJmz83QZ9g8HpX9424FvA0afeW7Bi54vgL9tc
260
260
  ccxt/async_support/coinbaseprime.py,sha256=M5Ez1DsFcW3-vJ-4QoZzwYBAKjAAtJnJpkfnV4sWAIc,1233
261
261
  ccxt/async_support/coinbasepro.py,sha256=6S_OI0TtEkdIQReB7DnEFERr444gNBhqXxgkvJ-edz4,79699
262
262
  ccxt/async_support/coincheck.py,sha256=NFaeF_K9Rva8m-w44-K-w_AcMaAfD7HtEVms18Hdpxk,34933
263
- ccxt/async_support/coinex.py,sha256=4SlN_V0IKUYJoeQ0hOIGvnGwuVM5baQiTtMsF1a6Ib0,199347
263
+ ccxt/async_support/coinex.py,sha256=ei5UlWlEFtmvgqm0L_43su8seHaRs0TAVE29zIsHk-c,201697
264
264
  ccxt/async_support/coinfalcon.py,sha256=9F-rZl0jrBq5VuFJ_RgB7qm0_lrEJAICJ2TXulgpEO0,39684
265
265
  ccxt/async_support/coinlist.py,sha256=YNAhHJt03OqwHtaiiFCqHnWDi9BlbeKRe3Hp7NjTM2A,103348
266
266
  ccxt/async_support/coinmate.py,sha256=6ENiySNE1fazimwE9Dkiq7VmgSOnzSU6A-LX-WyHv-4,40229
@@ -299,7 +299,7 @@ ccxt/async_support/lbank2.py,sha256=f4iTKEXjxglY3ZM2Ul5Yg3CslnPeaAtpxRl-rew21W4,
299
299
  ccxt/async_support/luno.py,sha256=WTT_wewIG3rSc0YKxDdYoCirjH-MqqTofcscc_03ed0,41302
300
300
  ccxt/async_support/lykke.py,sha256=CVSzyhH4dTi_W-iZJcgBqFhIq4dk2Gxe13OZW6QUBcU,49367
301
301
  ccxt/async_support/mercado.py,sha256=ANBR5HDpABpwNOi7xBQJn-xHiEse87mGTzCvFW9kOhc,35003
302
- ccxt/async_support/mexc.py,sha256=5RYGJcQ-rPB031MAdQAa2IDFzo_DdGa9zDiIk0PCvn8,227506
302
+ ccxt/async_support/mexc.py,sha256=L6flM1Zg1W7F6E5fhrTlQ2wWiHN2C8YeUBmNKAVpdqw,227530
303
303
  ccxt/async_support/mexc3.py,sha256=JW4rH1kXNWvtiW49W0WyKK6hmKunwboy0IJvsVruSmo,455
304
304
  ccxt/async_support/ndax.py,sha256=0lJuDxDSeOkEG2Zl9xHRQPPxc3-k3uVS7nwB0PGCzws,108165
305
305
  ccxt/async_support/novadax.py,sha256=2iHgTFmxygXWrY_6JrfM64MLD3GlTGsBj49zfupj9tM,64165
@@ -325,7 +325,7 @@ ccxt/async_support/yobit.py,sha256=ZVU0FXMsx-nVMxGk4PRU7ommtTmige1WRhTuqqA032E,5
325
325
  ccxt/async_support/zaif.py,sha256=8BLLg5SKT-fW6ulg0QFj3DtqLiSuwRW6P49PyzYElY0,29311
326
326
  ccxt/async_support/zonda.py,sha256=HGpGAc8SpHBwIqJBWqMpanf-KiuFjSkPe5z9v-wT9fM,81013
327
327
  ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
328
- ccxt/async_support/base/exchange.py,sha256=rWbFW0H-UjljTYVQOOF5eXumraxVijp9NWLGvqJyyrs,169952
328
+ ccxt/async_support/base/exchange.py,sha256=qFFAqX89kmwIHpF1kQW4fKtjRWzLoJAcyU_Xxb-kYsY,169952
329
329
  ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
330
330
  ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
331
331
  ccxt/async_support/base/ws/aiohttp_client.py,sha256=3YtsI6nV2ViYIZB7sGaowpoiF9Xaf93gHXH98253mJQ,5011
@@ -339,10 +339,10 @@ ccxt/async_support/base/ws/order_book_side.py,sha256=Pxrq22nCODckJ6G1OXkYEmUunIu
339
339
  ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
340
340
  ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
341
341
  ccxt/base/errors.py,sha256=HdcBhGDTKRJIHv9ng6vH3uliKpZsnbJdDzbqnK96KJ4,3830
342
- ccxt/base/exchange.py,sha256=M5vtwWca_FeLRXcoRUr8U1qaroxJAFMigxThfwxIWms,210540
342
+ ccxt/base/exchange.py,sha256=8zUfMHjRa2PaJ2W_1emrQS9Fgsmhgi0gJrGbj_agWF8,210540
343
343
  ccxt/base/precise.py,sha256=_xfu54sV0vWNnOfGTKRFykeuWP8mn4K1m9lk1tcllX4,8565
344
344
  ccxt/base/types.py,sha256=2-U2pj8nvaAhuLeexsN2kzrf2awKZ2NN8zWzOtU1jyQ,5126
345
- ccxt/pro/__init__.py,sha256=1E8PQHpAi11wiQnHwPc9SiiIWEo6h8vfQ4pCrcCg-TA,6678
345
+ ccxt/pro/__init__.py,sha256=E1i4ZEtFYKVYxE-jpSbD4v1ubz6Am0CAgakwfbkxdE4,6678
346
346
  ccxt/pro/alpaca.py,sha256=Eh-1rIkfyP_boqOpdJdVVZnal7GJBTmFJmPcy3bSmMg,27155
347
347
  ccxt/pro/ascendex.py,sha256=YNA9QK8PR9mMNeByMI32pg8nFvXdLFqLXtfYOiJqFV0,34863
348
348
  ccxt/pro/bequant.py,sha256=3IeQ0vPg-eVqPiGMfX7yqH9qtXKm1ZqocQDeLwpA8EE,1093
@@ -452,7 +452,7 @@ ccxt/test/base/test_ticker.py,sha256=5J8KHgFhJLgcWyFwt3bhJ-tldMho3K7LD5yJnnUyrT4
452
452
  ccxt/test/base/test_trade.py,sha256=AN3emAdEPhdFyunap43cKqZTS1cbaShZKTjYue67jEU,2297
453
453
  ccxt/test/base/test_trading_fee.py,sha256=2_WCp3qJ2UpraQQoGFlGJYwHD-T0Bm5W7KIw4zpFvSM,1068
454
454
  ccxt/test/base/test_transaction.py,sha256=BTbB4UHHXkrvYgwbrhh867nVRlevmIkIrz1W_odlQJI,1434
455
- ccxt-4.1.48.dist-info/METADATA,sha256=_o1DBgZvdYGQ_ei2jpPmhHmrpGiFnrZVLwEIAvs0Z9g,110331
456
- ccxt-4.1.48.dist-info/WHEEL,sha256=P2T-6epvtXQ2cBOE_U1K4_noqlJFN3tj15djMgEu4NM,110
457
- ccxt-4.1.48.dist-info/top_level.txt,sha256=CkQDuCTDKNcImPV60t36G6MdYfxsAPNiSaEwifVoVMo,5
458
- ccxt-4.1.48.dist-info/RECORD,,
455
+ ccxt-4.1.49.dist-info/METADATA,sha256=dGrZPAgHD1lHQwA32JVZ7AzshZrj1utd8EMWxzNjHd8,110331
456
+ ccxt-4.1.49.dist-info/WHEEL,sha256=P2T-6epvtXQ2cBOE_U1K4_noqlJFN3tj15djMgEu4NM,110
457
+ ccxt-4.1.49.dist-info/top_level.txt,sha256=CkQDuCTDKNcImPV60t36G6MdYfxsAPNiSaEwifVoVMo,5
458
+ ccxt-4.1.49.dist-info/RECORD,,
File without changes