ccxt 4.3.30__py2.py3-none-any.whl → 4.3.32__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.
Files changed (260) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +2 -0
  3. ccxt/abstract/binancecoinm.py +2 -0
  4. ccxt/abstract/binanceus.py +2 -0
  5. ccxt/abstract/binanceusdm.py +2 -0
  6. ccxt/ace.py +14 -14
  7. ccxt/alpaca.py +16 -16
  8. ccxt/ascendex.py +46 -46
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/ace.py +14 -14
  11. ccxt/async_support/alpaca.py +16 -16
  12. ccxt/async_support/ascendex.py +46 -46
  13. ccxt/async_support/base/exchange.py +23 -23
  14. ccxt/async_support/bigone.py +32 -32
  15. ccxt/async_support/binance.py +105 -96
  16. ccxt/async_support/bingx.py +21 -21
  17. ccxt/async_support/bit2c.py +13 -13
  18. ccxt/async_support/bitbank.py +19 -19
  19. ccxt/async_support/bitbns.py +17 -17
  20. ccxt/async_support/bitfinex.py +24 -24
  21. ccxt/async_support/bitfinex2.py +142 -109
  22. ccxt/async_support/bitflyer.py +23 -23
  23. ccxt/async_support/bitget.py +76 -76
  24. ccxt/async_support/bithumb.py +20 -20
  25. ccxt/async_support/bitmart.py +55 -55
  26. ccxt/async_support/bitmex.py +41 -41
  27. ccxt/async_support/bitopro.py +30 -30
  28. ccxt/async_support/bitrue.py +37 -37
  29. ccxt/async_support/bitso.py +30 -30
  30. ccxt/async_support/bitstamp.py +31 -31
  31. ccxt/async_support/bitteam.py +26 -26
  32. ccxt/async_support/bitvavo.py +27 -27
  33. ccxt/async_support/bl3p.py +8 -8
  34. ccxt/async_support/blockchaincom.py +24 -24
  35. ccxt/async_support/blofin.py +37 -37
  36. ccxt/async_support/btcalpha.py +19 -19
  37. ccxt/async_support/btcbox.py +11 -11
  38. ccxt/async_support/btcmarkets.py +22 -22
  39. ccxt/async_support/btcturk.py +13 -13
  40. ccxt/async_support/bybit.py +96 -96
  41. ccxt/async_support/cex.py +21 -21
  42. ccxt/async_support/coinbase.py +53 -53
  43. ccxt/async_support/coinbaseexchange.py +29 -29
  44. ccxt/async_support/coinbaseinternational.py +32 -32
  45. ccxt/async_support/coincheck.py +14 -14
  46. ccxt/async_support/coinex.py +208 -175
  47. ccxt/async_support/coinlist.py +35 -35
  48. ccxt/async_support/coinmate.py +22 -22
  49. ccxt/async_support/coinmetro.py +22 -22
  50. ccxt/async_support/coinone.py +18 -18
  51. ccxt/async_support/coinsph.py +32 -32
  52. ccxt/async_support/coinspot.py +8 -8
  53. ccxt/async_support/cryptocom.py +43 -43
  54. ccxt/async_support/currencycom.py +33 -33
  55. ccxt/async_support/delta.py +35 -35
  56. ccxt/async_support/deribit.py +54 -54
  57. ccxt/async_support/digifinex.py +56 -56
  58. ccxt/async_support/exmo.py +34 -34
  59. ccxt/async_support/gate.py +60 -60
  60. ccxt/async_support/gemini.py +24 -24
  61. ccxt/async_support/hitbtc.py +51 -51
  62. ccxt/async_support/hollaex.py +29 -29
  63. ccxt/async_support/htx.py +73 -73
  64. ccxt/async_support/huobijp.py +30 -30
  65. ccxt/async_support/hyperliquid.py +58 -58
  66. ccxt/async_support/idex.py +33 -33
  67. ccxt/async_support/independentreserve.py +12 -12
  68. ccxt/async_support/indodax.py +21 -21
  69. ccxt/async_support/kraken.py +46 -51
  70. ccxt/async_support/krakenfutures.py +29 -29
  71. ccxt/async_support/kucoin.py +51 -51
  72. ccxt/async_support/kucoinfutures.py +33 -33
  73. ccxt/async_support/kuna.py +27 -27
  74. ccxt/async_support/latoken.py +27 -27
  75. ccxt/async_support/lbank.py +35 -35
  76. ccxt/async_support/luno.py +19 -19
  77. ccxt/async_support/lykke.py +20 -20
  78. ccxt/async_support/mercado.py +17 -17
  79. ccxt/async_support/mexc.py +64 -64
  80. ccxt/async_support/ndax.py +38 -38
  81. ccxt/async_support/novadax.py +26 -26
  82. ccxt/async_support/oceanex.py +21 -21
  83. ccxt/async_support/okcoin.py +35 -35
  84. ccxt/async_support/okx.py +85 -85
  85. ccxt/async_support/onetrading.py +32 -32
  86. ccxt/async_support/p2b.py +14 -14
  87. ccxt/async_support/paymium.py +12 -12
  88. ccxt/async_support/phemex.py +50 -50
  89. ccxt/async_support/poloniex.py +35 -35
  90. ccxt/async_support/poloniexfutures.py +25 -21
  91. ccxt/async_support/probit.py +30 -30
  92. ccxt/async_support/timex.py +22 -22
  93. ccxt/async_support/tokocrypto.py +26 -26
  94. ccxt/async_support/tradeogre.py +12 -12
  95. ccxt/async_support/upbit.py +28 -28
  96. ccxt/async_support/wavesexchange.py +33 -33
  97. ccxt/async_support/wazirx.py +21 -21
  98. ccxt/async_support/whitebit.py +37 -37
  99. ccxt/async_support/woo.py +51 -51
  100. ccxt/async_support/woofipro.py +46 -46
  101. ccxt/async_support/yobit.py +20 -20
  102. ccxt/async_support/zaif.py +12 -12
  103. ccxt/async_support/zonda.py +22 -22
  104. ccxt/base/exchange.py +48 -36
  105. ccxt/base/types.py +13 -0
  106. ccxt/bigone.py +32 -32
  107. ccxt/binance.py +105 -96
  108. ccxt/bingx.py +21 -21
  109. ccxt/bit2c.py +13 -13
  110. ccxt/bitbank.py +19 -19
  111. ccxt/bitbns.py +17 -17
  112. ccxt/bitfinex.py +24 -24
  113. ccxt/bitfinex2.py +142 -109
  114. ccxt/bitflyer.py +23 -23
  115. ccxt/bitget.py +76 -76
  116. ccxt/bithumb.py +20 -20
  117. ccxt/bitmart.py +55 -55
  118. ccxt/bitmex.py +41 -41
  119. ccxt/bitopro.py +30 -30
  120. ccxt/bitrue.py +37 -37
  121. ccxt/bitso.py +30 -30
  122. ccxt/bitstamp.py +31 -31
  123. ccxt/bitteam.py +26 -26
  124. ccxt/bitvavo.py +27 -27
  125. ccxt/bl3p.py +8 -8
  126. ccxt/blockchaincom.py +24 -24
  127. ccxt/blofin.py +37 -37
  128. ccxt/btcalpha.py +19 -19
  129. ccxt/btcbox.py +11 -11
  130. ccxt/btcmarkets.py +22 -22
  131. ccxt/btcturk.py +13 -13
  132. ccxt/bybit.py +96 -96
  133. ccxt/cex.py +21 -21
  134. ccxt/coinbase.py +53 -53
  135. ccxt/coinbaseexchange.py +29 -29
  136. ccxt/coinbaseinternational.py +32 -32
  137. ccxt/coincheck.py +14 -14
  138. ccxt/coinex.py +208 -175
  139. ccxt/coinlist.py +35 -35
  140. ccxt/coinmate.py +22 -22
  141. ccxt/coinmetro.py +22 -22
  142. ccxt/coinone.py +18 -18
  143. ccxt/coinsph.py +32 -32
  144. ccxt/coinspot.py +8 -8
  145. ccxt/cryptocom.py +43 -43
  146. ccxt/currencycom.py +33 -33
  147. ccxt/delta.py +35 -35
  148. ccxt/deribit.py +54 -54
  149. ccxt/digifinex.py +56 -56
  150. ccxt/exmo.py +34 -34
  151. ccxt/gate.py +60 -60
  152. ccxt/gemini.py +24 -24
  153. ccxt/hitbtc.py +51 -51
  154. ccxt/hollaex.py +29 -29
  155. ccxt/htx.py +73 -73
  156. ccxt/huobijp.py +30 -30
  157. ccxt/hyperliquid.py +58 -58
  158. ccxt/idex.py +33 -33
  159. ccxt/independentreserve.py +12 -12
  160. ccxt/indodax.py +21 -21
  161. ccxt/kraken.py +46 -51
  162. ccxt/krakenfutures.py +29 -29
  163. ccxt/kucoin.py +51 -51
  164. ccxt/kucoinfutures.py +33 -33
  165. ccxt/kuna.py +27 -27
  166. ccxt/latoken.py +27 -27
  167. ccxt/lbank.py +35 -35
  168. ccxt/luno.py +19 -19
  169. ccxt/lykke.py +20 -20
  170. ccxt/mercado.py +17 -17
  171. ccxt/mexc.py +64 -64
  172. ccxt/ndax.py +38 -38
  173. ccxt/novadax.py +26 -26
  174. ccxt/oceanex.py +21 -21
  175. ccxt/okcoin.py +35 -35
  176. ccxt/okx.py +85 -85
  177. ccxt/onetrading.py +32 -32
  178. ccxt/p2b.py +14 -14
  179. ccxt/paymium.py +12 -12
  180. ccxt/phemex.py +50 -50
  181. ccxt/poloniex.py +35 -35
  182. ccxt/poloniexfutures.py +25 -21
  183. ccxt/pro/__init__.py +1 -1
  184. ccxt/pro/alpaca.py +8 -8
  185. ccxt/pro/ascendex.py +4 -4
  186. ccxt/pro/binance.py +56 -56
  187. ccxt/pro/bingx.py +5 -5
  188. ccxt/pro/bitfinex.py +6 -6
  189. ccxt/pro/bitfinex2.py +10 -10
  190. ccxt/pro/bitget.py +17 -17
  191. ccxt/pro/bithumb.py +6 -6
  192. ccxt/pro/bitmart.py +8 -8
  193. ccxt/pro/bitmex.py +16 -16
  194. ccxt/pro/bitopro.py +4 -4
  195. ccxt/pro/bitrue.py +8 -8
  196. ccxt/pro/bitstamp.py +5 -5
  197. ccxt/pro/bitvavo.py +14 -14
  198. ccxt/pro/blockchaincom.py +7 -7
  199. ccxt/pro/bybit.py +12 -12
  200. ccxt/pro/cex.py +20 -20
  201. ccxt/pro/coinbase.py +32 -2
  202. ccxt/pro/coinbaseexchange.py +10 -10
  203. ccxt/pro/coinbaseinternational.py +4 -4
  204. ccxt/pro/coincheck.py +2 -2
  205. ccxt/pro/coinex.py +15 -15
  206. ccxt/pro/coinone.py +4 -4
  207. ccxt/pro/cryptocom.py +11 -11
  208. ccxt/pro/currencycom.py +4 -4
  209. ccxt/pro/deribit.py +9 -9
  210. ccxt/pro/exmo.py +9 -9
  211. ccxt/pro/gate.py +12 -12
  212. ccxt/pro/gemini.py +11 -11
  213. ccxt/pro/hitbtc.py +13 -13
  214. ccxt/pro/hollaex.py +6 -6
  215. ccxt/pro/htx.py +15 -15
  216. ccxt/pro/huobijp.py +16 -16
  217. ccxt/pro/hyperliquid.py +9 -9
  218. ccxt/pro/idex.py +12 -12
  219. ccxt/pro/independentreserve.py +2 -2
  220. ccxt/pro/kraken.py +14 -14
  221. ccxt/pro/krakenfutures.py +12 -12
  222. ccxt/pro/kucoin.py +12 -12
  223. ccxt/pro/kucoinfutures.py +16 -16
  224. ccxt/pro/lbank.py +12 -12
  225. ccxt/pro/luno.py +4 -4
  226. ccxt/pro/mexc.py +14 -14
  227. ccxt/pro/ndax.py +12 -12
  228. ccxt/pro/okcoin.py +6 -6
  229. ccxt/pro/okx.py +30 -30
  230. ccxt/pro/onetrading.py +13 -13
  231. ccxt/pro/p2b.py +2 -2
  232. ccxt/pro/phemex.py +9 -9
  233. ccxt/pro/poloniex.py +9 -9
  234. ccxt/pro/poloniexfutures.py +10 -10
  235. ccxt/pro/probit.py +8 -8
  236. ccxt/pro/upbit.py +1 -1
  237. ccxt/pro/wazirx.py +10 -10
  238. ccxt/pro/whitebit.py +8 -8
  239. ccxt/pro/woo.py +14 -14
  240. ccxt/pro/woofipro.py +14 -14
  241. ccxt/probit.py +30 -30
  242. ccxt/test/base/test_shared_methods.py +1 -0
  243. ccxt/test/test_async.py +1 -1
  244. ccxt/test/test_sync.py +1 -1
  245. ccxt/timex.py +22 -22
  246. ccxt/tokocrypto.py +26 -26
  247. ccxt/tradeogre.py +12 -12
  248. ccxt/upbit.py +28 -28
  249. ccxt/wavesexchange.py +33 -33
  250. ccxt/wazirx.py +21 -21
  251. ccxt/whitebit.py +37 -37
  252. ccxt/woo.py +51 -51
  253. ccxt/woofipro.py +46 -46
  254. ccxt/yobit.py +20 -20
  255. ccxt/zaif.py +12 -12
  256. ccxt/zonda.py +22 -22
  257. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/METADATA +4 -4
  258. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/RECORD +260 -260
  259. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/WHEEL +0 -0
  260. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/top_level.txt +0 -0
