ccxt 4.4.28__py2.py3-none-any.whl → 4.4.29__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 (151) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/bybit.py +0 -13
  3. ccxt/alpaca.py +1 -1
  4. ccxt/async_support/__init__.py +1 -1
  5. ccxt/async_support/alpaca.py +1 -1
  6. ccxt/async_support/base/exchange.py +4 -1
  7. ccxt/async_support/bigone.py +1 -1
  8. ccxt/async_support/binance.py +1 -1
  9. ccxt/async_support/bingx.py +1 -1
  10. ccxt/async_support/bitbank.py +1 -1
  11. ccxt/async_support/bitfinex.py +1 -1
  12. ccxt/async_support/bitfinex2.py +1 -1
  13. ccxt/async_support/bitflyer.py +1 -1
  14. ccxt/async_support/bitget.py +96 -8
  15. ccxt/async_support/bithumb.py +1 -1
  16. ccxt/async_support/bitmart.py +1 -1
  17. ccxt/async_support/bitmex.py +1 -1
  18. ccxt/async_support/bitopro.py +22 -22
  19. ccxt/async_support/bitrue.py +29 -29
  20. ccxt/async_support/bitso.py +1 -1
  21. ccxt/async_support/bitstamp.py +1 -1
  22. ccxt/async_support/bitvavo.py +4 -1
  23. ccxt/async_support/blockchaincom.py +1 -1
  24. ccxt/async_support/btcmarkets.py +1 -1
  25. ccxt/async_support/bybit.py +50 -585
  26. ccxt/async_support/coinbase.py +1 -1
  27. ccxt/async_support/coinbaseexchange.py +1 -1
  28. ccxt/async_support/coinbaseinternational.py +1 -1
  29. ccxt/async_support/coincatch.py +25 -5
  30. ccxt/async_support/coinex.py +1 -1
  31. ccxt/async_support/coinlist.py +1 -1
  32. ccxt/async_support/coinmate.py +1 -1
  33. ccxt/async_support/coinsph.py +1 -1
  34. ccxt/async_support/cryptocom.py +1 -1
  35. ccxt/async_support/deribit.py +1 -1
  36. ccxt/async_support/digifinex.py +1 -1
  37. ccxt/async_support/exmo.py +1 -1
  38. ccxt/async_support/gate.py +1 -1
  39. ccxt/async_support/gemini.py +1 -1
  40. ccxt/async_support/hashkey.py +1 -1
  41. ccxt/async_support/hitbtc.py +1 -1
  42. ccxt/async_support/hollaex.py +1 -1
  43. ccxt/async_support/htx.py +1 -1
  44. ccxt/async_support/huobijp.py +1 -1
  45. ccxt/async_support/idex.py +1 -1
  46. ccxt/async_support/independentreserve.py +1 -1
  47. ccxt/async_support/indodax.py +1 -1
  48. ccxt/async_support/kraken.py +1 -1
  49. ccxt/async_support/kucoin.py +1 -1
  50. ccxt/async_support/kuna.py +1 -1
  51. ccxt/async_support/lbank.py +6 -1
  52. ccxt/async_support/lykke.py +1 -1
  53. ccxt/async_support/mercado.py +1 -1
  54. ccxt/async_support/mexc.py +1 -1
  55. ccxt/async_support/ndax.py +1 -1
  56. ccxt/async_support/novadax.py +1 -1
  57. ccxt/async_support/okcoin.py +1 -1
  58. ccxt/async_support/okx.py +1 -1
  59. ccxt/async_support/onetrading.py +1 -1
  60. ccxt/async_support/oxfun.py +1 -1
  61. ccxt/async_support/phemex.py +1 -1
  62. ccxt/async_support/poloniex.py +1 -1
  63. ccxt/async_support/probit.py +1 -1
  64. ccxt/async_support/tokocrypto.py +1 -1
  65. ccxt/async_support/upbit.py +1 -1
  66. ccxt/async_support/vertex.py +52 -8
  67. ccxt/async_support/wavesexchange.py +1 -1
  68. ccxt/async_support/whitebit.py +1 -1
  69. ccxt/async_support/woo.py +1 -1
  70. ccxt/async_support/woofipro.py +1 -1
  71. ccxt/async_support/xt.py +1 -1
  72. ccxt/async_support/yobit.py +2 -2
  73. ccxt/async_support/zaif.py +1 -1
  74. ccxt/async_support/zonda.py +1 -1
  75. ccxt/base/exchange.py +4 -1
  76. ccxt/bigone.py +1 -1
  77. ccxt/binance.py +1 -1
  78. ccxt/bingx.py +1 -1
  79. ccxt/bitbank.py +1 -1
  80. ccxt/bitfinex.py +1 -1
  81. ccxt/bitfinex2.py +1 -1
  82. ccxt/bitflyer.py +1 -1
  83. ccxt/bitget.py +96 -8
  84. ccxt/bithumb.py +1 -1
  85. ccxt/bitmart.py +1 -1
  86. ccxt/bitmex.py +1 -1
  87. ccxt/bitopro.py +22 -22
  88. ccxt/bitrue.py +29 -29
  89. ccxt/bitso.py +1 -1
  90. ccxt/bitstamp.py +1 -1
  91. ccxt/bitvavo.py +4 -1
  92. ccxt/blockchaincom.py +1 -1
  93. ccxt/btcmarkets.py +1 -1
  94. ccxt/bybit.py +50 -585
  95. ccxt/coinbase.py +1 -1
  96. ccxt/coinbaseexchange.py +1 -1
  97. ccxt/coinbaseinternational.py +1 -1
  98. ccxt/coincatch.py +25 -5
  99. ccxt/coinex.py +1 -1
  100. ccxt/coinlist.py +1 -1
  101. ccxt/coinmate.py +1 -1
  102. ccxt/coinsph.py +1 -1
  103. ccxt/cryptocom.py +1 -1
  104. ccxt/deribit.py +1 -1
  105. ccxt/digifinex.py +1 -1
  106. ccxt/exmo.py +1 -1
  107. ccxt/gate.py +1 -1
  108. ccxt/gemini.py +1 -1
  109. ccxt/hashkey.py +1 -1
  110. ccxt/hitbtc.py +1 -1
  111. ccxt/hollaex.py +1 -1
  112. ccxt/htx.py +1 -1
  113. ccxt/huobijp.py +1 -1
  114. ccxt/idex.py +1 -1
  115. ccxt/independentreserve.py +1 -1
  116. ccxt/indodax.py +1 -1
  117. ccxt/kraken.py +1 -1
  118. ccxt/kucoin.py +1 -1
  119. ccxt/kuna.py +1 -1
  120. ccxt/lbank.py +6 -1
  121. ccxt/lykke.py +1 -1
  122. ccxt/mercado.py +1 -1
  123. ccxt/mexc.py +1 -1
  124. ccxt/ndax.py +1 -1
  125. ccxt/novadax.py +1 -1
  126. ccxt/okcoin.py +1 -1
  127. ccxt/okx.py +1 -1
  128. ccxt/onetrading.py +1 -1
  129. ccxt/oxfun.py +1 -1
  130. ccxt/phemex.py +1 -1
  131. ccxt/poloniex.py +1 -1
  132. ccxt/pro/__init__.py +1 -1
  133. ccxt/pro/bitvavo.py +2 -1
  134. ccxt/pro/mexc.py +187 -30
  135. ccxt/probit.py +1 -1
  136. ccxt/tokocrypto.py +1 -1
  137. ccxt/upbit.py +1 -1
  138. ccxt/vertex.py +52 -8
  139. ccxt/wavesexchange.py +1 -1
  140. ccxt/whitebit.py +1 -1
  141. ccxt/woo.py +1 -1
  142. ccxt/woofipro.py +1 -1
  143. ccxt/xt.py +1 -1
  144. ccxt/yobit.py +2 -2
  145. ccxt/zaif.py +1 -1
  146. ccxt/zonda.py +1 -1
  147. {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/METADATA +4 -4
  148. {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/RECORD +151 -151
  149. {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/LICENSE.txt +0 -0
  150. {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/WHEEL +0 -0
  151. {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/top_level.txt +0 -0
ccxt/pro/mexc.py CHANGED
@@ -82,15 +82,23 @@ class mexc(ccxt.async_support.mexc):
82
82
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
83
83
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#individual-symbol-book-ticker-streams
84
84
  :see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#public-channels
85
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#miniticker
85
86
  :param str symbol: unified symbol of the market to fetch the ticker for
86
87
  :param dict [params]: extra parameters specific to the exchange API endpoint
88
+ :param boolean [params.miniTicker]: set to True for using the miniTicker endpoint
87
89
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
88
90
  """
89
91
  await self.load_markets()
90
92
  market = self.market(symbol)
91
93
  messageHash = 'ticker:' + market['symbol']
92
94
  if market['spot']:
93
- channel = 'spot@public.bookTicker.v3.api@' + market['id']
95
+ miniTicker = False
96
+ miniTicker, params = self.handle_option_and_params(params, 'watchTicker', 'miniTicker')
97
+ channel = None
98
+ if miniTicker:
99
+ channel = 'spot@public.miniTicker.v3.api@' + market['id'] + '@UTC+8'
100
+ else:
101
+ channel = 'spot@public.bookTicker.v3.api@' + market['id']
94
102
  return await self.watch_spot_public(channel, messageHash, params)
95
103
  else:
96
104
  channel = 'sub.ticker'
@@ -100,6 +108,38 @@ class mexc(ccxt.async_support.mexc):
100
108
  return await self.watch_swap_public(channel, messageHash, requestParams, params)
101
109
 
102
110
  def handle_ticker(self, client: Client, message):
111
+ #
112
+ # swap
113
+ #
114
+ # {
115
+ # "symbol": "BTC_USDT",
116
+ # "data": {
117
+ # "symbol": "BTC_USDT",
118
+ # "lastPrice": 76376.2,
119
+ # "riseFallRate": -0.0006,
120
+ # "fairPrice": 76374.4,
121
+ # "indexPrice": 76385.8,
122
+ # "volume24": 962062810,
123
+ # "amount24": 7344207079.96768,
124
+ # "maxBidPrice": 84024.3,
125
+ # "minAskPrice": 68747.2,
126
+ # "lower24Price": 75620.2,
127
+ # "high24Price": 77210,
128
+ # "timestamp": 1731137509138,
129
+ # "bid1": 76376.2,
130
+ # "ask1": 76376.3,
131
+ # "holdVol": 95479623,
132
+ # "riseFallValue": -46.5,
133
+ # "fundingRate": 0.0001,
134
+ # "zone": "UTC+8",
135
+ # "riseFallRates": [-0.0006, 0.1008, 0.2262, 0.2628, 0.2439, 1.0564],
136
+ # "riseFallRatesOfTimezone": [0.0065, -0.0013, -0.0006]
137
+ # },
138
+ # "channel": "push.ticker",
139
+ # "ts": 1731137509138
140
+ # }
141
+ #
142
+ # spot
103
143
  #
104
144
  # {
105
145
  # "c": "spot@public.bookTicker.v3.api@BTCUSDT",
@@ -113,8 +153,30 @@ class mexc(ccxt.async_support.mexc):
113
153
  # "t": 1678643605721
114
154
  # }
115
155
  #
156
+ # spot miniTicker
157
+ #
158
+ # {
159
+ # "d": {
160
+ # "s": "BTCUSDT",
161
+ # "p": "76522",
162
+ # "r": "0.0012",
163
+ # "tr": "0.0012",
164
+ # "h": "77196.3",
165
+ # "l": "75630.77",
166
+ # "v": "584664223.92",
167
+ # "q": "7666.720258",
168
+ # "lastRT": "-1",
169
+ # "MT": "0",
170
+ # "NV": "--",
171
+ # "t": "1731135533126"
172
+ # },
173
+ # "c": "spot@public.miniTicker.v3.api@BTCUSDT@UTC+8",
174
+ # "t": 1731135533126,
175
+ # "s": "BTCUSDT"
176
+ # }
177
+ #
116
178
  self.handle_bid_ask(client, message)
117
- rawTicker = self.safe_value_2(message, 'd', 'data')
179
+ rawTicker = self.safe_dict_2(message, 'd', 'data')
118
180
  marketId = self.safe_string_2(message, 's', 'symbol')
119
181
  timestamp = self.safe_integer(message, 't')
120
182
  market = self.safe_market(marketId)
@@ -135,24 +197,44 @@ class mexc(ccxt.async_support.mexc):
135
197
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
136
198
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#individual-symbol-book-ticker-streams
137
199
  :see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#public-channels
200
+ :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#minitickers
138
201
  :param str[] symbols: unified symbol of the market to fetch the ticker for
139
202
  :param dict [params]: extra parameters specific to the exchange API endpoint
203
+ :param boolean [params.miniTicker]: set to True for using the miniTicker endpoint
140
204
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
141
205
  """
142
206
  await self.load_markets()
143
- symbols = self.market_symbols(symbols, None, False)
207
+ symbols = self.market_symbols(symbols, None)
144
208
  messageHashes = []
145
- marketIds = self.market_ids(symbols)
146
- firstMarket = self.market(symbols[0])
147
- isSpot = firstMarket['spot']
209
+ firstSymbol = self.safe_string(symbols, 0)
210
+ market = None
211
+ if firstSymbol is not None:
212
+ market = self.market(firstSymbol)
213
+ type = None
214
+ type, params = self.handle_market_type_and_params('watchTickers', market, params)
215
+ isSpot = (type == 'spot')
148
216
  url = self.urls['api']['ws']['spot'] if (isSpot) else self.urls['api']['ws']['swap']
149
217
  request: dict = {}
150
218
  if isSpot:
219
+ miniTicker = False
220
+ miniTicker, params = self.handle_option_and_params(params, 'watchTickers', 'miniTicker')
151
221
  topics = []
152
- for i in range(0, len(marketIds)):
153
- marketId = marketIds[i]
154
- messageHashes.append('ticker:' + symbols[i])
155
- topics.append('spot@public.bookTicker.v3.api@' + marketId)
222
+ if not miniTicker:
223
+ if symbols is None:
224
+ raise ArgumentsRequired(self.id + 'watchTickers required symbols argument for the bookTicker channel')
225
+ marketIds = self.market_ids(symbols)
226
+ for i in range(0, len(marketIds)):
227
+ marketId = marketIds[i]
228
+ messageHashes.append('ticker:' + symbols[i])
229
+ channel = 'spot@public.bookTicker.v3.api@' + marketId
230
+ topics.append(channel)
231
+ else:
232
+ topics.append('spot@public.miniTickers.v3.api@UTC+8')
233
+ if symbols is None:
234
+ messageHashes.append('spot:ticker')
235
+ else:
236
+ for i in range(0, len(symbols)):
237
+ messageHashes.append('ticker:' + symbols[i])
156
238
  request['method'] = 'SUBSCRIPTION'
157
239
  request['params'] = topics
158
240
  else:
@@ -167,6 +249,8 @@ class mexc(ccxt.async_support.mexc):
167
249
  return self.filter_by_array(self.tickers, 'symbol', symbols)
168
250
 
169
251
  def handle_tickers(self, client: Client, message):
252
+ #
253
+ # swap
170
254
  #
171
255
  # {
172
256
  # "channel": "push.tickers",
@@ -189,36 +273,108 @@ class mexc(ccxt.async_support.mexc):
189
273
  # "ts": 1725872514111
190
274
  # }
191
275
  #
192
- data = self.safe_list(message, 'data')
193
- topic = 'ticker'
276
+ # spot
277
+ #
278
+ # {
279
+ # "c": "spot@public.bookTicker.v3.api@BTCUSDT",
280
+ # "d": {
281
+ # "A": "4.70432",
282
+ # "B": "6.714863",
283
+ # "a": "20744.54",
284
+ # "b": "20744.17"
285
+ # },
286
+ # "s": "BTCUSDT",
287
+ # "t": 1678643605721
288
+ # }
289
+ #
290
+ # spot miniTicker
291
+ #
292
+ # {
293
+ # "d": {
294
+ # "s": "BTCUSDT",
295
+ # "p": "76522",
296
+ # "r": "0.0012",
297
+ # "tr": "0.0012",
298
+ # "h": "77196.3",
299
+ # "l": "75630.77",
300
+ # "v": "584664223.92",
301
+ # "q": "7666.720258",
302
+ # "lastRT": "-1",
303
+ # "MT": "0",
304
+ # "NV": "--",
305
+ # "t": "1731135533126"
306
+ # },
307
+ # "c": "spot@public.miniTicker.v3.api@BTCUSDT@UTC+8",
308
+ # "t": 1731135533126,
309
+ # "s": "BTCUSDT"
310
+ # }
311
+ #
312
+ data = self.safe_list_2(message, 'data', 'd')
313
+ channel = self.safe_string(message, 'c', '')
314
+ marketId = self.safe_string(message, 's')
315
+ market = self.safe_market(marketId)
316
+ channelStartsWithSpot = channel.startswith('spot')
317
+ marketIdIsUndefined = marketId is None
318
+ isSpot = channelStartsWithSpot if marketIdIsUndefined else market['spot']
319
+ spotPrefix = 'spot:'
320
+ messageHashPrefix = spotPrefix if isSpot else ''
321
+ topic = messageHashPrefix + 'ticker'
194
322
  result = []
195
323
  for i in range(0, len(data)):
196
- ticker = self.parse_ticker(data[i])
324
+ entry = data[i]
325
+ ticker = None
326
+ if isSpot:
327
+ ticker = self.parse_ws_ticker(entry, market)
328
+ else:
329
+ ticker = self.parse_ticker(entry)
197
330
  symbol = ticker['symbol']
198
331
  self.tickers[symbol] = ticker
199
332
  result.append(ticker)
200
- messageHash = topic + ':' + symbol
333
+ messageHash = 'ticker:' + symbol
201
334
  client.resolve(ticker, messageHash)
202
335
  client.resolve(result, topic)
203
336
 
204
337
  def parse_ws_ticker(self, ticker, market=None):
205
338
  #
206
339
  # spot
207
- # {
208
- # "A": "4.70432",
209
- # "B": "6.714863",
210
- # "a": "20744.54",
211
- # "b": "20744.17"
212
- # }
213
340
  #
341
+ # {
342
+ # "A": "4.70432",
343
+ # "B": "6.714863",
344
+ # "a": "20744.54",
345
+ # "b": "20744.17"
346
+ # }
347
+ #
348
+ # spot miniTicker
349
+ #
350
+ # {
351
+ # "s": "BTCUSDT",
352
+ # "p": "76522",
353
+ # "r": "0.0012",
354
+ # "tr": "0.0012",
355
+ # "h": "77196.3",
356
+ # "l": "75630.77",
357
+ # "v": "584664223.92",
358
+ # "q": "7666.720258",
359
+ # "lastRT": "-1",
360
+ # "MT": "0",
361
+ # "NV": "--",
362
+ # "t": "1731135533126"
363
+ # }
364
+ #
365
+ marketId = self.safe_string(ticker, 's')
366
+ timestamp = self.safe_integer(ticker, 't')
367
+ price = self.safe_string(ticker, 'p')
214
368
  return self.safe_ticker({
215
- 'symbol': self.safe_symbol(None, market),
216
- 'timestamp': None,
217
- 'datetime': None,
369
+ 'info': ticker,
370
+ 'symbol': self.safe_symbol(marketId, market),
371
+ 'timestamp': timestamp,
372
+ 'datetime': self.iso8601(timestamp),
218
373
  'open': None,
219
- 'high': None,
220
- 'low': None,
221
- 'close': None,
374
+ 'high': self.safe_number(ticker, 'h'),
375
+ 'low': self.safe_number(ticker, 'l'),
376
+ 'close': price,
377
+ 'last': price,
222
378
  'bid': self.safe_number(ticker, 'b'),
223
379
  'bidVolume': self.safe_number(ticker, 'B'),
224
380
  'ask': self.safe_number(ticker, 'a'),
@@ -226,11 +382,10 @@ class mexc(ccxt.async_support.mexc):
226
382
  'vwap': None,
227
383
  'previousClose': None,
228
384
  'change': None,
229
- 'percentage': None,
385
+ 'percentage': self.safe_number(ticker, 'tr'),
230
386
  'average': None,
231
- 'baseVolume': None,
232
- 'quoteVolume': None,
233
- 'info': ticker,
387
+ 'baseVolume': self.safe_number(ticker, 'v'),
388
+ 'quoteVolume': self.safe_number(ticker, 'q'),
234
389
  }, market)
235
390
 
236
391
  async def watch_bids_asks(self, symbols: Strings = None, params={}) -> Tickers:
@@ -1258,6 +1413,8 @@ class mexc(ccxt.async_support.mexc):
1258
1413
  'public.kline.v3.api': self.handle_ohlcv,
1259
1414
  'push.kline': self.handle_ohlcv,
1260
1415
  'public.bookTicker.v3.api': self.handle_ticker,
1416
+ 'public.miniTicker.v3.api': self.handle_ticker,
1417
+ 'public.miniTickers.v3.api': self.handle_tickers,
1261
1418
  'push.ticker': self.handle_ticker,
1262
1419
  'push.tickers': self.handle_tickers,
1263
1420
  'public.increase.depth.v3.api': self.handle_order_book,
ccxt/probit.py CHANGED
@@ -1319,7 +1319,7 @@ class probit(Exchange, ImplicitAPI):
1319
1319
  data = self.safe_list(response, 'data', [])
1320
1320
  return self.parse_deposit_addresses(data, codes)
1321
1321
 
1322
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1322
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1323
1323
  """
1324
1324
  :see: https://docs-en.probit.com/reference/withdrawal
1325
1325
  make a withdrawal
ccxt/tokocrypto.py CHANGED
@@ -2235,7 +2235,7 @@ class tokocrypto(Exchange, ImplicitAPI):
2235
2235
  'fee': fee,
2236
2236
  }
2237
2237
 
2238
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
2238
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2239
2239
  """
2240
2240
  :see: https://www.tokocrypto.com/apidocs/#withdraw-signed
2241
2241
  make a withdrawal
ccxt/upbit.py CHANGED
@@ -1815,7 +1815,7 @@ class upbit(Exchange, ImplicitAPI):
1815
1815
  raise AddressPending(self.id + ' is generating ' + code + ' deposit address, call fetchDepositAddress or createDepositAddress one more time later to retrieve the generated address')
1816
1816
  return self.parse_deposit_address(response)
1817
1817
 
1818
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1818
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1819
1819
  """
1820
1820
  :see: https://docs.upbit.com/reference/디지털자산-출금하기
1821
1821
  :see: https://docs.upbit.com/reference/%EC%9B%90%ED%99%94-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0
ccxt/vertex.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.vertex import ImplicitAPI
8
- from ccxt.base.types import Balances, Currencies, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees
8
+ from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import AuthenticationError
@@ -2735,7 +2735,7 @@ class vertex(Exchange, ImplicitAPI):
2735
2735
  #
2736
2736
  return self.safe_dict(response, 'data', {})
2737
2737
 
2738
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2738
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2739
2739
  """
2740
2740
  make a withdrawal
2741
2741
  :see: https://docs.vertexprotocol.com/developer-resources/api/withdrawing-on-chain
@@ -2773,13 +2773,57 @@ class vertex(Exchange, ImplicitAPI):
2773
2773
  }
2774
2774
  response = self.v1GatewayPostExecute(self.extend(request, params))
2775
2775
  #
2776
- # {
2777
- # "status": "success",
2778
- # "signature": {signature},
2779
- # "request_type": "execute_withdraw_collateral"
2780
- # }
2776
+ # {
2777
+ # "status": "success",
2778
+ # "signature": {signature},
2779
+ # "request_type": "execute_withdraw_collateral"
2780
+ # }
2781
2781
  #
2782
- return response
2782
+ transaction = self.parse_transaction(response, currency)
2783
+ return self.extend(transaction, {
2784
+ 'amount': amount,
2785
+ 'address': address,
2786
+ })
2787
+
2788
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
2789
+ #
2790
+ # {
2791
+ # "status": "success",
2792
+ # "signature": {signature},
2793
+ # "request_type": "execute_withdraw_collateral"
2794
+ # }
2795
+ #
2796
+ code = None
2797
+ if currency is not None:
2798
+ code = currency['code']
2799
+ return {
2800
+ 'info': transaction,
2801
+ 'id': None,
2802
+ 'txid': None,
2803
+ 'timestamp': None,
2804
+ 'datetime': None,
2805
+ 'addressFrom': None,
2806
+ 'address': None,
2807
+ 'addressTo': None,
2808
+ 'tagFrom': None,
2809
+ 'tag': None,
2810
+ 'tagTo': None,
2811
+ 'type': 'withdrawal',
2812
+ 'amount': None,
2813
+ 'currency': code,
2814
+ 'status': self.parse_transaction_status(self.safe_string(transaction, 'status')),
2815
+ 'updated': None,
2816
+ 'network': None,
2817
+ 'comment': None,
2818
+ 'internal': None,
2819
+ 'fee': None,
2820
+ }
2821
+
2822
+ def parse_transaction_status(self, status: Str):
2823
+ statuses: dict = {
2824
+ 'success': 'ok',
2825
+ }
2826
+ return self.safe_string(statuses, status, status)
2783
2827
 
2784
2828
  def handle_public_address(self, methodName: str, params: dict):
2785
2829
  userAux = None
ccxt/wavesexchange.py CHANGED
@@ -2290,7 +2290,7 @@ class wavesexchange(Exchange, ImplicitAPI):
2290
2290
  raise ExchangeError(self.id + ' ' + body)
2291
2291
  return None
2292
2292
 
2293
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
2293
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2294
2294
  """
2295
2295
  make a withdrawal
2296
2296
  :param str code: unified currency code
ccxt/whitebit.py CHANGED
@@ -1896,7 +1896,7 @@ class whitebit(Exchange, ImplicitAPI):
1896
1896
  'status': None,
1897
1897
  }
1898
1898
 
1899
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1899
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1900
1900
  """
1901
1901
  make a withdrawal
1902
1902
  :see: https://docs.whitebit.com/private/http-main-v4/#create-withdraw-request
ccxt/woo.py CHANGED
@@ -2293,7 +2293,7 @@ class woo(Exchange, ImplicitAPI):
2293
2293
  }
2294
2294
  return self.safe_string(statuses, status, status)
2295
2295
 
2296
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
2296
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2297
2297
  """
2298
2298
  make a withdrawal
2299
2299
  :see: https://docs.woo.org/#token-withdraw
ccxt/woofipro.py CHANGED
@@ -2184,7 +2184,7 @@ class woofipro(Exchange, ImplicitAPI):
2184
2184
  def sign_message(self, message, privateKey):
2185
2185
  return self.sign_hash(self.hash_message(message), privateKey[-64:])
2186
2186
 
2187
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
2187
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2188
2188
  """
2189
2189
  make a withdrawal
2190
2190
  :see: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/create-withdraw-request
ccxt/xt.py CHANGED
@@ -3587,7 +3587,7 @@ class xt(Exchange, ImplicitAPI):
3587
3587
  withdrawals = self.safe_value(data, 'items', [])
3588
3588
  return self.parse_transactions(withdrawals, currency, since, limit, params)
3589
3589
 
3590
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
3590
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3591
3591
  """
3592
3592
  make a withdrawal
3593
3593
  :see: https://doc.xt.com/#deposit_withdrawalwithdraw
ccxt/yobit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.yobit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
9
+ from ccxt.base.types import Balances, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -1185,7 +1185,7 @@ class yobit(Exchange, ImplicitAPI):
1185
1185
  'tag': None,
1186
1186
  }
1187
1187
 
1188
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1188
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1189
1189
  """
1190
1190
  :see: https://yobit.net/en/api
1191
1191
  make a withdrawal
ccxt/zaif.py CHANGED
@@ -585,7 +585,7 @@ class zaif(Exchange, ImplicitAPI):
585
585
  response = self.privatePostTradeHistory(self.extend(request, params))
586
586
  return self.parse_orders(response['return'], market, since, limit)
587
587
 
588
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
588
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
589
589
  """
590
590
  :see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id41
591
591
  make a withdrawal
ccxt/zonda.py CHANGED
@@ -1689,7 +1689,7 @@ class zonda(Exchange, ImplicitAPI):
1689
1689
  }
1690
1690
  return self.safe_string(statuses, status, status)
1691
1691
 
1692
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1692
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1693
1693
  """
1694
1694
  :see: https://docs.zondacrypto.exchange/reference/crypto-withdrawal-1
1695
1695
  make a withdrawal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.4.28
3
+ Version: 4.4.29
4
4
  Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
5
5
  Home-page: https://ccxt.com
6
6
  Author: Igor Kroitor
@@ -273,13 +273,13 @@ console.log(version, Object.keys(exchanges));
273
273
 
274
274
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
275
275
 
276
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.28/dist/ccxt.browser.min.js
277
- * unpkg: https://unpkg.com/ccxt@4.4.28/dist/ccxt.browser.min.js
276
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.29/dist/ccxt.browser.min.js
277
+ * unpkg: https://unpkg.com/ccxt@4.4.29/dist/ccxt.browser.min.js
278
278
 
279
279
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
280
280
 
281
281
  ```HTML
282
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.28/dist/ccxt.browser.min.js"></script>
282
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.29/dist/ccxt.browser.min.js"></script>
283
283
  ```
284
284
 
285
285
  Creates a global `ccxt` object: