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
ccxt/async_support/ace.py CHANGED
@@ -181,7 +181,9 @@ class ace(Exchange, ImplicitAPI):
181
181
  async def fetch_markets(self, params={}) -> List[Market]:
182
182
  """
183
183
  retrieves data on all markets for ace
184
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---market-pair
184
+
185
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---market-pair
186
+
185
187
  :param dict [params]: extra parameters specific to the exchange API endpoint
186
188
  :returns dict[]: an array of objects representing market data
187
189
  """
@@ -308,7 +310,9 @@ class ace(Exchange, ImplicitAPI):
308
310
  async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
309
311
  """
310
312
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
311
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
313
+
314
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
315
+
312
316
  :param str symbol: unified symbol of the market to fetch the ticker for
313
317
  :param dict [params]: extra parameters specific to the exchange API endpoint
314
318
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -332,7 +336,9 @@ class ace(Exchange, ImplicitAPI):
332
336
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
333
337
  """
334
338
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
335
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
339
+
340
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
341
+
336
342
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
337
343
  :param dict [params]: extra parameters specific to the exchange API endpoint
338
344
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -361,7 +367,9 @@ class ace(Exchange, ImplicitAPI):
361
367
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
362
368
  """
363
369
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
364
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-books
370
+
371
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-books
372
+
365
373
  :param str symbol: unified symbol of the market to fetch the order book for
366
374
  :param int [limit]: the maximum amount of order book entries to return
367
375
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -447,7 +455,9 @@ class ace(Exchange, ImplicitAPI):
447
455
  async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
448
456
  """
449
457
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
450
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---klinecandlestick-data
458
+
459
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---klinecandlestick-data
460
+
451
461
  :param str symbol: unified symbol of the market to fetch OHLCV data for
452
462
  :param str timeframe: the length of time each candle represents
453
463
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -589,7 +599,9 @@ class ace(Exchange, ImplicitAPI):
589
599
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
590
600
  """
591
601
  create a trade order
592
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---new-order
602
+
603
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---new-order
604
+
593
605
  :param str symbol: unified symbol of the market to create an order in
594
606
  :param str type: 'market' or 'limit'
595
607
  :param str side: 'buy' or 'sell'
@@ -626,7 +638,9 @@ class ace(Exchange, ImplicitAPI):
626
638
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
627
639
  """
628
640
  cancels an open order
629
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---cancel-order
641
+
642
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---cancel-order
643
+
630
644
  :param str id: order id
631
645
  :param str symbol: unified symbol of the market the order was made in
632
646
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -650,7 +664,9 @@ class ace(Exchange, ImplicitAPI):
650
664
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
651
665
  """
652
666
  fetches information on an order made by the user
653
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-status
667
+
668
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-status
669
+
654
670
  :param str id: the order id
655
671
  :param str symbol: unified symbol of the market the order was made in
656
672
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -689,7 +705,9 @@ class ace(Exchange, ImplicitAPI):
689
705
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
690
706
  """
691
707
  fetch all unfilled currently open orders
692
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-list
708
+
709
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-list
710
+
693
711
  :param str symbol: unified market symbol of the market orders were made in
694
712
  :param int [since]: the earliest time in ms to fetch orders for
695
713
  :param int [limit]: the maximum number of order structures to retrieve
@@ -818,7 +836,9 @@ class ace(Exchange, ImplicitAPI):
818
836
  async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
819
837
  """
820
838
  fetch all the trades made from a single order
821
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-history
839
+
840
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-history
841
+
822
842
  :param str id: order id
823
843
  :param str symbol: unified market symbol
824
844
  :param int [since]: the earliest time in ms to fetch trades for
@@ -872,7 +892,9 @@ class ace(Exchange, ImplicitAPI):
872
892
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
873
893
  """
874
894
  fetch all trades made by the user
875
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---trade-list
895
+
896
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---trade-list
897
+
876
898
  :param str symbol: unified symbol of the market to fetch trades for
877
899
  :param int [since]: timestamp in ms of the earliest trade to fetch
878
900
  :param int [limit]: the maximum amount of trades to fetch
@@ -955,7 +977,9 @@ class ace(Exchange, ImplicitAPI):
955
977
  async def fetch_balance(self, params={}) -> Balances:
956
978
  """
957
979
  query for balance and get the amount of funds available for trading or funds locked in orders
958
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---account-balance
980
+
981
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---account-balance
982
+
959
983
  :param dict [params]: extra parameters specific to the exchange API endpoint
960
984
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
961
985
  """
@@ -314,7 +314,9 @@ class alpaca(Exchange, ImplicitAPI):
314
314
  async def fetch_markets(self, params={}) -> List[Market]:
315
315
  """
316
316
  retrieves data on all markets for alpaca
317
- :see: https://docs.alpaca.markets/reference/get-v2-assets
317
+
318
+ https://docs.alpaca.markets/reference/get-v2-assets
319
+
318
320
  :param dict [params]: extra parameters specific to the exchange api endpoint
319
321
  :returns dict[]: an array of objects representing market data
320
322
  """
@@ -438,8 +440,10 @@ class alpaca(Exchange, ImplicitAPI):
438
440
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
439
441
  """
440
442
  get the list of most recent trades for a particular symbol
441
- :see: https://docs.alpaca.markets/reference/cryptotrades
442
- :see: https://docs.alpaca.markets/reference/cryptolatesttrades
443
+
444
+ https://docs.alpaca.markets/reference/cryptotrades
445
+ https://docs.alpaca.markets/reference/cryptolatesttrades
446
+
443
447
  :param str symbol: unified symbol of the market to fetch trades for
444
448
  :param int [since]: timestamp in ms of the earliest trade to fetch
445
449
  :param int [limit]: the maximum amount of trades to fetch
@@ -508,7 +512,9 @@ class alpaca(Exchange, ImplicitAPI):
508
512
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
509
513
  """
510
514
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
511
- :see: https://docs.alpaca.markets/reference/cryptolatestorderbooks
515
+
516
+ https://docs.alpaca.markets/reference/cryptolatestorderbooks
517
+
512
518
  :param str symbol: unified symbol of the market to fetch the order book for
513
519
  :param int [limit]: the maximum amount of order book entries to return
514
520
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -569,8 +575,10 @@ class alpaca(Exchange, ImplicitAPI):
569
575
  async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
570
576
  """
571
577
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
572
- :see: https://docs.alpaca.markets/reference/cryptobars
573
- :see: https://docs.alpaca.markets/reference/cryptolatestbars
578
+
579
+ https://docs.alpaca.markets/reference/cryptobars
580
+ https://docs.alpaca.markets/reference/cryptolatestbars
581
+
574
582
  :param str symbol: unified symbol of the market to fetch OHLCV data for
575
583
  :param str timeframe: the length of time each candle represents
576
584
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -681,7 +689,9 @@ class alpaca(Exchange, ImplicitAPI):
681
689
  async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
682
690
  """
683
691
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
684
- :see: https://docs.alpaca.markets/reference/cryptosnapshots-1
692
+
693
+ https://docs.alpaca.markets/reference/cryptosnapshots-1
694
+
685
695
  :param str symbol: unified symbol of the market to fetch the ticker for
686
696
  :param dict [params]: extra parameters specific to the exchange API endpoint
687
697
  :param str [params.loc]: crypto location, default: us
@@ -695,7 +705,9 @@ class alpaca(Exchange, ImplicitAPI):
695
705
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
696
706
  """
697
707
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
698
- :see: https://docs.alpaca.markets/reference/cryptosnapshots-1
708
+
709
+ https://docs.alpaca.markets/reference/cryptosnapshots-1
710
+
699
711
  :param str[] symbols: unified symbols of the markets to fetch tickers for
700
712
  :param dict [params]: extra parameters specific to the exchange API endpoint
701
713
  :param str [params.loc]: crypto location, default: us
@@ -814,7 +826,9 @@ class alpaca(Exchange, ImplicitAPI):
814
826
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
815
827
  """
816
828
  create a trade order
817
- :see: https://docs.alpaca.markets/reference/postorder
829
+
830
+ https://docs.alpaca.markets/reference/postorder
831
+
818
832
  :param str symbol: unified symbol of the market to create an order in
819
833
  :param str type: 'market', 'limit' or 'stop_limit'
820
834
  :param str side: 'buy' or 'sell'
