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
@@ -9,7 +9,7 @@ import asyncio
9
9
  import hashlib
10
10
  import math
11
11
  import json
12
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
12
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
13
13
  from typing import List
14
14
  from ccxt.base.errors import ExchangeError
15
15
  from ccxt.base.errors import PermissionDenied
@@ -1824,7 +1824,7 @@ class kucoin(Exchange, ImplicitAPI):
1824
1824
  raise ExchangeError(self.id + ' createOrder() - you should use either triggerPrice or stopLossPrice or takeProfitPrice')
1825
1825
  return [triggerPrice, stopLossPrice, takeProfitPrice]
1826
1826
 
1827
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1827
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1828
1828
  """
1829
1829
  Create an order on the exchange
1830
1830
  :see: https://docs.kucoin.com/spot#place-a-new-order
@@ -2017,7 +2017,7 @@ class kucoin(Exchange, ImplicitAPI):
2017
2017
  data = self.safe_value(data, 'data', [])
2018
2018
  return self.parse_orders(data)
2019
2019
 
2020
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2020
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2021
2021
  market = self.market(symbol)
2022
2022
  # required param, cannot be used twice
2023
2023
  clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId', self.uuid())
@@ -2912,7 +2912,7 @@ class kucoin(Exchange, ImplicitAPI):
2912
2912
  'tierBased': True,
2913
2913
  }
2914
2914
 
2915
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
2915
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2916
2916
  """
2917
2917
  make a withdrawal
2918
2918
  :see: https://docs.kucoin.com/#apply-withdraw-2
@@ -3373,7 +3373,7 @@ class kucoin(Exchange, ImplicitAPI):
3373
3373
  returnType = result if isolated else self.safe_balance(result)
3374
3374
  return returnType
3375
3375
 
3376
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
3376
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
3377
3377
  """
3378
3378
  transfer currency internally between wallets on the same account
3379
3379
  :see: https://docs.kucoin.com/#inner-transfer
@@ -3945,7 +3945,7 @@ class kucoin(Exchange, ImplicitAPI):
3945
3945
  'info': info,
3946
3946
  }
3947
3947
 
3948
- async def borrow_cross_margin(self, code: str, amount, params={}):
3948
+ async def borrow_cross_margin(self, code: str, amount: float, params={}):
3949
3949
  """
3950
3950
  create a loan to borrow margin
3951
3951
  :see: https://docs.kucoin.com/#1-margin-borrowing
@@ -3978,7 +3978,7 @@ class kucoin(Exchange, ImplicitAPI):
3978
3978
  data = self.safe_value(response, 'data', {})
3979
3979
  return self.parse_margin_loan(data, currency)
3980
3980
 
3981
- async def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
3981
+ async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
3982
3982
  """
3983
3983
  create a loan to borrow margin
3984
3984
  :see: https://docs.kucoin.com/#1-margin-borrowing
@@ -4150,7 +4150,7 @@ class kucoin(Exchange, ImplicitAPI):
4150
4150
  endpart = ''
4151
4151
  headers = headers if (headers is not None) else {}
4152
4152
  url = self.urls['api'][api]
4153
- if query:
4153
+ if not self.is_empty(query):
4154
4154
  if (method == 'GET') or (method == 'DELETE'):
4155
4155
  endpoint += '?' + self.rawencode(query)
4156
4156
  else:
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.kucoin import kucoin
7
7
  from ccxt.abstract.kucoinfutures import ImplicitAPI
8
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction
8
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import PermissionDenied
11
11
  from ccxt.base.errors import AccountSuspended
@@ -1060,7 +1060,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
1060
1060
  'takeProfitPrice': None,
1061
1061
  })
1062
1062
 
1063
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1063
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1064
1064
  """
1065
1065
  Create an order on the exchange
1066
1066
  :see: https://docs.kucoin.com/futures/#place-an-order
@@ -1154,7 +1154,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
1154
1154
  data = self.safe_value(response, 'data', [])
1155
1155
  return self.parse_orders(data)
1156
1156
 
