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