@@ -891,7 +905,9 @@ class alpaca(Exchange, ImplicitAPI):
891
905
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
892
906
  """
893
907
  cancels an open order
894
- :see: https://docs.alpaca.markets/reference/deleteorderbyorderid
908
+
909
+ https://docs.alpaca.markets/reference/deleteorderbyorderid
910
+
895
911
  :param str id: order id
896
912
  :param str symbol: unified symbol of the market the order was made in
897
913
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -912,7 +928,9 @@ class alpaca(Exchange, ImplicitAPI):
912
928
  async def cancel_all_orders(self, symbol: Str = None, params={}):
913
929
  """
914
930
  cancel all open orders in a market
915
- :see: https://docs.alpaca.markets/reference/deleteallorders
931
+
932
+ https://docs.alpaca.markets/reference/deleteallorders
933
+
916
934
  :param str symbol: alpaca cancelAllOrders cannot setting symbol, it will cancel all open orders
917
935
  :param dict [params]: extra parameters specific to the exchange API endpoint
918
936
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -931,7 +949,9 @@ class alpaca(Exchange, ImplicitAPI):
931
949
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
932
950
  """
933
951
  fetches information on an order made by the user
934
- :see: https://docs.alpaca.markets/reference/getorderbyorderid
952
+
953
+ https://docs.alpaca.markets/reference/getorderbyorderid
954
+
935
955
  :param str id: the order id
936
956
  :param str symbol: unified symbol of the market the order was made in
937
957
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -949,7 +969,9 @@ class alpaca(Exchange, ImplicitAPI):
949
969
  async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
950
970
  """
951
971
  fetches information on multiple orders made by the user
952
- :see: https://docs.alpaca.markets/reference/getallorders
972
+
973
+ https://docs.alpaca.markets/reference/getallorders
974
+
953
975
  :param str symbol: unified market symbol of the market orders were made in
954
976
  :param int [since]: the earliest time in ms to fetch orders for
955
977
  :param int [limit]: the maximum number of order structures to retrieve
@@ -1019,7 +1041,9 @@ class alpaca(Exchange, ImplicitAPI):
1019
1041
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1020
1042
  """
1021
1043
  fetch all unfilled currently open orders
1022
- :see: https://docs.alpaca.markets/reference/getallorders
1044
+
1045
+ https://docs.alpaca.markets/reference/getallorders
1046
+
1023
1047
  :param str symbol: unified market symbol of the market orders were made in
1024
1048
  :param int [since]: the earliest time in ms to fetch orders for
1025
1049
  :param int [limit]: the maximum number of order structures to retrieve
@@ -1035,7 +1059,9 @@ class alpaca(Exchange, ImplicitAPI):
1035
1059
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1036
1060
  """
1037
1061
  fetches information on multiple closed orders made by the user
1038
- :see: https://docs.alpaca.markets/reference/getallorders
1062
+
1063
+ https://docs.alpaca.markets/reference/getallorders
1064
+
1039
1065
  :param str symbol: unified market symbol of the market orders were made in
1040
1066
  :param int [since]: the earliest time in ms to fetch orders for
1041
1067
  :param int [limit]: the maximum number of order structures to retrieve
@@ -1051,7 +1077,9 @@ class alpaca(Exchange, ImplicitAPI):
1051
1077
  async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
1052
1078
  """
1053
1079
  edit a trade order
1054
- :see: https://docs.alpaca.markets/reference/patchorderbyorderid-1
1080
+
1081
+ https://docs.alpaca.markets/reference/patchorderbyorderid-1
1082
+
1055
1083
  :param str id: order id
1056
1084
  :param str [symbol]: unified symbol of the market to create an order in
1057
1085
  :param str [type]: 'market', 'limit' or 'stop_limit'
@@ -1191,7 +1219,9 @@ class alpaca(Exchange, ImplicitAPI):
1191
1219
  async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1192
1220
  """
1193
1221
  fetch all trades made by the user
1194
- :see: https://docs.alpaca.markets/reference/getaccountactivitiesbyactivitytype-1
1222
+
1223
+ https://docs.alpaca.markets/reference/getaccountactivitiesbyactivitytype-1
1224
+
1195
1225
  :param str [symbol]: unified market symbol
1196
1226
  :param int [since]: the earliest time in ms to fetch trades for
1197
1227
  :param int [limit]: the maximum number of trade structures to retrieve
@@ -1295,7 +1325,9 @@ class alpaca(Exchange, ImplicitAPI):
1295
1325
  async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1296