1157
- def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1157
+ def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1158
1158
  market = self.market(symbol)
1159
1159
  # required param, cannot be used twice
1160
1160
  clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId', self.uuid())
@@ -1842,7 +1842,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
1842
1842
  #
1843
1843
  return self.parse_balance(response)
1844
1844
 
1845
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1845
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1846
1846
  """
1847
1847
  transfer currency internally between wallets on the same account
1848
1848
  :param str code: unified currency code
@@ -913,7 +913,7 @@ class kuna(Exchange, ImplicitAPI):
913
913
  data = self.safe_value(response, 'data', [])
914
914
  return self.parse_balance(data)
915
915
 
916
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
916
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
917
917
  """
918
918
  create a trade order
919
919
  :see: https://docs.kuna.io/docs/create-a-new-order-private
@@ -1337,7 +1337,7 @@ class kuna(Exchange, ImplicitAPI):
1337
1337
  data = self.safe_value(response, 'data')
1338
1338
  return self.parse_trades(data, market, since, limit)
1339
1339
 
1340
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1340
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1341
1341
  """
1342
1342
  make a withdrawal
1343
1343
  :see: https://docs.kuna.io/docs/create-a-withdraw
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.latoken import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, 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
@@ -1192,7 +1192,7 @@ class latoken(Exchange, ImplicitAPI):
1192
1192
  #
1193
1193
  return self.parse_order(response)
1194
1194
 
1195
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1195
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1196
1196
  """
1197
1197
  create a trade order
1198
1198
  :see: https://api.latoken.com/doc/v2/#tag/Order/operation/placeOrder
@@ -1493,7 +1493,7 @@ class latoken(Exchange, ImplicitAPI):
1493
1493
  transfers = self.safe_value(response, 'content', [])
1494
1494
  return self.parse_transfers(transfers, currency, since, limit)
1495
1495
 
1496
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1496
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1497
1497
  """
1498
1498
  transfer currency internally between wallets on the same account
1499
1499
  :param str code: unified currency code
@@ -62,6 +62,7 @@ class lbank(Exchange, ImplicitAPI):
62
62
  'fetchClosedOrders': False,
63
63
  'fetchCrossBorrowRate': False,
64
64
  'fetchCrossBorrowRates': False,
65
+ 'fetchDepositAddress': True,
65
66
  'fetchDepositWithdrawFee': 'emulated',
66
67
  'fetchDepositWithdrawFees': True,
67
68
  'fetchFundingHistory': False,
@@ -346,7 +347,7 @@ class lbank(Exchange, ImplicitAPI):
346
347
 
347
348
  async def fetch_markets(self, params={}):
348
349
  """
349
- retrieves data on all markets for lbank2
350
+ retrieves data on all markets for lbank
350
351
  :see: https://www.lbank.com/en-US/docs/index.html#trading-pairs
351
352
  :see: https://www.lbank.com/en-US/docs/contract.html#query-contract-information-list
352
353
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1244,7 +1245,7 @@ class lbank(Exchange, ImplicitAPI):
1244
1245
  params['createMarketBuyOrderRequiresPrice'] = False
1245
1246
  return await self.create_order(symbol, 'market', 'buy', cost, None, params)
1246
1247
 
1247
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1248
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1248
1249
  """
1249
1250
  create a trade order
1250
1251
  :see: https://www.lbank.com/en-US/docs/index.html#place-order
@@ -1904,7 +1905,7 @@ class lbank(Exchange, ImplicitAPI):
1904
1905
  'info': response,
1905
1906
  }
1906
1907
 
1907
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1908
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}) -> Transaction:
1908
1909
  """
1909
1910
  make a withdrawal
1910
1911
  :see: https://www.lbank.com/en-US/docs/index.html#withdrawal
@@ -2167,7 +2168,7 @@ class lbank(Exchange, ImplicitAPI):
2167
2168
  """
2168
2169
  * @deprecated
2169
2170
  please use fetchDepositWithdrawFees instead
2170
- :param str[]|None codes: not used by lbank2 fetchTransactionFees()
2171
+ :param str[]|None codes: not used by lbank fetchTransactionFees()
2171
2172
  :param dict [params]: extra parameters specific to the exchange API endpoint
2172
2173
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
2173
2174
  """
