ccxt 4.2.81__py2.py3-none-any.whl → 4.2.83__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 (189) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/bitstamp.py +1 -1
  3. ccxt/ace.py +1 -1
  4. ccxt/alpaca.py +1 -1
  5. ccxt/ascendex.py +1 -1
  6. ccxt/async_support/__init__.py +1 -1
  7. ccxt/async_support/ace.py +1 -1
  8. ccxt/async_support/alpaca.py +1 -1
  9. ccxt/async_support/ascendex.py +1 -1
  10. ccxt/async_support/base/exchange.py +1 -1
  11. ccxt/async_support/bigone.py +1 -1
  12. ccxt/async_support/binance.py +1 -1
  13. ccxt/async_support/bingx.py +1 -1
  14. ccxt/async_support/bitbank.py +1 -1
  15. ccxt/async_support/bitbns.py +1 -1
  16. ccxt/async_support/bitfinex.py +1 -1
  17. ccxt/async_support/bitfinex2.py +1 -1
  18. ccxt/async_support/bitflyer.py +1 -1
  19. ccxt/async_support/bitget.py +2 -1
  20. ccxt/async_support/bithumb.py +2 -1
  21. ccxt/async_support/bitmart.py +1 -1
  22. ccxt/async_support/bitmex.py +1 -1
  23. ccxt/async_support/bitopro.py +1 -1
  24. ccxt/async_support/bitrue.py +2 -2
  25. ccxt/async_support/bitso.py +1 -1
  26. ccxt/async_support/bitstamp.py +43 -16
  27. ccxt/async_support/bitteam.py +1 -1
  28. ccxt/async_support/bitvavo.py +1 -1
  29. ccxt/async_support/blockchaincom.py +1 -1
  30. ccxt/async_support/blofin.py +1 -1
  31. ccxt/async_support/btcalpha.py +1 -1
  32. ccxt/async_support/btcmarkets.py +1 -1
  33. ccxt/async_support/btcturk.py +1 -1
  34. ccxt/async_support/bybit.py +1 -1
  35. ccxt/async_support/cex.py +1 -1
  36. ccxt/async_support/coinbase.py +1 -1
  37. ccxt/async_support/coinbaseinternational.py +1 -1
  38. ccxt/async_support/coinbasepro.py +1 -1
  39. ccxt/async_support/coinex.py +1 -1
  40. ccxt/async_support/coinlist.py +1 -1
  41. ccxt/async_support/coinmate.py +1 -1
  42. ccxt/async_support/coinmetro.py +1 -1
  43. ccxt/async_support/coinone.py +1 -1
  44. ccxt/async_support/coinsph.py +1 -1
  45. ccxt/async_support/cryptocom.py +1 -1
  46. ccxt/async_support/currencycom.py +1 -1
  47. ccxt/async_support/delta.py +147 -2
  48. ccxt/async_support/deribit.py +18 -3
  49. ccxt/async_support/digifinex.py +1 -1
  50. ccxt/async_support/exmo.py +1 -1
  51. ccxt/async_support/gate.py +1 -1
  52. ccxt/async_support/gemini.py +2 -1
  53. ccxt/async_support/hitbtc.py +1 -1
  54. ccxt/async_support/hollaex.py +1 -1
  55. ccxt/async_support/htx.py +1 -1
  56. ccxt/async_support/huobijp.py +1 -1
  57. ccxt/async_support/hyperliquid.py +10 -9
  58. ccxt/async_support/idex.py +1 -1
  59. ccxt/async_support/independentreserve.py +1 -1
  60. ccxt/async_support/indodax.py +1 -1
  61. ccxt/async_support/kraken.py +1 -1
  62. ccxt/async_support/krakenfutures.py +1 -1
  63. ccxt/async_support/kucoin.py +1 -1
  64. ccxt/async_support/kucoinfutures.py +147 -10
  65. ccxt/async_support/kuna.py +1 -1
  66. ccxt/async_support/latoken.py +1 -1
  67. ccxt/async_support/lbank.py +1 -1
  68. ccxt/async_support/luno.py +1 -1
  69. ccxt/async_support/lykke.py +1 -1
  70. ccxt/async_support/mercado.py +1 -1
  71. ccxt/async_support/mexc.py +1 -1
  72. ccxt/async_support/ndax.py +1 -1
  73. ccxt/async_support/novadax.py +1 -1
  74. ccxt/async_support/oceanex.py +1 -1
  75. ccxt/async_support/okcoin.py +1 -1
  76. ccxt/async_support/okx.py +137 -2
  77. ccxt/async_support/onetrading.py +1 -1
  78. ccxt/async_support/p2b.py +1 -1
  79. ccxt/async_support/phemex.py +1 -1
  80. ccxt/async_support/poloniex.py +1 -1
  81. ccxt/async_support/poloniexfutures.py +1 -1
  82. ccxt/async_support/probit.py +1 -1
  83. ccxt/async_support/timex.py +1 -1
  84. ccxt/async_support/tokocrypto.py +1 -1
  85. ccxt/async_support/tradeogre.py +2 -1
  86. ccxt/async_support/upbit.py +1 -1
  87. ccxt/async_support/wavesexchange.py +1 -1
  88. ccxt/async_support/wazirx.py +1 -1
  89. ccxt/async_support/whitebit.py +1 -1
  90. ccxt/async_support/woo.py +1 -1
  91. ccxt/async_support/yobit.py +1 -1
  92. ccxt/async_support/zaif.py +1 -1
  93. ccxt/async_support/zonda.py +1 -1
  94. ccxt/base/exchange.py +1 -1
  95. ccxt/bigone.py +1 -1
  96. ccxt/binance.py +1 -1
  97. ccxt/bingx.py +1 -1
  98. ccxt/bitbank.py +1 -1
  99. ccxt/bitbns.py +1 -1
  100. ccxt/bitfinex.py +1 -1
  101. ccxt/bitfinex2.py +1 -1
  102. ccxt/bitflyer.py +1 -1
  103. ccxt/bitget.py +2 -1
  104. ccxt/bithumb.py +2 -1
  105. ccxt/bitmart.py +1 -1
  106. ccxt/bitmex.py +1 -1
  107. ccxt/bitopro.py +1 -1
  108. ccxt/bitrue.py +2 -2
  109. ccxt/bitso.py +1 -1
  110. ccxt/bitstamp.py +43 -16
  111. ccxt/bitteam.py +1 -1
  112. ccxt/bitvavo.py +1 -1
  113. ccxt/blockchaincom.py +1 -1
  114. ccxt/blofin.py +1 -1
  115. ccxt/btcalpha.py +1 -1
  116. ccxt/btcmarkets.py +1 -1
  117. ccxt/btcturk.py +1 -1
  118. ccxt/bybit.py +1 -1
  119. ccxt/cex.py +1 -1
  120. ccxt/coinbase.py +1 -1
  121. ccxt/coinbaseinternational.py +1 -1
  122. ccxt/coinbasepro.py +1 -1
  123. ccxt/coinex.py +1 -1
  124. ccxt/coinlist.py +1 -1
  125. ccxt/coinmate.py +1 -1
  126. ccxt/coinmetro.py +1 -1
  127. ccxt/coinone.py +1 -1
  128. ccxt/coinsph.py +1 -1
  129. ccxt/cryptocom.py +1 -1
  130. ccxt/currencycom.py +1 -1
  131. ccxt/delta.py +147 -2
  132. ccxt/deribit.py +18 -3
  133. ccxt/digifinex.py +1 -1
  134. ccxt/exmo.py +1 -1
  135. ccxt/gate.py +1 -1
  136. ccxt/gemini.py +2 -1
  137. ccxt/hitbtc.py +1 -1
  138. ccxt/hollaex.py +1 -1
  139. ccxt/htx.py +1 -1
  140. ccxt/huobijp.py +1 -1
  141. ccxt/hyperliquid.py +10 -9
  142. ccxt/idex.py +1 -1
  143. ccxt/independentreserve.py +1 -1
  144. ccxt/indodax.py +1 -1
  145. ccxt/kraken.py +1 -1
  146. ccxt/krakenfutures.py +1 -1
  147. ccxt/kucoin.py +1 -1
  148. ccxt/kucoinfutures.py +147 -10
  149. ccxt/kuna.py +1 -1
  150. ccxt/latoken.py +1 -1
  151. ccxt/lbank.py +1 -1
  152. ccxt/luno.py +1 -1
  153. ccxt/lykke.py +1 -1
  154. ccxt/mercado.py +1 -1
  155. ccxt/mexc.py +1 -1
  156. ccxt/ndax.py +1 -1
  157. ccxt/novadax.py +1 -1
  158. ccxt/oceanex.py +1 -1
  159. ccxt/okcoin.py +1 -1
  160. ccxt/okx.py +137 -2
  161. ccxt/onetrading.py +1 -1
  162. ccxt/p2b.py +1 -1
  163. ccxt/phemex.py +1 -1
  164. ccxt/poloniex.py +1 -1
  165. ccxt/poloniexfutures.py +1 -1
  166. ccxt/pro/__init__.py +3 -1
  167. ccxt/pro/bithumb.py +368 -0
  168. ccxt/pro/bitmart.py +1 -1
  169. ccxt/pro/bybit.py +1 -1
  170. ccxt/pro/cex.py +15 -5
  171. ccxt/pro/okx.py +2 -1
  172. ccxt/pro/p2b.py +14 -4
  173. ccxt/pro/woo.py +1 -1
  174. ccxt/probit.py +1 -1
  175. ccxt/timex.py +1 -1
  176. ccxt/tokocrypto.py +1 -1
  177. ccxt/tradeogre.py +2 -1
  178. ccxt/upbit.py +1 -1
  179. ccxt/wavesexchange.py +1 -1
  180. ccxt/wazirx.py +1 -1
  181. ccxt/whitebit.py +1 -1
  182. ccxt/woo.py +1 -1
  183. ccxt/yobit.py +1 -1
  184. ccxt/zaif.py +1 -1
  185. ccxt/zonda.py +1 -1
  186. {ccxt-4.2.81.dist-info → ccxt-4.2.83.dist-info}/METADATA +5 -5
  187. {ccxt-4.2.81.dist-info → ccxt-4.2.83.dist-info}/RECORD +189 -188
  188. {ccxt-4.2.81.dist-info → ccxt-4.2.83.dist-info}/WHEEL +0 -0
  189. {ccxt-4.2.81.dist-info → ccxt-4.2.83.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.2.81'
25
+ __version__ = '4.2.83'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/abstract/bitstamp.py CHANGED
@@ -41,7 +41,7 @@ class ImplicitAPI:
41
41
  private_post_transfer_from_main = privatePostTransferFromMain = Entry('transfer-from-main/', 'private', 'POST', {'cost': 1})
42
42
  private_post_my_trading_pairs = privatePostMyTradingPairs = Entry('my_trading_pairs/', 'private', 'POST', {'cost': 1})
43
43
  private_post_fees_trading = privatePostFeesTrading = Entry('fees/trading/', 'private', 'POST', {'cost': 1})
44
- private_post_fees_trading_pair = privatePostFeesTradingPair = Entry('fees/trading/{pair}', 'private', 'POST', {'cost': 1})
44
+ private_post_fees_trading_market_symbol = privatePostFeesTradingMarketSymbol = Entry('fees/trading/{market_symbol}', 'private', 'POST', {'cost': 1})
45
45
  private_post_fees_withdrawal = privatePostFeesWithdrawal = Entry('fees/withdrawal/', 'private', 'POST', {'cost': 1})
46
46
  private_post_fees_withdrawal_currency = privatePostFeesWithdrawalCurrency = Entry('fees/withdrawal/{currency}/', 'private', 'POST', {'cost': 1})
47
47
  private_post_withdrawal_requests = privatePostWithdrawalRequests = Entry('withdrawal-requests/', 'private', 'POST', {'cost': 1})
ccxt/ace.py CHANGED
@@ -173,7 +173,7 @@ class ace(Exchange, ImplicitAPI):
173
173
  },
174
174
  })
175
175
 
176
- def fetch_markets(self, params={}):
176
+ def fetch_markets(self, params={}) -> List[Market]:
177
177
  """
178
178
  retrieves data on all markets for ace
179
179
  :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---market-pair
ccxt/alpaca.py CHANGED
@@ -296,7 +296,7 @@ class alpaca(Exchange, ImplicitAPI):
296
296
  iso = self.parse8601(localTime) - self.parse_to_numeric(jetlag) * 3600 * 1000
297
297
  return iso
298
298
 
299
- def fetch_markets(self, params={}):
299
+ def fetch_markets(self, params={}) -> List[Market]:
300
300
  """
301
301
  retrieves data on all markets for alpaca
302
302
  :see: https://docs.alpaca.markets/reference/get-v2-assets
ccxt/ascendex.py CHANGED
@@ -500,7 +500,7 @@ class ascendex(Exchange, ImplicitAPI):
500
500
  }
501
501
  return result
502
502
 
503
- def fetch_markets(self, params={}):
503
+ def fetch_markets(self, params={}) -> List[Market]:
504
504
  """
505
505
  retrieves data on all markets for ascendex
506
506
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.2.81'
7
+ __version__ = '4.2.83'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/async_support/ace.py CHANGED
@@ -173,7 +173,7 @@ class ace(Exchange, ImplicitAPI):
173
173
  },
174
174
  })
175
175
 
176
- async def fetch_markets(self, params={}):
176
+ async def fetch_markets(self, params={}) -> List[Market]:
177
177
  """
