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

Files changed (251) hide show
  1. ccxt/__init__.py +2 -2
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/abstract/bitbank.py +1 -0
  7. ccxt/abstract/coinbase.py +2 -0
  8. ccxt/abstract/htx.py +3 -0
  9. ccxt/abstract/huobi.py +3 -0
  10. ccxt/abstract/huobipro.py +3 -0
  11. ccxt/abstract/okex.py +3 -1
  12. ccxt/abstract/okex5.py +3 -1
  13. ccxt/abstract/okx.py +3 -1
  14. ccxt/ace.py +23 -23
  15. ccxt/alpaca.py +8 -8
  16. ccxt/ascendex.py +26 -26
  17. ccxt/async_support/__init__.py +2 -2
  18. ccxt/async_support/ace.py +23 -23
  19. ccxt/async_support/alpaca.py +8 -8
  20. ccxt/async_support/ascendex.py +26 -26
  21. ccxt/async_support/base/exchange.py +4 -2216
  22. ccxt/async_support/bigone.py +21 -24
  23. ccxt/async_support/binance.py +61 -54
  24. ccxt/async_support/bingx.py +28 -28
  25. ccxt/async_support/bit2c.py +9 -9
  26. ccxt/async_support/bitbank.py +11 -10
  27. ccxt/async_support/bitbns.py +11 -11
  28. ccxt/async_support/bitfinex.py +15 -15
  29. ccxt/async_support/bitfinex2.py +22 -22
  30. ccxt/async_support/bitflyer.py +13 -13
  31. ccxt/async_support/bitforex.py +10 -10
  32. ccxt/async_support/bitget.py +44 -44
  33. ccxt/async_support/bithumb.py +9 -9
  34. ccxt/async_support/bitmart.py +85 -104
  35. ccxt/async_support/bitmex.py +27 -27
  36. ccxt/async_support/bitopro.py +18 -18
  37. ccxt/async_support/bitpanda.py +18 -18
  38. ccxt/async_support/bitrue.py +14 -14
  39. ccxt/async_support/bitso.py +17 -17
  40. ccxt/async_support/bitstamp.py +17 -17
  41. ccxt/async_support/bittrex.py +22 -24
  42. ccxt/async_support/bitvavo.py +15 -15
  43. ccxt/async_support/bl3p.py +4 -4
  44. ccxt/async_support/blockchaincom.py +17 -17
  45. ccxt/async_support/btcalpha.py +14 -14
  46. ccxt/async_support/btcbox.py +9 -9
  47. ccxt/async_support/btcmarkets.py +17 -17
  48. ccxt/async_support/btcturk.py +9 -9
  49. ccxt/async_support/bybit.py +46 -46
  50. ccxt/async_support/cex.py +10 -10
  51. ccxt/async_support/coinbase.py +69 -25
  52. ccxt/async_support/coinbasepro.py +19 -19
  53. ccxt/async_support/coincheck.py +10 -10
  54. ccxt/async_support/coinex.py +57 -66
  55. ccxt/async_support/coinlist.py +22 -22
  56. ccxt/async_support/coinmate.py +10 -10
  57. ccxt/async_support/coinone.py +10 -10
  58. ccxt/async_support/coinsph.py +17 -17
  59. ccxt/async_support/coinspot.py +5 -5
  60. ccxt/async_support/cryptocom.py +27 -27
  61. ccxt/async_support/currencycom.py +18 -18
  62. ccxt/async_support/delta.py +21 -21
  63. ccxt/async_support/deribit.py +24 -24
  64. ccxt/async_support/digifinex.py +35 -35
  65. ccxt/async_support/exmo.py +19 -19
  66. ccxt/async_support/gate.py +38 -38
  67. ccxt/async_support/gemini.py +11 -11
  68. ccxt/async_support/hitbtc.py +27 -27
  69. ccxt/async_support/hollaex.py +19 -19
  70. ccxt/async_support/htx.py +47 -44
  71. ccxt/async_support/huobijp.py +22 -22
  72. ccxt/async_support/idex.py +20 -20
  73. ccxt/async_support/independentreserve.py +9 -9
  74. ccxt/async_support/indodax.py +10 -10
  75. ccxt/async_support/kraken.py +25 -25
  76. ccxt/async_support/krakenfutures.py +17 -17
  77. ccxt/async_support/kucoin.py +27 -27
  78. ccxt/async_support/kucoinfutures.py +20 -20
  79. ccxt/async_support/kuna.py +19 -19
  80. ccxt/async_support/latoken.py +14 -14
  81. ccxt/async_support/lbank.py +18 -18
  82. ccxt/async_support/luno.py +14 -14
  83. ccxt/async_support/lykke.py +12 -12
  84. ccxt/async_support/mercado.py +11 -11
  85. ccxt/async_support/mexc.py +36 -36
  86. ccxt/async_support/ndax.py +18 -18
  87. ccxt/async_support/novadax.py +17 -17
  88. ccxt/async_support/oceanex.py +12 -12
  89. ccxt/async_support/okcoin.py +19 -19
  90. ccxt/async_support/okx.py +48 -45
  91. ccxt/async_support/p2b.py +6 -6
  92. ccxt/async_support/paymium.py +6 -6
  93. ccxt/async_support/phemex.py +57 -57
  94. ccxt/async_support/poloniex.py +31 -30
  95. ccxt/async_support/poloniexfutures.py +16 -16
  96. ccxt/async_support/probit.py +22 -22
  97. ccxt/async_support/tidex.py +15 -15
  98. ccxt/async_support/timex.py +20 -20
  99. ccxt/async_support/tokocrypto.py +16 -16
  100. ccxt/async_support/upbit.py +15 -15
  101. ccxt/async_support/wavesexchange.py +12 -12
  102. ccxt/async_support/wazirx.py +13 -13
  103. ccxt/async_support/whitebit.py +26 -26
  104. ccxt/async_support/woo.py +47 -47
  105. ccxt/async_support/yobit.py +8 -8
  106. ccxt/async_support/zaif.py +10 -10
  107. ccxt/async_support/zonda.py +16 -16
  108. ccxt/base/errors.py +17 -16
  109. ccxt/base/exchange.py +57 -97
  110. ccxt/base/types.py +138 -139
  111. ccxt/bigone.py +21 -24
  112. ccxt/binance.py +61 -54
  113. ccxt/bingx.py +28 -28
  114. ccxt/bit2c.py +9 -9
  115. ccxt/bitbank.py +11 -10
  116. ccxt/bitbns.py +11 -11
  117. ccxt/bitfinex.py +15 -15
  118. ccxt/bitfinex2.py +22 -22
  119. ccxt/bitflyer.py +13 -13
  120. ccxt/bitforex.py +10 -10
  121. ccxt/bitget.py +44 -44
  122. ccxt/bithumb.py +9 -9
  123. ccxt/bitmart.py +85 -104
  124. ccxt/bitmex.py +27 -27
  125. ccxt/bitopro.py +18 -18
  126. ccxt/bitpanda.py +18 -18
  127. ccxt/bitrue.py +14 -14
  128. ccxt/bitso.py +17 -17
  129. ccxt/bitstamp.py +17 -17
  130. ccxt/bittrex.py +22 -24
  131. ccxt/bitvavo.py +15 -15
  132. ccxt/bl3p.py +4 -4
  133. ccxt/blockchaincom.py +17 -17
  134. ccxt/btcalpha.py +14 -14
  135. ccxt/btcbox.py +9 -9
  136. ccxt/btcmarkets.py +17 -17
  137. ccxt/btcturk.py +9 -9
  138. ccxt/bybit.py +46 -46
  139. ccxt/cex.py +10 -10
  140. ccxt/coinbase.py +69 -25
  141. ccxt/coinbasepro.py +19 -19
  142. ccxt/coincheck.py +10 -10
  143. ccxt/coinex.py +57 -66
  144. ccxt/coinlist.py +22 -22
  145. ccxt/coinmate.py +10 -10
  146. ccxt/coinone.py +10 -10
  147. ccxt/coinsph.py +17 -17
  148. ccxt/coinspot.py +5 -5
  149. ccxt/cryptocom.py +27 -27
  150. ccxt/currencycom.py +18 -18
  151. ccxt/delta.py +21 -21
  152. ccxt/deribit.py +24 -24
  153. ccxt/digifinex.py +35 -35
  154. ccxt/exmo.py +19 -19
  155. ccxt/gate.py +38 -38
  156. ccxt/gemini.py +11 -11
  157. ccxt/hitbtc.py +27 -27
  158. ccxt/hollaex.py +19 -19
  159. ccxt/htx.py +47 -44
  160. ccxt/huobijp.py +22 -22
  161. ccxt/idex.py +20 -20
  162. ccxt/independentreserve.py +9 -9
  163. ccxt/indodax.py +10 -10
  164. ccxt/kraken.py +25 -25
  165. ccxt/krakenfutures.py +17 -17
  166. ccxt/kucoin.py +27 -27
  167. ccxt/kucoinfutures.py +20 -20
  168. ccxt/kuna.py +19 -19
  169. ccxt/latoken.py +14 -14
  170. ccxt/lbank.py +18 -18
  171. ccxt/luno.py +14 -14
  172. ccxt/lykke.py +12 -12
  173. ccxt/mercado.py +11 -11
  174. ccxt/mexc.py +36 -36
  175. ccxt/ndax.py +18 -18
  176. ccxt/novadax.py +17 -17
  177. ccxt/oceanex.py +12 -12
  178. ccxt/okcoin.py +19 -19
  179. ccxt/okx.py +48 -45
  180. ccxt/p2b.py +6 -6
  181. ccxt/paymium.py +6 -6
  182. ccxt/phemex.py +57 -57
  183. ccxt/poloniex.py +31 -30
  184. ccxt/poloniexfutures.py +16 -16
  185. ccxt/pro/__init__.py +1 -1
  186. ccxt/pro/alpaca.py +3 -3
  187. ccxt/pro/ascendex.py +2 -2
  188. ccxt/pro/binance.py +9 -9
  189. ccxt/pro/bingx.py +3 -3
  190. ccxt/pro/bitfinex.py +3 -3
  191. ccxt/pro/bitfinex2.py +3 -3
  192. ccxt/pro/bitget.py +3 -3
  193. ccxt/pro/bitmart.py +2 -2
  194. ccxt/pro/bitmex.py +3 -3
  195. ccxt/pro/bitpanda.py +3 -3
  196. ccxt/pro/bitrue.py +2 -2
  197. ccxt/pro/bitstamp.py +2 -2
  198. ccxt/pro/bittrex.py +3 -3
  199. ccxt/pro/bitvavo.py +3 -3
  200. ccxt/pro/blockchaincom.py +2 -2
  201. ccxt/pro/bybit.py +4 -4
  202. ccxt/pro/cex.py +3 -3
  203. ccxt/pro/coinbasepro.py +3 -3
  204. ccxt/pro/coinex.py +2 -2
  205. ccxt/pro/cryptocom.py +5 -5
  206. ccxt/pro/deribit.py +3 -3
  207. ccxt/pro/exmo.py +2 -2
  208. ccxt/pro/gate.py +3 -3
  209. ccxt/pro/gemini.py +2 -2
  210. ccxt/pro/hitbtc.py +4 -4
  211. ccxt/pro/hollaex.py +3 -3
  212. ccxt/pro/htx.py +3 -3
  213. ccxt/pro/idex.py +3 -3
  214. ccxt/pro/kraken.py +7 -7
  215. ccxt/pro/krakenfutures.py +4 -4
  216. ccxt/pro/kucoin.py +3 -3
  217. ccxt/pro/kucoinfutures.py +3 -3
  218. ccxt/pro/mexc.py +3 -3
  219. ccxt/pro/okcoin.py +2 -2
  220. ccxt/pro/okx.py +6 -6
  221. ccxt/pro/phemex.py +3 -3
  222. ccxt/pro/poloniex.py +3 -3
  223. ccxt/pro/poloniexfutures.py +3 -3
  224. ccxt/pro/probit.py +3 -3
  225. ccxt/pro/wazirx.py +3 -3
  226. ccxt/pro/whitebit.py +3 -3
  227. ccxt/pro/woo.py +2 -2
  228. ccxt/probit.py +22 -22
  229. ccxt/test/base/test_shared_methods.py +3 -3
  230. ccxt/test/test_async.py +543 -535
  231. ccxt/test/test_sync.py +542 -534
  232. ccxt/tidex.py +15 -15
  233. ccxt/timex.py +20 -20
  234. ccxt/tokocrypto.py +16 -16
  235. ccxt/upbit.py +15 -15
  236. ccxt/wavesexchange.py +12 -12
  237. ccxt/wazirx.py +13 -13
  238. ccxt/whitebit.py +26 -26
  239. ccxt/woo.py +47 -47
  240. ccxt/yobit.py +8 -8
  241. ccxt/zaif.py +10 -10
  242. ccxt/zonda.py +16 -16
  243. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/METADATA +10 -8
  244. ccxt-4.1.56.dist-info/RECORD +449 -0
  245. ccxt/async_support/bitstamp1.py +0 -402
  246. ccxt/async_support/lbank2.py +0 -2620
  247. ccxt/bitstamp1.py +0 -402
  248. ccxt/lbank2.py +0 -2619
  249. ccxt-4.1.54.dist-info/RECORD +0 -453
  250. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/WHEEL +0 -0
  251. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/top_level.txt +0 -0
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.poloniexfutures import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade
9
+ from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import AccountSuspended
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -352,7 +352,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
352
352
  'info': market,
353
353
  }
354
354
 
355
- def parse_ticker(self, ticker, market=None) -> Ticker:
355
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
356
356
  #
357
357
  # {
358
358
  # "symbol": "BTCUSDTPERP", # Market of the symbol
@@ -543,7 +543,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
543
543
  market = self.market(symbol)
544
544
  return self.fetch_order_book(market['id'], None, {'level': 3})
545
545
 
546
- def parse_trade(self, trade, market=None) -> Trade:
546
+ def parse_trade(self, trade, market: Market = None) -> Trade:
547
547
  #
548
548
  # fetchTrades(public)
549
549
  #
@@ -873,7 +873,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
873
873
  'info': response,
874
874
  }, market)
875
875
 
876
- async def cancel_order(self, id: str, symbol: String = None, params={}):
876
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
877
877
  """
878
878
  cancels an open order
879
879
  :see: https://futures-docs.poloniex.com/#cancel-an-order
@@ -969,7 +969,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
969
969
  data = self.safe_value(response, 'data')
970
970
  return self.parse_positions(data, symbols)
971
971
 
972
- def parse_position(self, position, market=None):
972
+ def parse_position(self, position, market: Market = None):
973
973
  #
974
974
  # {
975
975
  # "code": "200000",
@@ -1020,7 +1020,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1020
1020
  market = self.safe_market(symbol, market)
1021
1021
  timestamp = self.safe_integer(position, 'currentTimestamp')
1022
1022
  size = self.safe_string(position, 'currentQty')
1023
- side = None
1023
+ side: Str
1024
1024
  if Precise.string_gt(size, '0'):
1025
1025
  side = 'long'
1026
1026
  elif Precise.string_lt(size, '0'):
@@ -1060,7 +1060,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1060
1060
  'takeProfitPrice': None,
1061
1061
  }
1062
1062
 
1063
- async def fetch_funding_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1063
+ async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1064
1064
  """
1065
1065
  fetch the history of funding payments paid and received on self account
1066
1066
  :see: https://futures-docs.poloniex.com/#get-funding-history
@@ -1126,7 +1126,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1126
1126
  })
1127
1127
  return fees
1128
1128
 
1129
- async def cancel_all_orders(self, symbol: String = None, params={}):
1129
+ async def cancel_all_orders(self, symbol: Str = None, params={}):
1130
1130
  """
1131
1131
  cancel all open orders
1132
1132
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
@@ -1182,7 +1182,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1182
1182
  })
1183
1183
  return result
1184
1184
 
1185
- async def fetch_orders_by_status(self, status, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1185
+ async def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1186
1186
  """
1187
1187
  fetches a list of orders placed on the exchange
1188
1188
  :see: https://futures-docs.poloniex.com/#get-order-list
@@ -1209,7 +1209,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1209
1209
  request['status'] = 'active' if (status == 'open') else 'done'
1210
1210
  elif status != 'open':
1211
1211
  raise BadRequest(self.id + ' fetchOrdersByStatus() can only fetch untriggered stop orders')
1212
- market = None
1212
+ market: Market = None
1213
1213
  if symbol is not None:
1214
1214
  market = self.market(symbol)
1215
1215
  request['symbol'] = market['id']
