ccxt 4.1.95__py2.py3-none-any.whl → 4.1.97__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 (163) hide show
  1. ccxt/__init__.py +2 -1
  2. ccxt/abstract/bingx.py +2 -0
  3. ccxt/abstract/kucoin.py +12 -0
  4. ccxt/abstract/kucoinfutures.py +12 -1
  5. ccxt/ace.py +1 -1
  6. ccxt/ascendex.py +1 -1
  7. ccxt/async_support/__init__.py +2 -1
  8. ccxt/async_support/ace.py +1 -1
  9. ccxt/async_support/ascendex.py +1 -1
  10. ccxt/async_support/base/exchange.py +29 -23
  11. ccxt/async_support/bigone.py +2 -2
  12. ccxt/async_support/binance.py +116 -114
  13. ccxt/async_support/bingx.py +46 -7
  14. ccxt/async_support/bit2c.py +2 -3
  15. ccxt/async_support/bitfinex.py +1 -1
  16. ccxt/async_support/bitfinex2.py +3 -4
  17. ccxt/async_support/bitflyer.py +2 -2
  18. ccxt/async_support/bitmart.py +2 -2
  19. ccxt/async_support/bitmex.py +2 -2
  20. ccxt/async_support/bitopro.py +1 -1
  21. ccxt/async_support/bitpanda.py +1 -1
  22. ccxt/async_support/bitvavo.py +1 -1
  23. ccxt/async_support/blockchaincom.py +1 -1
  24. ccxt/async_support/btcalpha.py +2 -2
  25. ccxt/async_support/btcbox.py +3 -4
  26. ccxt/async_support/btcmarkets.py +2 -2
  27. ccxt/async_support/btcturk.py +1 -1
  28. ccxt/async_support/bybit.py +2 -2
  29. ccxt/async_support/cex.py +1 -1
  30. ccxt/async_support/coinbase.py +11 -5
  31. ccxt/async_support/coinbasepro.py +2 -2
  32. ccxt/async_support/coinex.py +1 -1
  33. ccxt/async_support/coinlist.py +1 -1
  34. ccxt/async_support/cryptocom.py +2 -1
  35. ccxt/async_support/delta.py +24 -1
  36. ccxt/async_support/deribit.py +1 -1
  37. ccxt/async_support/digifinex.py +1 -1
  38. ccxt/async_support/gate.py +2 -2
  39. ccxt/async_support/hitbtc.py +1 -1
  40. ccxt/async_support/hollaex.py +2 -2
  41. ccxt/async_support/htx.py +1 -1
  42. ccxt/async_support/huobijp.py +2 -2
  43. ccxt/async_support/idex.py +1 -1
  44. ccxt/async_support/independentreserve.py +1 -1
  45. ccxt/async_support/kraken.py +45 -41
  46. ccxt/async_support/krakenfutures.py +46 -23
  47. ccxt/async_support/kucoin.py +68 -5
  48. ccxt/async_support/kucoinfutures.py +2 -2
  49. ccxt/async_support/kuna.py +1 -1
  50. ccxt/async_support/latoken.py +1 -1
  51. ccxt/async_support/luno.py +2 -2
  52. ccxt/async_support/lykke.py +1 -1
  53. ccxt/async_support/mexc.py +2 -2
  54. ccxt/async_support/ndax.py +1 -1
  55. ccxt/async_support/novadax.py +2 -2
  56. ccxt/async_support/oceanex.py +1 -1
  57. ccxt/async_support/okcoin.py +1 -1
  58. ccxt/async_support/okx.py +1 -1
  59. ccxt/async_support/poloniexfutures.py +1 -1
  60. ccxt/async_support/probit.py +1 -1
  61. ccxt/async_support/timex.py +1 -1
  62. ccxt/async_support/tokocrypto.py +1 -1
  63. ccxt/async_support/upbit.py +1 -1
  64. ccxt/async_support/wavesexchange.py +1 -1
  65. ccxt/async_support/whitebit.py +1 -1
  66. ccxt/async_support/woo.py +1 -1
  67. ccxt/async_support/zaif.py +1 -1
  68. ccxt/base/errors.py +6 -0
  69. ccxt/base/exchange.py +10 -7
  70. ccxt/bigone.py +2 -2
  71. ccxt/binance.py +116 -114
  72. ccxt/bingx.py +46 -7
  73. ccxt/bit2c.py +2 -3
  74. ccxt/bitfinex.py +1 -1
  75. ccxt/bitfinex2.py +3 -4
  76. ccxt/bitflyer.py +2 -2
  77. ccxt/bitmart.py +2 -2
  78. ccxt/bitmex.py +2 -2
  79. ccxt/bitopro.py +1 -1
  80. ccxt/bitpanda.py +1 -1
  81. ccxt/bitvavo.py +1 -1
  82. ccxt/blockchaincom.py +1 -1
  83. ccxt/btcalpha.py +2 -2
  84. ccxt/btcbox.py +3 -4
  85. ccxt/btcmarkets.py +2 -2
  86. ccxt/btcturk.py +1 -1
  87. ccxt/bybit.py +2 -2
  88. ccxt/cex.py +1 -1
  89. ccxt/coinbase.py +11 -5
  90. ccxt/coinbasepro.py +2 -2
  91. ccxt/coinex.py +1 -1
  92. ccxt/coinlist.py +1 -1
  93. ccxt/cryptocom.py +2 -1
  94. ccxt/delta.py +24 -1
  95. ccxt/deribit.py +1 -1
  96. ccxt/digifinex.py +1 -1
  97. ccxt/gate.py +2 -2
  98. ccxt/hitbtc.py +1 -1
  99. ccxt/hollaex.py +2 -2
  100. ccxt/htx.py +1 -1
  101. ccxt/huobijp.py +2 -2
  102. ccxt/idex.py +1 -1
  103. ccxt/independentreserve.py +1 -1
  104. ccxt/kraken.py +45 -41
  105. ccxt/krakenfutures.py +46 -23
  106. ccxt/kucoin.py +68 -5
  107. ccxt/kucoinfutures.py +2 -2
  108. ccxt/kuna.py +1 -1
  109. ccxt/latoken.py +1 -1
  110. ccxt/luno.py +2 -2
  111. ccxt/lykke.py +1 -1
  112. ccxt/mexc.py +2 -2
  113. ccxt/ndax.py +1 -1
  114. ccxt/novadax.py +2 -2
  115. ccxt/oceanex.py +1 -1
  116. ccxt/okcoin.py +1 -1
  117. ccxt/okx.py +1 -1
  118. ccxt/poloniexfutures.py +1 -1
  119. ccxt/pro/__init__.py +1 -1
  120. ccxt/pro/alpaca.py +1 -1
  121. ccxt/pro/ascendex.py +1 -1
  122. ccxt/pro/binance.py +5 -6
  123. ccxt/pro/bingx.py +6 -3
  124. ccxt/pro/bitfinex.py +3 -4
  125. ccxt/pro/bitfinex2.py +1 -1
  126. ccxt/pro/bitmex.py +1 -1
  127. ccxt/pro/bitpanda.py +1 -1
  128. ccxt/pro/blockchaincom.py +1 -1
  129. ccxt/pro/bybit.py +2 -2
  130. ccxt/pro/cex.py +1 -1
  131. ccxt/pro/coinbase.py +1 -1
  132. ccxt/pro/coinbasepro.py +1 -1
  133. ccxt/pro/cryptocom.py +1 -1
  134. ccxt/pro/deribit.py +1 -1
  135. ccxt/pro/gate.py +3 -3
  136. ccxt/pro/gemini.py +1 -1
  137. ccxt/pro/hitbtc.py +1 -1
  138. ccxt/pro/hollaex.py +1 -1
  139. ccxt/pro/htx.py +1 -1
  140. ccxt/pro/idex.py +1 -1
  141. ccxt/pro/kraken.py +3 -4
  142. ccxt/pro/krakenfutures.py +1 -1
  143. ccxt/pro/kucoinfutures.py +1 -1
  144. ccxt/pro/mexc.py +1 -1
  145. ccxt/pro/okcoin.py +1 -1
  146. ccxt/pro/okx.py +4 -4
  147. ccxt/pro/phemex.py +1 -1
  148. ccxt/pro/poloniexfutures.py +1 -1
  149. ccxt/pro/woo.py +2 -3
  150. ccxt/probit.py +1 -1
  151. ccxt/test/test_async.py +3 -1
  152. ccxt/test/test_sync.py +3 -1
  153. ccxt/timex.py +1 -1
  154. ccxt/tokocrypto.py +1 -1
  155. ccxt/upbit.py +1 -1
  156. ccxt/wavesexchange.py +1 -1
  157. ccxt/whitebit.py +1 -1
  158. ccxt/woo.py +1 -1
  159. ccxt/zaif.py +1 -1
  160. {ccxt-4.1.95.dist-info → ccxt-4.1.97.dist-info}/METADATA +4 -4
  161. {ccxt-4.1.95.dist-info → ccxt-4.1.97.dist-info}/RECORD +163 -163
  162. {ccxt-4.1.95.dist-info → ccxt-4.1.97.dist-info}/WHEEL +0 -0
  163. {ccxt-4.1.95.dist-info → ccxt-4.1.97.dist-info}/top_level.txt +0 -0