@@ -826,7 +826,7 @@ class luno(Exchange, ImplicitAPI):
826
826
  'taker': self.safe_number(response, 'taker_fee'),
827
827
  }
828
828
 
829
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
829
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
830
830
  """
831
831
  create a trade order
832
832
  :param str symbol: unified symbol of the market to create an order in
@@ -755,7 +755,7 @@ class lykke(Exchange, ImplicitAPI):
755
755
  'trades': None,
756
756
  }, market)
757
757
 
758
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
758
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
759
759
  """
760
760
  create a trade order
761
761
  :param str symbol: unified symbol of the market to create an order in
@@ -1174,7 +1174,7 @@ class lykke(Exchange, ImplicitAPI):
1174
1174
  currency = self.currency(code)
1175
1175
  return self.parse_transactions(payload, currency, since, limit)
1176
1176
 
1177
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1177
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1178
1178
  """
1179
1179
  make a withdrawal
1180
1180
  :param str code: unified currency code
@@ -412,7 +412,7 @@ class mercado(Exchange, ImplicitAPI):
412
412
  response = await self.privatePostGetAccountInfo(params)
413
413
  return self.parse_balance(response)
414
414
 
415
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
415
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
416
416
  """
417
417
  create a trade order
418
418
  :param str symbol: unified symbol of the market to create an order in
@@ -591,7 +591,7 @@ class mercado(Exchange, ImplicitAPI):
591
591
  order = self.safe_value(responseData, 'order')
592
592
  return self.parse_order(order, market)
593
593
 
594
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
594
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
595
595
  """
596
596
  make a withdrawal
597
597
  :param str code: unified currency code
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.mexc import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, IndexType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, 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
@@ -1339,7 +1339,8 @@ class mexc(Exchange, ImplicitAPI):
1339
1339
  orderbook['nonce'] = self.safe_integer(data, 'version')
1340
1340
  return orderbook
1341
1341
 
1342
- def parse_bid_ask(self, bidask, priceKey: IndexType = 0, amountKey: IndexType = 1, countKey: IndexType = 2):
1342
+ def parse_bid_ask(self, bidask, priceKey: IndexType = 0, amountKey: IndexType = 1, countOrIdKey: IndexType = 2):
1343
+ countKey = 2
1343
1344
  price = self.safe_number(bidask, priceKey)
1344
1345
  amount = self.safe_number(bidask, amountKey)
1345
1346
  count = self.safe_number(bidask, countKey)
@@ -2017,7 +2018,7 @@ class mexc(Exchange, ImplicitAPI):
2017
2018
  params['createMarketBuyOrderRequiresPrice'] = False
2018
2019
  return await self.create_order(symbol, 'market', 'buy', cost, None, params)
2019
2020
 
2020
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2021
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2021
2022
  """
2022
2023
  create a trade order
2023
2024
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
@@ -3698,7 +3699,7 @@ class mexc(Exchange, ImplicitAPI):
3698
3699
  """
3699
3700
  return await self.modify_margin_helper(symbol, amount, 'ADD', params)
3700
3701
 
3701
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
3702
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3702
3703
  """
3703
3704
  set the level of leverage for a market
3704
3705
  :param float leverage: the rate of leverage
@@ -4582,7 +4583,7 @@ class mexc(Exchange, ImplicitAPI):
4582
4583
  #
4583
4584
  return self.parse_transfers(resultList, currency, since, limit)
4584
4585
 
4585
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
4586
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
4586
4587
  """
4587
4588
  transfer currency internally between wallets on the same account
4588
4589
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
@@ -4707,7 +4708,7 @@ class mexc(Exchange, ImplicitAPI):
4707
4708
  }
4708
4709
  return self.safe_string(statuses, status, status)
4709
4710
 
4710
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
4711
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
4711
4712
  """
4712
4713
  make a withdrawal
4713
4714
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw
@@ -1274,7 +1274,7 @@ class ndax(Exchange, ImplicitAPI):
1274
1274
  'trades': None,
1275
1275
  }, market)
1276
1276
 
1277
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1277
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1278
1278
  """
1279
1279
  create a trade order
1280
1280
  :param str symbol: unified symbol of the market to create an order in
@@ -2173,7 +2173,7 @@ class ndax(Exchange, ImplicitAPI):
2173
2173
  'network': None,
2174
2174
  }
2175
2175
 
2176
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
2176
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2177
2177
  """
2178
2178
  make a withdrawal
2179
2179
  :param str code: unified currency code
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.novadax import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, 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
@@ -715,7 +715,7 @@ class novadax(Exchange, ImplicitAPI):
715
715
  #
716
716
  return self.parse_balance(response)
717
717
 
718
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
718
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
719
719
  """
720
720
  create a trade order
721
721
  :see: https://doc.novadax.com/en-US/#order-introduction
@@ -1083,7 +1083,7 @@ class novadax(Exchange, ImplicitAPI):
1083
1083
  'trades': None,
1084
1084
  }, market)
1085
1085
 
1086
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1086
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1087
1087
  """
1088
1088
  transfer currency internally between wallets on the same account
1089
1089
  :see: https://doc.novadax.com/en-US/#get-sub-account-transfer
@@ -1154,7 +1154,7 @@ class novadax(Exchange, ImplicitAPI):
1154
1154
  }
1155
1155
  return self.safe_string(statuses, status, 'failed')
1156
1156
 
1157
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1157
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1158
1158
  """
1159
1159
  make a withdrawal
1160
1160
  :see: https://doc.novadax.com/en-US/#send-cryptocurrencies
@@ -594,7 +594,7 @@ class oceanex(Exchange, ImplicitAPI):
594
594
  response = await self.privateGetMembersMe(params)
595
595
  return self.parse_balance(response)
596
596
 
597
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
597
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
598
598
  """
599
599
  create a trade order
600
600
  :see: https://api.oceanex.pro/doc/v1/#new-order-post
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.okcoin import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, 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
@@ -1261,7 +1261,7 @@ class okcoin(Exchange, ImplicitAPI):
1261
1261
  params['tgtCcy'] = 'quote_ccy'
1262
1262
  return await self.create_order(symbol, 'market', 'buy', cost, None, params)
1263
1263
 
1264
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1264
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1265
1265
  """
1266
1266
  :see: https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-order
1267
1267
  :see: https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-algo-order
@@ -1316,7 +1316,7 @@ class okcoin(Exchange, ImplicitAPI):
1316
1316
  order['side'] = side
1317
1317
  return order
1318
1318
 
1319
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1319
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1320
1320
  market = self.market(symbol)
1321
1321
  request = {
1322
1322
  'instId': market['id'],
@@ -2143,7 +2143,7 @@ class okcoin(Exchange, ImplicitAPI):
2143
2143
  parsed = self.parse_deposit_addresses(filtered, [currency['code']], False)
2144
2144
  return self.index_by(parsed, 'network')
2145
2145
 
2146
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2146
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2147
2147
  """
2148
2148
  :see: https://www.okcoin.com/docs-v5/en/#rest-api-funding-funds-transfer
2149
2149
  transfer currency internally between wallets on the same account
@@ -2282,7 +2282,7 @@ class okcoin(Exchange, ImplicitAPI):
2282
2282
  }
2283
2283
  return self.safe_string(statuses, status, status)
2284
2284
 
2285
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
2285
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2286
2286
  """
2287
2287
  :see: https://www.okcoin.com/docs-v5/en/#rest-api-funding-withdrawal
2288
2288
  make a withdrawal
ccxt/async_support/okx.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.okx import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -364,9 +364,11 @@ class okx(Exchange, ImplicitAPI):
364
364
  'tradingBot/grid/sub-orders': 1,
365
365
  'tradingBot/grid/positions': 1,
366
366
  'tradingBot/grid/ai-param': 1,
367
- 'tradingBot/public/rsi-back-testing': 1,
367
+ 'tradingBot/signal/signals': 1,
368
368
  'tradingBot/signal/orders-algo-details': 1,
369
+ 'tradingBot/signal/orders-algo-history': 1,
369
370
  'tradingBot/signal/positions': 1,
371
+ 'tradingBot/signal/positions-history': 1,
370
372
  'tradingBot/signal/sub-orders': 1,
371
373
  'tradingBot/signal/event-history': 1,
372
374
  'tradingBot/recurring/orders-algo-pending': 1,
@@ -486,6 +488,15 @@ class okx(Exchange, ImplicitAPI):
486
488
  'tradingBot/grid/compute-margin-balance': 1,
487
489
  'tradingBot/grid/margin-balance': 1,
488
490
  'tradingBot/grid/min-investment': 1,
491
+ 'tradingBot/signal/create-signal': 1,
492
+ 'tradingBot/signal/order-algo': 1,
493
+ 'tradingBot/signal/stop-order-algo': 1,
494
+ 'tradingBot/signal/margin-balance': 1,
495
+ 'tradingBot/signal/amendTPSL': 1,
496
+ 'tradingBot/signal/set-instruments': 1,
497
+ 'tradingBot/signal/close-position': 1,
498
+ 'tradingBot/signal/sub-order': 1,
499
+ 'tradingBot/signal/cancel-sub-order': 1,
489
500
  'tradingBot/recurring/order-algo': 1,
490
501
  'tradingBot/recurring/amend-order-algo': 1,
491
502
  'tradingBot/recurring/stop-order-algo': 1,
@@ -1505,8 +1516,8 @@ class okx(Exchange, ImplicitAPI):
1505
1516
  # "msg": ""
1506
1517
  # }
1507
1518
  #
1508
- data = self.safe_value(response, 'data', [])
1509
- return self.parse_markets(data)
1519
+ dataResponse = self.safe_value(response, 'data', [])
1520
+ return self.parse_markets(dataResponse)
1510
1521
 
1511
1522
  def safe_network(self, networkId):
1512
1523
  networksById = {
@@ -2469,7 +2480,7 @@ class okx(Exchange, ImplicitAPI):
2469
2480
  params['tgtCcy'] = 'quote_ccy'
2470
2481
  return await self.create_order(symbol, 'market', 'sell', cost, None, params)
2471
2482
 
2472
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2483
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2473
2484
  market = self.market(symbol)
2474
2485
  request = {
2475
2486
  'instId': market['id'],
@@ -2673,7 +2684,7 @@ class okx(Exchange, ImplicitAPI):
2673
2684
  params = self.omit(params, ['clOrdId', 'clientOrderId'])
2674
2685
  return self.extend(request, params)
2675
2686
 
2676
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2687
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2677
2688
  """
2678
2689
  create a trade order
2679
2690
  :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
@@ -2954,7 +2965,7 @@ class okx(Exchange, ImplicitAPI):
2954
2965
  :param string[]|str ids: order ids
2955
2966
  :returns str[]: list of order ids
2956
2967
  """
2957
- if isinstance(ids, str):
2968
+ if (ids is not None) and isinstance(ids, str):
2958
2969
  return ids.split(',')
2959
2970
  else:
2960
2971
  return ids
@@ -3937,10 +3948,12 @@ class okx(Exchange, ImplicitAPI):
3937
3948
  if symbol is not None:
3938
3949
  market = self.market(symbol)
3939
3950
  request['instId'] = market['id']
3951
+ if since is not None:
3952
+ request['begin'] = since
3940
3953
  request, params = self.handle_until_option('end', request, params)
3941
3954
  type, query = self.handle_market_type_and_params('fetchMyTrades', market, params)
3942
3955
  request['instType'] = self.convert_to_instrument_type(type)
3943
- if limit is not None:
3956
+ if (limit is not None) and (since is None): # limit = n, okx will return the n most recent results, instead of the n results after limit, so limit should only be sent when since is None
3944
3957
  request['limit'] = limit # default 100, max 100
3945
3958
  response = await self.privateGetTradeFillsHistory(self.extend(request, query))
3946
3959
  #
@@ -4364,7 +4377,7 @@ class okx(Exchange, ImplicitAPI):
4364
4377
  raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find ' + network + ' deposit address for ' + code)
4365
4378
  return result
4366
4379
 
4367
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
4380
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
4368
4381
  """
4369
4382
  make a withdrawal
4370
4383
  :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
@@ -5105,7 +5118,7 @@ class okx(Exchange, ImplicitAPI):
5105
5118
  'takeProfitPrice': None,
5106
5119
  })
5107
5120
 
5108
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
5121
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
5109
5122
  """
5110
5123
  transfer currency internally between wallets on the same account
5111
5124
  :see: https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
@@ -5610,7 +5623,7 @@ class okx(Exchange, ImplicitAPI):
5610
5623
  sorted = self.sort_by(result, 'timestamp')
5611
5624
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
5612
5625
 
5613
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
5626
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5614
5627
  """
5615
5628
  set the level of leverage for a market
5616
5629
  :see: https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
@@ -6165,7 +6178,7 @@ class okx(Exchange, ImplicitAPI):
6165
6178
  'info': info,
6166
6179
  }
6167
6180
 
6168
- async def borrow_cross_margin(self, code: str, amount, params={}):
6181
+ async def borrow_cross_margin(self, code: str, amount: float, params={}):
6169
6182
  """
6170
6183
  create a loan to borrow margin(need to be VIP 5 and above)
6171
6184
  :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
@@ -6718,6 +6731,7 @@ class okx(Exchange, ImplicitAPI):
6718
6731
  entryMarketId = self.safe_string(entry, 'instId')
6719
6732
  if entryMarketId == marketId:
6720
6733
  return self.parse_greeks(entry, market)
6734
+ return None
6721
6735
 
6722
6736
  def parse_greeks(self, greeks, market: Market = None):
6723
6737
  #
@@ -1179,7 +1179,7 @@ class onetrading(Exchange, ImplicitAPI):
1179
1179
  withdrawalHistory = self.safe_value(response, 'withdrawal_history', [])
1180
1180
  return self.parse_transactions(withdrawalHistory, currency, since, limit, {'type': 'withdrawal'})
1181
1181
 
1182
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1182
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1183
1183
  """
1184
1184
  make a withdrawal
1185
1185
  :param str code: unified currency code
@@ -1443,7 +1443,7 @@ class onetrading(Exchange, ImplicitAPI):
1443
1443
  }
1444
1444
  return self.safe_string(timeInForces, timeInForce, timeInForce)
1445
1445
 
1446
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1446
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1447
1447
  """
1448
1448
  create a trade order
1449
1449
  :see: https://docs.onetrading.com/#create-order
ccxt/async_support/p2b.py CHANGED
@@ -760,7 +760,7 @@ class p2b(Exchange, ImplicitAPI):
760
760
  result[code] = account
761
761
  return self.safe_balance(result)
762
762
 
763
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
763
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
764
764
  """
765
765
  create a trade order
766
766
  :see: https://github.com/P2B-team/p2b-api-docs/blob/master/api-doc.md#create-order
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.paymium import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
9
+ from ccxt.base.types import Balances, Currency, Int, Market, TransferEntry, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.decimal_to_precision import TICK_SIZE
@@ -366,7 +366,7 @@ class paymium(Exchange, ImplicitAPI):
366
366
  'network': None,
367
367
  }
368
368
 
369
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
369
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
370
370
  """
371
371
  create a trade order
372
372
  :see: https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders/post
@@ -409,7 +409,7 @@ class paymium(Exchange, ImplicitAPI):
409
409
  }
410
410
  return await self.privateDeleteUserOrdersUuidCancel(self.extend(request, params))
411
411
 
412
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
412
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
413
413
  """
414
414
  transfer currency internally between wallets on the same account
415
415
  :see: https://paymium.github.io/api-documentation/#tag/Transfer/paths/~1user~1email_transfers/post