@@ -1277,7 +1277,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1277
1277
  result.append(orders[i])
1278
1278
  return self.parse_orders(result, market, since, limit)
1279
1279
 
1280
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1280
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1281
1281
  """
1282
1282
  fetch all unfilled currently open orders
1283
1283
  :see: https://futures-docs.poloniex.com/#get-order-list
@@ -1293,7 +1293,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1293
1293
  """
1294
1294
  return await self.fetch_orders_by_status('open', symbol, since, limit, params)
1295
1295
 
1296
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1296
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1297
1297
  """
1298
1298
  fetches information on multiple closed orders made by the user
1299
1299
  :see: https://futures-docs.poloniex.com/#get-order-list
@@ -1309,7 +1309,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1309
1309
  """
1310
1310
  return await self.fetch_orders_by_status('closed', symbol, since, limit, params)
1311
1311
 
1312
- async def fetch_order(self, id=None, symbol: String = None, params={}):
1312
+ async def fetch_order(self, id=None, symbol: Str = None, params={}):
1313
1313
  """
1314
1314
  fetches information on an order made by the user
1315
1315
  :see: https://futures-docs.poloniex.com/#get-details-of-a-single-order
@@ -1380,7 +1380,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1380
1380
  responseData = self.safe_value(response, 'data')
1381
1381
  return self.parse_order(responseData, market)
1382
1382
 
1383
- def parse_order(self, order, market=None) -> Order:
1383
+ def parse_order(self, order, market: Market = None) -> Order:
1384
1384
  #
1385
1385
  # createOrder
1386
1386
  #
@@ -1456,7 +1456,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1456
1456
  feeCurrencyId = self.safe_string(order, 'feeCurrency')
1457
1457
  filled = self.safe_string(order, 'dealSize')
1458
1458
  rawCost = self.safe_string_2(order, 'dealFunds', 'filledValue')
1459
- average = None
1459
+ average: Str = None
1460
1460
  if Precise.string_gt(filled, '0'):
1461
1461
  contractSize = self.safe_string(market, 'contractSize')
1462
1462
  if market['linear']:
@@ -1546,7 +1546,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1546
1546
  'previousFundingDatetime': self.iso8601(fundingTimestamp),
1547
1547
  }
1548
1548
 
1549
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1549
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1550
1550
  """
1551
1551
  fetch all trades made by the user
1552
1552
  :see: https://futures-docs.poloniex.com/#get-fills
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.probit import ImplicitAPI
8
8
  import math
9
- from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import BadRequest
@@ -643,7 +643,7 @@ class probit(Exchange, ImplicitAPI):
643
643
  raise BadResponse(self.id + ' fetchTicker() returned an empty response')
644
644
  return self.parse_ticker(ticker, market)
645
645
 
646
- def parse_ticker(self, ticker, market=None) -> Ticker:
646
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
647
647
  #
648
648
  # {
649
649
  # "last":"0.022902",
@@ -686,7 +686,7 @@ class probit(Exchange, ImplicitAPI):
686
686
  'info': ticker,
687
687
  }, market)
688
688
 
689
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
689
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
690
690
  """
691
691
  :see: https://docs-en.probit.com/reference/trade
692
692
  fetch all trades made by the user
@@ -697,7 +697,7 @@ class probit(Exchange, ImplicitAPI):
697
697
  :returns Trade[]: a list of `trade structures <https://github.com/ccxt/ccxt/wiki/Manual#trade-structure>`
698
698
  """
699
699
  await self.load_markets()
700
- market = None
700
+ market: Market = None
701
701
  now = self.milliseconds()
702
702
  request = {
703
703
  'limit': 100,
@@ -783,7 +783,7 @@ class probit(Exchange, ImplicitAPI):
783
783
  data = self.safe_value(response, 'data', [])
784
784
  return self.parse_trades(data, market, since, limit)
785
785
 
786
- def parse_trade(self, trade, market=None) -> Trade:
786
+ def parse_trade(self, trade, market: Market = None) -> Trade:
787
787
  #
788
788
  # fetchTrades(public)
789
789
  #
@@ -814,7 +814,7 @@ class probit(Exchange, ImplicitAPI):
814
814
  #
815
815
  timestamp = self.parse8601(self.safe_string(trade, 'time'))
816
816
  id = self.safe_string(trade, 'id')
817
- marketId = None
817
+ marketId: Str = None
818
818
  if id is not None:
819
819
  parts = id.split(':')
820
820
  marketId = self.safe_string(parts, 0)
@@ -870,7 +870,7 @@ class probit(Exchange, ImplicitAPI):
870
870
  parts = iso8601.split('-')
871
871
  year = self.safe_string(parts, 0)
872
872
  month = self.safe_integer(parts, 1)
873
- monthString = None
873
+ monthString: Str = None
874
874
  if after:
875
875
  monthString = self.sum(month, str(1))
876
876
  if month < 10:
@@ -953,7 +953,7 @@ class probit(Exchange, ImplicitAPI):
953
953
  data = self.safe_value(response, 'data', [])
954
954
  return self.parse_ohlcvs(data, market, timeframe, since, limit)
955
955
 
956
- def parse_ohlcv(self, ohlcv, market=None) -> list:
956
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
957
957
  #
958
958
  # {
959
959
  # "market_id":"ETH-BTC",
@@ -976,7 +976,7 @@ class probit(Exchange, ImplicitAPI):
976
976
  self.safe_number(ohlcv, 'base_volume'),
977
977
  ]
978
978
 
979
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
979
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
980
980
  """
981
981
  :see: https://docs-en.probit.com/reference/open_order-1
982
982
  fetch all unfilled currently open orders
@@ -989,7 +989,7 @@ class probit(Exchange, ImplicitAPI):
989
989
  await self.load_markets()
990
990
  since = self.parse8601(since)
991
991
  request = {}
992
- market = None
992
+ market: Market = None
993
993
  if symbol is not None:
994
994
  market = self.market(symbol)
995
995
  request['market_id'] = market['id']
@@ -997,7 +997,7 @@ class probit(Exchange, ImplicitAPI):
997
997
  data = self.safe_value(response, 'data')
998
998
  return self.parse_orders(data, market, since, limit)
999
999
 
1000
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1000
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1001
1001
  """
1002
1002
  :see: https://docs-en.probit.com/reference/order
1003
1003
  fetches information on multiple closed orders made by the user
@@ -1013,7 +1013,7 @@ class probit(Exchange, ImplicitAPI):
1013
1013
  'end_time': self.iso8601(self.milliseconds()),
1014
1014
  'limit': 100,
1015
1015
  }
1016
- market = None
1016
+ market: Market = None
1017
1017
  if symbol is not None:
1018
1018
  market = self.market(symbol)
1019
1019
  request['market_id'] = market['id']
@@ -1025,7 +1025,7 @@ class probit(Exchange, ImplicitAPI):
1025
1025
  data = self.safe_value(response, 'data')
1026
1026
  return self.parse_orders(data, market, since, limit)
1027
1027
 
1028
- async def fetch_order(self, id: str, symbol: String = None, params={}):
1028
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
1029
1029
  """
1030
1030
  :see: https://docs-en.probit.com/reference/order-3
1031
1031
  fetches information on an order made by the user
@@ -1058,7 +1058,7 @@ class probit(Exchange, ImplicitAPI):
1058
1058
  }
1059
1059
  return self.safe_string(statuses, status, status)
1060
1060
 
1061
- def parse_order(self, order, market=None) -> Order:
1061
+ def parse_order(self, order, market: Market = None) -> Order:
1062
1062
  #
1063
1063
  # {
1064
1064
  # id,
@@ -1206,7 +1206,7 @@ class probit(Exchange, ImplicitAPI):
1206
1206
  order['remaining'] = None
1207
1207
  return order
1208
1208
 
1209
- async def cancel_order(self, id: str, symbol: String = None, params={}):
1209
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
1210
1210
  """
1211
1211
  :see: https://docs-en.probit.com/reference/order-2
1212
1212
  cancels an open order
@@ -1226,7 +1226,7 @@ class probit(Exchange, ImplicitAPI):
1226
1226
  data = self.safe_value(response, 'data')
1227
1227
  return self.parse_order(data)
1228
1228
 
1229
- def parse_deposit_address(self, depositAddress, currency=None):
1229
+ def parse_deposit_address(self, depositAddress, currency: Currency = None):
1230
1230
  address = self.safe_string(depositAddress, 'address')
1231
1231
  tag = self.safe_string(depositAddress, 'destination_tag')
1232
1232
  currencyId = self.safe_string(depositAddress, 'currency_id')
@@ -1355,7 +1355,7 @@ class probit(Exchange, ImplicitAPI):
1355
1355
  data = self.safe_value(response, 'data')
1356
1356
  return self.parse_transaction(data, currency)
1357
1357
 