178
178
  retrieves data on all markets for ace
179
179
  :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---market-pair
@@ -296,7 +296,7 @@ class alpaca(Exchange, ImplicitAPI):
296
296
  iso = self.parse8601(localTime) - self.parse_to_numeric(jetlag) * 3600 * 1000
297
297
  return iso
298
298
 
299
- async def fetch_markets(self, params={}):
299
+ async def fetch_markets(self, params={}) -> List[Market]:
300
300
  """
301
301
  retrieves data on all markets for alpaca
302
302
  :see: https://docs.alpaca.markets/reference/get-v2-assets
@@ -500,7 +500,7 @@ class ascendex(Exchange, ImplicitAPI):
500
500
  }
501
501
  return result
502
502
 
503
- async def fetch_markets(self, params={}):
503
+ async def fetch_markets(self, params={}) -> List[Market]:
504
504
  """
505
505
  retrieves data on all markets for ascendex
506
506
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.2.81'
5
+ __version__ = '4.2.83'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -519,7 +519,7 @@ class bigone(Exchange, ImplicitAPI):
519
519
  }
520
520
  return result
521
521
 
522
- async def fetch_markets(self, params={}):
522
+ async def fetch_markets(self, params={}) -> List[Market]:
523
523
  """
524
524
  retrieves data on all markets for bigone
525
525
  :see: https://open.big.one/docs/spot_asset_pair.html
@@ -2790,7 +2790,7 @@ class binance(Exchange, ImplicitAPI):
2790
2790
  }
2791
2791
  return result
2792
2792
 
2793
- async def fetch_markets(self, params={}):
2793
+ async def fetch_markets(self, params={}) -> List[Market]:
2794
2794
  """
2795
2795
  retrieves data on all markets for binance
2796
2796
  :see: https://binance-docs.github.io/apidocs/spot/en/#exchange-information # spot
@@ -688,7 +688,7 @@ class bingx(Exchange, ImplicitAPI):
688
688
  'info': market,
689
689
  })
690
690
 
691
- async def fetch_markets(self, params={}):
691
+ async def fetch_markets(self, params={}) -> List[Market]:
692
692
  """
693
693
  retrieves data on all markets for bingx
694
694
  :see: https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20Symbols
@@ -164,7 +164,7 @@ class bitbank(Exchange, ImplicitAPI):
164
164
  },
165
165
  })
166
166
 
167
- async def fetch_markets(self, params={}):
167
+ async def fetch_markets(self, params={}) -> List[Market]:
168
168
  """
169
169
  retrieves data on all markets for bitbank
170
170
  :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-all-pairs-info
@@ -186,7 +186,7 @@ class bitbns(Exchange, ImplicitAPI):
186
186
  'info': response,
187
187
  }
188
188
 
189
- async def fetch_markets(self, params={}):
189
+ async def fetch_markets(self, params={}) -> List[Market]:
190
190
  """
191
191
  retrieves data on all markets for bitbns
192
192
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -557,7 +557,7 @@ class bitfinex(Exchange, ImplicitAPI):
557
557
  result[symbol] = fee
558
558
  return result
559
559
 
560
- async def fetch_markets(self, params={}):
560
+ async def fetch_markets(self, params={}) -> List[Market]:
561
561
  """
562
562
  retrieves data on all markets for bitfinex
563
563
  :see: https://docs.bitfinex.com/v1/reference/rest-public-symbols
@@ -508,7 +508,7 @@ class bitfinex2(Exchange, ImplicitAPI):
508
508
  'info': response,
509
509
  }
510
510
 
511
- async def fetch_markets(self, params={}):
511
+ async def fetch_markets(self, params={}) -> List[Market]:
512
512
  """
513
513
  retrieves data on all markets for bitfinex2
514
514
  :see: https://docs.bitfinex.com/reference/rest-public-conf
@@ -147,7 +147,7 @@ class bitflyer(Exchange, ImplicitAPI):
147
147
  # Since they're the same we just need to return one
148
148
  return super(bitflyer, self).safe_market(marketId, market, delimiter, 'spot')
149
149
 
150
- async def fetch_markets(self, params={}):
150
+ async def fetch_markets(self, params={}) -> List[Market]:
151
151
  """
152
152
  retrieves data on all markets for bitflyer
153
153
  :see: https://lightning.bitflyer.com/docs?lang=en#market-list
@@ -1315,6 +1315,7 @@ class bitget(Exchange, ImplicitAPI):
1315
1315
  'precisionMode': TICK_SIZE,
1316
1316
  'commonCurrencies': {
1317
1317
  'JADE': 'Jade Protocol',
1318
+ 'DEGEN': 'DegenReborn',
1318
1319
  },
1319
1320
  'options': {
1320
1321
  'timeframes': {
@@ -1510,7 +1511,7 @@ class bitget(Exchange, ImplicitAPI):
1510
1511
  data = self.safe_value(response, 'data', {})
1511
1512
  return self.safe_integer(data, 'serverTime')
1512
1513
 
1513
- async def fetch_markets(self, params={}):
1514
+ async def fetch_markets(self, params={}) -> List[Market]:
1514
1515
  """
1515
1516
  retrieves data on all markets for bitget
1516
1517
  :see: https://www.bitget.com/api-doc/spot/market/Get-Symbols
@@ -30,6 +30,7 @@ class bithumb(Exchange, ImplicitAPI):
30
30
  'name': 'Bithumb',
31
31
  'countries': ['KR'], # South Korea
32
32
  'rateLimit': 500,
33
+ 'pro': True,
33
34
  'has': {
34
35
  'CORS': True,
35
36
  'spot': True,
@@ -199,7 +200,7 @@ class bithumb(Exchange, ImplicitAPI):
199
200
  def amount_to_precision(self, symbol, amount):
200
201
  return self.decimal_to_precision(amount, TRUNCATE, self.markets[symbol]['precision']['amount'], DECIMAL_PLACES)
201
202
 
202
- async def fetch_markets(self, params={}):
203
+ async def fetch_markets(self, params={}) -> List[Market]:
203
204
  """
204
205
  retrieves data on all markets for bithumb
205
206
  :see: https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
@@ -975,7 +975,7 @@ class bitmart(Exchange, ImplicitAPI):
975
975
  })
976
976
  return result
977
977
 
978
- async def fetch_markets(self, params={}):
978
+ async def fetch_markets(self, params={}) -> List[Market]:
979
979
  """
980
980
  retrieves data on all markets for bitmart
981
981
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -453,7 +453,7 @@ class bitmex(Exchange, ImplicitAPI):
453
453
  def convert_from_raw_cost(self, symbol, rawQuantity):
454
454
  return self.convert_from_raw_quantity(symbol, rawQuantity, 'quote')
455
455
 
456
- async def fetch_markets(self, params={}):
456
+ async def fetch_markets(self, params={}) -> List[Market]:
457
457
  """
458
458
  retrieves data on all markets for bitmex
459
459
  :see: https://www.bitmex.com/api/explorer/#not /Instrument/Instrument_getActive
@@ -280,7 +280,7 @@ class bitopro(Exchange, ImplicitAPI):
280
280
  }
281
281
  return result
282
282
 
283
- async def fetch_markets(self, params={}):
283
+ async def fetch_markets(self, params={}) -> List[Market]:
284
284
  """
285
285
  retrieves data on all markets for bitopro
286
286
  :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_trading_pair_info.md
@@ -422,7 +422,7 @@ class bitrue(Exchange, ImplicitAPI):
422
422
  '-1022': AuthenticationError, # {"code":-1022,"msg":"Signature for self request is not valid."}
423
423
  '-1100': BadRequest, # createOrder(symbol, 1, asdf) -> 'Illegal characters found in parameter 'price'
424
424
  '-1101': BadRequest, # Too many parameters; expected %s and received %s.
425
- '-1102': BadRequest, # Param %s or %s must be sent, but both were empty
425
+ '-1102': BadRequest, # Param %s or %s must be sent, but both were empty # {"code":-1102,"msg":"timestamp IllegalArgumentException.","data":null}
426
426
  '-1103': BadRequest, # An unknown parameter was sent.
427
427
  '-1104': BadRequest, # Not all sent parameters were read, read 8 parameters but was sent 9
428
428
  '-1105': BadRequest, # Parameter %s was empty.
@@ -714,7 +714,7 @@ class bitrue(Exchange, ImplicitAPI):
714
714
  }
715
715
  return result
716
716
 
717
- async def fetch_markets(self, params={}):
717
+ async def fetch_markets(self, params={}) -> List[Market]:
718
718
  """
719
719
  retrieves data on all markets for bitrue
720
720
  :see: https://github.com/Bitrue-exchange/Spot-official-api-docs#exchangeInfo_endpoint
@@ -338,7 +338,7 @@ class bitso(Exchange, ImplicitAPI):
338
338
  'info': item,
339
339
  }, currency)
340
340
 
341
- async def fetch_markets(self, params={}):
341
+ async def fetch_markets(self, params={}) -> List[Market]:
342
342
  """
343
343
  retrieves data on all markets for bitso
344
344
  :see: https://docs.bitso.com/bitso-api/docs/list-available-books
@@ -176,7 +176,7 @@ class bitstamp(Exchange, ImplicitAPI):
176
176
  'transfer-from-main/': 1,
177
177
  'my_trading_pairs/': 1,
178
178
  'fees/trading/': 1,
179
- 'fees/trading/{pair}': 1,
179
+ 'fees/trading/{market_symbol}': 1,
180
180
  'fees/withdrawal/': 1,
181
181
  'fees/withdrawal/{currency}/': 1,
182
182
  'withdrawal-requests/': 1,
@@ -468,7 +468,7 @@ class bitstamp(Exchange, ImplicitAPI):
468
468
  },
469
469
  })
470
470
 
471
- async def fetch_markets(self, params={}):
471
+ async def fetch_markets(self, params={}) -> List[Market]:
472
472
  """
473
473
  retrieves data on all markets for bitstamp
474
474
  :see: https://www.bitstamp.net/api/#tag/Market-info/operation/GetTradingPairsInfo
@@ -1120,7 +1120,7 @@ class bitstamp(Exchange, ImplicitAPI):
1120
1120
  async def fetch_trading_fee(self, symbol: str, params={}):
1121
1121
  """
1122
1122
  fetch the trading fees for a market
1123
- :see: https://www.bitstamp.net/api/#tag/Fees/operation/GetAllTradingFees
1123
+ :see: https://www.bitstamp.net/api/#tag/Fees/operation/GetTradingFeesForCurrency
1124
1124
  :param str symbol: unified market symbol
1125
1125
  :param dict [params]: extra parameters specific to the exchange API endpoint
1126
1126
  :returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -1128,21 +1128,35 @@ class bitstamp(Exchange, ImplicitAPI):
1128
1128
  await self.load_markets()
1129
1129
  market = self.market(symbol)
1130
1130
  request = {
1131
- 'pair': market['id'],
1131
+ 'market_symbol': market['id'],
1132
1132
  }
1133
- response = await self.privatePostBalancePair(self.extend(request, params))
1134
- return self.parse_trading_fee(response, market)
1133
+ response = await self.privatePostFeesTrading(self.extend(request, params))
1134
+ #
1135
+ # [
1136
+ # {
1137
+ # "currency_pair": "btcusd",
1138
+ # "fees":
1139
+ # {
1140
+ # "maker": "0.15000",
1141
+ # "taker": "0.16000"
1142
+ # },
1143
+ # "market": "btcusd"
1144
+ # }
1145
+ # ...
1146
+ # ]
1147
+ #
1148
+ tradingFeesByMarketId = self.index_by(response, 'currency_pair')
1149
+ tradingFee = self.safe_dict(tradingFeesByMarketId, market['id'])
1150
+ return self.parse_trading_fee(tradingFee, market)
1135
1151
 
1136
1152
  def parse_trading_fee(self, fee, market: Market = None):
1137
- market = self.safe_market(None, market)
1138
- feeString = self.safe_string(fee, market['id'] + '_fee')
1139
- dividedFeeString = Precise.string_div(feeString, '100')
1140
- tradeFee = self.parse_number(dividedFeeString)
1153
+ marketId = self.safe_string(fee, 'market')
1154
+ fees = self.safe_dict(fee, 'fees', {})
1141
1155
  return {
1142
1156
  'info': fee,
1143
- 'symbol': market['symbol'],
1144
- 'maker': tradeFee,
1145
- 'taker': tradeFee,
1157
+ 'symbol': self.safe_symbol(marketId, market),
1158
+ 'maker': self.safe_number(fees, 'maker'),
1159
+ 'taker': self.safe_number(fees, 'taker'),
1146
1160
  }
1147
1161
 
1148
1162
  def parse_trading_fees(self, fees):
@@ -1150,8 +1164,7 @@ class bitstamp(Exchange, ImplicitAPI):
1150
1164
  symbols = self.symbols
1151
1165
  for i in range(0, len(symbols)):
1152
1166
  symbol = symbols[i]
1153
- market = self.market(symbol)
1154
- fee = self.parse_trading_fee(fees, market)
1167
+ fee = self.parse_trading_fee(fees[i])
1155
1168
  result[symbol] = fee
1156
1169
  return result
1157
1170
 
@@ -1163,7 +1176,21 @@ class bitstamp(Exchange, ImplicitAPI):
1163
1176
  :returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
1164
1177
  """
1165
1178
  await self.load_markets()
1166
- response = await self.privatePostBalance(params)
1179
+ response = await self.privatePostFeesTrading(params)
1180
+ #
1181
+ # [
1182
+ # {
1183
+ # "currency_pair": "btcusd",
1184
+ # "fees":
1185
+ # {
1186
+ # "maker": "0.15000",
1187
+ # "taker": "0.16000"
1188
+ # },
1189
+ # "market": "btcusd"
1190
+ # }
1191
+ # ...
1192
+ # ]
1193
+ #
1167
1194
  return self.parse_trading_fees(response)
1168
1195
 
1169
1196
  async def fetch_transaction_fees(self, codes: List[str] = None, params={}):
@@ -247,7 +247,7 @@ class bitteam(Exchange, ImplicitAPI):
247
247
  },
248
248
  })
249
249
 
250
- async def fetch_markets(self, params={}):
250
+ async def fetch_markets(self, params={}) -> List[Market]:
251
251
  """
252
252
  retrieves data on all markets for bitteam
253
253
  :see: https://bit.team/trade/api/documentation#/CCXT/getTradeApiCcxtPairs
@@ -322,7 +322,7 @@ class bitvavo(Exchange, ImplicitAPI):
322
322
  #
323
323
  return self.safe_integer(response, 'time')
324
324
 
325
- async def fetch_markets(self, params={}):
325
+ async def fetch_markets(self, params={}) -> List[Market]:
326
326
  """
327
327
  :see: https://docs.bitvavo.com/#tag/General/paths/~1markets/get
328
328
  retrieves data on all markets for bitvavo
@@ -227,7 +227,7 @@ class blockchaincom(Exchange, ImplicitAPI):
227
227
  },
228
228
  })
229
229
 
230
- async def fetch_markets(self, params={}):
230
+ async def fetch_markets(self, params={}) -> List[Market]:
231
231
  """
232
232
  retrieves data on all markets for blockchaincom
233
233
  :see: https://api.blockchain.com/v3/#/unauthenticated/getSymbols
@@ -355,7 +355,7 @@ class blofin(Exchange, ImplicitAPI):
355
355
  },
356
356
  })
357
357
 
358
- async def fetch_markets(self, params={}):
358
+ async def fetch_markets(self, params={}) -> List[Market]:
359
359
  """
360
360
  retrieves data on all markets for blofin
361
361
  :see: https://blofin.com/docs#get-instruments
@@ -158,7 +158,7 @@ class btcalpha(Exchange, ImplicitAPI):
158
158
  },
159
159
  })
160
160
 
161
- async def fetch_markets(self, params={}):
161
+ async def fetch_markets(self, params={}) -> List[Market]:
162
162
  """
163
163
  retrieves data on all markets for btcalpha
164
164
  :see: https://btc-alpha.github.io/api-docs/#list-all-currencies
@@ -350,7 +350,7 @@ class btcmarkets(Exchange, ImplicitAPI):
350
350
  'info': transaction,
351
351
  }
352
352
 
353
- async def fetch_markets(self, params={}):
353
+ async def fetch_markets(self, params={}) -> List[Market]:
354
354
  """
355
355
  retrieves data on all markets for btcmarkets
356
356
  :see: https://docs.btcmarkets.net/v3/#tag/Market-Data-APIs/paths/~1v3~1markets/get
@@ -149,7 +149,7 @@ class btcturk(Exchange, ImplicitAPI):
149
149
  'precisionMode': TICK_SIZE,
150
150
  })
151
151
 
152
- async def fetch_markets(self, params={}):
152
+ async def fetch_markets(self, params={}) -> List[Market]:
153
153
  """
154
154
  retrieves data on all markets for btcturk
155
155
  :see: https://docs.btcturk.com/public-endpoints/exchange-info
@@ -1421,7 +1421,7 @@ class bybit(Exchange, ImplicitAPI):
1421
1421
  }
1422
1422
  return result
1423
1423
 
1424
- async def fetch_markets(self, params={}):
1424
+ async def fetch_markets(self, params={}) -> List[Market]:
1425
1425
  """
1426
1426
  retrieves data on all markets for bybit
1427
1427
  :see: https://bybit-exchange.github.io/docs/v5/market/instrument
ccxt/async_support/cex.py CHANGED
@@ -340,7 +340,7 @@ class cex(Exchange, ImplicitAPI):
340
340
  }
341
341
  return result
342
342
 
343
- async def fetch_markets(self, params={}):
343
+ async def fetch_markets(self, params={}) -> List[Market]:
344
344
  """
345
345
  retrieves data on all markets for cex
346
346
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1031,7 +1031,7 @@ class coinbase(Exchange, ImplicitAPI):
1031
1031
  },
1032
1032
  })
1033
1033
 
1034
- async def fetch_markets(self, params={}):
1034
+ async def fetch_markets(self, params={}) -> List[Market]:
1035
1035
  """
1036
1036
  :see: https://docs.cloud.coinbase.com/advanced-trade-api/reference/retailbrokerageapi_getproducts
1037
1037
  :see: https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
@@ -894,7 +894,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
894
894
  },
895
895
  })
896
896
 
897
- async def fetch_markets(self, params={}):
897
+ async def fetch_markets(self, params={}) -> List[Market]:
898
898
  """
899
899
  :see: https://docs.cloud.coinbase.com/intx/reference/getinstruments
900
900
  retrieves data on all markets for coinbaseinternational
@@ -307,7 +307,7 @@ class coinbasepro(Exchange, ImplicitAPI):
307
307
  }
308
308
  return result
309
309
 
310
- async def fetch_markets(self, params={}):
310
+ async def fetch_markets(self, params={}) -> List[Market]:
311
311
  """
312
312
  retrieves data on all markets for coinbasepro
313
313
  :see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducts
@@ -489,7 +489,7 @@ class coinex(Exchange, ImplicitAPI):
489
489
  result[code]['limits']['withdraw']['min'] = self.parse_number(minWithdrawString)
490
490
  return result
491
491
 
492
- async def fetch_markets(self, params={}):
492
+ async def fetch_markets(self, params={}) -> List[Market]:
493
493
  """
494
494
  retrieves data on all markets for coinex
495
495
  :see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market002_all_market_info
@@ -397,7 +397,7 @@ class coinlist(Exchange, ImplicitAPI):
397
397
  }
398
398
  return result
399
399
 
400
- async def fetch_markets(self, params={}):
400
+ async def fetch_markets(self, params={}) -> List[Market]:
401
401
  """
402
402
  retrieves data on all markets for coinlist
403
403
  :see: https://trade-docs.coinlist.co/?javascript--nodejs#list-symbols
@@ -230,7 +230,7 @@ class coinmate(Exchange, ImplicitAPI):
230
230
  'precisionMode': TICK_SIZE,
231
231
  })
232
232
 
233
- async def fetch_markets(self, params={}):
233
+ async def fetch_markets(self, params={}) -> List[Market]:
234
234
  """
235
235
  retrieves data on all markets for coinmate
236
236
  :see: https://coinmate.docs.apiary.io/#reference/trading-pairs/get-trading-pairs/get
@@ -339,7 +339,7 @@ class coinmetro(Exchange, ImplicitAPI):
339
339
  self.options['currencyIdsListForParseMarket'] = list(currenciesById.keys())
340
340
  return result
341
341
 
342
- async def fetch_markets(self, params={}):
342
+ async def fetch_markets(self, params={}) -> List[Market]:
343
343
  """
344
344
  retrieves data on all markets for coinmetro
345
345
  :see: https://documenter.getpostman.com/view/3653795/SVfWN6KS#9fd18008-338e-4863-b07d-722878a46832
@@ -268,7 +268,7 @@ class coinone(Exchange, ImplicitAPI):
268
268
  }
269
269
  return result
270
270
 
271
- async def fetch_markets(self, params={}):
271
+ async def fetch_markets(self, params={}) -> List[Market]:
272
272
  """
273
273
  retrieves data on all markets for coinone
274
274
  :see: https://docs.coinone.co.kr/v1.0/reference/tickers
@@ -478,7 +478,7 @@ class coinsph(Exchange, ImplicitAPI):
478
478
  #
479
479
  return self.safe_integer(response, 'serverTime')
480
480
 
481
- async def fetch_markets(self, params={}):
481
+ async def fetch_markets(self, params={}) -> List[Market]:
482
482
  """
483
483
  retrieves data on all markets for coinsph
484
484
  :see: https://coins-docs.github.io/rest-api/#exchange-information
@@ -390,7 +390,7 @@ class cryptocom(Exchange, ImplicitAPI):
390
390
  },
391
391
  })
392
392
 
393
- async def fetch_markets(self, params={}):
393
+ async def fetch_markets(self, params={}) -> List[Market]:
394
394
  """
395
395
  :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-instruments
396
396
  retrieves data on all markets for cryptocom
@@ -395,7 +395,7 @@ class currencycom(Exchange, ImplicitAPI):
395
395
  }
396
396
  return result
397
397
 
398
- async def fetch_markets(self, params={}):
398
+ async def fetch_markets(self, params={}) -> List[Market]:
399
399
  """
400
400
  retrieves data on all markets for currencycom
401
401
  :see: https://apitradedoc.currency.com/swagger-ui.html#/rest-api/exchangeInfoUsingGET