ccxt/async_support/cex.py CHANGED
@@ -317,7 +317,7 @@ class cex(Exchange, ImplicitAPI):
317
317
  #
318
318
  data = self.safe_value(response, 'data', [])
319
319
  currencies = self.safe_value(data, 'symbols', [])
320
- result = {}
320
+ result: dict = {}
321
321
  for i in range(0, len(currencies)):
322
322
  currency = currencies[i]
323
323
  id = self.safe_string(currency, 'code')
@@ -457,7 +457,7 @@ class cex(Exchange, ImplicitAPI):
457
457
  return result
458
458
 
459
459
  def parse_balance(self, response) -> Balances:
460
- result = {'info': response}
460
+ result: dict = {'info': response}
461
461
  ommited = ['username', 'timestamp']
462
462
  balances = self.omit(response, ommited)
463
463
  currencyIds = list(balances.keys())
@@ -494,7 +494,7 @@ class cex(Exchange, ImplicitAPI):
494
494
  """
495
495
  await self.load_markets()
496
496
  market = self.market(symbol)
497
- request = {
497
+ request: dict = {
498
498
  'pair': market['id'],
499
499
  }
500
500
  if limit is not None:
@@ -541,7 +541,7 @@ class cex(Exchange, ImplicitAPI):
541
541
  else:
542
542
  if self.options['fetchOHLCVWarning']:
543
543
  raise ExchangeError(self.id + " fetchOHLCV warning: CEX can return historical candles for a certain date only, self might produce an empty or None reply. Set exchange.options['fetchOHLCVWarning'] = False or add({'options': {'fetchOHLCVWarning': False}}) to constructor params to suppress self warning message.")
544
- request = {
544
+ request: dict = {
545
545
  'pair': market['id'],
546
546
  'yyyymmdd': self.yyyymmdd(since, ''),
547
547
  }
@@ -604,12 +604,12 @@ class cex(Exchange, ImplicitAPI):
604
604
  await self.load_markets()
605
605
  symbols = self.market_symbols(symbols)
606
606
  currencies = list(self.currencies.keys())
607
- request = {
607
+ request: dict = {
608
608
  'currencies': '/'.join(currencies),
609
609
  }
610
610
  response = await self.publicGetTickersCurrencies(self.extend(request, params))
611
611
  tickers = self.safe_value(response, 'data', [])
612
- result = {}
612
+ result: dict = {}
613
613
  for t in range(0, len(tickers)):
614
614
  ticker = tickers[t]
615
615
  marketId = self.safe_string(ticker, 'pair')
@@ -628,13 +628,13 @@ class cex(Exchange, ImplicitAPI):
628
628
  """
