ccxt 4.3.18__py2.py3-none-any.whl → 4.3.19__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 (193) hide show
  1. ccxt/__init__.py +3 -1
  2. ccxt/abstract/bybit.py +1 -0
  3. ccxt/abstract/okx.py +1 -0
  4. ccxt/abstract/woofipro.py +119 -0
  5. ccxt/ace.py +1 -1
  6. ccxt/ascendex.py +7 -8
  7. ccxt/async_support/__init__.py +3 -1
  8. ccxt/async_support/ace.py +1 -1
  9. ccxt/async_support/ascendex.py +7 -8
  10. ccxt/async_support/base/exchange.py +23 -2
  11. ccxt/async_support/bigone.py +4 -4
  12. ccxt/async_support/binance.py +9 -9
  13. ccxt/async_support/bingx.py +4 -4
  14. ccxt/async_support/bit2c.py +1 -1
  15. ccxt/async_support/bitbank.py +1 -1
  16. ccxt/async_support/bitbns.py +1 -1
  17. ccxt/async_support/bitfinex.py +28 -4
  18. ccxt/async_support/bitfinex2.py +62 -54
  19. ccxt/async_support/bitflyer.py +1 -1
  20. ccxt/async_support/bitget.py +8 -11
  21. ccxt/async_support/bithumb.py +1 -1
  22. ccxt/async_support/bitmart.py +8 -8
  23. ccxt/async_support/bitmex.py +2 -2
  24. ccxt/async_support/bitopro.py +1 -1
  25. ccxt/async_support/bitrue.py +3 -3
  26. ccxt/async_support/bitso.py +1 -1
  27. ccxt/async_support/bitstamp.py +3 -5
  28. ccxt/async_support/bitteam.py +1 -1
  29. ccxt/async_support/bitvavo.py +1 -1
  30. ccxt/async_support/bl3p.py +1 -1
  31. ccxt/async_support/blockchaincom.py +1 -1
  32. ccxt/async_support/blofin.py +3 -3
  33. ccxt/async_support/btcalpha.py +1 -1
  34. ccxt/async_support/btcbox.py +1 -1
  35. ccxt/async_support/btcmarkets.py +1 -1
  36. ccxt/async_support/btcturk.py +1 -1
  37. ccxt/async_support/bybit.py +9 -8
  38. ccxt/async_support/cex.py +1 -1
  39. ccxt/async_support/coinbase.py +2 -2
  40. ccxt/async_support/coinbasepro.py +1 -1
  41. ccxt/async_support/coincheck.py +1 -1
  42. ccxt/async_support/coinex.py +320 -520
  43. ccxt/async_support/coinlist.py +6 -7
  44. ccxt/async_support/coinmate.py +1 -1
  45. ccxt/async_support/coinmetro.py +1 -1
  46. ccxt/async_support/coinone.py +1 -1
  47. ccxt/async_support/coinsph.py +1 -1
  48. ccxt/async_support/coinspot.py +1 -1
  49. ccxt/async_support/cryptocom.py +1 -1
  50. ccxt/async_support/currencycom.py +2 -2
  51. ccxt/async_support/delta.py +4 -4
  52. ccxt/async_support/deribit.py +8 -8
  53. ccxt/async_support/digifinex.py +5 -5
  54. ccxt/async_support/exmo.py +1 -1
  55. ccxt/async_support/gate.py +5 -5
  56. ccxt/async_support/gemini.py +1 -1
  57. ccxt/async_support/hitbtc.py +3 -3
  58. ccxt/async_support/hollaex.py +4 -4
  59. ccxt/async_support/htx.py +2 -2
  60. ccxt/async_support/huobijp.py +1 -1
  61. ccxt/async_support/idex.py +1 -1
  62. ccxt/async_support/independentreserve.py +1 -1
  63. ccxt/async_support/indodax.py +2 -2
  64. ccxt/async_support/kraken.py +2 -2
  65. ccxt/async_support/krakenfutures.py +3 -3
  66. ccxt/async_support/kucoin.py +3 -3
  67. ccxt/async_support/kucoinfutures.py +3 -3
  68. ccxt/async_support/kuna.py +1 -1
  69. ccxt/async_support/latoken.py +6 -6
  70. ccxt/async_support/lbank.py +1 -1
  71. ccxt/async_support/luno.py +1 -1
  72. ccxt/async_support/lykke.py +1 -1
  73. ccxt/async_support/mercado.py +1 -1
  74. ccxt/async_support/mexc.py +7 -7
  75. ccxt/async_support/ndax.py +1 -1
  76. ccxt/async_support/novadax.py +3 -4
  77. ccxt/async_support/okcoin.py +3 -3
  78. ccxt/async_support/okx.py +27 -10
  79. ccxt/async_support/onetrading.py +1 -1
  80. ccxt/async_support/paymium.py +3 -3
  81. ccxt/async_support/phemex.py +5 -5
  82. ccxt/async_support/poloniex.py +3 -4
  83. ccxt/async_support/poloniexfutures.py +1 -1
  84. ccxt/async_support/probit.py +1 -1
  85. ccxt/async_support/timex.py +1 -1
  86. ccxt/async_support/tokocrypto.py +1 -1
  87. ccxt/async_support/upbit.py +1 -1
  88. ccxt/async_support/wavesexchange.py +3 -3
  89. ccxt/async_support/wazirx.py +1 -1
  90. ccxt/async_support/whitebit.py +2 -2
  91. ccxt/async_support/woo.py +25 -10
  92. ccxt/async_support/woofipro.py +2524 -0
  93. ccxt/async_support/yobit.py +1 -1
  94. ccxt/async_support/zaif.py +1 -1
  95. ccxt/async_support/zonda.py +3 -3
  96. ccxt/base/exchange.py +62 -16
  97. ccxt/base/types.py +20 -0
  98. ccxt/bigone.py +4 -4
  99. ccxt/binance.py +9 -9
  100. ccxt/bingx.py +4 -4
  101. ccxt/bit2c.py +1 -1
  102. ccxt/bitbank.py +1 -1
  103. ccxt/bitbns.py +1 -1
  104. ccxt/bitfinex.py +28 -4
  105. ccxt/bitfinex2.py +62 -54
  106. ccxt/bitflyer.py +1 -1
  107. ccxt/bitget.py +8 -11
  108. ccxt/bithumb.py +1 -1
  109. ccxt/bitmart.py +8 -8
  110. ccxt/bitmex.py +2 -2
  111. ccxt/bitopro.py +1 -1
  112. ccxt/bitrue.py +3 -3
  113. ccxt/bitso.py +1 -1
  114. ccxt/bitstamp.py +3 -5
  115. ccxt/bitteam.py +1 -1
  116. ccxt/bitvavo.py +1 -1
  117. ccxt/bl3p.py +1 -1
  118. ccxt/blockchaincom.py +1 -1
  119. ccxt/blofin.py +3 -3
  120. ccxt/btcalpha.py +1 -1
  121. ccxt/btcbox.py +1 -1
  122. ccxt/btcmarkets.py +1 -1
  123. ccxt/btcturk.py +1 -1
  124. ccxt/bybit.py +9 -8
  125. ccxt/cex.py +1 -1
  126. ccxt/coinbase.py +2 -2
  127. ccxt/coinbasepro.py +1 -1
  128. ccxt/coincheck.py +1 -1
  129. ccxt/coinex.py +320 -520
  130. ccxt/coinlist.py +6 -7
  131. ccxt/coinmate.py +1 -1
  132. ccxt/coinmetro.py +1 -1
  133. ccxt/coinone.py +1 -1
  134. ccxt/coinsph.py +1 -1
  135. ccxt/coinspot.py +1 -1
  136. ccxt/cryptocom.py +1 -1
  137. ccxt/currencycom.py +2 -2
  138. ccxt/delta.py +4 -4
  139. ccxt/deribit.py +8 -8
  140. ccxt/digifinex.py +5 -5
  141. ccxt/exmo.py +1 -1
  142. ccxt/gate.py +5 -5
  143. ccxt/gemini.py +1 -1
  144. ccxt/hitbtc.py +3 -3
  145. ccxt/hollaex.py +4 -4
  146. ccxt/htx.py +2 -2
  147. ccxt/huobijp.py +1 -1
  148. ccxt/idex.py +1 -1
  149. ccxt/independentreserve.py +1 -1
  150. ccxt/indodax.py +2 -2
  151. ccxt/kraken.py +2 -2
  152. ccxt/krakenfutures.py +3 -3
  153. ccxt/kucoin.py +3 -3
  154. ccxt/kucoinfutures.py +3 -3
  155. ccxt/kuna.py +1 -1
  156. ccxt/latoken.py +6 -6
  157. ccxt/lbank.py +1 -1
  158. ccxt/luno.py +1 -1
  159. ccxt/lykke.py +1 -1
  160. ccxt/mercado.py +1 -1
  161. ccxt/mexc.py +7 -7
  162. ccxt/ndax.py +1 -1
  163. ccxt/novadax.py +3 -4
  164. ccxt/okcoin.py +3 -3
  165. ccxt/okx.py +27 -10
  166. ccxt/onetrading.py +1 -1
  167. ccxt/paymium.py +3 -3
  168. ccxt/phemex.py +5 -5
  169. ccxt/poloniex.py +3 -4
  170. ccxt/poloniexfutures.py +1 -1
  171. ccxt/pro/__init__.py +3 -1
  172. ccxt/pro/bitget.py +127 -190
  173. ccxt/pro/coinbaseinternational.py +11 -4
  174. ccxt/pro/okx.py +79 -1
  175. ccxt/pro/woofipro.py +1183 -0
  176. ccxt/probit.py +1 -1
  177. ccxt/test/test_async.py +31 -1
  178. ccxt/test/test_sync.py +31 -1
  179. ccxt/timex.py +1 -1
  180. ccxt/tokocrypto.py +1 -1
  181. ccxt/upbit.py +1 -1
  182. ccxt/wavesexchange.py +3 -3
  183. ccxt/wazirx.py +1 -1
  184. ccxt/whitebit.py +2 -2
  185. ccxt/woo.py +25 -10
  186. ccxt/woofipro.py +2524 -0
  187. ccxt/yobit.py +1 -1
  188. ccxt/zaif.py +1 -1
  189. ccxt/zonda.py +3 -3
  190. {ccxt-4.3.18.dist-info → ccxt-4.3.19.dist-info}/METADATA +8 -6
  191. {ccxt-4.3.18.dist-info → ccxt-4.3.19.dist-info}/RECORD +193 -189
  192. {ccxt-4.3.18.dist-info → ccxt-4.3.19.dist-info}/WHEEL +0 -0
  193. {ccxt-4.3.18.dist-info → ccxt-4.3.19.dist-info}/top_level.txt +0 -0
