ccxt 4.4.30__py2.py3-none-any.whl → 4.4.31__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 (267) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ace.py +36 -12
  3. ccxt/alpaca.py +62 -22
  4. ccxt/ascendex.py +65 -30
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +36 -12
  7. ccxt/async_support/alpaca.py +62 -22
  8. ccxt/async_support/ascendex.py +65 -30
  9. ccxt/async_support/base/exchange.py +3 -3
  10. ccxt/async_support/bigone.py +71 -27
  11. ccxt/async_support/binance.py +555 -323
  12. ccxt/async_support/bingx.py +208 -108
  13. ccxt/async_support/bit2c.py +34 -12
  14. ccxt/async_support/bitbank.py +42 -14
  15. ccxt/async_support/bitbns.py +17 -9
  16. ccxt/async_support/bitfinex.py +68 -24
  17. ccxt/async_support/bitfinex2.py +116 -44
  18. ccxt/async_support/bitflyer.py +54 -18
  19. ccxt/async_support/bitget.py +277 -145
  20. ccxt/async_support/bithumb.py +39 -14
  21. ccxt/async_support/bitmart.py +145 -79
  22. ccxt/async_support/bitmex.py +90 -30
  23. ccxt/async_support/bitopro.py +66 -22
  24. ccxt/async_support/bitrue.py +109 -57
  25. ccxt/async_support/bitso.py +55 -19
  26. ccxt/async_support/bitstamp.py +84 -36
  27. ccxt/async_support/bitteam.py +51 -17
  28. ccxt/async_support/bitvavo.py +57 -19
  29. ccxt/async_support/bl3p.py +26 -10
  30. ccxt/async_support/blockchaincom.py +63 -21
  31. ccxt/async_support/blofin.py +95 -38
  32. ccxt/async_support/btcalpha.py +48 -16
  33. ccxt/async_support/btcbox.py +27 -9
  34. ccxt/async_support/btcmarkets.py +57 -19
  35. ccxt/async_support/btcturk.py +36 -12
  36. ccxt/async_support/bybit.py +251 -95
  37. ccxt/async_support/cex.py +65 -22
  38. ccxt/async_support/coinbase.py +138 -56
  39. ccxt/async_support/coinbaseexchange.py +76 -28
  40. ccxt/async_support/coinbaseinternational.py +75 -27
  41. ccxt/async_support/coincatch.py +191 -97
  42. ccxt/async_support/coincheck.py +33 -11
  43. ccxt/async_support/coinex.py +212 -101
  44. ccxt/async_support/coinlist.py +87 -30
  45. ccxt/async_support/coinmate.py +55 -24
  46. ccxt/async_support/coinmetro.py +52 -18
  47. ccxt/async_support/coinone.py +27 -10
  48. ccxt/async_support/coinsph.py +73 -27
  49. ccxt/async_support/coinspot.py +25 -9
  50. ccxt/async_support/cryptocom.py +103 -38
  51. ccxt/async_support/currencycom.py +70 -23
  52. ccxt/async_support/delta.py +90 -30
  53. ccxt/async_support/deribit.py +131 -50
  54. ccxt/async_support/digifinex.py +114 -51
  55. ccxt/async_support/exmo.py +104 -45
  56. ccxt/async_support/gate.py +298 -155
  57. ccxt/async_support/gemini.py +57 -20
  58. ccxt/async_support/hashkey.py +151 -66
  59. ccxt/async_support/hitbtc.py +156 -73
  60. ccxt/async_support/hollaex.py +76 -25
  61. ccxt/async_support/htx.py +297 -240
  62. ccxt/async_support/huobijp.py +1 -0
  63. ccxt/async_support/hyperliquid.py +94 -38
  64. ccxt/async_support/idex.py +73 -24
  65. ccxt/async_support/independentreserve.py +12 -5
  66. ccxt/async_support/indodax.py +53 -16
  67. ccxt/async_support/kraken.py +107 -35
  68. ccxt/async_support/krakenfutures.py +88 -34
  69. ccxt/async_support/kucoin.py +211 -109
  70. ccxt/async_support/kucoinfutures.py +119 -42
  71. ccxt/async_support/kuna.py +80 -39
  72. ccxt/async_support/latoken.py +70 -33
  73. ccxt/async_support/lbank.py +89 -38
  74. ccxt/async_support/luno.py +54 -19
  75. ccxt/async_support/lykke.py +54 -19
  76. ccxt/async_support/mercado.py +1 -0
  77. ccxt/async_support/mexc.py +226 -108
  78. ccxt/async_support/ndax.py +58 -19
  79. ccxt/async_support/novadax.py +67 -22
  80. ccxt/async_support/oceanex.py +58 -19
  81. ccxt/async_support/okcoin.py +81 -38
  82. ccxt/async_support/okx.py +270 -109
  83. ccxt/async_support/onetrading.py +3 -1
  84. ccxt/async_support/oxfun.py +95 -36
  85. ccxt/async_support/p2b.py +49 -23
  86. ccxt/async_support/paradex.py +75 -27
  87. ccxt/async_support/paymium.py +31 -11
  88. ccxt/async_support/phemex.py +91 -41
  89. ccxt/async_support/poloniex.py +80 -30
  90. ccxt/async_support/poloniexfutures.py +72 -30
  91. ccxt/async_support/probit.py +64 -22
  92. ccxt/async_support/timex.py +58 -19
  93. ccxt/async_support/tokocrypto.py +63 -22
  94. ccxt/async_support/tradeogre.py +7 -2
  95. ccxt/async_support/upbit.py +72 -25
  96. ccxt/async_support/vertex.py +74 -28
  97. ccxt/async_support/wavesexchange.py +29 -8
  98. ccxt/async_support/wazirx.py +51 -17
  99. ccxt/async_support/whitebit.py +105 -41
  100. ccxt/async_support/woo.py +162 -65
  101. ccxt/async_support/woofipro.py +118 -49
  102. ccxt/async_support/xt.py +150 -73
  103. ccxt/async_support/yobit.py +49 -16
  104. ccxt/async_support/zaif.py +30 -10
  105. ccxt/async_support/zonda.py +46 -16
  106. ccxt/base/exchange.py +34 -34
  107. ccxt/base/types.py +1 -0
  108. ccxt/bigone.py +71 -27
  109. ccxt/binance.py +555 -323
  110. ccxt/bingx.py +208 -108
  111. ccxt/bit2c.py +34 -12
  112. ccxt/bitbank.py +42 -14
  113. ccxt/bitbns.py +17 -9
  114. ccxt/bitfinex.py +68 -24
  115. ccxt/bitfinex2.py +116 -44
  116. ccxt/bitflyer.py +54 -18
  117. ccxt/bitget.py +277 -145
  118. ccxt/bithumb.py +39 -14
  119. ccxt/bitmart.py +145 -79
  120. ccxt/bitmex.py +90 -30
  121. ccxt/bitopro.py +66 -22
  122. ccxt/bitrue.py +109 -57
  123. ccxt/bitso.py +55 -19
  124. ccxt/bitstamp.py +84 -36
  125. ccxt/bitteam.py +51 -17
  126. ccxt/bitvavo.py +57 -19
  127. ccxt/bl3p.py +26 -10
  128. ccxt/blockchaincom.py +63 -21
  129. ccxt/blofin.py +95 -38
  130. ccxt/btcalpha.py +48 -16
  131. ccxt/btcbox.py +27 -9
  132. ccxt/btcmarkets.py +57 -19
  133. ccxt/btcturk.py +36 -12
  134. ccxt/bybit.py +251 -95
  135. ccxt/cex.py +65 -22
  136. ccxt/coinbase.py +138 -56
  137. ccxt/coinbaseexchange.py +76 -28
  138. ccxt/coinbaseinternational.py +75 -27
  139. ccxt/coincatch.py +191 -97
  140. ccxt/coincheck.py +33 -11
  141. ccxt/coinex.py +212 -101
  142. ccxt/coinlist.py +87 -30
  143. ccxt/coinmate.py +55 -24
  144. ccxt/coinmetro.py +52 -18
  145. ccxt/coinone.py +27 -10
  146. ccxt/coinsph.py +73 -27
  147. ccxt/coinspot.py +25 -9
  148. ccxt/cryptocom.py +103 -38
  149. ccxt/currencycom.py +70 -23
  150. ccxt/delta.py +90 -30
  151. ccxt/deribit.py +131 -50
  152. ccxt/digifinex.py +114 -51
  153. ccxt/exmo.py +104 -45
  154. ccxt/gate.py +298 -155
  155. ccxt/gemini.py +57 -20
  156. ccxt/hashkey.py +151 -66
  157. ccxt/hitbtc.py +156 -73
  158. ccxt/hollaex.py +76 -25
  159. ccxt/htx.py +297 -240
  160. ccxt/huobijp.py +1 -0
  161. ccxt/hyperliquid.py +94 -38
  162. ccxt/idex.py +73 -24
  163. ccxt/independentreserve.py +12 -5
  164. ccxt/indodax.py +53 -16
  165. ccxt/kraken.py +107 -35
  166. ccxt/krakenfutures.py +88 -34
  167. ccxt/kucoin.py +211 -109
  168. ccxt/kucoinfutures.py +119 -42
  169. ccxt/kuna.py +80 -39
  170. ccxt/latoken.py +70 -33
  171. ccxt/lbank.py +89 -38
  172. ccxt/luno.py +54 -19
  173. ccxt/lykke.py +54 -19
  174. ccxt/mercado.py +1 -0
  175. ccxt/mexc.py +226 -108
  176. ccxt/ndax.py +58 -19
  177. ccxt/novadax.py +67 -22
  178. ccxt/oceanex.py +58 -19
  179. ccxt/okcoin.py +81 -38
  180. ccxt/okx.py +270 -109
  181. ccxt/onetrading.py +3 -1
  182. ccxt/oxfun.py +95 -36
  183. ccxt/p2b.py +49 -23
  184. ccxt/paradex.py +75 -27
  185. ccxt/paymium.py +31 -11
  186. ccxt/phemex.py +91 -41
  187. ccxt/poloniex.py +80 -30
  188. ccxt/poloniexfutures.py +72 -30
  189. ccxt/pro/__init__.py +1 -1
  190. ccxt/pro/alpaca.py +15 -5
  191. ccxt/pro/ascendex.py +18 -6
  192. ccxt/pro/binance.py +200 -119
  193. ccxt/pro/bingx.py +44 -24
  194. ccxt/pro/bitfinex.py +13 -5
  195. ccxt/pro/bitget.py +75 -36
  196. ccxt/pro/bithumb.py +12 -4
  197. ccxt/pro/bitmart.py +44 -20
  198. ccxt/pro/bitmex.py +42 -14
  199. ccxt/pro/bitopro.py +15 -5
  200. ccxt/pro/bitrue.py +7 -3
  201. ccxt/pro/bitvavo.py +51 -17
  202. ccxt/pro/blockchaincom.py +18 -6
  203. ccxt/pro/blofin.py +36 -12
  204. ccxt/pro/bybit.py +100 -42
  205. ccxt/pro/cex.py +48 -16
  206. ccxt/pro/coinbase.py +32 -12
  207. ccxt/pro/coinbaseexchange.py +1 -1
  208. ccxt/pro/coinbaseinternational.py +34 -14
  209. ccxt/pro/coincatch.py +54 -19
  210. ccxt/pro/coincheck.py +6 -2
  211. ccxt/pro/coinex.py +40 -20
  212. ccxt/pro/coinone.py +9 -3
  213. ccxt/pro/cryptocom.py +70 -26
  214. ccxt/pro/deribit.py +36 -12
  215. ccxt/pro/exmo.py +10 -4
  216. ccxt/pro/gate.py +64 -30
  217. ccxt/pro/gemini.py +21 -7
  218. ccxt/pro/hashkey.py +26 -8
  219. ccxt/pro/hitbtc.py +61 -37
  220. ccxt/pro/hollaex.py +15 -5
  221. ccxt/pro/htx.py +39 -21
  222. ccxt/pro/hyperliquid.py +41 -14
  223. ccxt/pro/kraken.py +49 -17
  224. ccxt/pro/krakenfutures.py +47 -24
  225. ccxt/pro/kucoin.py +60 -31
  226. ccxt/pro/kucoinfutures.py +41 -19
  227. ccxt/pro/lbank.py +27 -9
  228. ccxt/pro/luno.py +3 -1
  229. ccxt/pro/mexc.py +35 -17
  230. ccxt/pro/ndax.py +12 -4
  231. ccxt/pro/okcoin.py +18 -6
  232. ccxt/pro/okx.py +76 -28
  233. ccxt/pro/onetrading.py +21 -7
  234. ccxt/pro/oxfun.py +54 -20
  235. ccxt/pro/p2b.py +23 -11
  236. ccxt/pro/paradex.py +12 -4
  237. ccxt/pro/phemex.py +31 -19
  238. ccxt/pro/poloniex.py +50 -22
  239. ccxt/pro/poloniexfutures.py +17 -7
  240. ccxt/pro/probit.py +18 -6
  241. ccxt/pro/upbit.py +25 -9
  242. ccxt/pro/vertex.py +20 -6
  243. ccxt/pro/wazirx.py +21 -7
  244. ccxt/pro/whitebit.py +25 -9
  245. ccxt/pro/woo.py +32 -12
  246. ccxt/pro/woofipro.py +35 -13
  247. ccxt/pro/xt.py +46 -26
  248. ccxt/probit.py +64 -22
  249. ccxt/timex.py +58 -19
  250. ccxt/tokocrypto.py +63 -22
  251. ccxt/tradeogre.py +7 -2
  252. ccxt/upbit.py +72 -25
  253. ccxt/vertex.py +74 -28
  254. ccxt/wavesexchange.py +29 -8
  255. ccxt/wazirx.py +51 -17
  256. ccxt/whitebit.py +105 -41
  257. ccxt/woo.py +162 -65
  258. ccxt/woofipro.py +118 -49
  259. ccxt/xt.py +150 -73
  260. ccxt/yobit.py +49 -16
  261. ccxt/zaif.py +30 -10
  262. ccxt/zonda.py +46 -16
  263. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
  264. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/RECORD +267 -267
  265. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
  266. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
  267. {ccxt-4.4.30.dist-info → ccxt-4.4.31.dist-info}/top_level.txt +0 -0
ccxt/kucoin.py CHANGED
@@ -1008,7 +1008,9 @@ class kucoin(Exchange, ImplicitAPI):
1008
1008
  def fetch_time(self, params={}):
1009
1009
  """
1010
1010
  fetches the current integer timestamp in milliseconds from the exchange server
1011
- :see: https://docs.kucoin.com/#server-time
1011
+
1012
+ https://docs.kucoin.com/#server-time
1013
+
1012
1014
  :param dict [params]: extra parameters specific to the exchange API endpoint
1013
1015
  :returns int: the current integer timestamp in milliseconds from the exchange server
1014
1016
  """
@@ -1025,7 +1027,9 @@ class kucoin(Exchange, ImplicitAPI):
1025
1027
  def fetch_status(self, params={}):
1026
1028
  """
1027
1029
  the latest known information on the availability of the exchange API
1028
- :see: https://docs.kucoin.com/#service-status
1030
+
1031
+ https://docs.kucoin.com/#service-status
1032
+
1029
1033
  :param dict [params]: extra parameters specific to the exchange API endpoint
1030
1034
  :returns dict: a `status structure <https://docs.ccxt.com/#/?id=exchange-status-structure>`
1031
1035
  """
@@ -1052,8 +1056,10 @@ class kucoin(Exchange, ImplicitAPI):
1052
1056
  def fetch_markets(self, params={}) -> List[Market]:
1053
1057
  """
1054
1058
  retrieves data on all markets for kucoin
1055
- :see: https://docs.kucoin.com/#get-symbols-list-deprecated
1056
- :see: https://docs.kucoin.com/#get-all-tickers
1059
+
1060
+ https://docs.kucoin.com/#get-symbols-list-deprecated
1061
+ https://docs.kucoin.com/#get-all-tickers
1062
+
1057
1063
  :param dict [params]: extra parameters specific to the exchange API endpoint
1058
1064
  :returns dict[]: an array of objects representing market data
1059
1065
  """
@@ -1238,8 +1244,11 @@ class kucoin(Exchange, ImplicitAPI):
1238
1244
 
1239
1245
  def load_migration_status(self, force: bool = False):
1240
1246
  """
1247
+ @param force
1241
1248
  loads the migration status for the account(hf or not)
1242
- :see: https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/get-user-type
1249
+
1250
+ https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/get-user-type
1251
+
1243
1252
  """
1244
1253
  if not ('hf' in self.options) or (self.options['hf'] is None) or force:
1245
1254
  result: dict = self.privateGetHfAccountsOpened()
@@ -1260,7 +1269,9 @@ class kucoin(Exchange, ImplicitAPI):
1260
1269
  def fetch_currencies(self, params={}) -> Currencies:
1261
1270
  """
1262
1271
  fetches all available currencies on an exchange
1263
- :see: https://docs.kucoin.com/#get-currencies
1272
+
1273
+ https://docs.kucoin.com/#get-currencies
1274
+
1264
1275
  :param dict params: extra parameters specific to the exchange API endpoint
1265
1276
  :returns dict: an associative dictionary of currencies
1266
1277
  """
@@ -1414,7 +1425,9 @@ class kucoin(Exchange, ImplicitAPI):
1414
1425
  def fetch_accounts(self, params={}) -> List[Account]:
1415
1426
  """
1416
1427
  fetch all the accounts associated with a profile
1417
- :see: https://docs.kucoin.com/#list-accounts
1428
+
1429
+ https://docs.kucoin.com/#list-accounts
1430
+
1418
1431
  :param dict [params]: extra parameters specific to the exchange API endpoint
1419
1432
  :returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
1420
1433
  """
@@ -1462,7 +1475,9 @@ class kucoin(Exchange, ImplicitAPI):
1462
1475
  def fetch_transaction_fee(self, code: str, params={}):
1463
1476
  """
1464
1477
  *DEPRECATED* please use fetchDepositWithdrawFee instead
1465
- :see: https://docs.kucoin.com/#get-withdrawal-quotas
1478
+
1479
+ https://docs.kucoin.com/#get-withdrawal-quotas
1480
+
1466
1481
  :param str code: unified currency code
1467
1482
  :param dict params: extra parameters specific to the exchange API endpoint
1468
1483
  :returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -1489,7 +1504,9 @@ class kucoin(Exchange, ImplicitAPI):
1489
1504
  def fetch_deposit_withdraw_fee(self, code: str, params={}):
1490
1505
  """
1491
1506
  fetch the fee for deposits and withdrawals
1492
- :see: https://docs.kucoin.com/#get-withdrawal-quotas
1507
+
1508
+ https://docs.kucoin.com/#get-withdrawal-quotas
1509
+
1493
1510
  :param str code: unified currency code
1494
1511
  :param dict [params]: extra parameters specific to the exchange API endpoint
1495
1512
  :param str [params.network]: The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency; you can query the chain through the response of the GET /api/v2/currencies/{currency} interface
@@ -1677,7 +1694,9 @@ class kucoin(Exchange, ImplicitAPI):
1677
1694
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
1678
1695
  """
1679
1696
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1680
- :see: https://docs.kucoin.com/#get-all-tickers
1697
+
1698
+ https://docs.kucoin.com/#get-all-tickers
1699
+
1681
1700
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1682
1701
  :param dict [params]: extra parameters specific to the exchange API endpoint
1683
1702
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -1728,7 +1747,9 @@ class kucoin(Exchange, ImplicitAPI):
1728
1747
  def fetch_mark_prices(self, symbols: Strings = None, params={}) -> Tickers:
1729
1748
  """