629
629
  await self.load_markets()
630
630
  market = self.market(symbol)
631
- request = {
631
+ request: dict = {
632
632
  'pair': market['id'],
633
633
  }
634
634
  ticker = await self.publicGetTickerPair(self.extend(request, params))
635
635
  return self.parse_ticker(ticker, market)
636
636
 
637
- def parse_trade(self, trade, market: Market = None) -> Trade:
637
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
638
638
  #
639
639
  # fetchTrades(public)
640
640
  #
@@ -681,7 +681,7 @@ class cex(Exchange, ImplicitAPI):
681
681
  """
682
682
  await self.load_markets()
683
683
  market = self.market(symbol)
684
- request = {
684
+ request: dict = {
685
685
  'pair': market['id'],
686
686
  }
687
687
  response = await self.publicGetTradeHistoryPair(self.extend(request, params))
@@ -708,7 +708,7 @@ class cex(Exchange, ImplicitAPI):
708
708
  # }
709
709
  #
710
710
  data = self.safe_value(response, 'data', {})
711
- result = {}
711
+ result: dict = {}
712
712
  for i in range(0, len(self.symbols)):
713
713
  symbol = self.symbols[i]
714
714
  market = self.market(symbol)
@@ -742,7 +742,7 @@ class cex(Exchange, ImplicitAPI):
742
742
  """
743
743
  await self.load_markets()
744
744
  market = self.market(symbol)
745
- request = {
745
+ request: dict = {
746
746
  'pair': market['id'],
747
747
  'type': side,
748
748
  }
@@ -823,7 +823,7 @@ class cex(Exchange, ImplicitAPI):
823
823
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
824
824
  """
825
825
  await self.load_markets()
826
- request = {
826
+ request: dict = {
827
827
  'id': id,
828
828
  }
829
829
  response = await self.privatePostCancelOrder(self.extend(request, params))
@@ -843,7 +843,7 @@ class cex(Exchange, ImplicitAPI):
843
843
  raise ArgumentsRequired(self.id + ' cancelAllOrders requires a symbol.')
844
844
  await self.load_markets()
845
845
  market = self.market(symbol)
846
- request = {
846
+ request: dict = {
847
847
  'pair': market['id'],
848
848
  }
849
849
  orders = await self.privatePostCancelOrdersPair(self.extend(request, params))
@@ -857,7 +857,7 @@ class cex(Exchange, ImplicitAPI):
857
857
  #
858
858
  return orders
859
859
 
860
- def parse_order(self, order, market: Market = None) -> Order:
860
+ def parse_order(self, order: dict, market: Market = None) -> Order:
861
861
  # Depending on the call, 'time' can be a unix int, unix string or ISO string
862
862
  # Yes, really
863
863
  timestamp = self.safe_value(order, 'time')
@@ -1114,7 +1114,7 @@ class cex(Exchange, ImplicitAPI):
1114
1114
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1115
1115
  """
1116
1116
  await self.load_markets()
1117
- request = {}
1117
+ request: dict = {}
1118
1118
  market = None
1119
1119
  orders = None
1120
1120
  if symbol is not None:
@@ -1141,7 +1141,7 @@ class cex(Exchange, ImplicitAPI):
1141
1141
  raise ArgumentsRequired(self.id + ' fetchClosedOrders() requires a symbol argument')
1142
1142
  await self.load_markets()
1143
1143
  market = self.market(symbol)
1144
- request = {'pair': market['id']}
1144
+ request: dict = {'pair': market['id']}
1145
1145
  response = await self.privatePostArchivedOrdersPair(self.extend(request, params))
1146
1146
  return self.parse_orders(response, market, since, limit)
1147
1147
 
@@ -1154,7 +1154,7 @@ class cex(Exchange, ImplicitAPI):
1154
1154
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1155
1155
  """
1156
1156
  await self.load_markets()
1157
- request = {
1157
+ request: dict = {
1158
1158
  'id': str(id),
1159
1159
  }
1160
1160
  response = await self.privatePostGetOrderTx(self.extend(request, params))
@@ -1273,7 +1273,7 @@ class cex(Exchange, ImplicitAPI):
1273
1273
  """
1274
1274
  await self.load_markets()
1275
1275
  market = self.market(symbol)
1276
- request = {
1276
+ request: dict = {
1277
1277
  'limit': limit,
1278
1278
  'pair': market['id'],
1279
1279
  'dateFrom': since,
@@ -1477,7 +1477,7 @@ class cex(Exchange, ImplicitAPI):
1477
1477
  results.append(safeOrder)
1478
1478
  return results
1479
1479
 
1480
- def parse_order_status(self, status):
1480
+ def parse_order_status(self, status: Str):
1481
1481
  return self.safe_string(self.options['order']['status'], status, status)
1482
1482
 
1483
1483
  async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
@@ -1500,7 +1500,7 @@ class cex(Exchange, ImplicitAPI):
1500
1500
  await self.load_markets()
1501
1501
  market = self.market(symbol)
1502
1502
  # see: https://cex.io/rest-api#/definitions/CancelReplaceOrderRequest
1503
- request = {
1503
+ request: dict = {
1504
1504
  'pair': market['id'],
1505
1505
  'type': side,
1506
1506
  'amount': amount,
@@ -1520,7 +1520,7 @@ class cex(Exchange, ImplicitAPI):
1520
1520
  """
1521
1521
  await self.load_markets()
1522
1522
  currency = self.currency(code)
1523
- request = {
1523
+ request: dict = {
1524
1524
  'currency': currency['id'],
1525
1525
  }
1526
1526
  networkCode, query = self.handle_network_code_and_params(params)
@@ -437,7 +437,7 @@ class coinbase(Exchange, ImplicitAPI):
437
437
  paginate, params = self.handle_option_and_params(params, 'fetchAccounts', 'paginate')
438
438
  if paginate:
439
439
  return await self.fetch_paginated_call_cursor('fetchAccounts', None, None, None, params, 'next_starting_after', 'starting_after', None, 100)
440
- request = {
440
+ request: dict = {
441
441
  'limit': 100,
442
442
  }
443
443
  response = await self.v2PrivateGetAccounts(self.extend(request, params))
@@ -503,7 +503,7 @@ class coinbase(Exchange, ImplicitAPI):
503
503
  paginate, params = self.handle_option_and_params(params, 'fetchAccounts', 'paginate')
504
504
  if paginate:
505
505
  return await self.fetch_paginated_call_cursor('fetchAccounts', None, None, None, params, 'cursor', 'cursor', None, 100)
506
- request = {
506
+ request: dict = {
507
507
  'limit': 100,
508
508
  }
509
509
  response = await self.v3PrivateGetBrokerageAccounts(self.extend(request, params))
@@ -656,7 +656,7 @@ class coinbase(Exchange, ImplicitAPI):
656
656
  break
657
657
  if accountId is None:
658
658
  raise ExchangeError(self.id + ' createDepositAddress() could not find the account with matching currency code, specify an `account_id` extra param')
659
- request = {
659
+ request: dict = {
660
660
  'account_id': accountId,
661
661
  }
662
662
  response = await self.v2PrivatePostAccountsAccountIdAddresses(self.extend(request, params))
@@ -776,14 +776,14 @@ class coinbase(Exchange, ImplicitAPI):
776
776
  return await self.fetch_transactions_with_method('v2PrivateGetAccountsAccountIdDeposits', code, since, limit, params)
777
777
 
778
778
  def parse_transaction_status(self, status):
779
- statuses = {
779
+ statuses: dict = {
780
780
  'created': 'pending',
781
781
  'completed': 'ok',
782
782
  'canceled': 'canceled',
783
783
  }
784
784
  return self.safe_string(statuses, status, status)
785
785
 
786
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
786
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
787
787
  #
788
788
  # fiat deposit
789
789
  #
@@ -942,7 +942,7 @@ class coinbase(Exchange, ImplicitAPI):
942
942
  },
943
943
  }
944
944
 
945
- def parse_trade(self, trade, market: Market = None) -> Trade:
945
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
946
946
  #
947
947
  # fetchMyBuys, fetchMySells
948
948
  #
@@ -1660,9 +1660,9 @@ class coinbase(Exchange, ImplicitAPI):
1660
1660
  # }
1661
1661
  # }
1662
1662
  #
1663
- result = {}
1664
- networks = {}
1665
- networksById = {}
1663
+ result: dict = {}
1664
+ networks: dict = {}
1665
+ networksById: dict = {}
1666
1666
  for i in range(0, len(currencies)):
1667
1667
  currency = currencies[i]
1668
1668
  assetId = self.safe_string(currency, 'asset_id')
@@ -1718,7 +1718,7 @@ class coinbase(Exchange, ImplicitAPI):
1718
1718
  async def fetch_tickers_v2(self, symbols: Strings = None, params={}):
1719
1719
  await self.load_markets()
1720
1720
  symbols = self.market_symbols(symbols)
1721
- request = {
1721
+ request: dict = {
1722
1722
  # 'currency': 'USD',
1723
1723
  }
1724
1724
  response = await self.v2PublicGetExchangeRates(self.extend(request, params))
@@ -1737,7 +1737,7 @@ class coinbase(Exchange, ImplicitAPI):
1737
1737
  data = self.safe_dict(response, 'data', {})
1738
1738
  rates = self.safe_dict(data, 'rates', {})
1739
1739
  quoteId = self.safe_string(data, 'currency')
1740
- result = {}
1740
+ result: dict = {}
1741
1741
  baseIds = list(rates.keys())
1742
1742
  delimiter = '-'
1743
1743
  for i in range(0, len(baseIds)):
@@ -1751,7 +1751,7 @@ class coinbase(Exchange, ImplicitAPI):
1751
1751
  async def fetch_tickers_v3(self, symbols: Strings = None, params={}):
1752
1752
  await self.load_markets()
1753
1753
  symbols = self.market_symbols(symbols)
1754
- request = {}
1754
+ request: dict = {}
1755
1755
  if symbols is not None:
1756
1756
  request['product_ids'] = self.market_ids(symbols)
1757
1757
  marketType = None
@@ -1797,7 +1797,7 @@ class coinbase(Exchange, ImplicitAPI):
1797
1797
  # }
1798
1798
  #
1799
1799
  data = self.safe_list(response, 'products', [])
1800
- result = {}
1800
+ result: dict = {}
1801
1801
  for i in range(0, len(data)):
1802
1802
  entry = data[i]
1803
1803
  marketId = self.safe_string(entry, 'product_id')
@@ -1843,7 +1843,7 @@ class coinbase(Exchange, ImplicitAPI):
1843
1843
  spotData = self.safe_dict(spot, 'data', {})
1844
1844
  askData = self.safe_dict(ask, 'data', {})
1845
1845
  bidData = self.safe_dict(bid, 'data', {})
1846
- bidAskLast = {
1846
+ bidAskLast: dict = {
1847
1847
  'bid': self.safe_number(bidData, 'amount'),
1848
1848
  'ask': self.safe_number(askData, 'amount'),
1849
1849
  'price': self.safe_number(spotData, 'amount'),
@@ -1853,7 +1853,7 @@ class coinbase(Exchange, ImplicitAPI):
1853
1853
  async def fetch_ticker_v3(self, symbol: str, params={}):
1854
1854
  await self.load_markets()
1855
1855
  market = self.market(symbol)
1856
- request = {
1856
+ request: dict = {
1857
1857
  'product_id': market['id'],
1858
1858
  'limit': 1,
1859
1859
  }
@@ -2004,7 +2004,7 @@ class coinbase(Exchange, ImplicitAPI):
2004
2004
  balances = self.safe_list_2(response, 'data', 'accounts', [])
2005
2005
  accounts = self.safe_list(params, 'type', self.options['accounts'])
2006
2006
  v3Accounts = self.safe_list(params, 'type', self.options['v3Accounts'])
2007
- result = {'info': response}
2007
+ result: dict = {'info': response}
2008
2008
  for b in range(0, len(balances)):
2009
2009
  balance = balances[b]
2010
2010
  type = self.safe_string(balance, 'type')
@@ -2058,7 +2058,7 @@ class coinbase(Exchange, ImplicitAPI):
2058
2058
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
2059
2059
  """
2060
2060
  await self.load_markets()
2061
- request = {}
2061
+ request: dict = {}
2062
2062
  response = None
2063
2063
  isV3 = self.safe_bool(params, 'v3', False)
2064
2064
  params = self.omit(params, ['v3'])
@@ -2186,13 +2186,13 @@ class coinbase(Exchange, ImplicitAPI):
2186
2186
  return ledger
2187
2187
 
2188
2188
  def parse_ledger_entry_status(self, status):
2189
- types = {
2189
+ types: dict = {
2190
2190
  'completed': 'ok',
2191
2191
  }
2192
2192
  return self.safe_string(types, status, status)
2193
2193
 
2194
2194
  def parse_ledger_entry_type(self, type):
2195
- types = {
2195
+ types: dict = {
2196
2196
  'buy': 'trade',
2197
2197
  'sell': 'trade',
2198
2198
  'fiat_deposit': 'transaction',
@@ -2205,7 +2205,7 @@ class coinbase(Exchange, ImplicitAPI):
2205
2205
  }
2206
2206
  return self.safe_string(types, type, type)
2207
2207
 
2208
- def parse_ledger_entry(self, item, currency: Currency = None):
2208
+ def parse_ledger_entry(self, item: dict, currency: Currency = None):
2209
2209
  #
2210
2210
  # crypto deposit transaction
2211
2211
  #
@@ -2522,7 +2522,7 @@ class coinbase(Exchange, ImplicitAPI):
2522
2522
  accountId = self.safe_string_2(params, 'account_id', 'accountId')
2523
2523
  if accountId is None:
2524
2524
  raise ArgumentsRequired(self.id + ' prepareAccountRequest() method requires an account_id(or accountId) parameter')
2525
- request = {
2525
+ request: dict = {
2526
2526
  'account_id': accountId,
2527
2527
  }
2528
2528
  if limit is not None:
@@ -2538,7 +2538,7 @@ class coinbase(Exchange, ImplicitAPI):
2538
2538
  accountId = await self.find_account_id(code, params)
2539
2539
  if accountId is None:
2540
2540
  raise ExchangeError(self.id + ' prepareAccountRequestWithCurrencyCode() could not find account id for ' + code)
2541
- request = {
2541
+ request: dict = {
2542
2542
  'account_id': accountId,
2543
2543
  }
2544
2544
  if limit is not None:
@@ -2591,7 +2591,7 @@ class coinbase(Exchange, ImplicitAPI):
2591
2591
  await self.load_markets()
2592
2592
  market = self.market(symbol)
2593
2593
  id = self.safe_string(self.options, 'brokerId', 'ccxt')
2594
- request = {
2594
+ request: dict = {
2595
2595
  'client_order_id': id + '-' + self.uuid(),
2596
2596
  'product_id': market['id'],
2597
2597
  'side': side.upper(),
@@ -2779,7 +2779,7 @@ class coinbase(Exchange, ImplicitAPI):
2779
2779
  data = self.safe_dict(response, 'success_response', {})
2780
2780
  return self.parse_order(data, market)
2781
2781
 
2782
- def parse_order(self, order, market: Market = None) -> Order:
2782
+ def parse_order(self, order: dict, market: Market = None) -> Order:
2783
2783
  #
2784
2784
  # createOrder
2785
2785
  #
@@ -2911,8 +2911,8 @@ class coinbase(Exchange, ImplicitAPI):
2911
2911
  'trades': None,
2912
2912
  }, market)
2913
2913
 
2914
- def parse_order_status(self, status):
2915
- statuses = {
2914
+ def parse_order_status(self, status: Str):
2915
+ statuses: dict = {
2916
2916
  'OPEN': 'open',
2917
2917
  'FILLED': 'closed',
2918
2918
  'CANCELLED': 'canceled',
@@ -2922,10 +2922,10 @@ class coinbase(Exchange, ImplicitAPI):
2922
2922
  }
2923
2923
  return self.safe_string(statuses, status, status)
2924
2924
 
2925
- def parse_order_type(self, type):
2925
+ def parse_order_type(self, type: Str):
2926
2926
  if type == 'UNKNOWN_ORDER_TYPE':
2927
2927
  return None
2928
- types = {
2928
+ types: dict = {
2929
2929
  'MARKET': 'market',
2930
2930
  'LIMIT': 'limit',
2931
2931
  'STOP': 'limit',
@@ -2933,8 +2933,8 @@ class coinbase(Exchange, ImplicitAPI):
2933
2933
  }
2934
2934
  return self.safe_string(types, type, type)
2935
2935
 
2936
- def parse_time_in_force(self, timeInForce):
2937
- timeInForces = {
2936
+ def parse_time_in_force(self, timeInForce: Str):
2937
+ timeInForces: dict = {
2938
2938
  'GOOD_UNTIL_CANCELLED': 'GTC',
2939
2939
  'GOOD_UNTIL_DATE_TIME': 'GTD',
2940
2940
  'IMMEDIATE_OR_CANCEL': 'IOC',
@@ -2969,7 +2969,7 @@ class coinbase(Exchange, ImplicitAPI):
2969
2969
  market = None
2970
2970
  if symbol is not None:
2971
2971
  market = self.market(symbol)
2972
- request = {
2972
+ request: dict = {
2973
2973
  'order_ids': ids,
2974
2974
  }
2975
2975
  response = await self.v3PrivatePostBrokerageOrdersBatchCancel(self.extend(request, params))
@@ -3007,7 +3007,7 @@ class coinbase(Exchange, ImplicitAPI):
3007
3007
  """
3008
3008
  await self.load_markets()
3009
3009
  market = self.market(symbol)
3010
- request = {
3010
+ request: dict = {
3011
3011
  'order_id': id,
3012
3012
  }
3013
3013
  if amount is not None:
@@ -3045,7 +3045,7 @@ class coinbase(Exchange, ImplicitAPI):
3045
3045
  market = None
3046
3046
  if symbol is not None:
3047
3047
  market = self.market(symbol)
3048
- request = {
3048
+ request: dict = {
3049
3049
  'order_id': id,
3050
3050
  }
3051
3051
  response = await self.v3PrivateGetBrokerageOrdersHistoricalOrderId(self.extend(request, params))
@@ -3111,7 +3111,7 @@ class coinbase(Exchange, ImplicitAPI):
3111
3111
  market = None
3112
3112
  if symbol is not None:
3113
3113
  market = self.market(symbol)
3114
- request = {}
3114
+ request: dict = {}
3115
3115
  if market is not None:
3116
3116
  request['product_id'] = market['id']
3117
3117
  if limit is not None:
@@ -3178,7 +3178,7 @@ class coinbase(Exchange, ImplicitAPI):
3178
3178
  market = None
3179
3179
  if symbol is not None:
3180
3180
  market = self.market(symbol)
3181
- request = {
3181
+ request: dict = {
3182
3182
  'order_status': status,
3183
3183
  }
3184
3184
  if market is not None:
@@ -3314,7 +3314,7 @@ class coinbase(Exchange, ImplicitAPI):
3314
3314
  if paginate:
3315
3315
  return await self.fetch_paginated_call_deterministic('fetchOHLCV', symbol, since, limit, timeframe, params, maxLimit - 1)
3316
3316
  market = self.market(symbol)
3317
- request = {
3317
+ request: dict = {
3318
3318
  'product_id': market['id'],
3319
3319
  'granularity': self.safe_string(self.timeframes, timeframe, timeframe),
3320
3320
  }
@@ -3386,7 +3386,7 @@ class coinbase(Exchange, ImplicitAPI):
3386
3386
  """
3387
3387
  await self.load_markets()
3388
3388
  market = self.market(symbol)
3389
- request = {
3389
+ request: dict = {
3390
3390
  'product_id': market['id'],
3391
3391
  }
3392
3392
  if since is not None:
@@ -3439,7 +3439,7 @@ class coinbase(Exchange, ImplicitAPI):
3439
3439
  market = None
3440
3440
  if symbol is not None:
3441
3441
  market = self.market(symbol)
3442
- request = {}
3442
+ request: dict = {}
3443
3443
  if market is not None:
3444
3444
  request['product_id'] = market['id']
3445
3445
  if limit is not None:
@@ -3493,7 +3493,7 @@ class coinbase(Exchange, ImplicitAPI):
3493
3493
  """
3494
3494
  await self.load_markets()
3495
3495
  market = self.market(symbol)
3496
- request = {
3496
+ request: dict = {
3497
3497
  'product_id': market['id'],
3498
3498
  }
3499
3499
  if limit is not None:
@@ -3534,7 +3534,7 @@ class coinbase(Exchange, ImplicitAPI):
3534
3534
  """
3535
3535
  await self.load_markets()
3536
3536
  symbols = self.market_symbols(symbols)
3537
- request = {}
3537
+ request: dict = {}
3538
3538
  if symbols is not None:
3539
3539
  request['product_ids'] = self.market_ids(symbols)
3540
3540
  response = await self.v3PrivateGetBrokerageBestBidAsk(self.extend(request, params))
@@ -3586,7 +3586,7 @@ class coinbase(Exchange, ImplicitAPI):
3586
3586
  accountId = await self.find_account_id(code, params)
3587
3587
  if accountId is None:
3588
3588
  raise ExchangeError(self.id + ' withdraw() could not find account id for ' + code)
3589
- request = {
3589
+ request: dict = {
3590
3590
  'account_id': accountId,
3591
3591
  'type': 'send',
3592
3592
  'to': address,
@@ -3803,7 +3803,7 @@ class coinbase(Exchange, ImplicitAPI):
3803
3803
  accountId = await self.find_account_id(code, params)
3804
3804
  if accountId is None:
3805
3805
  raise ExchangeError(self.id + ' deposit() could not find account id for ' + code)
3806
- request = {
3806
+ request: dict = {
3807
3807
  'account_id': accountId,
3808
3808
  'amount': self.number_to_string(amount),
3809
3809
  'currency': code.upper(), # need to use code in case depositing USD etc.
@@ -3868,7 +3868,7 @@ class coinbase(Exchange, ImplicitAPI):
3868
3868
  accountId = await self.find_account_id(code, params)
3869
3869
  if accountId is None:
3870
3870
  raise ExchangeError(self.id + ' fetchDeposit() could not find account id for ' + code)
3871
- request = {
3871
+ request: dict = {
3872
3872
  'account_id': accountId,
3873
3873
  'deposit_id': id,
3874
3874
  }
@@ -3926,7 +3926,7 @@ class coinbase(Exchange, ImplicitAPI):
3926
3926
  :returns dict: a `conversion structure <https://docs.ccxt.com/#/?id=conversion-structure>`
3927
3927
  """
3928
3928
  await self.load_markets()
3929
- request = {
3929
+ request: dict = {
3930
3930
  'from_account': fromCode,
3931
3931
  'to_account': toCode,
3932
3932
  'amount': self.number_to_string(amount),
@@ -3947,7 +3947,7 @@ class coinbase(Exchange, ImplicitAPI):
3947
3947
  :returns dict: a `conversion structure <https://docs.ccxt.com/#/?id=conversion-structure>`
3948
3948
  """
3949
3949
  await self.load_markets()
3950
- request = {
3950
+ request: dict = {
3951
3951
  'trade_id': id,
3952
3952
  'from_account': fromCode,
3953
3953
  'to_account': toCode,
@@ -3973,7 +3973,7 @@ class coinbase(Exchange, ImplicitAPI):
3973
3973
  if toCode is None:
3974
3974
  raise ArgumentsRequired(self.id + ' fetchConvertTrade() requires a toCode parameter')
3975
3975
  params = self.omit(params, 'toCode')
3976
- request = {
3976
+ request: dict = {
3977
3977
  'trade_id': id,
3978
3978
  'from_account': code,
3979
3979
  'to_account': toCode,
@@ -4020,7 +4020,7 @@ class coinbase(Exchange, ImplicitAPI):
4020
4020
  raise NotSupported(self.id + ' closePosition() only supported for futures markets')
4021
4021
  clientOrderId = self.safe_string_2(params, 'client_order_id', 'clientOrderId')
4022
4022
  params = self.omit(params, 'clientOrderId')
4023
- request = {
4023
+ request: dict = {
4024
4024
  'product_id': market['id'],
4025
4025
  }
4026
4026
  if clientOrderId is None:
@@ -4055,7 +4055,7 @@ class coinbase(Exchange, ImplicitAPI):
4055
4055
  portfolio, params = self.handle_option_and_params(params, 'fetchPositions', 'portfolio')
4056
4056
  if portfolio is None:
4057
4057
  raise ArgumentsRequired(self.id + ' fetchPositions() requires a "portfolio" value in params(eg: dbcb91e7-2bc9-515), or set.options["portfolio"]. You can get a list of portfolios with fetchPortfolios()')
4058
- request = {
4058
+ request: dict = {
4059
4059
  'portfolio_uuid': portfolio,
4060
4060
  }
4061
4061
  response = await self.v3PrivateGetBrokerageIntxPositionsPortfolioUuid(self.extend(request, params))
@@ -4080,7 +4080,7 @@ class coinbase(Exchange, ImplicitAPI):
4080
4080
  productId = self.safe_string(market, 'product_id')
4081
4081
  if productId is None:
4082
4082
  raise ArgumentsRequired(self.id + ' fetchPosition() requires a "product_id" in params')
4083
- futureRequest = {
4083
+ futureRequest: dict = {
4084
4084
  'product_id': productId,
4085
4085
  }
4086
4086
  response = await self.v3PrivateGetBrokerageCfmPositionsProductId(self.extend(futureRequest, params))
@@ -4089,7 +4089,7 @@ class coinbase(Exchange, ImplicitAPI):
4089
4089
  portfolio, params = self.handle_option_and_params(params, 'fetchPositions', 'portfolio')
4090
4090
  if portfolio is None:
4091
4091
  raise ArgumentsRequired(self.id + ' fetchPosition() requires a "portfolio" value in params(eg: dbcb91e7-2bc9-515), or set.options["portfolio"]. You can get a list of portfolios with fetchPortfolios()')
4092
- request = {
4092
+ request: dict = {
4093
4093
  'symbol': market['id'],
4094
4094
  'portfolio_uuid': portfolio,
4095
4095
  }
@@ -4097,7 +4097,7 @@ class coinbase(Exchange, ImplicitAPI):
4097
4097
  position = self.safe_dict(response, 'position', {})
4098
4098
  return self.parse_position(position, market)
4099
4099
 
4100
- def parse_position(self, position, market: Market = None):
4100
+ def parse_position(self, position: dict, market: Market = None):
4101
4101
  #
4102
4102
  # {
4103
4103
  # "product_id": "1r4njf84-0-0",
@@ -4243,7 +4243,7 @@ class coinbase(Exchange, ImplicitAPI):
4243
4243
  if quesPos > 0:
4244
4244
  uri = uri[0:quesPos]
4245
4245
  nonce = self.random_bytes(16)
4246
- request = {
4246
+ request: dict = {
4247
4247
  'aud': ['retail_rest_api_proxy'],
4248
4248
  'iss': 'coinbase-cloud',
4249
4249
  'nbf': seconds,
@@ -4304,7 +4304,7 @@ class coinbase(Exchange, ImplicitAPI):
4304
4304
  # uri = uri[0:quesPos]
4305
4305
  # }
4306
4306
  # nonce = self.random_bytes(16)
4307
- # request = {
4307
+ # request: Dict = {
4308
4308
  # 'aud': ['retail_rest_api_proxy'],
4309
4309
  # 'iss': 'coinbase-cloud',
4310
4310
  # 'nbf': seconds,