ccxt/luno.py CHANGED
@@ -509,7 +509,7 @@ class luno(Exchange, ImplicitAPI):
509
509
  """
510
510
  return self.fetch_orders_by_state('COMPLETE', symbol, since, limit, params)
511
511
 
512
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
512
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
513
513
  # {
514
514
  # "pair":"XBTAUD",
515
515
  # "timestamp":1642201439301,
ccxt/lykke.py CHANGED
@@ -357,7 +357,7 @@ class lykke(Exchange, ImplicitAPI):
357
357
  })
358
358
  return result
359
359
 
360
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
360
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
361
361
  #
362
362
  # fetchTickers
363
363
  #
ccxt/mercado.py CHANGED
@@ -268,7 +268,7 @@ class mercado(Exchange, ImplicitAPI):
268
268
  response = self.publicGetCoinOrderbook(self.extend(request, params))
269
269
  return self.parse_order_book(response, market['symbol'])
270
270
 
271
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
271
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
272
272
  #
273
273
  # {
274
274
  # "high":"103.96000000",
ccxt/mexc.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.mexc import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currencies, Currency, IndexType, Int, Leverage, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, IndexType, Int, Leverage, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry, TransferEntries
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -1947,7 +1947,7 @@ class mexc(Exchange, ImplicitAPI):
1947
1947
  # when it's single symbol request, the returned structure is different(singular object) for both spot & swap, thus we need to wrap inside array
1948
1948
  return self.parse_ticker(ticker, market)
1949
1949
 
1950
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
1950
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
1951
1951
  marketId = self.safe_string(ticker, 'symbol')
1952
1952
  market = self.safe_market(marketId, market)
1953
1953
  timestamp = None
@@ -4661,7 +4661,7 @@ class mexc(Exchange, ImplicitAPI):
4661
4661
  'lastUpdateTimestamp': None,
4662
4662
  })
4663
4663
 
4664
- def fetch_transfer(self, id: str, since: Int = None, limit: Int = None, params={}):
4664
+ def fetch_transfer(self, id: str, code: Str = None, params={}) -> TransferEntry:
4665
4665
  marketType, query = self.handle_market_type_and_params('fetchTransfer', None, params)
4666
4666
  self.load_markets()
4667
4667
  if marketType == 'spot':
@@ -4688,7 +4688,7 @@ class mexc(Exchange, ImplicitAPI):
4688
4688
  raise BadRequest(self.id + ' fetchTransfer() is not supported for ' + marketType)
4689
4689
  return None
4690
4690
 
4691
- def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
4691
+ def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> TransferEntries:
4692
4692
  """