1326
  """
1297
1327
  fetch the deposit address for a currency associated with self account
1298
- :see: https://docs.alpaca.markets/reference/listcryptofundingwallets
1328
+
1329
+ https://docs.alpaca.markets/reference/listcryptofundingwallets
1330
+
1299
1331
  :param str code: unified currency code
1300
1332
  :param dict [params]: extra parameters specific to the exchange API endpoint
1301
1333
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
@@ -1337,7 +1369,9 @@ class alpaca(Exchange, ImplicitAPI):
1337
1369
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1338
1370
  """
1339
1371
  make a withdrawal
1340
- :see: https://docs.alpaca.markets/reference/createcryptotransferforaccount
1372
+
1373
+ https://docs.alpaca.markets/reference/createcryptotransferforaccount
1374
+
1341
1375
  :param str code: unified currency code
1342
1376
  :param float amount: the amount to withdraw
1343
1377
  :param str address: the address to withdraw to
@@ -1412,7 +1446,9 @@ class alpaca(Exchange, ImplicitAPI):
1412
1446
  async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1413
1447
  """
1414
1448
  fetch history of deposits and withdrawals
1415
- :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1449
+
1450
+ https://docs.alpaca.markets/reference/listcryptofundingtransfers
1451
+
1416
1452
  :param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
1417
1453
  :param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
1418
1454
  :param int [limit]: max number of deposit/withdrawals to return, default is None
@@ -1424,7 +1460,9 @@ class alpaca(Exchange, ImplicitAPI):
1424
1460
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1425
1461
  """
1426
1462
  fetch all deposits made to an account
1427
- :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1463
+
1464
+ https://docs.alpaca.markets/reference/listcryptofundingtransfers
1465
+
1428
1466
  :param str [code]: unified currency code
1429
1467
  :param int [since]: the earliest time in ms to fetch deposits for
1430
1468
  :param int [limit]: the maximum number of deposit structures to retrieve
@@ -1436,7 +1474,9 @@ class alpaca(Exchange, ImplicitAPI):
1436
1474
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1437
1475
  """
1438
1476
  fetch all withdrawals made from an account
1439
- :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1477
+
1478
+ https://docs.alpaca.markets/reference/listcryptofundingtransfers
1479
+
1440
1480
  :param str [code]: unified currency code
1441
1481
  :param int [since]: the earliest time in ms to fetch withdrawals for
1442
1482
  :param int [limit]: the maximum number of withdrawal structures to retrieve
@@ -802,9 +802,11 @@ class ascendex(Exchange, ImplicitAPI):
802
802
  async def fetch_balance(self, params={}) -> Balances:
803
803
  """
804
804
  query for balance and get the amount of funds available for trading or funds locked in orders
805
- :see: https://ascendex.github.io/ascendex-pro-api/#cash-account-balance
806
- :see: https://ascendex.github.io/ascendex-pro-api/#margin-account-balance
807
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
805
+
806
+ https://ascendex.github.io/ascendex-pro-api/#cash-account-balance
807
+ https://ascendex.github.io/ascendex-pro-api/#margin-account-balance
808
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
809
+
808
810
  :param dict [params]: extra parameters specific to the exchange API endpoint
809
811
  :param str [params.type]: wallet type, 'spot', 'margin', or 'swap'
810
812
  :param str [params.marginMode]: 'cross' or None, for spot margin trading, value of 'isolated' is invalid
@@ -1013,8 +1015,10 @@ class ascendex(Exchange, ImplicitAPI):
1013
1015
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
1014
1016
  """
1015
1017
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1016
- :see: https://ascendex.github.io/ascendex-pro-api/#ticker
1017
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#ticker
1018
+
1019
+ https://ascendex.github.io/ascendex-pro-api/#ticker
1020
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#ticker
1021
+
1018
1022
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1019
1023
  :param dict [params]: extra parameters specific to the exchange API endpoint
1020
1024
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -1172,7 +1176,9 @@ class ascendex(Exchange, ImplicitAPI):
1172
1176
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
1173
1177
  """
1174
1178
  get the list of most recent trades for a particular symbol
1175
- :see: https://ascendex.github.io/ascendex-pro-api/#market-trades
1179
+
1180
+ https://ascendex.github.io/ascendex-pro-api/#market-trades
1181
+
1176
1182
  :param str symbol: unified symbol of the market to fetch trades for