1358
- async def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1358
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1359
1359
  """
1360
1360
  fetch all deposits made to an account
1361
1361
  :param str code: unified currency code
@@ -1370,7 +1370,7 @@ class probit(Exchange, ImplicitAPI):
1370
1370
  result = await self.fetch_transactions(code, since, limit, self.extend(request, params))
1371
1371
  return result
1372
1372
 
1373
- async def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1373
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1374
1374
  """
1375
1375
  fetch all withdrawals made to an account
1376
1376
  :param str code: unified currency code
@@ -1385,7 +1385,7 @@ class probit(Exchange, ImplicitAPI):
1385
1385
  result = await self.fetch_transactions(code, since, limit, self.extend(request, params))
1386
1386
  return result
1387
1387
 
1388
- async def fetch_transactions(self, code: String = None, since: Int = None, limit: Int = None, params={}):
1388
+ async def fetch_transactions(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1389
1389
  """
1390
1390
  * @deprecated
1391
1391
  use fetchDepositsWithdrawals instead
@@ -1398,7 +1398,7 @@ class probit(Exchange, ImplicitAPI):
1398
1398
  :returns dict[]: a list of `transaction structures <https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure>`
1399
1399
  """
1400
1400
  await self.load_markets()
1401
- currency = None
1401
+ currency: Currency = None
1402
1402
  request = {}
1403
1403
  if code is not None:
1404
1404
  currency = self.currency(code)
@@ -1445,7 +1445,7 @@ class probit(Exchange, ImplicitAPI):
1445
1445
  data = self.safe_value(response, 'data', {})
1446
1446
  return self.parse_transactions(data, currency, since, limit)
1447
1447
 
1448
- def parse_transaction(self, transaction, currency=None) -> Transaction:
1448
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
1449
1449
  #
1450
1450
  # {
1451
1451
  # "id": "01211d4b-0e68-41d6-97cb-298bfe2cab67",
@@ -1589,7 +1589,7 @@ class probit(Exchange, ImplicitAPI):
1589
1589
  data = self.safe_value(response, 'data')
1590
1590
  return self.parse_deposit_withdraw_fees(data, codes, 'id')
1591
1591
 
1592
- def parse_deposit_withdraw_fee(self, fee, currency=None):
1592
+ def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
1593
1593
  #
1594
1594
  # {
1595
1595
  # "id": "USDT",
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.tidex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -456,7 +456,7 @@ class tidex(Exchange, ImplicitAPI):
456
456
  result[symbol] = self.parse_order_book(response[id], symbol)
457
457
  return result
458
458
 
459
- def parse_ticker(self, ticker, market=None) -> Ticker:
459
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
460
460
  #
461
461
  # {
462
462
  # "high": 0.03497582,
@@ -539,7 +539,7 @@ class tidex(Exchange, ImplicitAPI):
539
539
  tickers = await self.fetch_tickers([symbol], params)
540
540
  return tickers[symbol]
541
541
 
542
- def parse_trade(self, trade, market=None) -> Trade:
542
+ def parse_trade(self, trade, market: Market = None) -> Trade:
543
543
  timestamp = self.safe_timestamp(trade, 'timestamp')
544
544
  side = self.safe_string(trade, 'type')
545
545
  if side == 'ask':
@@ -556,7 +556,7 @@ class tidex(Exchange, ImplicitAPI):
556
556
  amount = self.parse_number(amountString)
557
557
  cost = self.parse_number(Precise.string_mul(priceString, amountString))
558
558
  type = 'limit' # all trades are still limit trades
559
- takerOrMaker = None
559
+ takerOrMaker: Str = None
560
560
  fee = None
561
561
  feeCost = self.safe_number(trade, 'commission')
562
562
  if feeCost is not None:
@@ -636,7 +636,7 @@ class tidex(Exchange, ImplicitAPI):
636
636
  'rate': self.price_to_precision(symbol, price),
637
637
  }
638
638
  response = await self.privatePostTrade(self.extend(request, params))
639
- id = None
639
+ id: Str = None
640
640
  status = 'open'
641
641
  filledString = '0.0'
642
642
  remainingString = amountString
@@ -671,7 +671,7 @@ class tidex(Exchange, ImplicitAPI):
671
671
  'trades': None,
672
672
  }, market)
673
673
 
674
- async def cancel_order(self, id: str, symbol: String = None, params={}):
674
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
675
675
  """
676
676
  cancels an open order
677
677
  :param str id: order id
@@ -694,14 +694,14 @@ class tidex(Exchange, ImplicitAPI):
694
694
  }
695
695
  return self.safe_string(statuses, status, status)
696
696
 
697
- def parse_order(self, order, market=None) -> Order:
697
+ def parse_order(self, order, market: Market = None) -> Order:
698
698
  id = self.safe_string(order, 'id')
699
699
  status = self.parse_order_status(self.safe_string(order, 'status'))
700
700
  timestamp = self.safe_timestamp(order, 'timestamp_created')
701
701
  marketId = self.safe_string(order, 'pair')
702
702
  symbol = self.safe_symbol(marketId, market)
703
- remaining = None
704
- amount = None
703
+ remaining: str
704
+ amount: Str
705
705
  price = self.safe_string(order, 'rate')
706
706
  if 'start_amount' in order:
707
707
  amount = self.safe_string(order, 'start_amount')
@@ -734,7 +734,7 @@ class tidex(Exchange, ImplicitAPI):
734
734
  'trades': None,
735
735
  }, market)
736
736
 
737
- async def fetch_order(self, id: str, symbol: String = None, params={}):
737
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
738
738
  """
739
739
  fetches information on an order made by the user
740
740
  :param str symbol: not used by tidex fetchOrder
@@ -751,7 +751,7 @@ class tidex(Exchange, ImplicitAPI):
751
751
  order = self.safe_value(result, id)
752
752
  return self.parse_order(self.extend({'id': id}, order))
753
753
 
754
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
754
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
755
755
  """
756
756
  fetch all unfilled currently open orders
757
757
  :param str symbol: unified market symbol
@@ -762,7 +762,7 @@ class tidex(Exchange, ImplicitAPI):
762
762
  """
763
763
  await self.load_markets()
764
764
  request = {}
765
- market = None
765
+ market: Market = None
766
766
  if symbol is not None:
767
767
  market = self.market(symbol)
768
768
  request['pair'] = market['id']
@@ -792,7 +792,7 @@ class tidex(Exchange, ImplicitAPI):
792
792
  orders = self.safe_value(response, 'return', [])
793
793
  return self.parse_orders(orders, market, since, limit)
794
794
 
795
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
795
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
796
796
  """
797
797
  fetch all trades made by the user
798
798
  :param str symbol: unified market symbol
@@ -802,7 +802,7 @@ class tidex(Exchange, ImplicitAPI):
802
802
  :returns Trade[]: a list of `trade structures <https://github.com/ccxt/ccxt/wiki/Manual#trade-structure>`
803
803
  """
804
804
  await self.load_markets()
805
- market = None
805
+ market: Market = None
806
806
  # some derived classes use camelcase notation for request fields
807
807
  request = {
808
808
  # 'from': 123456789, # trade ID, from which the display starts numerical 0(test result: liqui ignores self field)
@@ -875,7 +875,7 @@ class tidex(Exchange, ImplicitAPI):
875
875
  withdrawInfo = self.safe_value(result, 'withdraw_info', {})
876
876
  return self.parse_transaction(withdrawInfo, currency)
877
877
 
878
- def parse_transaction(self, transaction, currency=None) -> Transaction:
878
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
879
879
  #
880
880
  # {
881
881
  # "id":1111,
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.timex import ImplicitAPI
8
- from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
8
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import PermissionDenied
@@ -343,7 +343,7 @@ class timex(Exchange, ImplicitAPI):
343
343
  result.append(self.parse_currency(currency))
344
344
  return self.index_by(result, 'code')
345
345
 
346
- async def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
346
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
347
347
  """
348
348
  fetch all deposits made to an account
349
349
  :param str code: unified currency code
@@ -375,7 +375,7 @@ class timex(Exchange, ImplicitAPI):
375
375
  currency = self.safe_currency(code)
376
376
  return self.parse_transactions(response, currency, since, limit)
377
377
 
378
- async def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
378
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
379
379
  """
380
380
  fetch all withdrawals made to an account
381
381
  :param str code: unified currency code
@@ -417,7 +417,7 @@ class timex(Exchange, ImplicitAPI):
417
417
  return currency
418
418
  return None
419
419
 
420
- def parse_transaction(self, transaction, currency=None) -> Transaction:
420
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
421
421
  #
422
422
  # {
423
423
  # "from": "0x1134cc86b45039cc211c6d1d2e4b3c77f60207ed",
@@ -802,7 +802,7 @@ class timex(Exchange, ImplicitAPI):
802
802
  order = self.safe_value(firstOrder, 'newOrder', {})
803
803
  return self.parse_order(order, market)
804
804
 
805
- async def cancel_order(self, id: str, symbol: String = None, params={}):
805
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
806
806
  """
807
807
  cancels an open order
808
808
  :param str id: order id
@@ -813,7 +813,7 @@ class timex(Exchange, ImplicitAPI):
813
813
  await self.load_markets()
814
814
  return await self.cancel_orders([id], symbol, params)
815
815
 
816
- async def cancel_orders(self, ids, symbol: String = None, params={}):
816
+ async def cancel_orders(self, ids, symbol: Str = None, params={}):
817
817
  """
818
818
  cancel multiple orders
819
819
  :param str[] ids: order ids
@@ -852,7 +852,7 @@ class timex(Exchange, ImplicitAPI):
852
852
  # }
853
853
  return response
854
854
 
855
- async def fetch_order(self, id: str, symbol: String = None, params={}):
855
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
856
856
  """
857
857
  fetches information on an order made by the user
858
858
  :param str symbol: not used by timex fetchOrder
@@ -901,7 +901,7 @@ class timex(Exchange, ImplicitAPI):
901
901
  trades = self.safe_value(response, 'trades', [])
902
902
  return self.parse_order(self.extend(order, {'trades': trades}))
903
903
 
904
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
904
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
905
905
  """
906
906
  fetch all unfilled currently open orders
907
907
  :param str symbol: unified market symbol
@@ -920,7 +920,7 @@ class timex(Exchange, ImplicitAPI):
920
920
  # page: 0, # results page you want to retrieve(0 .. N)
921
921
  'sort': sort, # sorting criteria in the format "property,asc" or "property,desc", default order is ascending, multiple sort criteria are supported
922
922
  }
923
- market = None
923
+ market: Market = None
924
924
  if symbol is not None:
925
925
  market = self.market(symbol)
926
926
  request['symbol'] = market['id']
@@ -951,7 +951,7 @@ class timex(Exchange, ImplicitAPI):
951
951
  orders = self.safe_value(response, 'orders', [])
952
952
  return self.parse_orders(orders, market, since, limit)
953
953
 
954
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
954
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
955
955
  """
956
956
  fetches information on multiple closed orders made by the user
957
957
  :param str symbol: unified market symbol of the market orders were made in
@@ -972,7 +972,7 @@ class timex(Exchange, ImplicitAPI):
972
972
  'side': 'BUY', # or 'SELL'
973
973
  # 'till': self.iso8601(self.milliseconds()),
974
974
  }
975
- market = None
975
+ market: Market = None
976
976
  if symbol is not None:
977
977
  market = self.market(symbol)
978
978
  request['symbol'] = market['id']
@@ -1005,7 +1005,7 @@ class timex(Exchange, ImplicitAPI):
1005
1005
  orders = self.safe_value(response, 'orders', [])
1006
1006
  return self.parse_orders(orders, market, since, limit)
1007
1007
 
1008
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1008
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1009
1009
  """
1010
1010
  fetch all trades made by the user
1011
1011
  :param str symbol: unified market symbol
@@ -1032,7 +1032,7 @@ class timex(Exchange, ImplicitAPI):
1032
1032
  # 'takerOrderId': '1234',
1033
1033
  # 'till': self.iso8601(self.milliseconds()),
1034
1034
  }
1035
- market = None
1035
+ market: Market = None
1036
1036
  if symbol is not None:
1037
1037
  market = self.market(symbol)
1038
1038
  request['symbol'] = market['id']
@@ -1062,7 +1062,7 @@ class timex(Exchange, ImplicitAPI):
1062
1062
  trades = self.safe_value(response, 'trades', [])
1063
1063
  return self.parse_trades(trades, market, since, limit)
1064
1064
 
1065
- def parse_trading_fee(self, fee, market=None):
1065
+ def parse_trading_fee(self, fee, market: Market = None):
1066
1066
  #
1067
1067
  # {
1068
1068
  # "fee": 0.0075,
@@ -1264,7 +1264,7 @@ class timex(Exchange, ImplicitAPI):
1264
1264
  'networks': {},
1265
1265
  }
1266
1266
 
1267
- def parse_ticker(self, ticker, market=None) -> Ticker:
1267
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
1268
1268
  #
1269
1269
  # {
1270
1270
  # "ask": 0.017,
@@ -1308,7 +1308,7 @@ class timex(Exchange, ImplicitAPI):
1308
1308
  'quoteVolume': self.safe_string(ticker, 'volumeQuote'),
1309
1309
  }, market)
1310
1310
 
1311
- def parse_trade(self, trade, market=None) -> Trade:
1311
+ def parse_trade(self, trade, market: Market = None) -> Trade:
1312
1312
  #
1313
1313
  # fetchTrades(public)
1314
1314
  #
@@ -1347,7 +1347,7 @@ class timex(Exchange, ImplicitAPI):
1347
1347
  id = self.safe_string(trade, 'id')
1348
1348
  side = self.safe_string_lower_2(trade, 'direction', 'side')
1349
1349
  takerOrMaker = self.safe_string_lower(trade, 'makerOrTaker')
1350
- orderId = None
1350
+ orderId: Str = None
1351
1351
  if takerOrMaker is not None:
1352
1352
  orderId = self.safe_string(trade, takerOrMaker + 'OrderId')
1353
1353
  fee = None
@@ -1374,7 +1374,7 @@ class timex(Exchange, ImplicitAPI):
1374
1374
  'fee': fee,
1375
1375
  }
1376
1376
 
1377
- def parse_ohlcv(self, ohlcv, market=None) -> list:
1377
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
1378
1378
  #
1379
1379
  # {
1380
1380
  # "timestamp":"2019-12-04T23:00:00",
@@ -1395,7 +1395,7 @@ class timex(Exchange, ImplicitAPI):
1395
1395
  self.safe_number(ohlcv, 'volume'),
1396
1396
  ]
1397
1397
 
1398
- def parse_order(self, order, market=None) -> Order:
1398
+ def parse_order(self, order, market: Market = None) -> Order:
1399
1399
  #
1400
1400
  # fetchOrder, createOrder, cancelOrder, cancelOrders, fetchOpenOrders, fetchClosedOrders
1401
1401
  #
@@ -1426,7 +1426,7 @@ class timex(Exchange, ImplicitAPI):
1426
1426
  amount = self.safe_string(order, 'quantity')
1427
1427
  filled = self.safe_string(order, 'filledQuantity')
1428
1428
  canceledQuantity = self.omit_zero(self.safe_string(order, 'cancelledQuantity'))
1429
- status = None
1429
+ status: str
1430
1430
  if Precise.string_equals(filled, amount):
1431
1431
  status = 'closed'
1432
1432
  elif canceledQuantity is not None: