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/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
  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
  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 = 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
  self.load_markets()
630
630
  market = self.market(symbol)
631
- request = {
631
+ request: dict = {
632
632
  'pair': market['id'],
633
633
  }
634
634
  ticker = 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
  self.load_markets()
683
683
  market = self.market(symbol)
684
- request = {
684
+ request: dict = {
685
685
  'pair': market['id'],
686
686
  }
687
687
  response = 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
  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
  self.load_markets()
826
- request = {
826
+ request: dict = {
827
827
  'id': id,
828
828
  }
829
829
  response = 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
  self.load_markets()
845
845
  market = self.market(symbol)
846
- request = {
846
+ request: dict = {
847
847
  'pair': market['id'],
848
848
  }
849
849
  orders = 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
  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
  self.load_markets()
1143
1143
  market = self.market(symbol)
1144
- request = {'pair': market['id']}
1144
+ request: dict = {'pair': market['id']}
1145
1145
  response = 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
  self.load_markets()
1157
- request = {
1157
+ request: dict = {
1158
1158
  'id': str(id),
1159
1159
  }
1160
1160
  response = self.privatePostGetOrderTx(self.extend(request, params))
@@ -1273,7 +1273,7 @@ class cex(Exchange, ImplicitAPI):
1273
1273
  """
1274
1274
  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
  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
  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
  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)
ccxt/coinbase.py CHANGED
@@ -436,7 +436,7 @@ class coinbase(Exchange, ImplicitAPI):
436
436
  paginate, params = self.handle_option_and_params(params, 'fetchAccounts', 'paginate')
437
437
  if paginate:
438
438
  return self.fetch_paginated_call_cursor('fetchAccounts', None, None, None, params, 'next_starting_after', 'starting_after', None, 100)
439
- request = {
439
+ request: dict = {
440
440
  'limit': 100,
441
441
  }
442
442
  response = self.v2PrivateGetAccounts(self.extend(request, params))
@@ -502,7 +502,7 @@ class coinbase(Exchange, ImplicitAPI):
502
502
  paginate, params = self.handle_option_and_params(params, 'fetchAccounts', 'paginate')
503
503
  if paginate:
504
504
  return self.fetch_paginated_call_cursor('fetchAccounts', None, None, None, params, 'cursor', 'cursor', None, 100)
505
- request = {
505
+ request: dict = {
506
506
  'limit': 100,
507
507
  }
508
508
  response = self.v3PrivateGetBrokerageAccounts(self.extend(request, params))
@@ -655,7 +655,7 @@ class coinbase(Exchange, ImplicitAPI):
655
655
  break
656
656
  if accountId is None:
657
657
  raise ExchangeError(self.id + ' createDepositAddress() could not find the account with matching currency code, specify an `account_id` extra param')
658
- request = {
658
+ request: dict = {
659
659
  'account_id': accountId,
660
660
  }
661
661
  response = self.v2PrivatePostAccountsAccountIdAddresses(self.extend(request, params))
@@ -775,14 +775,14 @@ class coinbase(Exchange, ImplicitAPI):
775
775
  return self.fetch_transactions_with_method('v2PrivateGetAccountsAccountIdDeposits', code, since, limit, params)
776
776
 
777
777
  def parse_transaction_status(self, status):
778
- statuses = {
778
+ statuses: dict = {
779
779
  'created': 'pending',
780
780
  'completed': 'ok',
781
781
  'canceled': 'canceled',
782
782
  }
783
783
  return self.safe_string(statuses, status, status)
784
784
 
785
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
785
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
786
786
  #
787
787
  # fiat deposit
788
788
  #
@@ -941,7 +941,7 @@ class coinbase(Exchange, ImplicitAPI):
941
941
  },
942
942
  }
943
943
 
944
- def parse_trade(self, trade, market: Market = None) -> Trade:
944
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
945
945
  #
946
946
  # fetchMyBuys, fetchMySells
947
947
  #
@@ -1659,9 +1659,9 @@ class coinbase(Exchange, ImplicitAPI):
1659
1659
  # }
1660
1660
  # }
1661
1661
  #
1662
- result = {}
1663
- networks = {}
1664
- networksById = {}
1662
+ result: dict = {}
1663
+ networks: dict = {}
1664
+ networksById: dict = {}
1665
1665
  for i in range(0, len(currencies)):
1666
1666
  currency = currencies[i]
1667
1667
  assetId = self.safe_string(currency, 'asset_id')
@@ -1717,7 +1717,7 @@ class coinbase(Exchange, ImplicitAPI):
1717
1717
  def fetch_tickers_v2(self, symbols: Strings = None, params={}):
1718
1718
  self.load_markets()
1719
1719
  symbols = self.market_symbols(symbols)
1720
- request = {
1720
+ request: dict = {
1721
1721
  # 'currency': 'USD',
1722
1722
  }
1723
1723
  response = self.v2PublicGetExchangeRates(self.extend(request, params))
@@ -1736,7 +1736,7 @@ class coinbase(Exchange, ImplicitAPI):
1736
1736
  data = self.safe_dict(response, 'data', {})
1737
1737
  rates = self.safe_dict(data, 'rates', {})
1738
1738
  quoteId = self.safe_string(data, 'currency')
1739
- result = {}
1739
+ result: dict = {}
1740
1740
  baseIds = list(rates.keys())
1741
1741
  delimiter = '-'
1742
1742
  for i in range(0, len(baseIds)):
@@ -1750,7 +1750,7 @@ class coinbase(Exchange, ImplicitAPI):
1750
1750
  def fetch_tickers_v3(self, symbols: Strings = None, params={}):
1751
1751
  self.load_markets()
1752
1752
  symbols = self.market_symbols(symbols)
1753
- request = {}
1753
+ request: dict = {}
1754
1754
  if symbols is not None:
1755
1755
  request['product_ids'] = self.market_ids(symbols)
1756
1756
  marketType = None
@@ -1796,7 +1796,7 @@ class coinbase(Exchange, ImplicitAPI):
1796
1796
  # }
1797
1797
  #
1798
1798
  data = self.safe_list(response, 'products', [])
1799
- result = {}
1799
+ result: dict = {}
1800
1800
  for i in range(0, len(data)):
1801
1801
  entry = data[i]
1802
1802
  marketId = self.safe_string(entry, 'product_id')
@@ -1842,7 +1842,7 @@ class coinbase(Exchange, ImplicitAPI):
1842
1842
  spotData = self.safe_dict(spot, 'data', {})
1843
1843
  askData = self.safe_dict(ask, 'data', {})
1844
1844
  bidData = self.safe_dict(bid, 'data', {})
1845
- bidAskLast = {
1845
+ bidAskLast: dict = {
1846
1846
  'bid': self.safe_number(bidData, 'amount'),
1847
1847
  'ask': self.safe_number(askData, 'amount'),
1848
1848
  'price': self.safe_number(spotData, 'amount'),
@@ -1852,7 +1852,7 @@ class coinbase(Exchange, ImplicitAPI):
1852
1852
  def fetch_ticker_v3(self, symbol: str, params={}):
1853
1853
  self.load_markets()
1854
1854
  market = self.market(symbol)
1855
- request = {
1855
+ request: dict = {
1856
1856
  'product_id': market['id'],
1857
1857
  'limit': 1,
1858
1858
  }
@@ -2003,7 +2003,7 @@ class coinbase(Exchange, ImplicitAPI):
2003
2003
  balances = self.safe_list_2(response, 'data', 'accounts', [])
2004
2004
  accounts = self.safe_list(params, 'type', self.options['accounts'])
2005
2005
  v3Accounts = self.safe_list(params, 'type', self.options['v3Accounts'])
2006
- result = {'info': response}
2006
+ result: dict = {'info': response}
2007
2007
  for b in range(0, len(balances)):
2008
2008
  balance = balances[b]
2009
2009
  type = self.safe_string(balance, 'type')
@@ -2057,7 +2057,7 @@ class coinbase(Exchange, ImplicitAPI):
2057
2057
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
2058
2058
  """
2059
2059
  self.load_markets()
2060
- request = {}
2060
+ request: dict = {}
2061
2061
  response = None
2062
2062
  isV3 = self.safe_bool(params, 'v3', False)
2063
2063
  params = self.omit(params, ['v3'])
@@ -2185,13 +2185,13 @@ class coinbase(Exchange, ImplicitAPI):
2185
2185
  return ledger
2186
2186
 
2187
2187
  def parse_ledger_entry_status(self, status):
2188
- types = {
2188
+ types: dict = {
2189
2189
  'completed': 'ok',
2190
2190
  }
2191
2191
  return self.safe_string(types, status, status)
2192
2192
 
2193
2193
  def parse_ledger_entry_type(self, type):
2194
- types = {
2194
+ types: dict = {
2195
2195
  'buy': 'trade',
2196
2196
  'sell': 'trade',
2197
2197
  'fiat_deposit': 'transaction',
@@ -2204,7 +2204,7 @@ class coinbase(Exchange, ImplicitAPI):
2204
2204
  }
2205
2205
  return self.safe_string(types, type, type)
2206
2206
 
2207
- def parse_ledger_entry(self, item, currency: Currency = None):
2207
+ def parse_ledger_entry(self, item: dict, currency: Currency = None):
2208
2208
  #
2209
2209
  # crypto deposit transaction
2210
2210
  #
@@ -2521,7 +2521,7 @@ class coinbase(Exchange, ImplicitAPI):
2521
2521
  accountId = self.safe_string_2(params, 'account_id', 'accountId')
2522
2522
  if accountId is None:
2523
2523
  raise ArgumentsRequired(self.id + ' prepareAccountRequest() method requires an account_id(or accountId) parameter')
2524
- request = {
2524
+ request: dict = {
2525
2525
  'account_id': accountId,
2526
2526
  }
2527
2527
  if limit is not None:
@@ -2537,7 +2537,7 @@ class coinbase(Exchange, ImplicitAPI):
2537
2537
  accountId = self.find_account_id(code, params)
2538
2538
  if accountId is None:
2539
2539
  raise ExchangeError(self.id + ' prepareAccountRequestWithCurrencyCode() could not find account id for ' + code)
2540
- request = {
2540
+ request: dict = {
2541
2541
  'account_id': accountId,
2542
2542
  }
2543
2543
  if limit is not None:
@@ -2590,7 +2590,7 @@ class coinbase(Exchange, ImplicitAPI):
2590
2590
  self.load_markets()
2591
2591
  market = self.market(symbol)
2592
2592
  id = self.safe_string(self.options, 'brokerId', 'ccxt')
2593
- request = {
2593
+ request: dict = {
2594
2594
  'client_order_id': id + '-' + self.uuid(),
2595
2595
  'product_id': market['id'],
2596
2596
  'side': side.upper(),
@@ -2778,7 +2778,7 @@ class coinbase(Exchange, ImplicitAPI):
2778
2778
  data = self.safe_dict(response, 'success_response', {})
2779
2779
  return self.parse_order(data, market)
2780
2780
 
2781
- def parse_order(self, order, market: Market = None) -> Order:
2781
+ def parse_order(self, order: dict, market: Market = None) -> Order:
2782
2782
  #
2783
2783
  # createOrder
2784
2784
  #
@@ -2910,8 +2910,8 @@ class coinbase(Exchange, ImplicitAPI):
2910
2910
  'trades': None,
2911
2911
  }, market)
2912
2912
 
2913
- def parse_order_status(self, status):
2914
- statuses = {
2913
+ def parse_order_status(self, status: Str):
2914
+ statuses: dict = {
2915
2915
  'OPEN': 'open',
2916
2916
  'FILLED': 'closed',
2917
2917
  'CANCELLED': 'canceled',
@@ -2921,10 +2921,10 @@ class coinbase(Exchange, ImplicitAPI):
2921
2921
  }
2922
2922
  return self.safe_string(statuses, status, status)
2923
2923
 
2924
- def parse_order_type(self, type):
2924
+ def parse_order_type(self, type: Str):
2925
2925
  if type == 'UNKNOWN_ORDER_TYPE':
2926
2926
  return None
2927
- types = {
2927
+ types: dict = {
2928
2928
  'MARKET': 'market',
2929
2929
  'LIMIT': 'limit',
2930
2930
  'STOP': 'limit',
@@ -2932,8 +2932,8 @@ class coinbase(Exchange, ImplicitAPI):
2932
2932
  }
2933
2933
  return self.safe_string(types, type, type)
2934
2934
 
2935
- def parse_time_in_force(self, timeInForce):
2936
- timeInForces = {
2935
+ def parse_time_in_force(self, timeInForce: Str):
2936
+ timeInForces: dict = {
2937
2937
  'GOOD_UNTIL_CANCELLED': 'GTC',
2938
2938
  'GOOD_UNTIL_DATE_TIME': 'GTD',
2939
2939
  'IMMEDIATE_OR_CANCEL': 'IOC',
@@ -2968,7 +2968,7 @@ class coinbase(Exchange, ImplicitAPI):
2968
2968
  market = None
2969
2969
  if symbol is not None:
2970
2970
  market = self.market(symbol)
2971
- request = {
2971
+ request: dict = {
2972
2972
  'order_ids': ids,
2973
2973
  }
2974
2974
  response = self.v3PrivatePostBrokerageOrdersBatchCancel(self.extend(request, params))
@@ -3006,7 +3006,7 @@ class coinbase(Exchange, ImplicitAPI):
3006
3006
  """
3007
3007
  self.load_markets()
3008
3008
  market = self.market(symbol)
3009
- request = {
3009
+ request: dict = {
3010
3010
  'order_id': id,
3011
3011
  }
3012
3012
  if amount is not None:
@@ -3044,7 +3044,7 @@ class coinbase(Exchange, ImplicitAPI):
3044
3044
  market = None
3045
3045
  if symbol is not None:
3046
3046
  market = self.market(symbol)
3047
- request = {
3047
+ request: dict = {
3048
3048
  'order_id': id,
3049
3049
  }
3050
3050
  response = self.v3PrivateGetBrokerageOrdersHistoricalOrderId(self.extend(request, params))
@@ -3110,7 +3110,7 @@ class coinbase(Exchange, ImplicitAPI):
3110
3110
  market = None
3111
3111
  if symbol is not None:
3112
3112
  market = self.market(symbol)
3113
- request = {}
3113
+ request: dict = {}
3114
3114
  if market is not None:
3115
3115
  request['product_id'] = market['id']
3116
3116
  if limit is not None:
@@ -3177,7 +3177,7 @@ class coinbase(Exchange, ImplicitAPI):
3177
3177
  market = None
3178
3178
  if symbol is not None:
3179
3179
  market = self.market(symbol)
3180
- request = {
3180
+ request: dict = {
3181
3181
  'order_status': status,
3182
3182
  }
3183
3183
  if market is not None:
@@ -3313,7 +3313,7 @@ class coinbase(Exchange, ImplicitAPI):
3313
3313
  if paginate:
3314
3314
  return self.fetch_paginated_call_deterministic('fetchOHLCV', symbol, since, limit, timeframe, params, maxLimit - 1)
3315
3315
  market = self.market(symbol)
3316
- request = {
3316
+ request: dict = {
3317
3317
  'product_id': market['id'],
3318
3318
  'granularity': self.safe_string(self.timeframes, timeframe, timeframe),
3319
3319
  }
@@ -3385,7 +3385,7 @@ class coinbase(Exchange, ImplicitAPI):
3385
3385
  """
3386
3386
  self.load_markets()
3387
3387
  market = self.market(symbol)
3388
- request = {
3388
+ request: dict = {
3389
3389
  'product_id': market['id'],
3390
3390
  }
3391
3391
  if since is not None:
@@ -3438,7 +3438,7 @@ class coinbase(Exchange, ImplicitAPI):
3438
3438
  market = None
3439
3439
  if symbol is not None:
3440
3440
  market = self.market(symbol)
3441
- request = {}
3441
+ request: dict = {}
3442
3442
  if market is not None:
3443
3443
  request['product_id'] = market['id']
3444
3444
  if limit is not None:
@@ -3492,7 +3492,7 @@ class coinbase(Exchange, ImplicitAPI):
3492
3492
  """
3493
3493
  self.load_markets()
3494
3494
  market = self.market(symbol)
3495
- request = {
3495
+ request: dict = {
3496
3496
  'product_id': market['id'],
3497
3497
  }
3498
3498
  if limit is not None:
@@ -3533,7 +3533,7 @@ class coinbase(Exchange, ImplicitAPI):
3533
3533
  """
3534
3534
  self.load_markets()
3535
3535
  symbols = self.market_symbols(symbols)
3536
- request = {}
3536
+ request: dict = {}
3537
3537
  if symbols is not None:
3538
3538
  request['product_ids'] = self.market_ids(symbols)
3539
3539
  response = self.v3PrivateGetBrokerageBestBidAsk(self.extend(request, params))
@@ -3585,7 +3585,7 @@ class coinbase(Exchange, ImplicitAPI):
3585
3585
  accountId = self.find_account_id(code, params)
3586
3586
  if accountId is None:
3587
3587
  raise ExchangeError(self.id + ' withdraw() could not find account id for ' + code)
3588
- request = {
3588
+ request: dict = {
3589
3589
  'account_id': accountId,
3590
3590
  'type': 'send',
3591
3591
  'to': address,
@@ -3802,7 +3802,7 @@ class coinbase(Exchange, ImplicitAPI):
3802
3802
  accountId = self.find_account_id(code, params)
3803
3803
  if accountId is None:
3804
3804
  raise ExchangeError(self.id + ' deposit() could not find account id for ' + code)
3805
- request = {
3805
+ request: dict = {
3806
3806
  'account_id': accountId,
3807
3807
  'amount': self.number_to_string(amount),
3808
3808
  'currency': code.upper(), # need to use code in case depositing USD etc.
@@ -3867,7 +3867,7 @@ class coinbase(Exchange, ImplicitAPI):
3867
3867
  accountId = self.find_account_id(code, params)
3868
3868
  if accountId is None:
3869
3869
  raise ExchangeError(self.id + ' fetchDeposit() could not find account id for ' + code)
3870
- request = {
3870
+ request: dict = {
3871
3871
  'account_id': accountId,
3872
3872
  'deposit_id': id,
3873
3873
  }
@@ -3925,7 +3925,7 @@ class coinbase(Exchange, ImplicitAPI):
3925
3925
  :returns dict: a `conversion structure <https://docs.ccxt.com/#/?id=conversion-structure>`
3926
3926
  """
3927
3927
  self.load_markets()
3928
- request = {
3928
+ request: dict = {
3929
3929
  'from_account': fromCode,
3930
3930
  'to_account': toCode,
3931
3931
  'amount': self.number_to_string(amount),
@@ -3946,7 +3946,7 @@ class coinbase(Exchange, ImplicitAPI):
3946
3946
  :returns dict: a `conversion structure <https://docs.ccxt.com/#/?id=conversion-structure>`
3947
3947
  """
3948
3948
  self.load_markets()
3949
- request = {
3949
+ request: dict = {
3950
3950
  'trade_id': id,
3951
3951
  'from_account': fromCode,
3952
3952
  'to_account': toCode,
@@ -3972,7 +3972,7 @@ class coinbase(Exchange, ImplicitAPI):
3972
3972
  if toCode is None:
3973
3973
  raise ArgumentsRequired(self.id + ' fetchConvertTrade() requires a toCode parameter')
3974
3974
  params = self.omit(params, 'toCode')
3975
- request = {
3975
+ request: dict = {
3976
3976
  'trade_id': id,
3977
3977
  'from_account': code,
3978
3978
  'to_account': toCode,
@@ -4019,7 +4019,7 @@ class coinbase(Exchange, ImplicitAPI):
4019
4019
  raise NotSupported(self.id + ' closePosition() only supported for futures markets')
4020
4020
  clientOrderId = self.safe_string_2(params, 'client_order_id', 'clientOrderId')
4021
4021
  params = self.omit(params, 'clientOrderId')
4022
- request = {
4022
+ request: dict = {
4023
4023
  'product_id': market['id'],
4024
4024
  }
4025
4025
  if clientOrderId is None:
@@ -4054,7 +4054,7 @@ class coinbase(Exchange, ImplicitAPI):
4054
4054
  portfolio, params = self.handle_option_and_params(params, 'fetchPositions', 'portfolio')
4055
4055
  if portfolio is None:
4056
4056
  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()')
4057
- request = {
4057
+ request: dict = {
4058
4058
  'portfolio_uuid': portfolio,
4059
4059
  }
4060
4060
  response = self.v3PrivateGetBrokerageIntxPositionsPortfolioUuid(self.extend(request, params))
@@ -4079,7 +4079,7 @@ class coinbase(Exchange, ImplicitAPI):
4079
4079
  productId = self.safe_string(market, 'product_id')
4080
4080
  if productId is None:
4081
4081
  raise ArgumentsRequired(self.id + ' fetchPosition() requires a "product_id" in params')
4082
- futureRequest = {
4082
+ futureRequest: dict = {
4083
4083
  'product_id': productId,
4084
4084
  }
4085
4085
  response = self.v3PrivateGetBrokerageCfmPositionsProductId(self.extend(futureRequest, params))
@@ -4088,7 +4088,7 @@ class coinbase(Exchange, ImplicitAPI):
4088
4088
  portfolio, params = self.handle_option_and_params(params, 'fetchPositions', 'portfolio')
4089
4089
  if portfolio is None:
4090
4090
  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()')
4091
- request = {
4091
+ request: dict = {
4092
4092
  'symbol': market['id'],
4093
4093
  'portfolio_uuid': portfolio,
4094
4094
  }
@@ -4096,7 +4096,7 @@ class coinbase(Exchange, ImplicitAPI):
4096
4096
  position = self.safe_dict(response, 'position', {})
4097
4097
  return self.parse_position(position, market)
4098
4098
 
4099
- def parse_position(self, position, market: Market = None):
4099
+ def parse_position(self, position: dict, market: Market = None):
4100
4100
  #
4101
4101
  # {
4102
4102
  # "product_id": "1r4njf84-0-0",
@@ -4242,7 +4242,7 @@ class coinbase(Exchange, ImplicitAPI):
4242
4242
  if quesPos > 0:
4243
4243
  uri = uri[0:quesPos]
4244
4244
  nonce = self.random_bytes(16)
4245
- request = {
4245
+ request: dict = {
4246
4246
  'aud': ['retail_rest_api_proxy'],
4247
4247
  'iss': 'coinbase-cloud',
4248
4248
  'nbf': seconds,
@@ -4303,7 +4303,7 @@ class coinbase(Exchange, ImplicitAPI):
4303
4303
  # uri = uri[0:quesPos]
4304
4304
  # }
4305
4305
  # nonce = self.random_bytes(16)
4306
- # request = {
4306
+ # request: Dict = {
4307
4307
  # 'aud': ['retail_rest_api_proxy'],
4308
4308
  # 'iss': 'coinbase-cloud',
4309
4309
  # 'nbf': seconds,