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