1730
1749
  fetches the mark price for multiple markets
1731
- :see: https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-all-margin-trading-pairs-mark-prices
1750
+
1751
+ https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-all-margin-trading-pairs-mark-prices
1752
+
1732
1753
  :param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1733
1754
  :param dict [params]: extra parameters specific to the exchange API endpoint
1734
1755
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -1742,7 +1763,9 @@ class kucoin(Exchange, ImplicitAPI):
1742
1763
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
1743
1764
  """
1744
1765
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1745
- :see: https://docs.kucoin.com/#get-24hr-stats
1766
+
1767
+ https://docs.kucoin.com/#get-24hr-stats
1768
+
1746
1769
  :param str symbol: unified symbol of the market to fetch the ticker for
1747
1770
  :param dict [params]: extra parameters specific to the exchange API endpoint
1748
1771
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -1782,7 +1805,9 @@ class kucoin(Exchange, ImplicitAPI):
1782
1805
  def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
1783
1806
  """
1784
1807
  fetches the mark price for a specific market
1785
- :see: https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-mark-price
1808
+
1809
+ https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-mark-price
1810
+
1786
1811
  :param str symbol: unified symbol of the market to fetch the ticker for
1787
1812
  :param dict [params]: extra parameters specific to the exchange API endpoint
1788
1813
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -1821,7 +1846,9 @@ class kucoin(Exchange, ImplicitAPI):
1821
1846
  def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
1822
1847
  """
1823
1848
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1824
- :see: https://docs.kucoin.com/#get-klines
1849
+
1850
+ https://docs.kucoin.com/#get-klines
1851
+
1825
1852
  :param str symbol: unified symbol of the market to fetch OHLCV data for
1826
1853
  :param str timeframe: the length of time each candle represents
1827
1854
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -1872,7 +1899,9 @@ class kucoin(Exchange, ImplicitAPI):
1872
1899
 
1873
1900
  def create_deposit_address(self, code: str, params={}):
1874
1901
  """
1875
- :see: https://www.kucoin.com/docs/rest/funding/deposit/create-deposit-address-v3-
1902
+
1903
+ https://www.kucoin.com/docs/rest/funding/deposit/create-deposit-address-v3-
1904
+
1876
1905
  create a currency deposit address
1877
1906
  :param str code: unified currency code of the currency for the deposit address
1878
1907
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1910,7 +1939,9 @@ class kucoin(Exchange, ImplicitAPI):
1910
1939
  def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1911
1940
  """
1912
1941
  fetch the deposit address for a currency associated with self account
1913
- :see: https://docs.kucoin.com/#get-deposit-addresses-v2
1942
+
1943
+ https://docs.kucoin.com/#get-deposit-addresses-v2
1944
+
1914
1945
  :param str code: unified currency code
1915
1946
  :param dict [params]: extra parameters specific to the exchange API endpoint
1916
1947
  :param str [params.network]: the blockchain network name
@@ -1960,7 +1991,9 @@ class kucoin(Exchange, ImplicitAPI):
1960
1991
 
1961
1992
  def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
1962
1993
  """
1963
- :see: https://docs.kucoin.com/#get-deposit-addresses-v2
1994
+
1995
+ https://docs.kucoin.com/#get-deposit-addresses-v2
1996
+
1964
1997
  fetch the deposit address for a currency associated with self account
1965
1998
  :param str code: unified currency code
1966
1999
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1999,8 +2032,10 @@ class kucoin(Exchange, ImplicitAPI):
1999
2032
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
2000
2033
  """
2001
2034
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
2002
- :see: https://www.kucoin.com/docs/rest/spot-trading/market-data/get-part-order-book-aggregated-
2003
- :see: https://www.kucoin.com/docs/rest/spot-trading/market-data/get-full-order-book-aggregated-
2035
+
2036
+ https://www.kucoin.com/docs/rest/spot-trading/market-data/get-part-order-book-aggregated-
2037
+ https://www.kucoin.com/docs/rest/spot-trading/market-data/get-full-order-book-aggregated-
2038
+
2004
2039
  :param str symbol: unified symbol of the market to fetch the order book for
2005
2040
  :param int [limit]: the maximum amount of order book entries to return
2006
2041
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2074,13 +2109,15 @@ class kucoin(Exchange, ImplicitAPI):
2074
2109
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
2075
2110
  """
2076
2111
  Create an order on the exchange
2077
- :see: https://docs.kucoin.com/spot#place-a-new-order
2078
- :see: https://docs.kucoin.com/spot#place-a-new-order-2
2079
- :see: https://docs.kucoin.com/spot#place-a-margin-order
2080
- :see: https://docs.kucoin.com/spot-hf/#place-hf-order
2081
- :see: https://www.kucoin.com/docs/rest/spot-trading/orders/place-order-test
2082
- :see: https://www.kucoin.com/docs/rest/margin-trading/orders/place-margin-order-test
2083
- :see: https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-hf-order
2112
+
2113
+ https://docs.kucoin.com/spot#place-a-new-order
2114
+ https://docs.kucoin.com/spot#place-a-new-order-2
2115
+ https://docs.kucoin.com/spot#place-a-margin-order
2116
+ https://docs.kucoin.com/spot-hf/#place-hf-order
2117
+ https://www.kucoin.com/docs/rest/spot-trading/orders/place-order-test
2118
+ https://www.kucoin.com/docs/rest/margin-trading/orders/place-margin-order-test
2119
+ https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-hf-order
2120
+
2084
2121
  :param str symbol: Unified CCXT market symbol
2085
2122
  :param str type: 'limit' or 'market'
2086
2123
  :param str side: 'buy' or 'sell'
@@ -2091,21 +2128,21 @@ class kucoin(Exchange, ImplicitAPI):
2091
2128
  :param str [params.marginMode]: 'cross', # cross(cross mode) and isolated(isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned
2092
2129
  :param str [params.timeInForce]: GTC, GTT, IOC, or FOK, default is GTC, limit orders only
2093
2130
  :param str [params.postOnly]: Post only flag, invalid when timeInForce is IOC or FOK
2094
- *
2095
- * EXCHANGE SPECIFIC PARAMETERS
2131
+
2132
+ EXCHANGE SPECIFIC PARAMETERS
2096
2133
  :param str [params.clientOid]: client order id, defaults to uuid if not passed
2097
2134
  :param str [params.remark]: remark for the order, length cannot exceed 100 utf8 characters
2098
2135
  :param str [params.tradeType]: 'TRADE', # TRADE, MARGIN_TRADE # not used with margin orders
2099
- * limit orders ---------------------------------------------------
2136
+ limit orders ---------------------------------------------------
2100
2137
  :param float [params.cancelAfter]: long, # cancel after n seconds, requires timeInForce to be GTT
2101
2138
  :param bool [params.hidden]: False, # Order will not be displayed in the order book
2102
2139
  :param bool [params.iceberg]: False, # Only a portion of the order is displayed in the order book
2103
2140
  :param str [params.visibleSize]: self.amount_to_precision(symbol, visibleSize), # The maximum visible size of an iceberg order
2104
- * market orders --------------------------------------------------
2141
+ market orders --------------------------------------------------
2105
2142
  :param str [params.funds]: # Amount of quote currency to use
2106
- * stop orders ----------------------------------------------------
2143
+ stop orders ----------------------------------------------------
2107
2144
  :param str [params.stop]: Either loss or entry, the default is loss. Requires stopPrice to be defined
2108
- * margin orders --------------------------------------------------
2145
+ margin orders --------------------------------------------------
2109
2146
  :param float [params.leverage]: Leverage size of the order
2110
2147
  :param str [params.stp]: '', # self trade prevention, CN, CO, CB or DC
2111
2148
  :param bool [params.autoBorrow]: False, # The system will first borrow you funds at the optimal interest rate and then place an order for you
@@ -2162,7 +2199,9 @@ class kucoin(Exchange, ImplicitAPI):
2162
2199
  def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={}):
2163
2200
  """
2164
2201
  create a market order by providing the symbol, side and cost
2165
- :see: https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2202
+
2203
+ https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2204
+
2166
2205
  :param str symbol: unified symbol of the market to create an order in
2167
2206
  :param str side: 'buy' or 'sell'
2168
2207
  :param float cost: how much you want to trade in units of the quote currency
@@ -2176,7 +2215,9 @@ class kucoin(Exchange, ImplicitAPI):
2176
2215
  def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
2177
2216
  """
2178
2217
  create a market buy order by providing the symbol and cost
2179
- :see: https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2218
+
2219
+ https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2220
+
2180
2221
  :param str symbol: unified symbol of the market to create an order in
2181
2222
  :param float cost: how much you want to trade in units of the quote currency
2182
2223
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2188,7 +2229,9 @@ class kucoin(Exchange, ImplicitAPI):
2188
2229
  def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
2189
2230
  """
2190
2231
  create a market sell order by providing the symbol and cost
2191
- :see: https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2232
+
2233
+ https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2234
+
2192
2235
  :param str symbol: unified symbol of the market to create an order in
2193
2236
  :param float cost: how much you want to trade in units of the quote currency
2194
2237
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2200,9 +2243,11 @@ class kucoin(Exchange, ImplicitAPI):
2200
2243
  def create_orders(self, orders: List[OrderRequest], params={}):
2201
2244
  """
2202
2245
  create a list of trade orders
2203
- :see: https://www.kucoin.com/docs/rest/spot-trading/orders/place-multiple-orders
2204
- :see: https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/place-multiple-hf-orders
2205
- :see: https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-multiple-hf-orders
2246
+
2247
+ https://www.kucoin.com/docs/rest/spot-trading/orders/place-multiple-orders
2248
+ https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/place-multiple-hf-orders
2249
+ https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-multiple-hf-orders
2250
+
2206
2251
  :param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
2207
2252
  :param dict [params]: extra parameters specific to the exchange API endpoint
2208
2253
  :param bool [params.hf]: False, # True for hf orders
@@ -2346,7 +2391,9 @@ class kucoin(Exchange, ImplicitAPI):
2346
2391
  def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
2347
2392
  """
2348
2393
  edit an order, kucoin currently only supports the modification of HF orders
2349
- :see: https://docs.kucoin.com/spot-hf/#modify-order
2394
+
2395
+ https://docs.kucoin.com/spot-hf/#modify-order
2396
+
2350
2397
  :param str id: order id
2351
2398
  :param str symbol: unified symbol of the market to create an order in
2352
2399
  :param str type: not used
@@ -2386,14 +2433,16 @@ class kucoin(Exchange, ImplicitAPI):
2386
2433
  def cancel_order(self, id: str, symbol: Str = None, params={}):
2387
2434
  """
2388
2435
  cancels an open order
2389
- :see: https://docs.kucoin.com/spot#cancel-an-order
2390
- :see: https://docs.kucoin.com/spot#cancel-an-order-2
2391
- :see: https://docs.kucoin.com/spot#cancel-single-order-by-clientoid
2392
- :see: https://docs.kucoin.com/spot#cancel-single-order-by-clientoid-2
2393
- :see: https://docs.kucoin.com/spot-hf/#cancel-orders-by-orderid
2394
- :see: https://docs.kucoin.com/spot-hf/#cancel-order-by-clientoid
2395
- :see: https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-orderid
2396
- :see: https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-clientoid
2436
+
2437
+ https://docs.kucoin.com/spot#cancel-an-order
2438
+ https://docs.kucoin.com/spot#cancel-an-order-2
2439
+ https://docs.kucoin.com/spot#cancel-single-order-by-clientoid
2440
+ https://docs.kucoin.com/spot#cancel-single-order-by-clientoid-2
2441
+ https://docs.kucoin.com/spot-hf/#cancel-orders-by-orderid
2442
+ https://docs.kucoin.com/spot-hf/#cancel-order-by-clientoid
2443
+ https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-orderid
2444
+ https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-clientoid
2445
+
2397
2446
  :param str id: order id
2398
2447
  :param str symbol: unified symbol of the market the order was made in
2399
2448
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2499,15 +2548,16 @@ class kucoin(Exchange, ImplicitAPI):
2499
2548
  def cancel_all_orders(self, symbol: Str = None, params={}):
2500
2549
  """
2501
2550
  cancel all open orders
2502
- :see: https://docs.kucoin.com/spot#cancel-all-orders
2503
- :see: https://docs.kucoin.com/spot#cancel-orders
2504
- :see: https://docs.kucoin.com/spot-hf/#cancel-all-hf-orders-by-symbol
2551
+
2552
+ https://docs.kucoin.com/spot#cancel-all-orders
2553
+ https://docs.kucoin.com/spot#cancel-orders
2554
+ https://docs.kucoin.com/spot-hf/#cancel-all-hf-orders-by-symbol
2555
+
2505
2556
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
2506
2557
  :param dict [params]: extra parameters specific to the exchange API endpoint
2507
2558
  :param bool [params.stop]: *invalid for isolated margin* True if cancelling all stop orders
2508
2559
  :param str [params.marginMode]: 'cross' or 'isolated'
2509
2560
  :param str [params.orderIds]: *stop orders only* Comma seperated order IDs
2510
- :param bool [params.stop]: True if cancelling a stop order
2511
2561
  :param bool [params.hf]: False, # True for hf order
2512
2562
  :returns: Response from the exchange
2513
2563
  """
