ccxt 4.3.17__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 (195) 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 +34 -17
  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 +4 -4
  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 +63 -17
  97. ccxt/base/types.py +20 -0
  98. ccxt/bigone.py +4 -4
  99. ccxt/binance.py +34 -17
  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 +4 -4
  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/bitvavo.py +1 -1
  174. ccxt/pro/bybit.py +4 -3
  175. ccxt/pro/coinbaseinternational.py +11 -4
  176. ccxt/pro/okx.py +79 -1
  177. ccxt/pro/woofipro.py +1183 -0
  178. ccxt/probit.py +1 -1
  179. ccxt/test/test_async.py +31 -1
  180. ccxt/test/test_sync.py +31 -1
  181. ccxt/timex.py +1 -1
  182. ccxt/tokocrypto.py +1 -1
  183. ccxt/upbit.py +1 -1
  184. ccxt/wavesexchange.py +3 -3
  185. ccxt/wazirx.py +1 -1
  186. ccxt/whitebit.py +2 -2
  187. ccxt/woo.py +25 -10
  188. ccxt/woofipro.py +2524 -0
  189. ccxt/yobit.py +1 -1
  190. ccxt/zaif.py +1 -1
  191. ccxt/zonda.py +3 -3
  192. {ccxt-4.3.17.dist-info → ccxt-4.3.19.dist-info}/METADATA +8 -6
  193. {ccxt-4.3.17.dist-info → ccxt-4.3.19.dist-info}/RECORD +195 -191
  194. {ccxt-4.3.17.dist-info → ccxt-4.3.19.dist-info}/WHEEL +0 -0
  195. {ccxt-4.3.17.dist-info → ccxt-4.3.19.dist-info}/top_level.txt +0 -0
ccxt/async_support/woo.py CHANGED
@@ -6,8 +6,9 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.woo import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Bool, Conversion, Currencies, Currency, Int, Leverage, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Trade, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Bool, Conversion, Currencies, Currency, Int, Leverage, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Trade, TradingFees, Transaction, TransferEntry, TransferEntries
10
10
  from typing import List
11
+ from typing import Any
11
12
  from ccxt.base.errors import ExchangeError
12
13
  from ccxt.base.errors import AuthenticationError
13
14
  from ccxt.base.errors import ArgumentsRequired
@@ -401,6 +402,7 @@ class woo(Exchange, ImplicitAPI):
401
402
  async def fetch_markets(self, params={}) -> List[Market]:
402
403
  """
403
404
  retrieves data on all markets for woo
405
+ :see: https://docs.woo.org/#exchange-information
404
406
  :param dict [params]: extra parameters specific to the exchange API endpoint
405
407
  :returns dict[]: an array of objects representing market data
406
408
  """
@@ -513,6 +515,7 @@ class woo(Exchange, ImplicitAPI):
513
515
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
514
516
  """
515
517
  get the list of most recent trades for a particular symbol
518
+ :see: https://docs.woo.org/#market-trades-public
516
519
  :param str symbol: unified symbol of the market to fetch trades for
517
520
  :param int [since]: timestamp in ms of the earliest trade to fetch
518
521
  :param int [limit]: the maximum amount of trades to fetch
@@ -687,6 +690,7 @@ class woo(Exchange, ImplicitAPI):
687
690
  async def fetch_currencies(self, params={}) -> Currencies:
688
691
  """
689
692
  fetches all available currencies on an exchange
693
+ :see: https://docs.woo.org/#available-token-public
690
694
  :param dict [params]: extra parameters specific to the exchange API endpoint
691
695
  :returns dict: an associative dictionary of currencies
692
696
  """
@@ -834,6 +838,7 @@ class woo(Exchange, ImplicitAPI):
834
838
  async def create_trailing_amount_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingAmount=None, trailingTriggerPrice=None, params={}) -> Order:
835
839
  """
836
840
  create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
841
+ :see: https://docs.woo.org/#send-algo-order
837
842
  :param str symbol: unified symbol of the market to create an order in
838
843
  :param str type: 'market' or 'limit'
839
844
  :param str side: 'buy' or 'sell'
@@ -855,6 +860,7 @@ class woo(Exchange, ImplicitAPI):
855
860
  async def create_trailing_percent_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent=None, trailingTriggerPrice=None, params={}) -> Order:
856
861
  """
857
862
  create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
863
+ :see: https://docs.woo.org/#send-algo-order
858
864
  :param str symbol: unified symbol of the market to create an order in
859
865
  :param str type: 'market' or 'limit'
860
866
  :param str side: 'buy' or 'sell'
@@ -1555,6 +1561,7 @@ class woo(Exchange, ImplicitAPI):
1555
1561
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
1556
1562
  """
1557
1563
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
1564
+ :see: https://docs.woo.org/#orderbook-snapshot-public
1558
1565
  :param str symbol: unified symbol of the market to fetch the order book for
1559
1566
  :param int [limit]: the maximum amount of order book entries to return
1560
1567
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1680,6 +1687,7 @@ class woo(Exchange, ImplicitAPI):
1680
1687
  async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1681
1688
  """
1682
1689
  fetch all the trades made from a single order
1690
+ :see: https://docs.woo.org/#get-trades
1683
1691
  :param str id: order id
1684
1692
  :param str symbol: unified market symbol
1685
1693
  :param int [since]: the earliest time in ms to fetch trades for
@@ -1718,8 +1726,8 @@ class woo(Exchange, ImplicitAPI):
1718
1726
 
1719
1727
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1720
1728
  """
1721
- :see: https://docs.woo.org/#get-trades
1722
1729
  fetch all trades made by the user
1730
+ :see: https://docs.woo.org/#get-trades
1723
1731
  :param str symbol: unified market symbol
1724
1732
  :param int [since]: the earliest time in ms to fetch trades for
1725
1733
  :param int [limit]: the maximum number of trades structures to retrieve
@@ -1773,6 +1781,7 @@ class woo(Exchange, ImplicitAPI):
1773
1781
  async def fetch_accounts(self, params={}) -> List[Account]:
1774
1782
  """
1775
1783
  fetch all the accounts associated with a profile
1784
+ :see: https://docs.woo.org/#get-assets-of-subaccounts
1776
1785
  :param dict [params]: extra parameters specific to the exchange API endpoint
1777
1786
  :returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
1778
1787
  """
@@ -1865,6 +1874,7 @@ class woo(Exchange, ImplicitAPI):
1865
1874
  async def fetch_deposit_address(self, code: str, params={}):
1866
1875
  """
1867
1876
  fetch the deposit address for a currency associated with self account
1877
+ :see: https://docs.woo.org/#get-token-deposit-address
1868
1878
  :param str code: unified currency code
1869
1879
  :param dict [params]: extra parameters specific to the exchange API endpoint
1870
1880
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
@@ -1896,7 +1906,7 @@ class woo(Exchange, ImplicitAPI):
1896
1906
  'info': response,
1897
1907
  }
1898
1908
 
1899
- async def get_asset_history_rows(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1909
+ async def get_asset_history_rows(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> Any:
1900
1910
  await self.load_markets()
1901
1911
  request = {}
1902
1912
  currency: Currency = None
@@ -1946,11 +1956,12 @@ class woo(Exchange, ImplicitAPI):
1946
1956
  # "meta": {total: '1', records_per_page: "25", current_page: "1"},
1947
1957
  # "success": True
1948
1958
  # }
1949
- return [currency, self.safe_value(response, 'rows', {})]
1959
+ return [currency, self.safe_list(response, 'rows', [])]
1950
1960
 
1951
1961
  async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1952
1962
  """
1953
1963
  fetch the history of changes, actions done by the user or operations that altered balance of the user
1964
+ :see: https://docs.woo.org/#get-asset-history
1954
1965
  :param str code: unified currency code, default is None
1955
1966
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
1956
1967
  :param int [limit]: max number of ledger entrys to return, default is None
@@ -2010,6 +2021,7 @@ class woo(Exchange, ImplicitAPI):
2010
2021
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2011
2022
  """
2012
2023
  fetch all deposits made to an account
2024
+ :see: https://docs.woo.org/#get-asset-history
2013
2025
  :param str code: unified currency code
2014
2026
  :param int [since]: the earliest time in ms to fetch deposits for
2015
2027
  :param int [limit]: the maximum number of deposits structures to retrieve
@@ -2024,6 +2036,7 @@ class woo(Exchange, ImplicitAPI):
2024
2036
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2025
2037
  """
2026
2038
  fetch all withdrawals made from an account
2039
+ :see: https://docs.woo.org/#get-asset-history
2027
2040
  :param str code: unified currency code
2028
2041
  :param int [since]: the earliest time in ms to fetch withdrawals for
2029
2042
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -2038,6 +2051,7 @@ class woo(Exchange, ImplicitAPI):
2038
2051
  async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2039
2052
  """
2040
2053
  fetch history of deposits and withdrawals
2054
+ :see: https://docs.woo.org/#get-asset-history
2041
2055
  :param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
2042
2056
  :param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
2043
2057
  :param int [limit]: max number of deposit/withdrawals to return, default is None
@@ -2108,8 +2122,8 @@ class woo(Exchange, ImplicitAPI):
2108
2122
 
2109
2123
  async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
2110
2124
  """
2111
- :see: https://docs.woo.org/#get-transfer-history
2112
2125
  transfer currency internally between wallets on the same account
2126
+ :see: https://docs.woo.org/#get-transfer-history
2113
2127
  :param str code: unified currency code
2114
2128
  :param float amount: amount to transfer
2115
2129
  :param str fromAccount: account to transfer from
@@ -2141,7 +2155,7 @@ class woo(Exchange, ImplicitAPI):
2141
2155
  transfer['toAccount'] = toAccount
2142
2156
  return transfer
2143
2157
 
2144
- async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
2158
+ async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> TransferEntries:
2145
2159
  """
2146
2160
  fetch a history of internal transfers made on an account
2147
2161
  :see: https://docs.woo.org/#get-transfer-history
@@ -2189,7 +2203,7 @@ class woo(Exchange, ImplicitAPI):
2189
2203
  data = self.safe_list(response, 'rows', [])
2190
2204
  return self.parse_transfers(data, None, since, limit, params)
2191
2205
 
2192
- def parse_transfer(self, transfer, currency: Currency = None):
2206
+ def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
2193
2207
  #
2194
2208
  # fetchTransfers
2195
2209
  # {
@@ -2231,7 +2245,7 @@ class woo(Exchange, ImplicitAPI):
2231
2245
  'info': transfer,
2232
2246
  }
2233
2247
 
2234
- def parse_transfer_status(self, status):
2248
+ def parse_transfer_status(self, status: Str) -> Str:
2235
2249
  statuses = {
2236
2250
  'NEW': 'pending',
2237
2251
  'CONFIRMING': 'pending',
@@ -2244,6 +2258,7 @@ class woo(Exchange, ImplicitAPI):
2244
2258
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
2245
2259
  """
2246
2260
  make a withdrawal
2261
+ :see: https://docs.woo.org/#token-withdraw
2247
2262
  :param str code: unified currency code
2248
2263
  :param float amount: the amount to withdraw
2249
2264
  :param str address: the address to withdraw to
@@ -2680,7 +2695,7 @@ class woo(Exchange, ImplicitAPI):
2680
2695
  data = self.safe_dict(response, 'data', {})
2681
2696
  return self.parse_leverage(data, market)
2682
2697
 
2683
- def parse_leverage(self, leverage, market=None) -> Leverage:
2698
+ def parse_leverage(self, leverage: dict, market: Market = None) -> Leverage:
2684
2699
  leverageValue = self.safe_integer(leverage, 'leverage')
2685
2700
  return {
2686
2701
  'info': leverage,
@@ -2967,7 +2982,7 @@ class woo(Exchange, ImplicitAPI):
2967
2982
  rows = self.safe_list(data, 'tradeVos', [])
2968
2983
  return self.parse_conversions(rows, code, 'sellAsset', 'buyAsset', since, limit)
2969
2984
 
2970
- def parse_conversion(self, conversion, fromCurrency: Currency = None, toCurrency: Currency = None) -> Conversion:
2985
+ def parse_conversion(self, conversion: dict, fromCurrency: Currency = None, toCurrency: Currency = None) -> Conversion:
2971
2986
  #
2972
2987
  # fetchConvertQuote
2973
2988
  #