ccxt/bitfinex2.py CHANGED
@@ -1046,15 +1046,14 @@ class bitfinex2(Exchange, ImplicitAPI):
1046
1046
  # FRR_AMOUNT_AVAILABLE
1047
1047
  # ]
1048
1048
  #
1049
- timestamp = self.milliseconds()
1050
1049
  symbol = self.safe_symbol(None, market)
1051
1050
  length = len(ticker)
1052
1051
  last = self.safe_string(ticker, length - 4)
1053
1052
  percentage = self.safe_string(ticker, length - 5)
1054
1053
  return self.safe_ticker({
1055
1054
  'symbol': symbol,
1056
- 'timestamp': timestamp,
1057
- 'datetime': self.iso8601(timestamp),
1055
+ 'timestamp': None,
1056
+ 'datetime': None,
1058
1057
  'high': self.safe_string(ticker, length - 2),
1059
1058
  'low': self.safe_string(ticker, length - 1),
1060
1059
  'bid': self.safe_string(ticker, length - 10),
@@ -1736,7 +1735,7 @@ class bitfinex2(Exchange, ImplicitAPI):
1736
1735
  :see: https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
1737
1736
  :param str symbol: unified market symbol of the market orders were made in
1738
1737
  :param int [since]: the earliest time in ms to fetch orders for
1739
- :param int [limit]: the maximum number of orde structures to retrieve
1738
+ :param int [limit]: the maximum number of order structures to retrieve
1740
1739
  :param dict [params]: extra parameters specific to the exchange API endpoint
1741
1740
  :param int [params.until]: the latest time in ms to fetch entries for
1742
1741
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
ccxt/bitflyer.py CHANGED
@@ -620,7 +620,7 @@ class bitflyer(Exchange, ImplicitAPI):
620
620
  :see: https://lightning.bitflyer.com/docs?lang=en#list-orders
621
621
  :param str symbol: unified market symbol of the market orders were made in
622
622
  :param int [since]: the earliest time in ms to fetch orders for
623
- :param int [limit]: the maximum number of orde structures to retrieve
623
+ :param int [limit]: the maximum number of order structures to retrieve
624
624
  :param dict [params]: extra parameters specific to the exchange API endpoint
625
625
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
626
626
  """
@@ -659,7 +659,7 @@ class bitflyer(Exchange, ImplicitAPI):
659
659
  :see: https://lightning.bitflyer.com/docs?lang=en#list-orders
660
660
  :param str symbol: unified market symbol of the market orders were made in
661
661
  :param int [since]: the earliest time in ms to fetch orders for
662
- :param int [limit]: the maximum number of orde structures to retrieve
662
+ :param int [limit]: the maximum number of order structures to retrieve
663
663
  :param dict [params]: extra parameters specific to the exchange API endpoint
664
664
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
665
665
  """
ccxt/bitmart.py CHANGED
@@ -1074,7 +1074,7 @@ class bitmart(Exchange, ImplicitAPI):
1074
1074
  # "legal_coin_price":"0.1302699"
1075
1075
  # }
1076
1076
  #
1077
- timestamp = self.safe_integer(ticker, 'timestamp', self.milliseconds())
1077
+ timestamp = self.safe_integer(ticker, 'timestamp')
1078
1078
  marketId = self.safe_string_2(ticker, 'symbol', 'contract_symbol')
1079
1079
  market = self.safe_market(marketId, market)
1080
1080
  symbol = market['symbol']
@@ -2589,7 +2589,7 @@ class bitmart(Exchange, ImplicitAPI):
2589
2589
  fetches information on multiple closed orders made by the user
2590
2590
  :param str symbol: unified market symbol of the market orders were made in
2591
2591
  :param int [since]: the earliest time in ms to fetch orders for
2592
- :param int [limit]: the maximum number of orde structures to retrieve
2592
+ :param int [limit]: the maximum number of order structures to retrieve
2593
2593
  :param dict [params]: extra parameters specific to the exchange API endpoint
2594
2594
  :param int [params.until]: timestamp in ms of the latest entry
2595
2595
  :param str [params.marginMode]: *spot only* 'cross' or 'isolated', for margin trading
ccxt/bitmex.py CHANGED
@@ -847,7 +847,7 @@ class bitmex(Exchange, ImplicitAPI):
847
847
  fetches information on multiple orders made by the user
848
848
  :param str symbol: unified market symbol of the market orders were made in
849
849
  :param int [since]: the earliest time in ms to fetch orders for
850
- :param int [limit]: the maximum number of orde structures to retrieve
850
+ :param int [limit]: the maximum number of order structures to retrieve
851
851
  :param dict [params]: extra parameters specific to the exchange API endpoint
852
852
  :param int [params.until]: the earliest time in ms to fetch orders for
853
853
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
@@ -901,7 +901,7 @@ class bitmex(Exchange, ImplicitAPI):
901
901
  fetches information on multiple closed orders made by the user
902
902
  :param str symbol: unified market symbol of the market orders were made in
903
903
  :param int [since]: the earliest time in ms to fetch orders for
904
- :param int [limit]: the maximum number of orde structures to retrieve
904
+ :param int [limit]: the maximum number of order structures to retrieve
905
905
  :param dict [params]: extra parameters specific to the exchange API endpoint
906
906
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
907
907
  """
ccxt/bitopro.py CHANGED
@@ -1203,7 +1203,7 @@ class bitopro(Exchange, ImplicitAPI):
1203
1203
  :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_orders_data.md
1204
1204
  :param str symbol: unified market symbol of the market orders were made in
1205
1205
  :param int [since]: the earliest time in ms to fetch orders for
1206
- :param int [limit]: the maximum number of orde structures to retrieve
1206
+ :param int [limit]: the maximum number of order structures to retrieve
1207
1207
  :param dict [params]: extra parameters specific to the exchange API endpoint
1208
1208
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1209
1209
  """
ccxt/bitpanda.py CHANGED
@@ -1745,7 +1745,7 @@ class bitpanda(Exchange, ImplicitAPI):
1745
1745
  fetches information on multiple closed orders made by the user
1746
1746
  :param str symbol: unified market symbol of the market orders were made in
1747
1747
  :param int [since]: the earliest time in ms to fetch orders for
1748
- :param int [limit]: the maximum number of orde structures to retrieve
1748
+ :param int [limit]: the maximum number of order structures to retrieve
1749
1749
  :param dict [params]: extra parameters specific to the exchange API endpoint
1750
1750
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1751
1751
  """
ccxt/bitvavo.py CHANGED
@@ -1208,7 +1208,7 @@ class bitvavo(Exchange, ImplicitAPI):
1208
1208
  fetches information on multiple orders made by the user
1209
1209
  :param str symbol: unified market symbol of the market orders were made in
1210
1210
  :param int [since]: the earliest time in ms to fetch orders for
1211
- :param int [limit]: the maximum number of orde structures to retrieve
1211
+ :param int [limit]: the maximum number of order structures to retrieve
1212
1212
  :param dict [params]: extra parameters specific to the exchange API endpoint
1213
1213
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1214
1214
  :param int [params.until]: the latest time in ms to fetch entries for
ccxt/blockchaincom.py CHANGED
@@ -654,7 +654,7 @@ class blockchaincom(Exchange, ImplicitAPI):
654
654
  fetches information on multiple closed orders made by the user
655
655
  :param str symbol: unified market symbol of the market orders were made in
656
656
  :param int [since]: the earliest time in ms to fetch orders for
657
- :param int [limit]: the maximum number of orde structures to retrieve
657
+ :param int [limit]: the maximum number of order structures to retrieve
658
658
  :param dict [params]: extra parameters specific to the exchange API endpoint
659
659
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
660
660
  """
ccxt/btcalpha.py CHANGED
@@ -761,7 +761,7 @@ class btcalpha(Exchange, ImplicitAPI):
761
761
  fetches information on multiple orders made by the user
762
762
  :param str symbol: unified market symbol of the market orders were made in
763
763
  :param int [since]: the earliest time in ms to fetch orders for
764
- :param int [limit]: the maximum number of orde structures to retrieve
764
+ :param int [limit]: the maximum number of order structures to retrieve
765
765
  :param dict [params]: extra parameters specific to the exchange API endpoint
766
766
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
767
767
  """
@@ -795,7 +795,7 @@ class btcalpha(Exchange, ImplicitAPI):
795
795
  fetches information on multiple closed orders made by the user
796
796
  :param str symbol: unified market symbol of the market orders were made in
797
797
  :param int [since]: the earliest time in ms to fetch orders for
798
- :param int [limit]: the maximum number of orde structures to retrieve
798
+ :param int [limit]: the maximum number of order structures to retrieve
799
799
  :param dict [params]: extra parameters specific to the exchange API endpoint
800
800
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
801
801
  """
ccxt/btcbox.py CHANGED
@@ -177,13 +177,12 @@ class btcbox(Exchange, ImplicitAPI):
177
177
  return self.parse_order_book(response, market['symbol'])
178
178
 
179
179
  def parse_ticker(self, ticker, market: Market = None) -> Ticker:
180
- timestamp = self.milliseconds()
181
180
  symbol = self.safe_symbol(None, market)
182
181
  last = self.safe_string(ticker, 'last')
183
182
  return self.safe_ticker({
184
183
  'symbol': symbol,
185
- 'timestamp': timestamp,
186
- 'datetime': self.iso8601(timestamp),
184
+ 'timestamp': None,
185
+ 'datetime': None,
187
186
  'high': self.safe_string(ticker, 'high'),
188
187
  'low': self.safe_string(ticker, 'low'),
189
188
  'bid': self.safe_string(ticker, 'buy'),
@@ -467,7 +466,7 @@ class btcbox(Exchange, ImplicitAPI):
467
466
  fetches information on multiple orders made by the user
468
467
  :param str symbol: unified market symbol of the market orders were made in
469
468
  :param int [since]: the earliest time in ms to fetch orders for
470
- :param int [limit]: the maximum number of orde structures to retrieve
469
+ :param int [limit]: the maximum number of order structures to retrieve
471
470
  :param dict [params]: extra parameters specific to the exchange API endpoint
472
471
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
473
472
  """
ccxt/btcmarkets.py CHANGED
@@ -970,7 +970,7 @@ class btcmarkets(Exchange, ImplicitAPI):
970
970
  fetches information on multiple orders made by the user
971
971
  :param str symbol: unified market symbol of the market orders were made in
972
972
  :param int [since]: the earliest time in ms to fetch orders for
973
- :param int [limit]: the maximum number of orde structures to retrieve
973
+ :param int [limit]: the maximum number of order structures to retrieve
974
974
  :param dict [params]: extra parameters specific to the exchange API endpoint
975
975
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
976
976
  """
@@ -1006,7 +1006,7 @@ class btcmarkets(Exchange, ImplicitAPI):
1006
1006
  fetches information on multiple closed orders made by the user
1007
1007
  :param str symbol: unified market symbol of the market orders were made in
1008
1008
  :param int [since]: the earliest time in ms to fetch orders for
1009
- :param int [limit]: the maximum number of orde structures to retrieve
1009
+ :param int [limit]: the maximum number of order structures to retrieve
1010
1010
  :param dict [params]: extra parameters specific to the exchange API endpoint
1011
1011
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1012
1012
  """
ccxt/btcturk.py CHANGED
@@ -696,7 +696,7 @@ class btcturk(Exchange, ImplicitAPI):
696
696
  fetches information on multiple orders made by the user
697
697
  :param str symbol: unified market symbol of the market orders were made in
698
698
  :param int [since]: the earliest time in ms to fetch orders for
699
- :param int [limit]: the maximum number of orde structures to retrieve
699
+ :param int [limit]: the maximum number of order structures to retrieve
700
700
  :param dict [params]: extra parameters specific to the exchange API endpoint
701
701
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
702
702
  """
ccxt/bybit.py CHANGED
@@ -4140,7 +4140,7 @@ class bybit(Exchange, ImplicitAPI):
4140
4140
  :see: https://bybit-exchange.github.io/docs/v5/order/order-list
4141
4141
  :param str symbol: unified market symbol of the market orders were made in
4142
4142
  :param int [since]: the earliest time in ms to fetch orders for
4143
- :param int [limit]: the maximum number of orde structures to retrieve
4143
+ :param int [limit]: the maximum number of order structures to retrieve
4144
4144
  :param dict [params]: extra parameters specific to the exchange API endpoint
4145
4145
  :param boolean [params.stop]: True if stop order
4146
4146
  :param str [params.type]: market type, ['swap', 'option', 'spot']
@@ -4245,7 +4245,7 @@ class bybit(Exchange, ImplicitAPI):
4245
4245
  :see: https://bybit-exchange.github.io/docs/v5/order/order-list
4246
4246
  :param str symbol: unified market symbol of the market orders were made in
4247
4247
  :param int [since]: the earliest time in ms to fetch orders for
4248
- :param int [limit]: the maximum number of orde structures to retrieve
4248
+ :param int [limit]: the maximum number of order structures to retrieve
4249
4249
  :param dict [params]: extra parameters specific to the exchange API endpoint
4250
4250
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
4251
4251
  """
ccxt/cex.py CHANGED
@@ -1261,7 +1261,7 @@ class cex(Exchange, ImplicitAPI):
1261
1261
  fetches information on multiple orders made by the user
1262
1262
  :param str symbol: unified market symbol of the market orders were made in
1263
1263
  :param int [since]: the earliest time in ms to fetch orders for
1264
- :param int [limit]: the maximum number of orde structures to retrieve
1264
+ :param int [limit]: the maximum number of order structures to retrieve
1265
1265
  :param dict [params]: extra parameters specific to the exchange API endpoint
1266
1266
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1267
1267
  """
ccxt/coinbase.py CHANGED
@@ -2261,6 +2261,12 @@ class coinbase(Exchange, ImplicitAPI):
2261
2261
  # "base_size": "0.2",
2262
2262
  # "limit_price": "0.006",
2263
2263
  # "post_only": False
2264
+ # },
2265
+ # "stop_limit_stop_limit_gtc": {
2266
+ # "base_size": "48.54",
2267
+ # "limit_price": "6.998",
2268
+ # "stop_price": "7.0687",
2269
+ # "stop_direction": "STOP_DIRECTION_STOP_DOWN"
2264
2270
  # }
2265
2271
  # },
2266
2272
  # "side": "SELL",
@@ -2293,11 +2299,11 @@ class coinbase(Exchange, ImplicitAPI):
2293
2299
  if symbol is not None:
2294
2300
  market = self.market(symbol)
2295
2301
  orderConfiguration = self.safe_value(order, 'order_configuration', {})
2296
- limitGTC = self.safe_value(orderConfiguration, 'limit_limit_gtc', {})
2297
- limitGTD = self.safe_value(orderConfiguration, 'limit_limit_gtd', {})
2298
- stopLimitGTC = self.safe_value(orderConfiguration, 'stop_limit_stop_limit_gtc', {})
2299
- stopLimitGTD = self.safe_value(orderConfiguration, 'stop_limit_stop_limit_gtd', {})
2300
- marketIOC = self.safe_value(orderConfiguration, 'market_market_ioc', {})
2302
+ limitGTC = self.safe_value(orderConfiguration, 'limit_limit_gtc')
2303
+ limitGTD = self.safe_value(orderConfiguration, 'limit_limit_gtd')
2304
+ stopLimitGTC = self.safe_value(orderConfiguration, 'stop_limit_stop_limit_gtc')
2305
+ stopLimitGTD = self.safe_value(orderConfiguration, 'stop_limit_stop_limit_gtd')
2306
+ marketIOC = self.safe_value(orderConfiguration, 'market_market_ioc')
2301
2307
  isLimit = ((limitGTC is not None) or (limitGTD is not None))
2302
2308
  isStop = ((stopLimitGTC is not None) or (stopLimitGTD is not None))
2303
2309
  price = None
ccxt/coinbasepro.py CHANGED
@@ -1083,7 +1083,7 @@ class coinbasepro(Exchange, ImplicitAPI):
1083
1083
  fetches information on multiple orders made by the user
1084
1084
  :param str symbol: unified market symbol of the market orders were made in
1085
1085
  :param int [since]: the earliest time in ms to fetch orders for
1086
- :param int [limit]: the maximum number of orde structures to retrieve
1086
+ :param int [limit]: the maximum number of order structures to retrieve
1087
1087
  :param dict [params]: extra parameters specific to the exchange API endpoint
1088
1088
  :param int [params.until]: the latest time in ms to fetch open orders for
1089
1089
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1132,7 +1132,7 @@ class coinbasepro(Exchange, ImplicitAPI):
1132
1132
  fetches information on multiple closed orders made by the user
1133
1133
  :param str symbol: unified market symbol of the market orders were made in
1134
1134
  :param int [since]: the earliest time in ms to fetch orders for
1135
- :param int [limit]: the maximum number of orde structures to retrieve
1135
+ :param int [limit]: the maximum number of order structures to retrieve
1136
1136
  :param dict [params]: extra parameters specific to the exchange API endpoint
1137
1137
  :param int [params.until]: the latest time in ms to fetch open orders for
1138
1138
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
ccxt/coinex.py CHANGED
@@ -2989,7 +2989,7 @@ class coinex(Exchange, ImplicitAPI):
2989
2989
  :see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade012_finished_order
2990
2990
  :param str symbol: unified market symbol of the market orders were made in
2991
2991
  :param int [since]: the earliest time in ms to fetch orders for
2992
- :param int [limit]: the maximum number of orde structures to retrieve
2992
+ :param int [limit]: the maximum number of order structures to retrieve
2993
2993
  :param dict [params]: extra parameters specific to the exchange API endpoint
2994
2994
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
2995
2995
  """
ccxt/coinlist.py CHANGED
@@ -1179,7 +1179,7 @@ class coinlist(Exchange, ImplicitAPI):
1179
1179
  :see: https://trade-docs.coinlist.co/?javascript--nodejs#list-orders
1180
1180
  :param str symbol: unified market symbol of the market orders were made in
1181
1181
  :param int [since]: the earliest time in ms to fetch orders for
1182
- :param int [limit]: the maximum number of orde structures to retrieve(default 200, max 500)
1182
+ :param int [limit]: the maximum number of order structures to retrieve(default 200, max 500)
1183
1183
  :param dict [params]: extra parameters specific to the exchange API endpoint
1184
1184
  :param int [params.until]: the latest time in ms to fetch entries for
1185
1185
  :param string|str[] [params.status]: the status of the order - 'accepted', 'done', 'canceled', 'rejected', 'pending'(default ['accepted', 'done', 'canceled', 'rejected', 'pending'])
ccxt/cryptocom.py CHANGED
@@ -1760,6 +1760,7 @@ class cryptocom(Exchange, ImplicitAPI):
1760
1760
  timestamp = self.safe_integer(ticker, 't')
1761
1761
  marketId = self.safe_string(ticker, 'i')
1762
1762
  market = self.safe_market(marketId, market, '_')
1763
+ quote = self.safe_string(market, 'quote')
1763
1764
  last = self.safe_string(ticker, 'a')
1764
1765
  return self.safe_ticker({
1765
1766
  'symbol': market['symbol'],
@@ -1780,7 +1781,7 @@ class cryptocom(Exchange, ImplicitAPI):
1780
1781
  'percentage': self.safe_string(ticker, 'c'),
1781
1782
  'average': None,
1782
1783
  'baseVolume': self.safe_string(ticker, 'v'),
1783
- 'quoteVolume': self.safe_string(ticker, 'vv'),
1784
+ 'quoteVolume': self.safe_string(ticker, 'vv') if (quote == 'USD') else None,
1784
1785
  'info': ticker,
1785
1786
  }, market)
1786
1787
 
ccxt/delta.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.delta import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
9
+ from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderSide, OrderType, Position, 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
@@ -41,6 +41,8 @@ class delta(Exchange, ImplicitAPI):
41
41
  'addMargin': True,
42
42
  'cancelAllOrders': True,
43
43
  'cancelOrder': True,
44
+ 'closeAllPositions': True,
45
+ 'closePosition': False,
44
46
  'createOrder': True,
45
47
  'createReduceOnlyOrder': True,
46
48
  'editOrder': True,
@@ -3061,6 +3063,27 @@ class delta(Exchange, ImplicitAPI):
3061
3063
  'info': greeks,
3062
3064
  }
3063
3065
 
3066
+ def close_all_positions(self, params={}) -> List[Position]:
3067
+ """
3068
+ closes all open positions for a market type
3069
+ :see: https://docs.delta.exchange/#close-all-positions
3070
+ :param dict [params]: extra parameters specific to the exchange API endpoint
3071
+ :param int [params.user_id]: the users id
3072
+ :returns dict[]: A list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
3073
+ """
3074
+ self.load_markets()
3075
+ request = {
3076
+ 'close_all_portfolio': True,
3077
+ 'close_all_isolated': True,
3078
+ # 'user_id': 12345,
3079
+ }
3080
+ response = self.privatePostPositionsCloseAll(self.extend(request, params))
3081
+ #
3082
+ # {"result":{},"success":true}
3083
+ #
3084
+ position = self.parse_position(self.safe_value(response, 'result', {}))
3085
+ return [position]
3086
+
3064
3087
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
3065
3088
  requestPath = '/' + self.version + '/' + self.implode_params(path, params)
3066
3089
  url = self.urls['api'][api] + requestPath
ccxt/deribit.py CHANGED
@@ -1898,7 +1898,7 @@ class deribit(Exchange, ImplicitAPI):
1898
1898
  fetches information on multiple closed orders made by the user
1899
1899
  :param str symbol: unified market symbol of the market orders were made in
1900
1900
  :param int [since]: the earliest time in ms to fetch orders for
1901
- :param int [limit]: the maximum number of orde structures to retrieve
1901
+ :param int [limit]: the maximum number of order structures to retrieve
1902
1902
  :param dict [params]: extra parameters specific to the exchange API endpoint
1903
1903
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1904
1904
  """
ccxt/digifinex.py CHANGED
@@ -2084,7 +2084,7 @@ class digifinex(Exchange, ImplicitAPI):
2084
2084
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#historyorder
2085
2085
  :param str symbol: unified market symbol of the market orders were made in
2086
2086
  :param int [since]: the earliest time in ms to fetch orders for
2087
- :param int [limit]: the maximum number of orde structures to retrieve
2087
+ :param int [limit]: the maximum number of order structures to retrieve
2088
2088
  :param dict [params]: extra parameters specific to the exchange API endpoint
2089
2089
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
2090
2090
  """
ccxt/gate.py CHANGED
@@ -4333,7 +4333,7 @@ class gate(Exchange, ImplicitAPI):
4333
4333
  :see: https://www.gate.io/docs/developers/apiv4/en/#list-options-orders
4334
4334
  :param str symbol: unified market symbol of the market orders were made in
4335
4335
  :param int [since]: the earliest time in ms to fetch orders for
4336
- :param int [limit]: the maximum number of orde structures to retrieve
4336
+ :param int [limit]: the maximum number of order structures to retrieve
4337
4337
  :param dict [params]: extra parameters specific to the exchange API endpoint
4338
4338
  :param bool [params.stop]: True for fetching stop orders
4339
4339
  :param str [params.type]: spot, swap or future, if not provided self.options['defaultType'] is used
@@ -6502,7 +6502,7 @@ class gate(Exchange, ImplicitAPI):
6502
6502
  :param str symbol: Unified CCXT market symbol
6503
6503
  :param str side: 'buy' or 'sell'
6504
6504
  :param dict [params]: extra parameters specific to the okx api endpoint
6505
- :returns [dict]: `A list of position structures <https://docs.ccxt.com/#/?id=position-structure>`
6505
+ :returns dict[]: `A list of position structures <https://docs.ccxt.com/#/?id=position-structure>`
6506
6506
  """
6507
6507
  request = {
6508
6508
  'close': True,
ccxt/hitbtc.py CHANGED
@@ -1729,7 +1729,7 @@ class hitbtc(Exchange, ImplicitAPI):
1729
1729
  :see: https://api.hitbtc.com/#margin-orders-history
1730
1730
  :param str symbol: unified market symbol of the market orders were made in
1731
1731
  :param int [since]: the earliest time in ms to fetch orders for
1732
- :param int [limit]: the maximum number of orde structures to retrieve
1732
+ :param int [limit]: the maximum number of order structures to retrieve
1733
1733
  :param dict [params]: extra parameters specific to the exchange API endpoint
1734
1734
  :param str [params.marginMode]: 'cross' or 'isolated' only 'isolated' is supported
1735
1735
  :param bool [params.margin]: True for fetching margin orders
ccxt/hollaex.py CHANGED
@@ -892,7 +892,7 @@ class hollaex(Exchange, ImplicitAPI):
892
892
  fetches information on multiple closed orders made by the user
893
893
  :param str symbol: unified market symbol of the market orders were made in
894
894
  :param int [since]: the earliest time in ms to fetch orders for
895
- :param int [limit]: the maximum number of orde structures to retrieve
895
+ :param int [limit]: the maximum number of order structures to retrieve
896
896
  :param dict [params]: extra parameters specific to the exchange API endpoint
897
897
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
898
898
  """
@@ -945,7 +945,7 @@ class hollaex(Exchange, ImplicitAPI):
945
945
  fetches information on multiple orders made by the user
946
946
  :param str symbol: unified market symbol of the market orders were made in
947
947
  :param int [since]: the earliest time in ms to fetch orders for
948
- :param int [limit]: the maximum number of orde structures to retrieve
948
+ :param int [limit]: the maximum number of order structures to retrieve
949
949
  :param dict [params]: extra parameters specific to the exchange API endpoint
950
950
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
951
951
  """
ccxt/htx.py CHANGED
@@ -3860,7 +3860,7 @@ class htx(Exchange, ImplicitAPI):
3860
3860
  fetches information on multiple closed orders made by the user
3861
3861
  :param str symbol: unified market symbol of the market orders were made in
3862
3862
  :param int [since]: the earliest time in ms to fetch orders for
3863
- :param int [limit]: the maximum number of orde structures to retrieve
3863
+ :param int [limit]: the maximum number of order structures to retrieve
3864
3864
  :param dict [params]: extra parameters specific to the exchange API endpoint
3865
3865
  :param int [params.until]: the latest time in ms to fetch entries for
3866
3866
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
ccxt/huobijp.py CHANGED
@@ -1133,7 +1133,7 @@ class huobijp(Exchange, ImplicitAPI):
1133
1133
  fetches information on multiple orders made by the user
1134
1134
  :param str symbol: unified market symbol of the market orders were made in
1135
1135
  :param int [since]: the earliest time in ms to fetch orders for
1136
- :param int [limit]: the maximum number of orde structures to retrieve
1136
+ :param int [limit]: the maximum number of order structures to retrieve
1137
1137
  :param dict [params]: extra parameters specific to the exchange API endpoint
1138
1138
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1139
1139
  """
@@ -1161,7 +1161,7 @@ class huobijp(Exchange, ImplicitAPI):
1161
1161
  fetches information on multiple closed orders made by the user
1162
1162
  :param str symbol: unified market symbol of the market orders were made in
1163
1163
  :param int [since]: the earliest time in ms to fetch orders for
1164
- :param int [limit]: the maximum number of orde structures to retrieve
1164
+ :param int [limit]: the maximum number of order structures to retrieve
1165
1165
  :param dict [params]: extra parameters specific to the exchange API endpoint
1166
1166
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1167
1167
  """
ccxt/idex.py CHANGED
@@ -885,7 +885,7 @@ class idex(Exchange, ImplicitAPI):
885
885
  fetches information on multiple closed orders made by the user
886
886
  :param str symbol: unified market symbol of the market orders were made in
887
887
  :param int [since]: the earliest time in ms to fetch orders for
888
- :param int [limit]: the maximum number of orde structures to retrieve
888
+ :param int [limit]: the maximum number of order structures to retrieve
889
889
  :param dict [params]: extra parameters specific to the exchange API endpoint
890
890
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
891
891
  """
@@ -485,7 +485,7 @@ class independentreserve(Exchange, ImplicitAPI):
485
485
  fetches information on multiple closed orders made by the user
486
486
  :param str symbol: unified market symbol of the market orders were made in
487
487
  :param int [since]: the earliest time in ms to fetch orders for
488
- :param int [limit]: the maximum number of orde structures to retrieve
488
+ :param int [limit]: the maximum number of order structures to retrieve
489
489
  :param dict [params]: extra parameters specific to the exchange API endpoint
490
490
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
491
491
  """