4693
4693
  fetch a history of internal transfers made on an account
4694
4694
  :param str code: unified currency code of the currency transferred
@@ -4819,7 +4819,7 @@ class mexc(Exchange, ImplicitAPI):
4819
4819
  'toAccount': toAccount,
4820
4820
  })
4821
4821
 
4822
- def parse_transfer(self, transfer, currency: Currency = None):
4822
+ def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
4823
4823
  #
4824
4824
  # spot: fetchTransfer
4825
4825
  #
@@ -4883,7 +4883,7 @@ class mexc(Exchange, ImplicitAPI):
4883
4883
  }
4884
4884
  return self.safe_string(statuses, status, status)
4885
4885
 
4886
- def parse_transfer_status(self, status):
4886
+ def parse_transfer_status(self, status: Str) -> Str:
4887
4887
  statuses = {
4888
4888
  'SUCCESS': 'ok',
4889
4889
  'FAILED': 'failed',
@@ -5181,7 +5181,7 @@ class mexc(Exchange, ImplicitAPI):
5181
5181
  data = self.safe_list(response, 'data', [])
5182
5182
  return self.parse_leverage(data, market)
5183
5183
 
5184
- def parse_leverage(self, leverage, market=None) -> Leverage:
5184
+ def parse_leverage(self, leverage: dict, market: Market = None) -> Leverage:
5185
5185
  marginMode = None
5186
5186
  longLeverage = None
5187
5187
  shortLeverage = None
ccxt/ndax.py CHANGED
@@ -596,7 +596,7 @@ class ndax(Exchange, ImplicitAPI):
596
596
  #
597
597
  return self.parse_order_book(response, symbol)
598
598
 
599
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
599
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
600
600
  #
601
601
  # fetchTicker
602
602
  #
ccxt/novadax.py CHANGED
@@ -330,7 +330,7 @@ class novadax(Exchange, ImplicitAPI):
330
330
  'info': market,
331
331
  }
332
332
 
333
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
333
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
334
334
  #
335
335
  # fetchTicker, fetchTickers
336
336
  #
@@ -1128,7 +1128,7 @@ class novadax(Exchange, ImplicitAPI):
1128
1128
  transfer['amount'] = amount
1129
1129
  return transfer
1130
1130
 
1131
- def parse_transfer(self, transfer, currency: Currency = None):
1131
+ def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
1132
1132
  #
1133
1133
  # {
1134
1134
  # "code":"A10000",
@@ -1143,7 +1143,6 @@ class novadax(Exchange, ImplicitAPI):
1143
1143
  'info': transfer,
1144
1144
  'id': id,
1145
1145
  'amount': None,
1146
- 'code': currencyCode, # kept here for backward-compatibility, but will be removed soon
1147
1146
  'currency': currencyCode,
1148
1147
  'fromAccount': None,
1149
1148
  'toAccount': None,
@@ -1152,7 +1151,7 @@ class novadax(Exchange, ImplicitAPI):
1152
1151
  'status': status,
1153
1152
  }
1154
1153
 
1155
- def parse_transfer_status(self, status):
1154
+ def parse_transfer_status(self, status: Str) -> Str:
1156
1155
  statuses = {
1157
1156
  'SUCCESS': 'pending',
1158
1157
  }
ccxt/okcoin.py CHANGED
@@ -859,7 +859,7 @@ class okcoin(Exchange, ImplicitAPI):
859
859
  timestamp = self.safe_integer(first, 'ts')
860
860
  return self.parse_order_book(first, symbol, timestamp)
861
861
 
862
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
862
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
863
863
  #
864
864
  # {
865
865
  # "instType": "SPOT",
@@ -2227,7 +2227,7 @@ class okcoin(Exchange, ImplicitAPI):
2227
2227
  rawTransfer = self.safe_dict(data, 0, {})
2228
2228
  return self.parse_transfer(rawTransfer, currency)
2229
2229
 
2230
- def parse_transfer(self, transfer, currency: Currency = None):
2230
+ def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
2231
2231
  #
2232
2232
  # transfer
2233
2233
  #
@@ -2303,7 +2303,7 @@ class okcoin(Exchange, ImplicitAPI):
2303
2303
  'status': self.parse_transfer_status(self.safe_string(transfer, 'state')),
2304
2304
  }
2305
2305
 
2306
- def parse_transfer_status(self, status):
2306
+ def parse_transfer_status(self, status: Str) -> Str:
2307
2307
  statuses = {
2308
2308
  'success': 'ok',
2309
2309
  }
ccxt/okx.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.okx import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Conversion, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Greeks, Int, Leverage, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Conversion, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Greeks, Int, Leverage, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry, TransferEntries
10
10
  from typing import List
11
11
  from typing import Any
12
12
  from ccxt.base.errors import ExchangeError
@@ -504,6 +504,7 @@ class okx(Exchange, ImplicitAPI):
504
504
  'tradingBot/grid/compute-margin-balance': 1,
505
505
  'tradingBot/grid/margin-balance': 1,
506
506
  'tradingBot/grid/min-investment': 1,
507
+ 'tradingBot/grid/adjust-investment': 1,
507
508
  'tradingBot/signal/create-signal': 1,
508
509
  'tradingBot/signal/order-algo': 1,
509
510
  'tradingBot/signal/stop-order-algo': 1,
@@ -1758,7 +1759,7 @@ class okx(Exchange, ImplicitAPI):
1758
1759
  timestamp = self.safe_integer(first, 'ts')
1759
1760
  return self.parse_order_book(first, symbol, timestamp)
1760
1761
 
1761
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
1762
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
1762
1763
  #
1763
1764
  # {
1764
1765
  # "instType": "SPOT",
@@ -4978,7 +4979,7 @@ class okx(Exchange, ImplicitAPI):
4978
4979
  data = self.safe_list(response, 'data', [])
4979
4980
  return self.parse_leverage(data, market)
4980
4981
 
4981
- def parse_leverage(self, leverage, market=None) -> Leverage:
4982
+ def parse_leverage(self, leverage: dict, market: Market = None) -> Leverage:
4982
4983
  marketId = None
4983
4984
  marginMode = None
4984
4985
  longLeverage = None
@@ -5385,7 +5386,7 @@ class okx(Exchange, ImplicitAPI):
5385
5386
  rawTransfer = self.safe_dict(data, 0, {})
5386
5387
  return self.parse_transfer(rawTransfer, currency)
5387
5388
 
5388
- def parse_transfer(self, transfer, currency: Currency = None):
5389
+ def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
5389
5390
  #
5390
5391
  # transfer
5391
5392
  #
@@ -5461,13 +5462,13 @@ class okx(Exchange, ImplicitAPI):
5461
5462
  'status': self.parse_transfer_status(self.safe_string(transfer, 'state')),
5462
5463
  }
5463
5464
 
5464
- def parse_transfer_status(self, status):
5465
+ def parse_transfer_status(self, status: Str) -> Str:
5465
5466
  statuses = {
5466
5467
  'success': 'ok',
5467
5468
  }
5468
5469
  return self.safe_string(statuses, status, status)
5469
5470
 
5470
- def fetch_transfer(self, id: str, code: Str = None, params={}):
5471
+ def fetch_transfer(self, id: str, code: Str = None, params={}) -> TransferEntry:
5471
5472
  self.load_markets()
5472
5473
  request = {
5473
5474
  'transId': id,
@@ -5498,7 +5499,7 @@ class okx(Exchange, ImplicitAPI):
5498
5499
  transfer = self.safe_dict(data, 0)
5499
5500
  return self.parse_transfer(transfer)
5500
5501
 
5501
- def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
5502
+ def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> TransferEntries:
5502
5503
  """
5503
5504
  fetch a history of internal transfers made on an account
5504
5505
  :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
@@ -5617,6 +5618,22 @@ class okx(Exchange, ImplicitAPI):
5617
5618
  # "nextFundingRate": "0.00017",
5618
5619
  # "nextFundingTime": "1634284800000"
5619
5620
  # }
5621
+ # ws
5622
+ # {
5623
+ # "fundingRate":"0.0001875391284828",
5624
+ # "fundingTime":"1700726400000",
5625
+ # "instId":"BTC-USD-SWAP",
5626
+ # "instType":"SWAP",
5627
+ # "method": "next_period",
5628
+ # "maxFundingRate":"0.00375",
5629
+ # "minFundingRate":"-0.00375",
5630
+ # "nextFundingRate":"0.0002608059239328",
5631
+ # "nextFundingTime":"1700755200000",
5632
+ # "premium": "0.0001233824646391",
5633
+ # "settFundingRate":"0.0001699799259033",
5634
+ # "settState":"settled",
5635
+ # "ts":"1700724675402"
5636
+ # }
5620
5637
  #
5621
5638
  # in the response above nextFundingRate is actually two funding rates from now
5622
5639
  #
@@ -7031,7 +7048,7 @@ class okx(Exchange, ImplicitAPI):
7031
7048
  return self.parse_greeks(entry, market)
7032
7049
  return None
7033
7050
 
7034
- def parse_greeks(self, greeks, market: Market = None):
7051
+ def parse_greeks(self, greeks: dict, market: Market = None) -> Greeks:
7035
7052
  #
7036
7053
  # {
7037
7054
  # "askVol": "0",
@@ -7229,7 +7246,7 @@ class okx(Exchange, ImplicitAPI):
7229
7246
  result = self.safe_list(response, 'data', [])
7230
7247
  return self.parse_option_chain(result, None, 'instId')
7231
7248
 
7232
- def parse_option(self, chain, currency: Currency = None, market: Market = None):
7249
+ def parse_option(self, chain: dict, currency: Currency = None, market: Market = None) -> Option:
7233
7250
  #
7234
7251
  # {
7235
7252
  # "instType": "OPTION",
@@ -7464,7 +7481,7 @@ class okx(Exchange, ImplicitAPI):
7464
7481
  rows = self.safe_list(response, 'data', [])
7465
7482
  return self.parse_conversions(rows, code, 'baseCcy', 'quoteCcy', since, limit)
7466
7483
 
7467
- def parse_conversion(self, conversion, fromCurrency: Currency = None, toCurrency: Currency = None) -> Conversion:
7484
+ def parse_conversion(self, conversion: dict, fromCurrency: Currency = None, toCurrency: Currency = None) -> Conversion:
7468
7485
  #
7469
7486
  # fetchConvertQuote
7470
7487
  #
ccxt/onetrading.py CHANGED
@@ -561,7 +561,7 @@ class onetrading(Exchange, ImplicitAPI):
561
561
  'taker': takerFees,
562
562
  }
563
563
 
564
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
564
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
565
565
  #
566
566
  # fetchTicker, fetchTickers
567
567
  #
ccxt/paymium.py CHANGED
@@ -158,7 +158,7 @@ class paymium(Exchange, ImplicitAPI):
158
158
  response = self.publicGetDataCurrencyDepth(self.extend(request, params))
159
159
  return self.parse_order_book(response, market['symbol'], None, 'bids', 'asks', 'price', 'amount')
160
160
 
161
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
161
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
162
162
  #
163
163
  # {
164
164
  # "high":"33740.82",
@@ -467,7 +467,7 @@ class paymium(Exchange, ImplicitAPI):
467
467
  #
468
468
  return self.parse_transfer(response, currency)
469
469
 
470
- def parse_transfer(self, transfer, currency: Currency = None):
470
+ def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
471
471
  #
472
472
  # {
473
473
  # "uuid": "968f4580-e26c-4ad8-8bcd-874d23d55296",
@@ -518,7 +518,7 @@ class paymium(Exchange, ImplicitAPI):
518
518
  'status': self.parse_transfer_status(status),
519
519
  }
520
520
 
521
- def parse_transfer_status(self, status):
521
+ def parse_transfer_status(self, status: Str) -> Str:
522
522
  statuses = {
523
523
  'executed': 'ok',
524
524
  # what are the other statuses?
ccxt/phemex.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.phemex import ImplicitAPI
8
8
  import hashlib
9
9
  import numbers
10
- from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry, TransferEntries
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -1270,7 +1270,7 @@ class phemex(Exchange, ImplicitAPI):
1270
1270
  rows = self.safe_list(data, 'rows', [])
1271
1271
  return self.parse_ohlcvs(rows, market, timeframe, since, userLimit)
1272
1272
 
1273
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
1273
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
1274
1274
  #
1275
1275
  # spot
1276
1276
  #
@@ -4139,7 +4139,7 @@ class phemex(Exchange, ImplicitAPI):
4139
4139
  transfer['currency'] = code
4140
4140
  return transfer
4141
4141
 
4142
- def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
4142
+ def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> TransferEntries:
4143
4143
  """
4144
4144
  fetch a history of internal transfers made on an account
4145
4145
  :param str code: unified currency code of the currency transferred
@@ -4184,7 +4184,7 @@ class phemex(Exchange, ImplicitAPI):
4184
4184
  transfers = self.safe_list(data, 'rows', [])
4185
4185
  return self.parse_transfers(transfers, currency, since, limit)
4186
4186
 
4187
- def parse_transfer(self, transfer, currency: Currency = None):
4187
+ def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
4188
4188
  #
4189
4189
  # transfer
4190
4190
  #
@@ -4238,7 +4238,7 @@ class phemex(Exchange, ImplicitAPI):
4238
4238
  'status': self.parse_transfer_status(status),
4239
4239
  }
4240
4240
 
4241
- def parse_transfer_status(self, status):
4241
+ def parse_transfer_status(self, status: Str) -> Str:
4242
4242
  statuses = {
4243
4243
  '3': 'rejected', # 'Rejected',
4244
4244
  '6': 'canceled', # 'Got error and wait for recovery',
ccxt/poloniex.py CHANGED
@@ -580,7 +580,7 @@ class poloniex(Exchange, ImplicitAPI):
580
580
  response = self.publicGetTimestamp(params)
581
581
  return self.safe_integer(response, 'serverTime')
582
582
 
583
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
583
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
584
584
  #
585
585
  # {
586
586
  # "symbol" : "BTC_USDT",
@@ -1752,12 +1752,11 @@ class poloniex(Exchange, ImplicitAPI):
1752
1752
  """
1753
1753
  self.load_markets()
1754
1754
  currency = self.currency(code)
1755
- amount = self.currency_to_precision(code, amount)
1756
1755
  accountsByType = self.safe_value(self.options, 'accountsByType', {})
1757
1756
  fromId = self.safe_string(accountsByType, fromAccount, fromAccount)
1758
1757
  toId = self.safe_string(accountsByType, toAccount, fromAccount)
1759
1758
  request = {
1760
- 'amount': amount,
1759
+ 'amount': self.currency_to_precision(code, amount),
1761
1760
  'currency': currency['id'],
1762
1761
  'fromAccount': fromId,
1763
1762
  'toAccount': toId,
@@ -1770,7 +1769,7 @@ class poloniex(Exchange, ImplicitAPI):
1770
1769
  #
1771
1770
  return self.parse_transfer(response, currency)
1772
1771
 
1773
- def parse_transfer(self, transfer, currency: Currency = None):
1772
+ def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
1774
1773
  #
1775
1774
  # {
1776
1775
  # "transferId" : "168041074"
ccxt/poloniexfutures.py CHANGED
@@ -356,7 +356,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
356
356
  'info': market,
357
357
  }
358
358
 
359
- def parse_ticker(self, ticker, market: Market = None) -> Ticker:
359
+ def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
360
360
  #
361
361
  # {
362
362
  # "symbol": "BTCUSDTPERP", # Market of the symbol
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.18'
7
+ __version__ = '4.3.19'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
@@ -76,6 +76,7 @@ from ccxt.pro.upbit import upbit # noqa
76
76
  from ccxt.pro.wazirx import wazirx # noqa: F401
77
77
  from ccxt.pro.whitebit import whitebit # noqa: F401
78
78
  from ccxt.pro.woo import woo # noqa: F401
79
+ from ccxt.pro.woofipro import woofipro # noqa: F401
79
80
 
80
81
  exchanges = [
81
82
  'alpaca',
@@ -142,4 +143,5 @@ exchanges = [
142
143
  'wazirx',
143
144
  'whitebit',
144
145
  'woo',
146
+ 'woofipro',
145
147
  ]