1177
1183
  :param int [since]: timestamp in ms of the earliest trade to fetch
1178
1184
  :param int [limit]: the maximum amount of trades to fetch
@@ -1438,7 +1444,7 @@ class ascendex(Exchange, ImplicitAPI):
1438
1444
 
1439
1445
  def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
1440
1446
  """
1441
- * @ignore
1447
+ @ignore
1442
1448
  helper function to build request
1443
1449
  :param str symbol: unified symbol of the market to create an order in
1444
1450
  :param str type: 'market' or 'limit'
@@ -1511,8 +1517,10 @@ class ascendex(Exchange, ImplicitAPI):
1511
1517
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
1512
1518
  """
1513
1519
  create a trade order on the exchange
1514
- :see: https://ascendex.github.io/ascendex-pro-api/#place-order
1515
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#new-order
1520
+
1521
+ https://ascendex.github.io/ascendex-pro-api/#place-order
1522
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#new-order
1523
+
1516
1524
  :param str symbol: unified CCXT market symbol
1517
1525
  :param str type: "limit" or "market"
1518
1526
  :param str side: "buy" or "sell"
@@ -1607,8 +1615,10 @@ class ascendex(Exchange, ImplicitAPI):
1607
1615
  async def create_orders(self, orders: List[OrderRequest], params={}):
1608
1616
  """
1609
1617
  create a list of trade orders
1610
- :see: https://ascendex.github.io/ascendex-pro-api/#place-batch-orders
1611
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#place-batch-orders
1618
+
1619
+ https://ascendex.github.io/ascendex-pro-api/#place-batch-orders
1620
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#place-batch-orders
1621
+
1612
1622
  :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
1613
1623
  :param dict [params]: extra parameters specific to the exchange API endpoint
1614
1624
  :param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
@@ -1693,8 +1703,10 @@ class ascendex(Exchange, ImplicitAPI):
1693
1703
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
1694
1704
  """
1695
1705
  fetches information on an order made by the user
1696
- :see: https://ascendex.github.io/ascendex-pro-api/#query-order
1697
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#query-order-by-id
1706
+
1707
+ https://ascendex.github.io/ascendex-pro-api/#query-order
1708
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#query-order-by-id
1709
+
1698
1710
  :param str id: the order id
1699
1711
  :param str symbol: unified symbol of the market the order was made in
1700
1712
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1796,8 +1808,10 @@ class ascendex(Exchange, ImplicitAPI):
1796
1808
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1797
1809
  """
1798
1810
  fetch all unfilled currently open orders
1799
- :see: https://ascendex.github.io/ascendex-pro-api/#list-open-orders
1800
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-open-orders
1811
+
1812
+ https://ascendex.github.io/ascendex-pro-api/#list-open-orders
1813
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-open-orders
1814
+
1801
1815
  :param str symbol: unified market symbol
1802
1816
  :param int [since]: the earliest time in ms to fetch open orders for
1803
1817
  :param int [limit]: the maximum number of open orders structures to retrieve
@@ -1907,8 +1921,10 @@ class ascendex(Exchange, ImplicitAPI):
1907
1921
  async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1908
1922
  """
1909
1923
  fetches information on multiple closed orders made by the user
1910
- :see: https://ascendex.github.io/ascendex-pro-api/#list-history-orders-v2
1911
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-current-history-orders
1924
+
1925
+ https://ascendex.github.io/ascendex-pro-api/#list-history-orders-v2
1926
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-current-history-orders
1927
+
1912
1928
  :param str symbol: unified market symbol of the market orders were made in
1913
1929
  :param int [since]: the earliest time in ms to fetch orders for
1914
1930
  :param int [limit]: the maximum number of order structures to retrieve
@@ -2070,8 +2086,10 @@ class ascendex(Exchange, ImplicitAPI):
2070
2086
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
2071
2087
  """
2072
2088
  cancels an open order
2073
- :see: https://ascendex.github.io/ascendex-pro-api/#cancel-order
2074
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-order
2089
+
2090
+ https://ascendex.github.io/ascendex-pro-api/#cancel-order
2091
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-order
2092
+
2075
2093
  :param str id: order id
2076
2094
  :param str symbol: unified symbol of the market the order was made in
2077
2095
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2178,8 +2196,10 @@ class ascendex(Exchange, ImplicitAPI):
2178
2196
  async def cancel_all_orders(self, symbol: Str = None, params={}):
2179
2197
  """