@@ -2539,17 +2589,18 @@ class kucoin(Exchange, ImplicitAPI):
2539
2589
  def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2540
2590
  """
2541
2591
  fetch a list of orders
2542
- :see: https://docs.kucoin.com/spot#list-orders
2543
- :see: https://docs.kucoin.com/spot#list-stop-orders
2544
- :see: https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2545
- :see: https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2592
+
2593
+ https://docs.kucoin.com/spot#list-orders
2594
+ https://docs.kucoin.com/spot#list-stop-orders
2595
+ https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2596
+ https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2597
+
2546
2598
  :param str status: *not used for stop orders* 'open' or 'closed'
2547
2599
  :param str symbol: unified market symbol
2548
2600
  :param int [since]: timestamp in ms of the earliest order
2549
2601
  :param int [limit]: max number of orders to return
2550
2602
  :param dict [params]: exchange specific params
2551
2603
  :param int [params.until]: end time in ms
2552
- :param bool [params.stop]: True if fetching stop orders
2553
2604
  :param str [params.side]: buy or sell
2554
2605
  :param str [params.type]: limit, market, limit_stop or market_stop
2555
2606
  :param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
@@ -2650,10 +2701,12 @@ class kucoin(Exchange, ImplicitAPI):
2650
2701
  def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2651
2702
  """
2652
2703
  fetches information on multiple closed orders made by the user
2653
- :see: https://docs.kucoin.com/spot#list-orders
2654
- :see: https://docs.kucoin.com/spot#list-stop-orders
2655
- :see: https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2656
- :see: https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2704
+
2705
+ https://docs.kucoin.com/spot#list-orders
2706
+ https://docs.kucoin.com/spot#list-stop-orders
2707
+ https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2708
+ https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2709
+
2657
2710
  :param str symbol: unified market symbol of the market orders were made in
2658
2711
  :param int [since]: the earliest time in ms to fetch orders for
2659
2712
  :param int [limit]: the maximum number of order structures to retrieve
@@ -2677,10 +2730,12 @@ class kucoin(Exchange, ImplicitAPI):
2677
2730
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2678
2731
  """
2679
2732
  fetch all unfilled currently open orders
2680
- :see: https://docs.kucoin.com/spot#list-orders
2681
- :see: https://docs.kucoin.com/spot#list-stop-orders
2682
- :see: https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2683
- :see: https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2733
+
2734
+ https://docs.kucoin.com/spot#list-orders
2735
+ https://docs.kucoin.com/spot#list-stop-orders
2736
+ https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2737
+ https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2738
+
2684
2739
  :param str symbol: unified market symbol
2685
2740
  :param int [since]: the earliest time in ms to fetch open orders for
2686
2741
  :param int [limit]: the maximum number of open orders structures to retrieve
@@ -2692,7 +2747,6 @@ class kucoin(Exchange, ImplicitAPI):
2692
2747
  :param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
2693
2748
  :param int [params.currentPage]: *stop orders only* current page
2694
2749
  :param str [params.orderIds]: *stop orders only* comma seperated order ID list
2695
- :param bool [params.stop]: True if fetching a stop order
2696
2750
  :param bool [params.hf]: False, # True for hf order
2697
2751
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2698
2752
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2707,12 +2761,14 @@ class kucoin(Exchange, ImplicitAPI):
2707
2761
  def fetch_order(self, id: str, symbol: Str = None, params={}):
2708
2762
  """
2709
2763
  fetch an order
2710
- :see: https://docs.kucoin.com/spot#get-an-order
2711
- :see: https://docs.kucoin.com/spot#get-single-active-order-by-clientoid
2712
- :see: https://docs.kucoin.com/spot#get-single-order-info
2713
- :see: https://docs.kucoin.com/spot#get-single-order-by-clientoid
2714
- :see: https://docs.kucoin.com/spot-hf/#details-of-a-single-hf-order
2715
- :see: https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
2764
+
2765
+ https://docs.kucoin.com/spot#get-an-order
2766
+ https://docs.kucoin.com/spot#get-single-active-order-by-clientoid
2767
+ https://docs.kucoin.com/spot#get-single-order-info
2768
+ https://docs.kucoin.com/spot#get-single-order-by-clientoid
2769
+ https://docs.kucoin.com/spot-hf/#details-of-a-single-hf-order
2770
+ https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
2771
+
2716
2772
  :param str id: Order id
2717
2773
  :param str symbol: not sent to exchange except for stop orders with clientOid, but used internally by CCXT to filter
2718
2774
  :param dict [params]: exchange specific parameters
@@ -2942,8 +2998,10 @@ class kucoin(Exchange, ImplicitAPI):
2942
2998
  def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2943
2999
  """
2944
3000
  fetch all the trades made from a single order
2945
- :see: https://docs.kucoin.com/#list-fills
2946
- :see: https://docs.kucoin.com/spot-hf/#transaction-details
3001
+
3002
+ https://docs.kucoin.com/#list-fills
3003
+ https://docs.kucoin.com/spot-hf/#transaction-details
3004
+
2947
3005
  :param str id: order id
2948
3006
  :param str symbol: unified market symbol
2949
3007
  :param int [since]: the earliest time in ms to fetch trades for
@@ -2958,8 +3016,10 @@ class kucoin(Exchange, ImplicitAPI):
2958
3016
 
2959
3017
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2960
3018
  """
2961
- :see: https://docs.kucoin.com/#list-fills
2962
- :see: https://docs.kucoin.com/spot-hf/#transaction-details
3019
+
3020
+ https://docs.kucoin.com/#list-fills
3021
+ https://docs.kucoin.com/spot-hf/#transaction-details
3022
+
2963
3023
  fetch all trades made by the user
2964
3024
  :param str symbol: unified market symbol
2965
3025
  :param int [since]: the earliest time in ms to fetch trades for
@@ -3057,7 +3117,9 @@ class kucoin(Exchange, ImplicitAPI):
3057
3117
  def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
3058
3118
  """
3059
3119
  get the list of most recent trades for a particular symbol
3060
- :see: https://www.kucoin.com/docs/rest/spot-trading/market-data/get-trade-histories
3120
+
3121
+ https://www.kucoin.com/docs/rest/spot-trading/market-data/get-trade-histories
3122
+
3061
3123
  :param str symbol: unified symbol of the market to fetch trades for
3062
3124
  :param int [since]: timestamp in ms of the earliest trade to fetch
3063
3125
  :param int [limit]: the maximum amount of trades to fetch
@@ -3222,7 +3284,9 @@ class kucoin(Exchange, ImplicitAPI):
3222
3284
  def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
3223
3285
  """
3224
3286
  fetch the trading fees for a market
3225
- :see: https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-spot-margin-trade_hf
3287
+
3288
+ https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-spot-margin-trade_hf
3289
+
3226
3290
  :param str symbol: unified market symbol
3227
3291
  :param dict [params]: extra parameters specific to the exchange API endpoint
3228
3292
  :returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -3260,7 +3324,9 @@ class kucoin(Exchange, ImplicitAPI):
3260
3324
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
3261
3325
  """
3262
3326
  make a withdrawal
3263
- :see: https://www.kucoin.com/docs/rest/funding/withdrawals/apply-withdraw-v3-
3327
+
3328
+ https://www.kucoin.com/docs/rest/funding/withdrawals/apply-withdraw-v3-
3329
+
3264
3330
  :param str code: unified currency code
3265
3331
  :param float amount: the amount to withdraw
3266
3332
  :param str address: the address to withdraw to
@@ -3422,8 +3488,10 @@ class kucoin(Exchange, ImplicitAPI):
3422
3488
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3423
3489
  """
3424
3490
  fetch all deposits made to an account
3425
- :see: https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-list
3426
- :see: https://www.kucoin.com/docs/rest/funding/deposit/get-v1-historical-deposits-list
3491
+
3492
+ https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-list
3493
+ https://www.kucoin.com/docs/rest/funding/deposit/get-v1-historical-deposits-list
3494
+
3427
3495
  :param str code: unified currency code
3428
3496
  :param int [since]: the earliest time in ms to fetch deposits for
3429
3497
  :param int [limit]: the maximum number of deposits structures to retrieve
@@ -3499,8 +3567,10 @@ class kucoin(Exchange, ImplicitAPI):
3499
3567
  def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3500
3568
  """
3501
3569
  fetch all withdrawals made from an account
3502
- :see: https://www.kucoin.com/docs/rest/funding/withdrawals/get-withdrawals-list
3503
- :see: https://www.kucoin.com/docs/rest/funding/withdrawals/get-v1-historical-withdrawals-list
3570
+
3571
+ https://www.kucoin.com/docs/rest/funding/withdrawals/get-withdrawals-list
3572
+ https://www.kucoin.com/docs/rest/funding/withdrawals/get-v1-historical-withdrawals-list
3573
+
3504
3574
  :param str code: unified currency code
3505
3575
  :param int [since]: the earliest time in ms to fetch withdrawals for
3506
3576
  :param int [limit]: the maximum number of withdrawals structures to retrieve
@@ -3587,9 +3657,11 @@ class kucoin(Exchange, ImplicitAPI):
3587
3657
  def fetch_balance(self, params={}) -> Balances:
3588
3658
  """
3589
3659
  query for balance and get the amount of funds available for trading or funds locked in orders
3590
- :see: https://www.kucoin.com/docs/rest/account/basic-info/get-account-list-spot-margin-trade_hf
3591
- :see: https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-margin
3592
- :see: https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-isolated-margin
3660
+
3661
+ https://www.kucoin.com/docs/rest/account/basic-info/get-account-list-spot-margin-trade_hf
3662
+ https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-margin
3663
+ https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-isolated-margin
3664
+
3593
3665
  :param dict [params]: extra parameters specific to the exchange API endpoint
3594
3666
  :param dict [params.marginMode]: 'cross' or 'isolated', margin type for fetching margin balance
3595
3667
  :param dict [params.type]: extra parameters specific to the exchange API endpoint
@@ -3751,9 +3823,11 @@ class kucoin(Exchange, ImplicitAPI):
3751
3823
  def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
3752
3824
  """
3753
3825
  transfer currency internally between wallets on the same account
3754
- :see: https://www.kucoin.com/docs/rest/funding/transfer/inner-transfer
3755
- :see: https://docs.kucoin.com/futures/#transfer-funds-to-kucoin-main-account-2
3756
- :see: https://docs.kucoin.com/spot-hf/#internal-funds-transfers-in-high-frequency-trading-accounts
3826
+
3827
+ https://www.kucoin.com/docs/rest/funding/transfer/inner-transfer
3828
+ https://docs.kucoin.com/futures/#transfer-funds-to-kucoin-main-account-2
3829
+ https://docs.kucoin.com/spot-hf/#internal-funds-transfers-in-high-frequency-trading-accounts
3830
+
3757
3831
  :param str code: unified currency code
3758
3832
  :param float amount: amount to transfer
3759
3833
  :param str fromAccount: account to transfer from
@@ -4020,9 +4094,11 @@ class kucoin(Exchange, ImplicitAPI):
4020
4094
  def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
4021
4095
  """
4022
4096
  fetch the history of changes, actions done by the user or operations that altered the balance of the user
4023
- :see: https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-spot-margin
4024
- :see: https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-trade_hf
4025
- :see: https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-margin_hf
4097
+
4098
+ https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-spot-margin
4099
+ https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-trade_hf
4100
+ https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-margin_hf
4101
+
4026
4102
  :param str [code]: unified currency code, default is None
4027
4103
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
4028
4104
  :param int [limit]: max number of ledger entries to return, default is None
@@ -4156,10 +4232,12 @@ class kucoin(Exchange, ImplicitAPI):
4156
4232
  def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
4157
4233
  """
4158
4234
  fetch the interest owed by the user for borrowing currency for margin trading
4159
- :see: https://docs.kucoin.com/#get-repay-record
4160
- :see: https://docs.kucoin.com/#query-isolated-margin-account-info
4161
- :param str code: unified currency code
4162
- :param str symbol: unified market symbol, required for isolated margin
4235
+
4236
+ https://docs.kucoin.com/#get-repay-record
4237
+ https://docs.kucoin.com/#query-isolated-margin-account-info
4238
+
4239
+ :param str [code]: unified currency code
4240
+ :param str [symbol]: unified market symbol, required for isolated margin
4163
4241
  :param int [since]: the earliest time in ms to fetch borrrow interest for
4164
4242
  :param int [limit]: the maximum number of structures to retrieve
4165
4243
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -4168,14 +4246,19 @@ class kucoin(Exchange, ImplicitAPI):
4168
4246
  """
4169
4247
  self.load_markets()
4170
4248
  marginMode = None
4171
- marginMode, params = self.handle_margin_mode_and_params('fetchBorrowInterest', params)
4172
- if marginMode is None:
4173
- marginMode = 'cross' # cross marginMode
4249
+ marginMode, params = self.handle_margin_mode_and_params('fetchBorrowInterest', params, 'cross')
4174
4250
  request: dict = {}
4175
- response = None
4251
+ currency = None
4176
4252
  if code is not None:
4177
4253
  currency = self.currency(code)
4178
- request['quoteCurrency'] = currency['id']
4254
+ if marginMode == 'isolated':
4255
+ request['balanceCurrency'] = currency['id']
4256
+ else:
4257
+ request['quoteCurrency'] = currency['id']
4258
+ market = None
4259
+ if symbol is not None:
4260
+ market = self.market(symbol)
4261
+ response = None
4179
4262
  if marginMode == 'isolated':
4180
4263
  response = self.privateGetIsolatedAccounts(self.extend(request, params))
4181
4264
  else:
@@ -4246,7 +4329,9 @@ class kucoin(Exchange, ImplicitAPI):
4246
4329
  #
4247
4330
  data = self.safe_dict(response, 'data', {})
4248
4331
  assets = self.safe_list(data, 'assets', []) if (marginMode == 'isolated') else self.safe_list(data, 'accounts', [])
4249
- return self.parse_borrow_interests(assets, None)
4332
+ interest = self.parse_borrow_interests(assets, market)
4333
+ filteredByCurrency = self.filter_by_currency_since_limit(interest, code, since, limit)
4334
+ return self.filter_by_symbol_since_limit(filteredByCurrency, symbol, since, limit)
4250
4335
 
4251
4336
  def parse_borrow_interest(self, info: dict, market: Market = None) -> BorrowInterest:
4252
4337
  #
@@ -4325,7 +4410,9 @@ class kucoin(Exchange, ImplicitAPI):
4325
4410
  def fetch_borrow_rate_histories(self, codes=None, since: Int = None, limit: Int = None, params={}):
4326
4411
  """
4327
4412
  retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is None
4328
- :see: https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
4413
+
4414
+ https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
4415
+
4329
4416
  :param str[]|None codes: list of unified currency codes, default is None
4330
4417
  :param int [since]: timestamp in ms of the earliest borrowRate, default is None
4331
4418
  :param int [limit]: max number of borrow rate prices to return, default is None
@@ -4374,7 +4461,9 @@ class kucoin(Exchange, ImplicitAPI):
4374
4461
  def fetch_borrow_rate_history(self, code: str, since: Int = None, limit: Int = None, params={}):
4375
4462
  """
4376
4463
  retrieves a history of a currencies borrow interest rate at specific time slots
4377
- :see: https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
4464
+
4465
+ https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
4466
+
4378
4467
  :param str code: unified currency code
4379
4468
  :param int [since]: timestamp for the earliest borrow rate
4380
4469
  :param int [limit]: the maximum number of `borrow rate structures <https://docs.ccxt.com/#/?id=borrow-rate-structure>` to retrieve
@@ -4451,7 +4540,9 @@ class kucoin(Exchange, ImplicitAPI):
4451
4540
  def borrow_cross_margin(self, code: str, amount: float, params={}):
4452
4541
  """
4453
4542
  create a loan to borrow margin
4454
- :see: https://docs.kucoin.com/#1-margin-borrowing
4543
+
4544
+ https://docs.kucoin.com/#1-margin-borrowing
4545
+
4455
4546
  :param str code: unified currency code of the currency to borrow
4456
4547
  :param float amount: the amount to borrow
4457
4548
  :param dict [params]: extra parameters specific to the exchange API endpoints
@@ -4484,7 +4575,9 @@ class kucoin(Exchange, ImplicitAPI):
4484
4575
  def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
4485
4576
  """
4486
4577
  create a loan to borrow margin
4487
- :see: https://docs.kucoin.com/#1-margin-borrowing
4578
+
4579
+ https://docs.kucoin.com/#1-margin-borrowing
4580
+
4488
4581
  :param str symbol: unified market symbol, required for isolated margin
4489
4582
  :param str code: unified currency code of the currency to borrow
4490
4583
  :param float amount: the amount to borrow
@@ -4521,7 +4614,9 @@ class kucoin(Exchange, ImplicitAPI):
4521
4614
  def repay_cross_margin(self, code: str, amount, params={}):
4522
4615
  """
4523
4616
  repay borrowed margin and interest
4524
- :see: https://docs.kucoin.com/#2-repayment
4617
+
4618
+ https://docs.kucoin.com/#2-repayment
4619
+
4525
4620
  :param str code: unified currency code of the currency to repay
4526
4621
  :param float amount: the amount to repay
4527
4622
  :param dict [params]: extra parameters specific to the exchange API endpoints
@@ -4552,7 +4647,9 @@ class kucoin(Exchange, ImplicitAPI):
4552
4647
  def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
4553
4648
  """
4554
4649
  repay borrowed margin and interest
4555
- :see: https://docs.kucoin.com/#2-repayment
4650
+
4651
+ https://docs.kucoin.com/#2-repayment
4652
+
4556
4653
  :param str symbol: unified market symbol
4557
4654
  :param str code: unified currency code of the currency to repay
4558
4655
  :param float amount: the amount to repay
@@ -4606,7 +4703,9 @@ class kucoin(Exchange, ImplicitAPI):
4606
4703
  def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
4607
4704
  """
4608
4705
  fetch deposit and withdraw fees - *IMPORTANT* use fetchDepositWithdrawFee to get more in-depth info
4609
- :see: https://docs.kucoin.com/#get-currencies
4706
+
4707
+ https://docs.kucoin.com/#get-currencies
4708
+
4610
4709
  :param str[]|None codes: list of unified currency codes
4611
4710
  :param dict [params]: extra parameters specific to the exchange API endpoint
4612
4711
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -4637,7 +4736,10 @@ class kucoin(Exchange, ImplicitAPI):
4637
4736
  def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4638
4737
  """
4639
4738
  set the level of leverage for a market
4640
- :see: https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/modify-leverage-multiplier
4739
+
4740
+ https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/modify-leverage-multiplier
4741
+
4742
+ @param leverage
4641
4743
  :param str symbol: unified market symbol
4642
4744
  :param dict [params]: extra parameters specific to the exchange API endpoint
4643
4745
  :returns dict: response from the exchange