ccxt 4.2.30__py2.py3-none-any.whl → 4.2.34__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (244) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/coinbase.py +10 -0
  3. ccxt/abstract/okx.py +12 -1
  4. ccxt/ace.py +4 -3
  5. ccxt/alpaca.py +1 -1
  6. ccxt/ascendex.py +6 -6
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/ace.py +4 -3
  9. ccxt/async_support/alpaca.py +1 -1
  10. ccxt/async_support/ascendex.py +6 -6
  11. ccxt/async_support/base/exchange.py +62 -39
  12. ccxt/async_support/bigone.py +25 -5
  13. ccxt/async_support/binance.py +17 -16
  14. ccxt/async_support/bingx.py +10 -9
  15. ccxt/async_support/bit2c.py +13 -1
  16. ccxt/async_support/bitbank.py +2 -2
  17. ccxt/async_support/bitbns.py +1 -1
  18. ccxt/async_support/bitfinex.py +5 -5
  19. ccxt/async_support/bitfinex2.py +386 -40
  20. ccxt/async_support/bitflyer.py +5 -5
  21. ccxt/async_support/bitforex.py +4 -1
  22. ccxt/async_support/bitget.py +11 -11
  23. ccxt/async_support/bithumb.py +2 -2
  24. ccxt/async_support/bitmart.py +9 -9
  25. ccxt/async_support/bitmex.py +3 -3
  26. ccxt/async_support/bitopro.py +2 -2
  27. ccxt/async_support/bitrue.py +8 -8
  28. ccxt/async_support/bitso.py +4 -4
  29. ccxt/async_support/bitstamp.py +2 -2
  30. ccxt/async_support/bitteam.py +1 -1
  31. ccxt/async_support/bitvavo.py +3 -3
  32. ccxt/async_support/bl3p.py +1 -1
  33. ccxt/async_support/blockchaincom.py +3 -3
  34. ccxt/async_support/btcalpha.py +1 -1
  35. ccxt/async_support/btcbox.py +1 -1
  36. ccxt/async_support/btcmarkets.py +2 -2
  37. ccxt/async_support/btcturk.py +1 -1
  38. ccxt/async_support/bybit.py +9 -9
  39. ccxt/async_support/cex.py +1 -1
  40. ccxt/async_support/coinbase.py +16 -6
  41. ccxt/async_support/coinbasepro.py +2 -2
  42. ccxt/async_support/coincheck.py +1 -1
  43. ccxt/async_support/coinex.py +9 -9
  44. ccxt/async_support/coinlist.py +4 -4
  45. ccxt/async_support/coinmate.py +2 -2
  46. ccxt/async_support/coinmetro.py +2 -2
  47. ccxt/async_support/coinone.py +1 -1
  48. ccxt/async_support/coinsph.py +2 -2
  49. ccxt/async_support/coinspot.py +1 -1
  50. ccxt/async_support/cryptocom.py +14 -14
  51. ccxt/async_support/currencycom.py +1 -1
  52. ccxt/async_support/delta.py +2 -2
  53. ccxt/async_support/deribit.py +5 -4
  54. ccxt/async_support/digifinex.py +6 -6
  55. ccxt/async_support/exmo.py +2 -2
  56. ccxt/async_support/gate.py +41 -37
  57. ccxt/async_support/gemini.py +2 -2
  58. ccxt/async_support/hitbtc.py +5 -5
  59. ccxt/async_support/hollaex.py +2 -2
  60. ccxt/async_support/htx.py +11 -11
  61. ccxt/async_support/huobijp.py +4 -4
  62. ccxt/async_support/idex.py +2 -2
  63. ccxt/async_support/independentreserve.py +2 -2
  64. ccxt/async_support/indodax.py +2 -2
  65. ccxt/async_support/kraken.py +45 -5
  66. ccxt/async_support/krakenfutures.py +8 -5
  67. ccxt/async_support/kucoin.py +8 -8
  68. ccxt/async_support/kucoinfutures.py +4 -4
  69. ccxt/async_support/kuna.py +2 -2
  70. ccxt/async_support/latoken.py +3 -3
  71. ccxt/async_support/lbank.py +5 -4
  72. ccxt/async_support/luno.py +1 -1
  73. ccxt/async_support/lykke.py +2 -2
  74. ccxt/async_support/mercado.py +2 -2
  75. ccxt/async_support/mexc.py +7 -6
  76. ccxt/async_support/ndax.py +2 -2
  77. ccxt/async_support/novadax.py +4 -4
  78. ccxt/async_support/oceanex.py +1 -1
  79. ccxt/async_support/okcoin.py +5 -5
  80. ccxt/async_support/okx.py +26 -12
  81. ccxt/async_support/onetrading.py +2 -2
  82. ccxt/async_support/p2b.py +1 -1
  83. ccxt/async_support/paymium.py +3 -3
  84. ccxt/async_support/phemex.py +13 -13
  85. ccxt/async_support/poloniex.py +4 -4
  86. ccxt/async_support/poloniexfutures.py +4 -1
  87. ccxt/async_support/probit.py +5 -5
  88. ccxt/async_support/timex.py +2 -2
  89. ccxt/async_support/tokocrypto.py +4 -4
  90. ccxt/async_support/upbit.py +2 -2
  91. ccxt/async_support/wavesexchange.py +4 -3
  92. ccxt/async_support/wazirx.py +1 -1
  93. ccxt/async_support/whitebit.py +6 -6
  94. ccxt/async_support/woo.py +6 -6
  95. ccxt/async_support/yobit.py +41 -2
  96. ccxt/async_support/zaif.py +2 -2
  97. ccxt/async_support/zonda.py +4 -4
  98. ccxt/base/exchange.py +77 -44
  99. ccxt/base/types.py +10 -0
  100. ccxt/bigone.py +25 -5
  101. ccxt/binance.py +17 -16
  102. ccxt/bingx.py +10 -9
  103. ccxt/bit2c.py +13 -1
  104. ccxt/bitbank.py +2 -2
  105. ccxt/bitbns.py +1 -1
  106. ccxt/bitfinex.py +5 -5
  107. ccxt/bitfinex2.py +386 -40
  108. ccxt/bitflyer.py +5 -5
  109. ccxt/bitforex.py +4 -1
  110. ccxt/bitget.py +11 -11
  111. ccxt/bithumb.py +2 -2
  112. ccxt/bitmart.py +9 -9
  113. ccxt/bitmex.py +3 -3
  114. ccxt/bitopro.py +2 -2
  115. ccxt/bitrue.py +8 -8
  116. ccxt/bitso.py +4 -4
  117. ccxt/bitstamp.py +2 -2
  118. ccxt/bitteam.py +1 -1
  119. ccxt/bitvavo.py +3 -3
  120. ccxt/bl3p.py +1 -1
  121. ccxt/blockchaincom.py +3 -3
  122. ccxt/btcalpha.py +1 -1
  123. ccxt/btcbox.py +1 -1
  124. ccxt/btcmarkets.py +2 -2
  125. ccxt/btcturk.py +1 -1
  126. ccxt/bybit.py +9 -9
  127. ccxt/cex.py +1 -1
  128. ccxt/coinbase.py +16 -6
  129. ccxt/coinbasepro.py +2 -2
  130. ccxt/coincheck.py +1 -1
  131. ccxt/coinex.py +9 -9
  132. ccxt/coinlist.py +4 -4
  133. ccxt/coinmate.py +2 -2
  134. ccxt/coinmetro.py +2 -2
  135. ccxt/coinone.py +1 -1
  136. ccxt/coinsph.py +2 -2
  137. ccxt/coinspot.py +1 -1
  138. ccxt/cryptocom.py +14 -14
  139. ccxt/currencycom.py +1 -1
  140. ccxt/delta.py +2 -2
  141. ccxt/deribit.py +5 -4
  142. ccxt/digifinex.py +6 -6
  143. ccxt/exmo.py +2 -2
  144. ccxt/gate.py +41 -37
  145. ccxt/gemini.py +2 -2
  146. ccxt/hitbtc.py +5 -5
  147. ccxt/hollaex.py +2 -2
  148. ccxt/htx.py +11 -11
  149. ccxt/huobijp.py +4 -4
  150. ccxt/idex.py +2 -2
  151. ccxt/independentreserve.py +2 -2
  152. ccxt/indodax.py +2 -2
  153. ccxt/kraken.py +45 -5
  154. ccxt/krakenfutures.py +8 -5
  155. ccxt/kucoin.py +8 -8
  156. ccxt/kucoinfutures.py +4 -4
  157. ccxt/kuna.py +2 -2
  158. ccxt/latoken.py +3 -3
  159. ccxt/lbank.py +5 -4
  160. ccxt/luno.py +1 -1
  161. ccxt/lykke.py +2 -2
  162. ccxt/mercado.py +2 -2
  163. ccxt/mexc.py +7 -6
  164. ccxt/ndax.py +2 -2
  165. ccxt/novadax.py +4 -4
  166. ccxt/oceanex.py +1 -1
  167. ccxt/okcoin.py +5 -5
  168. ccxt/okx.py +26 -12
  169. ccxt/onetrading.py +2 -2
  170. ccxt/p2b.py +1 -1
  171. ccxt/paymium.py +3 -3
  172. ccxt/phemex.py +13 -13
  173. ccxt/poloniex.py +4 -4
  174. ccxt/poloniexfutures.py +4 -1
  175. ccxt/pro/__init__.py +1 -1
  176. ccxt/pro/alpaca.py +8 -4
  177. ccxt/pro/ascendex.py +1 -2
  178. ccxt/pro/binance.py +14 -10
  179. ccxt/pro/bingx.py +1 -1
  180. ccxt/pro/bitfinex.py +21 -22
  181. ccxt/pro/bitfinex2.py +13 -15
  182. ccxt/pro/bitget.py +3 -1
  183. ccxt/pro/bitmart.py +3 -7
  184. ccxt/pro/bitmex.py +4 -6
  185. ccxt/pro/bitopro.py +2 -4
  186. ccxt/pro/bitrue.py +1 -1
  187. ccxt/pro/bitstamp.py +2 -3
  188. ccxt/pro/bitvavo.py +10 -5
  189. ccxt/pro/blockchaincom.py +22 -22
  190. ccxt/pro/bybit.py +5 -5
  191. ccxt/pro/cex.py +7 -7
  192. ccxt/pro/coinbase.py +3 -2
  193. ccxt/pro/coinbasepro.py +1 -1
  194. ccxt/pro/coinex.py +15 -13
  195. ccxt/pro/currencycom.py +5 -6
  196. ccxt/pro/deribit.py +4 -4
  197. ccxt/pro/exmo.py +15 -13
  198. ccxt/pro/gate.py +1 -1
  199. ccxt/pro/gemini.py +4 -2
  200. ccxt/pro/hitbtc.py +10 -9
  201. ccxt/pro/hollaex.py +2 -2
  202. ccxt/pro/htx.py +6 -6
  203. ccxt/pro/huobijp.py +3 -4
  204. ccxt/pro/idex.py +1 -1
  205. ccxt/pro/independentreserve.py +14 -13
  206. ccxt/pro/kraken.py +10 -14
  207. ccxt/pro/krakenfutures.py +10 -6
  208. ccxt/pro/kucoin.py +10 -10
  209. ccxt/pro/kucoinfutures.py +11 -10
  210. ccxt/pro/lbank.py +10 -10
  211. ccxt/pro/luno.py +12 -14
  212. ccxt/pro/mexc.py +3 -2
  213. ccxt/pro/ndax.py +7 -11
  214. ccxt/pro/okcoin.py +7 -10
  215. ccxt/pro/okx.py +6 -9
  216. ccxt/pro/onetrading.py +16 -15
  217. ccxt/pro/p2b.py +5 -3
  218. ccxt/pro/phemex.py +16 -11
  219. ccxt/pro/poloniex.py +6 -4
  220. ccxt/pro/poloniexfutures.py +13 -9
  221. ccxt/pro/probit.py +15 -12
  222. ccxt/pro/upbit.py +8 -8
  223. ccxt/pro/wazirx.py +6 -3
  224. ccxt/pro/woo.py +9 -7
  225. ccxt/probit.py +5 -5
  226. ccxt/test/base/test_order_book.py +7 -7
  227. ccxt/test/base/test_shared_methods.py +1 -1
  228. ccxt/test/test_async.py +86 -36
  229. ccxt/test/test_sync.py +86 -36
  230. ccxt/timex.py +2 -2
  231. ccxt/tokocrypto.py +4 -4
  232. ccxt/upbit.py +2 -2
  233. ccxt/wavesexchange.py +4 -3
  234. ccxt/wazirx.py +1 -1
  235. ccxt/whitebit.py +6 -6
  236. ccxt/woo.py +6 -6
  237. ccxt/yobit.py +41 -2
  238. ccxt/zaif.py +2 -2
  239. ccxt/zonda.py +4 -4
  240. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/METADATA +10 -10
  241. ccxt-4.2.34.dist-info/RECORD +438 -0
  242. ccxt-4.2.30.dist-info/RECORD +0 -438
  243. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/WHEEL +0 -0
  244. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/top_level.txt +0 -0
ccxt/gate.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.gate import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -1590,32 +1590,33 @@ class gate(Exchange, ImplicitAPI):
1590
1590
  withdrawAvailable = self.safe_value(result[code], 'withdraw')
1591
1591
  withdrawAvailable = withdrawEnabled if (withdrawEnabled) else withdrawAvailable
1592
1592
  networks = self.safe_value(result[code], 'networks', {})
1593
- networks[networkCode] = {
1594
- 'info': entry,
1595
- 'id': networkId,
1596
- 'network': networkCode,
1597
- 'currencyId': currencyId,
1598
- 'lowerCaseCurrencyId': currencyIdLower,
1599
- 'deposit': depositEnabled,
1600
- 'withdraw': withdrawEnabled,
1601
- 'active': active,
1602
- 'fee': None,
1603
- 'precision': self.parse_number('1e-4'),
1604
- 'limits': {
1605
- 'amount': {
1606
- 'min': None,
1607
- 'max': None,
1608
- },
1609
- 'withdraw': {
1610
- 'min': None,
1611
- 'max': None,
1612
- },
1613
- 'deposit': {
1614
- 'min': None,
1615
- 'max': None,
1593
+ if networkCode is not None:
1594
+ networks[networkCode] = {
1595
+ 'info': entry,
1596
+ 'id': networkId,
1597
+ 'network': networkCode,
1598
+ 'currencyId': currencyId,
1599
+ 'lowerCaseCurrencyId': currencyIdLower,
1600
+ 'deposit': depositEnabled,
1601
+ 'withdraw': withdrawEnabled,
1602
+ 'active': active,
1603
+ 'fee': None,
1604
+ 'precision': self.parse_number('1e-4'),
1605
+ 'limits': {
1606
+ 'amount': {
1607
+ 'min': None,
1608
+ 'max': None,
1609
+ },
1610
+ 'withdraw': {
1611
+ 'min': None,
1612
+ 'max': None,
1613
+ },
1614
+ 'deposit': {
1615
+ 'min': None,
1616
+ 'max': None,
1617
+ },
1616
1618
  },
1617
- },
1618
- }
1619
+ }
1619
1620
  result[code]['networks'] = networks
1620
1621
  info = self.safe_value(result[code], 'info', [])
1621
1622
  info.append(entry)
@@ -2502,6 +2503,7 @@ class gate(Exchange, ImplicitAPI):
2502
2503
  type, query = self.handle_market_type_and_params('fetchTickers', market, params)
2503
2504
  request, requestParams = self.prepare_request(None, type, query)
2504
2505
  response = None
2506
+ request['timezone'] = 'utc0' # default to utc
2505
2507
  if type == 'spot' or type == 'margin':
2506
2508
  response = self.publicSpotGetTickers(self.extend(request, requestParams))
2507
2509
  elif type == 'swap':
@@ -2515,7 +2517,7 @@ class gate(Exchange, ImplicitAPI):
2515
2517
  request['underlying'] = self.safe_string(optionParts, 0)
2516
2518
  response = self.publicOptionsGetTickers(self.extend(request, requestParams))
2517
2519
  else:
2518
- raise NotSupported(self.id + ' fetchTickers() not support self market type')
2520
+ raise NotSupported(self.id + ' fetchTickers() not support self market type, provide symbols or set params["defaultType"] to one from spot/margin/swap/future/option')
2519
2521
  return self.parse_tickers(response, symbols)
2520
2522
 
2521
2523
  def parse_balance_helper(self, entry):
@@ -3382,7 +3384,7 @@ class gate(Exchange, ImplicitAPI):
3382
3384
  response = self.privateWalletGetWithdrawals(self.extend(request, params))
3383
3385
  return self.parse_transactions(response, currency)
3384
3386
 
3385
- def withdraw(self, code: str, amount, address, tag=None, params={}):
3387
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
3386
3388
  """
3387
3389
  make a withdrawal
3388
3390
  :see: https://www.gate.io/docs/developers/apiv4/en/#withdraw
@@ -3529,7 +3531,7 @@ class gate(Exchange, ImplicitAPI):
3529
3531
  },
3530
3532
  }
3531
3533
 
3532
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
3534
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
3533
3535
  """
3534
3536
  Create an order on the exchange
3535
3537
  :see: https://www.gate.io/docs/developers/apiv4/en/#create-an-order
@@ -3695,7 +3697,7 @@ class gate(Exchange, ImplicitAPI):
3695
3697
  response = self.privateFuturesPostSettleBatchOrders(ordersRequests)
3696
3698
  return self.parse_orders(response)
3697
3699
 
3698
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
3700
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
3699
3701
  market = self.market(symbol)
3700
3702
  contract = market['contract']
3701
3703
  trigger = self.safe_value(params, 'trigger')
@@ -4728,7 +4730,7 @@ class gate(Exchange, ImplicitAPI):
4728
4730
  #
4729
4731
  return self.parse_orders(response, market)
4730
4732
 
4731
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
4733
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
4732
4734
  """
4733
4735
  transfer currency internally between wallets on the same account
4734
4736
  :see: https://www.gate.io/docs/developers/apiv4/en/#transfer-between-trading-accounts
@@ -4804,7 +4806,7 @@ class gate(Exchange, ImplicitAPI):
4804
4806
  'info': transfer,
4805
4807
  }
4806
4808
 
4807
- def set_leverage(self, leverage, symbol: Str = None, params={}):
4809
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4808
4810
  """
4809
4811
  set the level of leverage for a market
4810
4812
  :see: https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage
@@ -4826,14 +4828,15 @@ class gate(Exchange, ImplicitAPI):
4826
4828
  defaultMarginMode = self.safe_string_2(self.options, 'marginMode', 'defaultMarginMode')
4827
4829
  crossLeverageLimit = self.safe_string(query, 'cross_leverage_limit')
4828
4830
  marginMode = self.safe_string(query, 'marginMode', defaultMarginMode)
4831
+ stringifiedMargin = self.number_to_string(leverage)
4829
4832
  if crossLeverageLimit is not None:
4830
4833
  marginMode = 'cross'
4831
- leverage = crossLeverageLimit
4834
+ stringifiedMargin = crossLeverageLimit
4832
4835
  if marginMode == 'cross' or marginMode == 'cross_margin':
4833
- request['cross_leverage_limit'] = str(leverage)
4836
+ request['cross_leverage_limit'] = stringifiedMargin
4834
4837
  request['leverage'] = '0'
4835
4838
  else:
4836
- request['leverage'] = str(leverage)
4839
+ request['leverage'] = stringifiedMargin
4837
4840
  response = None
4838
4841
  if market['swap']:
4839
4842
  response = self.privateFuturesPostSettlePositionsContractLeverage(self.extend(request, query))
@@ -5429,7 +5432,7 @@ class gate(Exchange, ImplicitAPI):
5429
5432
  response = self.safe_value(response, 0)
5430
5433
  return self.parse_margin_loan(response, currency)
5431
5434
 
5432
- def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
5435
+ def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
5433
5436
  """
5434
5437
  create a loan to borrow margin
5435
5438
  :see: https://www.gate.io/docs/developers/apiv4/en/#marginuni
@@ -5472,7 +5475,7 @@ class gate(Exchange, ImplicitAPI):
5472
5475
  #
5473
5476
  return self.parse_margin_loan(response, currency)
5474
5477
 
5475
- def borrow_cross_margin(self, code: str, amount, params={}):
5478
+ def borrow_cross_margin(self, code: str, amount: float, params={}):
5476
5479
  """
5477
5480
  create a loan to borrow margin
5478
5481
  :see: https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan
@@ -6438,6 +6441,7 @@ class gate(Exchange, ImplicitAPI):
6438
6441
  entryMarketId = self.safe_string(entry, 'name')
6439
6442
  if entryMarketId == marketId:
6440
6443
  return self.parse_greeks(entry, market)
6444
+ return None
6441
6445
 
6442
6446
  def parse_greeks(self, greeks, market: Market = None):
6443
6447
  #
ccxt/gemini.py CHANGED
@@ -1262,7 +1262,7 @@ class gemini(Exchange, ImplicitAPI):
1262
1262
  market = self.market(symbol) # throws on non-existent symbol
1263
1263
  return self.parse_orders(response, market, since, limit)
1264
1264
 
1265
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1265
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1266
1266
  """
1267
1267
  create a trade order
1268
1268
  :see: https://docs.gemini.com/rest-api/#new-order
@@ -1409,7 +1409,7 @@ class gemini(Exchange, ImplicitAPI):
1409
1409
  response = self.privatePostV1Mytrades(self.extend(request, params))
1410
1410
  return self.parse_trades(response, market, since, limit)
1411
1411
 
1412
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1412
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1413
1413
  """
1414
1414
  make a withdrawal
1415
1415
  :param str code: unified currency code
ccxt/hitbtc.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.hitbtc import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, MarginMode, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, MarginMode, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -2107,7 +2107,7 @@ class hitbtc(Exchange, ImplicitAPI):
2107
2107
  raise NotSupported(self.id + ' editOrder() not support self market type')
2108
2108
  return self.parse_order(response, market)
2109
2109
 
2110
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2110
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2111
2111
  """
2112
2112
  create a trade order
2113
2113
  :see: https://api.hitbtc.com/#create-new-spot-order
@@ -2400,7 +2400,7 @@ class hitbtc(Exchange, ImplicitAPI):
2400
2400
  filteredMargin = self.filter_by_symbol(marginModes, symbol)
2401
2401
  return self.safe_value(filteredMargin, 0)
2402
2402
 
2403
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2403
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2404
2404
  """
2405
2405
  transfer currency internally between wallets on the same account
2406
2406
  :see: https://api.hitbtc.com/#transfer-between-wallet-and-exchange
@@ -2481,7 +2481,7 @@ class hitbtc(Exchange, ImplicitAPI):
2481
2481
  'info': response,
2482
2482
  }