2180
2198
  cancel all open orders
2181
- :see: https://ascendex.github.io/ascendex-pro-api/#cancel-all-orders
2182
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-all-open-orders
2199
+
2200
+ https://ascendex.github.io/ascendex-pro-api/#cancel-all-orders
2201
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-all-open-orders
2202
+
2183
2203
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
2184
2204
  :param dict [params]: extra parameters specific to the exchange API endpoint
2185
2205
  :returns dict[]: a list with a single `order structure <https://docs.ccxt.com/#/?id=order-structure>` with the response assigned to the info property
@@ -2279,7 +2299,9 @@ class ascendex(Exchange, ImplicitAPI):
2279
2299
  async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
2280
2300
  """
2281
2301
  fetch the deposit address for a currency associated with self account
2282
- :see: https://ascendex.github.io/ascendex-pro-api/#query-deposit-addresses
2302
+
2303
+ https://ascendex.github.io/ascendex-pro-api/#query-deposit-addresses
2304
+
2283
2305
  :param str code: unified currency code
2284
2306
  :param dict [params]: extra parameters specific to the exchange API endpoint
2285
2307
  :param str [params.network]: unified network code for deposit chain
@@ -2770,7 +2792,9 @@ class ascendex(Exchange, ImplicitAPI):
2770
2792
  async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2771
2793
  """
2772
2794
  set the level of leverage for a market
2773
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-contract-leverage
2795
+
2796
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-contract-leverage
2797
+
2774
2798
  :param float leverage: the rate of leverage
2775
2799
  :param str symbol: unified market symbol
2776
2800
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2797,7 +2821,9 @@ class ascendex(Exchange, ImplicitAPI):
2797
2821
  async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
2798
2822
  """
2799
2823
  set margin mode to 'cross' or 'isolated'
2800
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-margin-type
2824
+
2825
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-margin-type
2826
+
2801
2827
  :param str marginMode: 'cross' or 'isolated'
2802
2828
  :param str symbol: unified market symbol
2803
2829
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2894,14 +2920,15 @@ class ascendex(Exchange, ImplicitAPI):
2894
2920
  # }
2895
2921
  #
2896
2922
  marginRequirements = self.safe_list(info, 'marginRequirements', [])
2897
- id = self.safe_string(info, 'symbol')
2898
- market = self.safe_market(id, market)
2923
+ marketId = self.safe_string(info, 'symbol')
2924
+ market = self.safe_market(marketId, market)
2899
2925
  tiers = []
2900
2926
  for i in range(0, len(marginRequirements)):
2901
2927
  tier = marginRequirements[i]
2902
2928
  initialMarginRate = self.safe_string(tier, 'initialMarginRate')
2903
2929
  tiers.append({
2904
2930
  'tier': self.sum(i, 1),
2931
+ 'symbol': self.safe_symbol(marketId, market, None, 'contract'),
2905
2932
  'currency': market['quote'],
2906
2933
  'minNotional': self.safe_number(tier, 'positionNotionalLowerBound'),
2907
2934
  'maxNotional': self.safe_number(tier, 'positionNotionalUpperBound'),
@@ -2962,7 +2989,9 @@ class ascendex(Exchange, ImplicitAPI):
2962
2989
  async def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
2963
2990
  """
2964
2991
  fetch deposit and withdraw fees
2965
- :see: https://ascendex.github.io/ascendex-pro-api/#list-all-assets
2992
+
2993
+ https://ascendex.github.io/ascendex-pro-api/#list-all-assets
2994
+
2966
2995
  :param str[]|None codes: list of unified currency codes
2967
2996
  :param dict [params]: extra parameters specific to the exchange API endpoint
2968
2997
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
@@ -3039,7 +3068,9 @@ class ascendex(Exchange, ImplicitAPI):
3039
3068
  async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3040