2483
2483
 
2484
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2484
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2485
2485
  """
2486
2486
  make a withdrawal
2487
2487
  :see: https://api.hitbtc.com/#withdraw-crypto
@@ -3149,7 +3149,7 @@ class hitbtc(Exchange, ImplicitAPI):
3149
3149
  #
3150
3150
  return self.safe_number(response, 'leverage')
3151
3151
 
3152
- def set_leverage(self, leverage, symbol: Str = None, params={}):
3152
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3153
3153
  """
3154
3154
  set the level of leverage for a market
3155
3155
  :see: https://api.hitbtc.com/#create-update-margin-account-2
ccxt/hollaex.py CHANGED
@@ -1079,7 +1079,7 @@ class hollaex(Exchange, ImplicitAPI):
1079
1079
  'average': None,
1080
1080
  }, market)
1081
1081
 
1082
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1082
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1083
1083
  """
1084
1084
  create a trade order
1085
1085
  :param str symbol: unified symbol of the market to create an order in
@@ -1584,7 +1584,7 @@ class hollaex(Exchange, ImplicitAPI):
1584
1584
  'fee': fee,
1585
1585
  }
1586
1586
 
1587
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1587
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1588
1588
  """
1589
1589
  make a withdrawal
1590
1590
  :param str code: unified currency code
ccxt/htx.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.htx import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -2714,7 +2714,7 @@ class htx(Exchange, ImplicitAPI):
2714
2714
  trades = self.safe_value(trades, 'trades')
2715
2715
  return self.parse_trades(trades, market, since, limit)
2716
2716
 
2717
- def fetch_trades(self, symbol: str, since: Int = None, limit=1000, params={}) -> List[Trade]:
2717
+ def fetch_trades(self, symbol: str, since: Int = None, limit: Int = 1000, params={}) -> List[Trade]:
2718
2718
  """
2719
2719
  :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-most-recent-trades
2720
2720
  :see: https://huobiapi.github.io/docs/dm/v1/en/#query-a-batch-of-trade-records-of-a-contract
@@ -4691,7 +4691,7 @@ class htx(Exchange, ImplicitAPI):
4691
4691
  marketId = self.safe_string_2(order, 'contract_code', 'symbol')
4692
4692
  market = self.safe_market(marketId, market)
4693
4693
  timestamp = self.safe_integer_n(order, ['created_at', 'created-at', 'create_date'])
4694
- clientOrderId = self.safe_string_2(order, 'client_order_id', 'client-order-id')
4694
+ clientOrderId = self.safe_string_2(order, 'client_order_id', 'client-or' + 'der-id') # transpiler regex trick for php issue
4695
4695
  cost = None
4696
4696
  amount = None
4697
4697
  if (type is not None) and (type.find('market') >= 0):
@@ -4789,7 +4789,7 @@ class htx(Exchange, ImplicitAPI):
4789
4789
  params['trailingTriggerPrice'] = trailingTriggerPrice
4790
4790
  return self.create_order(symbol, type, side, amount, price, params)
4791
4791
 
4792
- def create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
4792
+ def create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
4793
4793
  """
4794
4794
  * @ignore
4795
4795
  helper function to build request
@@ -4893,7 +4893,7 @@ class htx(Exchange, ImplicitAPI):
4893
4893
  params = self.omit(params, ['stopPrice', 'stop-price', 'clientOrderId', 'client-order-id', 'operator', 'timeInForce'])
4894
4894
  return self.extend(request, params)
4895
4895
 
4896
- def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
4896
+ def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
4897
4897
  """
4898
4898
  * @ignore
4899
4899
  helper function to build request
@@ -4974,7 +4974,7 @@ class htx(Exchange, ImplicitAPI):
4974
4974
  params = self.omit(params, ['reduceOnly', 'stopPrice', 'stopLossPrice', 'takeProfitPrice', 'triggerType', 'leverRate', 'timeInForce', 'leverage', 'trailingPercent', 'trailingTriggerPrice'])
4975
4975
  return self.extend(request, params)
4976
4976
 
4977
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
4977
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
4978
4978
  """
4979
4979
  create a trade order
4980
4980
  :see: https://huobiapi.github.io/docs/spot/v1/en/#place-a-new-order # spot, margin
@@ -5946,7 +5946,7 @@ class htx(Exchange, ImplicitAPI):
5946
5946
  }
5947
5947
  return self.safe_string(statuses, status, status)
5948
5948
 
5949
- def withdraw(self, code: str, amount, address, tag=None, params={}):
5949
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
5950
5950
  """
5951
5951
  make a withdrawal
5952
5952
  :param str code: unified currency code
@@ -6022,7 +6022,7 @@ class htx(Exchange, ImplicitAPI):
6022
6022
  'status': None,
6023
6023
  }
6024
6024
 
6025
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
6025
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
6026
6026
  """
6027
6027
  transfer currency internally between wallets on the same account
6028
6028
  :see: https://huobiapi.github.io/docs/dm/v1/en/#transfer-margin-between-spot-account-and-future-account
@@ -6715,7 +6715,7 @@ class htx(Exchange, ImplicitAPI):
6715
6715
  data = self.safe_value(response, 'data', [])
6716
6716
  return self.parse_incomes(data, market, since, limit)
6717
6717
 
6718
- def set_leverage(self, leverage, symbol: Str = None, params={}):
6718
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
6719
6719
  """
6720
6720
  set the level of leverage for a market
6721
6721
  :param float leverage: the rate of leverage
@@ -7800,7 +7800,7 @@ class htx(Exchange, ImplicitAPI):
7800
7800
  'info': interest,
7801
7801
  }, market)
7802
7802
 
7803
- def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
7803
+ def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
7804
7804
  """
7805
7805
  create a loan to borrow margin
7806
7806
  :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
@@ -7833,7 +7833,7 @@ class htx(Exchange, ImplicitAPI):
7833
7833
  'symbol': symbol,
7834
7834
  })
7835
7835
 
7836
- def borrow_cross_margin(self, code: str, amount, params={}):
7836
+ def borrow_cross_margin(self, code: str, amount: float, params={}):
7837
7837
  """
7838
7838
  create a loan to borrow margin
7839
7839
  :see: https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
ccxt/huobijp.py CHANGED
@@ -837,7 +837,7 @@ class huobijp(Exchange, ImplicitAPI):
837
837
  response = self.privateGetOrderMatchresults(self.extend(request, params))
838
838
  return self.parse_trades(response['data'], market, since, limit)
839
839
 
840
- def fetch_trades(self, symbol: str, since: Int = None, limit=1000, params={}) -> List[Trade]:
840
+ def fetch_trades(self, symbol: str, since: Int = None, limit: Int = 1000, params={}) -> List[Trade]:
841
841
  """
842
842
  get the list of most recent trades for a particular symbol
843
843
  :param str symbol: unified symbol of the market to fetch trades for
@@ -910,7 +910,7 @@ class huobijp(Exchange, ImplicitAPI):
910
910
  self.safe_number(ohlcv, 'amount'),
911
911
  ]
912
912
 
913
- def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit=1000, params={}) -> List[list]:
913
+ def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = 1000, params={}) -> List[list]:
914
914
  """
915
915
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
916
916
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -1320,7 +1320,7 @@ class huobijp(Exchange, ImplicitAPI):
1320
1320
  params['createMarketBuyOrderRequiresPrice'] = False
1321
1321
  return self.create_order(symbol, 'market', 'buy', cost, None, params)
1322
1322
 
1323
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1323
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1324
1324
  """
1325
1325
  create a trade order
1326
1326
  :param str symbol: unified symbol of the market to create an order in
@@ -1696,7 +1696,7 @@ class huobijp(Exchange, ImplicitAPI):
1696
1696
  }
1697
1697
  return self.safe_string(statuses, status, status)
1698
1698
 
1699
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1699
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1700
1700
  """
1701
1701
  make a withdrawal
1702
1702
  :param str code: unified currency code
ccxt/idex.py CHANGED
@@ -1084,7 +1084,7 @@ class idex(Exchange, ImplicitAPI):
1084
1084
  result = self.privatePostWallets(request)
1085
1085
  return result
1086
1086
 
1087
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1087
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1088
1088
  """
1089
1089
  create a trade order, https://docs.idex.io/#create-order
1090
1090
  :param str symbol: unified symbol of the market to create an order in
@@ -1259,7 +1259,7 @@ class idex(Exchange, ImplicitAPI):
1259
1259
  response = self.privatePostOrders(request)
1260
1260
  return self.parse_order(response, market)
1261
1261
 
1262
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1262
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1263
1263
  """
1264
1264
  make a withdrawal
1265
1265
  :param str code: unified currency code
@@ -504,7 +504,7 @@ class independentreserve(Exchange, ImplicitAPI):
504
504
  data = self.safe_value(response, 'Data', [])
505
505
  return self.parse_orders(data, market, since, limit)
506
506
 
507
- def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit=50, params={}):
507
+ def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = 50, params={}):
508
508
  """
509
509
  fetch all trades made by the user
510
510
  :param str symbol: unified market symbol
@@ -625,7 +625,7 @@ class independentreserve(Exchange, ImplicitAPI):
625
625
  }
626
626
  return result
627
627
 
628
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
628
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
629
629
  """
630
630
  create a trade order
631
631
  :param str symbol: unified symbol of the market to create an order in
ccxt/indodax.py CHANGED
@@ -659,7 +659,7 @@ class indodax(Exchange, ImplicitAPI):
659
659
  orders = self.filter_by(orders, 'status', 'closed')
660
660
  return self.filter_by_symbol_since_limit(orders, symbol, since, limit)
661
661
 
662
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
662
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
663
663
  """
664
664
  create a trade order
665
665
  :param str symbol: unified symbol of the market to create an order in
@@ -840,7 +840,7 @@ class indodax(Exchange, ImplicitAPI):
840
840
  transactions = self.array_concat(withdraws, deposits)
841
841
  return self.parse_transactions(transactions, currency, since, limit)
842
842
 
843
- def withdraw(self, code: str, amount, address, tag=None, params={}):
843
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
844
844
  """
845
845
  make a withdrawal
846
846
  :param str code: unified currency code
ccxt/kraken.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.kraken import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, IndexType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, IndexType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -958,7 +958,9 @@ class kraken(Exchange, ImplicitAPI):
958
958
  else:
959
959
  request['interval'] = timeframe
960
960
  if since is not None:
961
- request['since'] = self.parse_to_int((since - 1) / 1000)
961
+ # contrary to kraken's api documentation, the since parameter must be passed in nanoseconds
962
+ # the adding of '000000' is copied from the fetchTrades function
963
+ request['since'] = self.number_to_string(since) + '000000' # expected to be in nanoseconds
962
964
  response = self.publicGetOHLC(self.extend(request, params))
963
965
  #
964
966
  # {
@@ -1296,7 +1298,7 @@ class kraken(Exchange, ImplicitAPI):
1296
1298
  #
1297
1299
  return self.parse_balance(response)
1298
1300
 
1299
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1301
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1300
1302
  """
1301
1303
  :see: https://docs.kraken.com/rest/#tag/Trading/operation/addOrder
1302
1304
  create a trade order
@@ -1456,6 +1458,41 @@ class kraken(Exchange, ImplicitAPI):
1456
1458
  # "txid": "OTI672-HJFAO-XOIPPK"
1457
1459
  # }
1458
1460
  #
1461
+ # {
1462
+ # "error": [],
1463
+ # "result": {
1464
+ # "open": {
1465
+ # "OXVPSU-Q726F-L3SDEP": {
1466
+ # "refid": null,
1467
+ # "userref": 0,
1468
+ # "status": "open",
1469
+ # "opentm": 1706893367.4656649,
1470
+ # "starttm": 0,
1471
+ # "expiretm": 0,
1472
+ # "descr": {
1473
+ # "pair": "XRPEUR",
1474
+ # "type": "sell",
1475
+ # "ordertype": "trailing-stop",
1476
+ # "price": "+50.0000%",
1477
+ # "price2": "0",
1478
+ # "leverage": "none",
1479
+ # "order": "sell 10.00000000 XRPEUR @ trailing stop +50.0000%",
1480
+ # "close": ""
1481
+ # },
1482
+ # "vol": "10.00000000",
1483
+ # "vol_exec": "0.00000000",
1484
+ # "cost": "0.00000000",
1485
+ # "fee": "0.00000000",
1486
+ # "price": "0.00000000",
1487
+ # "stopprice": "0.23424000",
1488
+ # "limitprice": "0.46847000",
1489
+ # "misc": "",
1490
+ # "oflags": "fciq",
1491
+ # "trigger": "index"
1492
+ # }
1493
+ # }
1494
+ # }
1495
+ #
1459
1496
  description = self.safe_value(order, 'descr', {})
1460
1497
  orderDescription = self.safe_string(description, 'order', description)
1461
1498
  side = None
@@ -1492,6 +1529,9 @@ class kraken(Exchange, ImplicitAPI):
1492
1529
  # kraken truncates the cost in the api response so we will ignore it and calculate it from average & filled
1493
1530
  # cost = self.safe_string(order, 'cost')
1494
1531
  price = self.safe_string(description, 'price', price)
1532
+ # when type = trailling stop returns price = '+50.0000%'
1533
+ if (price is not None) and price.endswith('%'):
1534
+ price = None # self is not the price we want
1495
1535
  if (price is None) or Precise.string_equals(price, '0'):
1496
1536
  price = self.safe_string(description, 'price2')
1497
1537
  if (price is None) or Precise.string_equals(price, '0'):
@@ -2440,7 +2480,7 @@ class kraken(Exchange, ImplicitAPI):
2440
2480
  'info': depositAddress,
2441
2481
  }
2442
2482
 
2443
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2483
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2444
2484
  """
2445
2485
  make a withdrawal
2446
2486
  :see: https://docs.kraken.com/rest/#tag/Funding/operation/withdrawFunds
@@ -2557,7 +2597,7 @@ class kraken(Exchange, ImplicitAPI):
2557
2597
  """
2558
2598
  return self.transfer(code, amount, 'spot', 'swap', params)
2559
2599
 
2560
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2600
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2561
2601
  """
2562
2602
  :see: https://docs.kraken.com/rest/#tag/User-Funding/operation/walletTransfer
2563
2603
  transfers currencies between sub-accounts(only spot->swap direction is supported)
ccxt/krakenfutures.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.krakenfutures import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -57,6 +57,9 @@ class krakenfutures(Exchange, ImplicitAPI):
57
57
  'fetchClosedOrders': None, # https://support.kraken.com/hc/en-us/articles/360058243651-Historical-orders
58
58
  'fetchCrossBorrowRate': False,
59
59
  'fetchCrossBorrowRates': False,
60
+ 'fetchDepositAddress': False,
61
+ 'fetchDepositAddresses': False,
62
+ 'fetchDepositAddressesByNetwork': False,
60
63
  'fetchFundingHistory': None,
61
64
  'fetchFundingRate': 'emulated',
62
65
  'fetchFundingRateHistory': True,
@@ -814,7 +817,7 @@ class krakenfutures(Exchange, ImplicitAPI):
814
817
  'fee': None,
815
818
  })
816
819
 
817
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
820
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
818
821
  market = self.market(symbol)
819
822
  type = self.safe_string(params, 'orderType', type)
820
823
  timeInForce = self.safe_string(params, 'timeInForce')
@@ -866,7 +869,7 @@ class krakenfutures(Exchange, ImplicitAPI):
866
869
  params = self.omit(params, ['clientOrderId', 'timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice'])
867
870
  return self.extend(request, params)
868
871
 
869
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
872
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
870
873
  """
871
874
  Create an order on the exchange
872
875
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-send-order
@@ -2112,7 +2115,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2112
2115
  """
2113
2116
  return self.transfer(code, amount, 'future', 'spot', params)
2114
2117
 
2115
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2118
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2116
2119
  """
2117
2120
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-transfers-initiate-wallet-transfer
2118
2121
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-transfers-initiate-withdrawal-to-spot-wallet
@@ -2155,7 +2158,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2155
2158
  'toAccount': toAccount,
2156
2159
  })
2157
2160
 
2158
- def set_leverage(self, leverage, symbol: Str = None, params={}):
2161
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2159
2162
  """
2160
2163
  set the level of leverage for a market
2161
2164
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-set-the-leverage-setting-for-a-market