3069
  """
3041
3070
  fetch the history of funding payments paid and received on self account
3042
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#funding-payment-history
3071
+
3072
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#funding-payment-history
3073
+
3043
3074
  :param str [symbol]: unified market symbol
3044
3075
  :param int [since]: the earliest time in ms to fetch funding history for
3045
3076
  :param int [limit]: the maximum number of funding history structures to retrieve
@@ -3111,7 +3142,9 @@ class ascendex(Exchange, ImplicitAPI):
3111
3142
  async def fetch_margin_modes(self, symbols: Strings = None, params={}) -> MarginModes:
3112
3143
  """
3113
3144
  fetches the set margin mode of the user
3114
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
3145
+
3146
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
3147
+
3115
3148
  :param str[] [symbols]: a list of unified market symbols
3116
3149
  :param dict [params]: extra parameters specific to the exchange API endpoint
3117
3150
  :returns dict: a list of `margin mode structures <https://docs.ccxt.com/#/?id=margin-mode-structure>`
@@ -3180,7 +3213,9 @@ class ascendex(Exchange, ImplicitAPI):
3180
3213
  async def fetch_leverages(self, symbols: Strings = None, params={}) -> Leverages:
3181
3214
  """
3182
3215
  fetch the set leverage for all contract markets
3183
- :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
3216
+
3217
+ https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
3218
+
3184
3219
  :param str[] [symbols]: a list of unified market symbols
3185
3220
  :param dict [params]: extra parameters specific to the exchange API endpoint
3186
3221
  :returns dict: a list of `leverage structures <https://docs.ccxt.com/#/?id=leverage-structure>`
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.30'
5
+ __version__ = '4.4.32'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -1766,7 +1766,7 @@ class Exchange(BaseExchange):
1766
1766
  :param int [since]: timestamp in ms of the earliest candle to fetch
1767
1767
  :param int [limit]: the maximum amount of candles to fetch
1768
1768
  :param dict [params]: extra parameters specific to the exchange API endpoint
1769
- * @returns {} A list of candles ordered, open, high, low, close, None
1769
+ @returns {} A list of candles ordered, open, high, low, close, None
1770
1770
  """
1771
1771
  if self.has['fetchIndexOHLCV']:
1772
1772
  request: dict = {
@@ -1796,7 +1796,7 @@ class Exchange(BaseExchange):
1796
1796
 
1797
1797
  async def fetch_transactions(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1798
1798
  """
1799
- * @deprecated
1799
+ @deprecated
1800
1800
  *DEPRECATED* use fetchDepositsWithdrawals instead
1801
1801
  :param str code: unified currency code for the currency of the deposit/withdrawals, default is None
1802
1802
  :param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
@@ -1,5 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
+ orjson = None
4
+ try:
5
+ import orjson as orjson
6
+ except ImportError:
7
+ pass
8
+
3
9
  import json
4
10
  from asyncio import sleep, ensure_future
5
11
  from aiohttp import WSMsgType
@@ -25,8 +31,16 @@ class AiohttpClient(Client):
25
31
  self.log(iso8601(milliseconds()), 'message', data)
26
32
  if isinstance(data, bytes):
27
33
  data = data.decode()
28
- decoded = json.loads(data) if is_json_encoded_object(data) else data
29
- self.on_message_callback(self, decoded)
34
+ # decoded = json.loads(data) if is_json_encoded_object(data) else data
35
+ decode = None
36
+ if is_json_encoded_object(data):
37
+ if orjson is None:
38
+ decode = json.loads(data)
39
+ else:
40
+ decode = orjson.loads(data)
41
+ else:
42
+ decode = data
43
+ self.on_message_callback(self, decode)
30
44
 
31
45
  def handle_message(self, message):
32
46
  # self.log(iso8601(milliseconds()), message)
@@ -80,7 +94,15 @@ class AiohttpClient(Client):
80
94
  async def send(self, message):
81
95
  if self.verbose:
82
96
  self.log(iso8601(milliseconds()), 'sending', message)
83
- return await self.connection.send_str(message if isinstance(message, str) else json.dumps(message, separators=(',', ':')))
97
+ send_msg = None
98
+ if isinstance(message, str):
99
+ send_msg = message
100
+ else:
101
+ if orjson is None:
102
+ send_msg = json.dumps(message, separators=(',', ':'))
103
+ else:
104
+ send_msg = orjson.dumps(message).decode('utf-8')
105
+ return await self.connection.send_str(send_msg)
84
106
 
85
107
  async def close(self, code=1000):
86
108
  if self.verbose: