ccxt 4.4.52__py2.py3-none-any.whl → 4.4.53__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 (224) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +0 -1
  3. ccxt/abstract/binancecoinm.py +0 -1
  4. ccxt/abstract/binanceus.py +0 -1
  5. ccxt/abstract/binanceusdm.py +0 -1
  6. ccxt/ace.py +3 -0
  7. ccxt/alpaca.py +5 -0
  8. ccxt/ascendex.py +2 -1
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/ace.py +3 -0
  11. ccxt/async_support/alpaca.py +5 -0
  12. ccxt/async_support/ascendex.py +2 -1
  13. ccxt/async_support/base/exchange.py +20 -3
  14. ccxt/async_support/bigone.py +5 -0
  15. ccxt/async_support/binance.py +55 -69
  16. ccxt/async_support/bingx.py +25 -29
  17. ccxt/async_support/bit2c.py +3 -0
  18. ccxt/async_support/bitbank.py +3 -0
  19. ccxt/async_support/bitbns.py +3 -0
  20. ccxt/async_support/bitfinex.py +6 -1
  21. ccxt/async_support/bitflyer.py +6 -1
  22. ccxt/async_support/bitget.py +8 -4
  23. ccxt/async_support/bithumb.py +3 -1
  24. ccxt/async_support/bitmart.py +22 -12
  25. ccxt/async_support/bitmex.py +99 -93
  26. ccxt/async_support/bitopro.py +7 -2
  27. ccxt/async_support/bitrue.py +4 -0
  28. ccxt/async_support/bitso.py +5 -2
  29. ccxt/async_support/bitstamp.py +3 -0
  30. ccxt/async_support/bitteam.py +5 -0
  31. ccxt/async_support/bitvavo.py +4 -0
  32. ccxt/async_support/blockchaincom.py +4 -0
  33. ccxt/async_support/blofin.py +3 -0
  34. ccxt/async_support/btcalpha.py +5 -0
  35. ccxt/async_support/btcbox.py +3 -2
  36. ccxt/async_support/btcmarkets.py +5 -0
  37. ccxt/async_support/btcturk.py +3 -0
  38. ccxt/async_support/bybit.py +10 -4
  39. ccxt/async_support/cex.py +2 -0
  40. ccxt/async_support/coinbase.py +19 -12
  41. ccxt/async_support/coinbaseexchange.py +5 -0
  42. ccxt/async_support/coinbaseinternational.py +21 -2
  43. ccxt/async_support/coincatch.py +3 -0
  44. ccxt/async_support/coincheck.py +2 -0
  45. ccxt/async_support/coinex.py +5 -1
  46. ccxt/async_support/coinlist.py +5 -0
  47. ccxt/async_support/coinmate.py +4 -0
  48. ccxt/async_support/coinmetro.py +9 -5
  49. ccxt/async_support/coinone.py +3 -0
  50. ccxt/async_support/coinsph.py +4 -0
  51. ccxt/async_support/coinspot.py +1 -0
  52. ccxt/async_support/cryptocom.py +5 -0
  53. ccxt/async_support/currencycom.py +3 -0
  54. ccxt/async_support/defx.py +5 -0
  55. ccxt/async_support/delta.py +4 -1
  56. ccxt/async_support/deribit.py +7 -3
  57. ccxt/async_support/digifinex.py +10 -5
  58. ccxt/async_support/ellipx.py +9 -5
  59. ccxt/async_support/exmo.py +6 -3
  60. ccxt/async_support/gate.py +5 -1
  61. ccxt/async_support/gemini.py +3 -0
  62. ccxt/async_support/hashkey.py +5 -4
  63. ccxt/async_support/hitbtc.py +6 -2
  64. ccxt/async_support/hollaex.py +7 -2
  65. ccxt/async_support/htx.py +8 -1
  66. ccxt/async_support/huobijp.py +5 -0
  67. ccxt/async_support/hyperliquid.py +6 -1
  68. ccxt/async_support/idex.py +5 -1
  69. ccxt/async_support/independentreserve.py +4 -0
  70. ccxt/async_support/indodax.py +3 -0
  71. ccxt/async_support/kraken.py +6 -4
  72. ccxt/async_support/krakenfutures.py +5 -2
  73. ccxt/async_support/kucoin.py +13 -6
  74. ccxt/async_support/kucoinfutures.py +5 -1
  75. ccxt/async_support/kuna.py +3 -0
  76. ccxt/async_support/latoken.py +4 -0
  77. ccxt/async_support/lbank.py +6 -1
  78. ccxt/async_support/luno.py +6 -1
  79. ccxt/async_support/lykke.py +4 -0
  80. ccxt/async_support/mercado.py +4 -0
  81. ccxt/async_support/mexc.py +10 -9
  82. ccxt/async_support/ndax.py +6 -1
  83. ccxt/async_support/novadax.py +5 -0
  84. ccxt/async_support/oceanex.py +6 -2
  85. ccxt/async_support/okcoin.py +4 -0
  86. ccxt/async_support/okx.py +17 -5
  87. ccxt/async_support/onetrading.py +4 -0
  88. ccxt/async_support/oxfun.py +3 -0
  89. ccxt/async_support/p2b.py +3 -0
  90. ccxt/async_support/paradex.py +8 -2
  91. ccxt/async_support/phemex.py +10 -4
  92. ccxt/async_support/poloniex.py +6 -3
  93. ccxt/async_support/poloniexfutures.py +5 -1
  94. ccxt/async_support/probit.py +4 -0
  95. ccxt/async_support/timex.py +4 -0
  96. ccxt/async_support/tokocrypto.py +5 -0
  97. ccxt/async_support/tradeogre.py +2 -0
  98. ccxt/async_support/upbit.py +5 -2
  99. ccxt/async_support/vertex.py +6 -2
  100. ccxt/async_support/wavesexchange.py +20 -3
  101. ccxt/async_support/wazirx.py +2 -0
  102. ccxt/async_support/whitebit.py +5 -4
  103. ccxt/async_support/woo.py +15 -5
  104. ccxt/async_support/woofipro.py +21 -7
  105. ccxt/async_support/xt.py +5 -0
  106. ccxt/async_support/yobit.py +5 -2
  107. ccxt/async_support/zaif.py +2 -0
  108. ccxt/async_support/zonda.py +2 -0
  109. ccxt/base/exchange.py +92 -50
  110. ccxt/base/types.py +1 -1
  111. ccxt/bigone.py +5 -0
  112. ccxt/binance.py +55 -69
  113. ccxt/bingx.py +25 -29
  114. ccxt/bit2c.py +3 -0
  115. ccxt/bitbank.py +3 -0
  116. ccxt/bitbns.py +3 -0
  117. ccxt/bitfinex.py +6 -1
  118. ccxt/bitflyer.py +6 -1
  119. ccxt/bitget.py +8 -4
  120. ccxt/bithumb.py +3 -1
  121. ccxt/bitmart.py +22 -12
  122. ccxt/bitmex.py +99 -93
  123. ccxt/bitopro.py +7 -2
  124. ccxt/bitrue.py +4 -0
  125. ccxt/bitso.py +5 -2
  126. ccxt/bitstamp.py +3 -0
  127. ccxt/bitteam.py +5 -0
  128. ccxt/bitvavo.py +4 -0
  129. ccxt/blockchaincom.py +4 -0
  130. ccxt/blofin.py +3 -0
  131. ccxt/btcalpha.py +5 -0
  132. ccxt/btcbox.py +3 -2
  133. ccxt/btcmarkets.py +5 -0
  134. ccxt/btcturk.py +3 -0
  135. ccxt/bybit.py +10 -4
  136. ccxt/cex.py +2 -0
  137. ccxt/coinbase.py +19 -12
  138. ccxt/coinbaseexchange.py +5 -0
  139. ccxt/coinbaseinternational.py +21 -2
  140. ccxt/coincatch.py +3 -0
  141. ccxt/coincheck.py +2 -0
  142. ccxt/coinex.py +5 -1
  143. ccxt/coinlist.py +5 -0
  144. ccxt/coinmate.py +4 -0
  145. ccxt/coinmetro.py +9 -5
  146. ccxt/coinone.py +3 -0
  147. ccxt/coinsph.py +4 -0
  148. ccxt/coinspot.py +1 -0
  149. ccxt/cryptocom.py +5 -0
  150. ccxt/currencycom.py +3 -0
  151. ccxt/defx.py +5 -0
  152. ccxt/delta.py +4 -1
  153. ccxt/deribit.py +7 -3
  154. ccxt/digifinex.py +10 -5
  155. ccxt/ellipx.py +9 -5
  156. ccxt/exmo.py +6 -3
  157. ccxt/gate.py +5 -1
  158. ccxt/gemini.py +3 -0
  159. ccxt/hashkey.py +5 -4
  160. ccxt/hitbtc.py +6 -2
  161. ccxt/hollaex.py +7 -2
  162. ccxt/htx.py +8 -1
  163. ccxt/huobijp.py +5 -0
  164. ccxt/hyperliquid.py +6 -1
  165. ccxt/idex.py +5 -1
  166. ccxt/independentreserve.py +4 -0
  167. ccxt/indodax.py +3 -0
  168. ccxt/kraken.py +6 -4
  169. ccxt/krakenfutures.py +5 -2
  170. ccxt/kucoin.py +13 -6
  171. ccxt/kucoinfutures.py +5 -1
  172. ccxt/kuna.py +3 -0
  173. ccxt/latoken.py +4 -0
  174. ccxt/lbank.py +6 -1
  175. ccxt/luno.py +6 -1
  176. ccxt/lykke.py +4 -0
  177. ccxt/mercado.py +4 -0
  178. ccxt/mexc.py +10 -9
  179. ccxt/ndax.py +6 -1
  180. ccxt/novadax.py +5 -0
  181. ccxt/oceanex.py +6 -2
  182. ccxt/okcoin.py +4 -0
  183. ccxt/okx.py +17 -5
  184. ccxt/onetrading.py +4 -0
  185. ccxt/oxfun.py +3 -0
  186. ccxt/p2b.py +3 -0
  187. ccxt/paradex.py +8 -2
  188. ccxt/phemex.py +10 -4
  189. ccxt/poloniex.py +6 -3
  190. ccxt/poloniexfutures.py +5 -1
  191. ccxt/pro/__init__.py +1 -1
  192. ccxt/pro/bitcoincom.py +1 -4
  193. ccxt/pro/bitopro.py +1 -1
  194. ccxt/probit.py +4 -0
  195. ccxt/test/tests_async.py +57 -30
  196. ccxt/test/tests_sync.py +57 -30
  197. ccxt/timex.py +4 -0
  198. ccxt/tokocrypto.py +5 -0
  199. ccxt/tradeogre.py +2 -0
  200. ccxt/upbit.py +5 -2
  201. ccxt/vertex.py +6 -2
  202. ccxt/wavesexchange.py +20 -3
  203. ccxt/wazirx.py +2 -0
  204. ccxt/whitebit.py +5 -4
  205. ccxt/woo.py +15 -5
  206. ccxt/woofipro.py +21 -7
  207. ccxt/xt.py +5 -0
  208. ccxt/yobit.py +5 -2
  209. ccxt/zaif.py +2 -0
  210. ccxt/zonda.py +2 -0
  211. {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/METADATA +225 -140
  212. {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/RECORD +215 -224
  213. ccxt/static_dependencies/ethereum/abi/py.typed +0 -0
  214. ccxt/static_dependencies/ethereum/account/py.typed +0 -0
  215. ccxt/static_dependencies/ethereum/hexbytes/py.typed +0 -0
  216. ccxt/static_dependencies/ethereum/typing/py.typed +0 -0
  217. ccxt/static_dependencies/ethereum/utils/py.typed +0 -0
  218. ccxt/static_dependencies/lark/py.typed +0 -0
  219. ccxt/static_dependencies/marshmallow/py.typed +0 -0
  220. ccxt/static_dependencies/marshmallow_dataclass/py.typed +0 -0
  221. ccxt/static_dependencies/marshmallow_oneofschema/py.typed +0 -0
  222. {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/LICENSE.txt +0 -0
  223. {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/WHEEL +0 -0
  224. {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/top_level.txt +0 -0
@@ -8,7 +8,7 @@ from ccxt.abstract.binance import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
10
  import json
11
- from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, LongShortRatio, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
11
+ from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, LongShortRatio, MarginMode, MarginModes, MarginModification, Market, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, MarketInterface, TransferEntry
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
14
14
  from ccxt.base.errors import AuthenticationError
@@ -249,7 +249,6 @@ class binance(Exchange, ImplicitAPI):
249
249
  'private': 'https://api.binance.com/api/v3',
250
250
  'v1': 'https://api.binance.com/api/v1',
251
251
  'papi': 'https://papi.binance.com/papi/v1',
252
- 'papiV2': 'https://papi.binance.com/papi/v2',
253
252
  },
254
253
  'www': 'https://www.binance.com',
255
254
  'referral': {
@@ -1194,11 +1193,6 @@ class binance(Exchange, ImplicitAPI):
1194
1193
  'listenKey': 0.2,
1195
1194
  },
1196
1195
  },
1197
- 'papiV2': {
1198
- 'get': {
1199
- 'um/account': 1,
1200
- },
1201
- },
1202
1196
  },
1203
1197
  'fees': {
1204
1198
  'trading': {
@@ -1357,7 +1351,8 @@ class binance(Exchange, ImplicitAPI):
1357
1351
  'BEP20': 'BSC',
1358
1352
  'OMNI': 'OMNI',
1359
1353
  'EOS': 'EOS',
1360
- 'SPL': 'SOL',
1354
+ 'SPL': 'SOL', # temporarily keep support for SPL(old name)
1355
+ 'SOL': 'SOL', # we shouldn't rename SOL
1361
1356
  },
1362
1357
  # keeping self object for backward-compatibility
1363
1358
  'reverseNetworks': {
@@ -1455,6 +1450,7 @@ class binance(Exchange, ImplicitAPI):
1455
1450
  'explorer.zensystem.io': 'ZEN',
1456
1451
  },
1457
1452
  'networksById': {
1453
+ 'SOL': 'SOL', # temporary fix for SPL definition
1458
1454
  'tronscan.org': 'TRC20',
1459
1455
  'etherscan.io': 'ERC20',
1460
1456
  'bscscan.com': 'BSC',
@@ -1626,11 +1622,13 @@ class binance(Exchange, ImplicitAPI):
1626
1622
  'limit': 1000,
1627
1623
  'daysBack': None,
1628
1624
  'untilDays': 1, # days between start-end
1625
+ 'symbolRequired': True,
1629
1626
  },
1630
1627
  'fetchOrder': {
1631
1628
  'marginMode': True,
1632
1629
  'trigger': False,
1633
1630
  'trailing': False,
1631
+ 'symbolRequired': True,
1634
1632
  },
1635
1633
  'fetchOpenOrders': {
1636
1634
  'marginMode': True,
@@ -1645,6 +1643,7 @@ class binance(Exchange, ImplicitAPI):
1645
1643
  'untilDays': 10000,
1646
1644
  'trigger': False,
1647
1645
  'trailing': False,
1646
+ 'symbolRequired': True,
1648
1647
  },
1649
1648
  'fetchClosedOrders': {
1650
1649
  'marginMode': True,
@@ -1654,6 +1653,7 @@ class binance(Exchange, ImplicitAPI):
1654
1653
  'untilDays': 10000,
1655
1654
  'trigger': False,
1656
1655
  'trailing': False,
1656
+ 'symbolRequired': True,
1657
1657
  },
1658
1658
  'fetchOHLCV': {
1659
1659
  'limit': 1000,
@@ -1696,17 +1696,20 @@ class binance(Exchange, ImplicitAPI):
1696
1696
  'daysBack': None,
1697
1697
  'limit': 1000,
1698
1698
  'untilDays': 7,
1699
+ 'symbolRequired': True,
1699
1700
  },
1700
1701
  'fetchOrder': {
1701
1702
  'marginMode': False,
1702
1703
  'trigger': False,
1703
1704
  'trailing': False,
1705
+ 'symbolRequired': True,
1704
1706
  },
1705
1707
  'fetchOpenOrders': {
1706
1708
  'marginMode': True,
1707
1709
  'limit': 500,
1708
1710
  'trigger': False,
1709
1711
  'trailing': False,
1712
+ 'symbolRequired': False,
1710
1713
  },
1711
1714
  'fetchOrders': {
1712
1715
  'marginMode': True,
@@ -1715,6 +1718,7 @@ class binance(Exchange, ImplicitAPI):
1715
1718
  'untilDays': 7,
1716
1719
  'trigger': False,
1717
1720
  'trailing': False,
1721
+ 'symbolRequired': True,
1718
1722
  },
1719
1723
  'fetchClosedOrders': {
1720
1724
  'marginMode': True,
@@ -1724,6 +1728,7 @@ class binance(Exchange, ImplicitAPI):
1724
1728
  'untilDays': 7,
1725
1729
  'trigger': False,
1726
1730
  'trailing': False,
1731
+ 'symbolRequired': True,
1727
1732
  },
1728
1733
  'fetchOHLCV': {
1729
1734
  'limit': 1500,
@@ -2936,7 +2941,7 @@ class binance(Exchange, ImplicitAPI):
2936
2941
  """
2937
2942
  fetches the current integer timestamp in milliseconds from the exchange server
2938
2943
 
2939
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#check-server-time # spot
2944
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#check-server-time # spot
2940
2945
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time # swap
2941
2946
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Check-Server-time # future
2942
2947
 
@@ -3172,7 +3177,7 @@ class binance(Exchange, ImplicitAPI):
3172
3177
  """
3173
3178
  retrieves data on all markets for binance
3174
3179
 
3175
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#exchange-information # spot
3180
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#exchange-information # spot
3176
3181
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information # swap
3177
3182
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Exchange-Information # future
3178
3183
  https://developers.binance.com/docs/derivatives/option/market-data/Exchange-Information # option
@@ -3731,7 +3736,7 @@ class binance(Exchange, ImplicitAPI):
3731
3736
  """
3732
3737
  query for balance and get the amount of funds available for trading or funds locked in orders
3733
3738
 
3734
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#account-information-user_data # spot
3739
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-information-user_data # spot
3735
3740
  https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details # cross margin
3736
3741
  https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info # isolated margin
3737
3742
  https://developers.binance.com/docs/wallet/asset/funding-wallet # funding
@@ -3989,7 +3994,7 @@ class binance(Exchange, ImplicitAPI):
3989
3994
  """
3990
3995
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
3991
3996
 
3992
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#order-book # spot
3997
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#order-book # spot
3993
3998
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Order-Book # swap
3994
3999
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Order-Book # future
3995
4000
  https://developers.binance.com/docs/derivatives/option/market-data/Order-Book # option
@@ -4246,8 +4251,8 @@ class binance(Exchange, ImplicitAPI):
4246
4251
  """
4247
4252
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
4248
4253
 
4249
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#24hr-ticker-price-change-statistics # spot
4250
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#rolling-window-price-change-statistics # spot
4254
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics # spot
4255
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#rolling-window-price-change-statistics # spot
4251
4256
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics # swap
4252
4257
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics # future
4253
4258
  https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics # option
@@ -4285,7 +4290,7 @@ class binance(Exchange, ImplicitAPI):
4285
4290
  """
4286
4291
  fetches the bid and ask price and volume for multiple markets
4287
4292
 
4288
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#symbol-order-book-ticker # spot
4293
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-order-book-ticker # spot
4289
4294
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker # swap
4290
4295
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Order-Book-Ticker # future
4291
4296
 
@@ -4319,7 +4324,7 @@ class binance(Exchange, ImplicitAPI):
4319
4324
  """
4320
4325
  fetches the last price for multiple markets
4321
4326
 
4322
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#symbol-price-ticker # spot
4327
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-price-ticker # spot
4323
4328
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker # swap
4324
4329
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Price-Ticker # future
4325
4330
 
@@ -4419,7 +4424,7 @@ class binance(Exchange, ImplicitAPI):
4419
4424
  """
4420
4425
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
4421
4426
 
4422
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#24hr-ticker-price-change-statistics # spot
4427
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics # spot
4423
4428
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics # swap
4424
4429
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics # future
4425
4430
  https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics # option
@@ -4580,7 +4585,7 @@ class binance(Exchange, ImplicitAPI):
4580
4585
  """
4581
4586
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
4582
4587
 
4583
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#klinecandlestick-data
4588
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#klinecandlestick-data
4584
4589
  https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
4585
4590
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
4586
4591
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
@@ -4693,7 +4698,8 @@ class binance(Exchange, ImplicitAPI):
4693
4698
  # }
4694
4699
  # ]
4695
4700
  #
4696
- return self.parse_ohlcvs(response, market, timeframe, since, limit)
4701
+ candles = self.parse_ohlcvs(response, market, timeframe, since, limit)
4702
+ return candles
4697
4703
 
4698
4704
  def parse_trade(self, trade: dict, market: Market = None) -> Trade:
4699
4705
  if 'isDustTrade' in trade:
@@ -4956,17 +4962,17 @@ class binance(Exchange, ImplicitAPI):
4956
4962
  get the list of most recent trades for a particular symbol
4957
4963
  Default fetchTradesMethod
4958
4964
 
4959
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#compressedaggregate-trades-list # publicGetAggTrades(spot)
4965
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#compressedaggregate-trades-list # publicGetAggTrades(spot)
4960
4966
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List # fapiPublicGetAggTrades(swap)
4961
4967
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Compressed-Aggregate-Trades-List # dapiPublicGetAggTrades(future)
4962
4968
  https://developers.binance.com/docs/derivatives/option/market-data/Recent-Trades-List # eapiPublicGetTrades(option)
4963
4969
 
4964
4970
  Other fetchTradesMethod
4965
4971
 
4966
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#recent-trades-list # publicGetTrades(spot)
4972
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#recent-trades-list # publicGetTrades(spot)
4967
4973
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List # fapiPublicGetTrades(swap)
4968
4974
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Recent-Trades-List # dapiPublicGetTrades(future)
4969
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#old-trade-lookup # publicGetHistoricalTrades(spot)
4975
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#old-trade-lookup # publicGetHistoricalTrades(spot)
4970
4976
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup # fapiPublicGetHistoricalTrades(swap)
4971
4977
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Old-Trades-Lookup # dapiPublicGetHistoricalTrades(future)
4972
4978
  https://developers.binance.com/docs/derivatives/option/market-data/Old-Trades-Lookup # eapiPublicGetHistoricalTrades(option)
@@ -5095,7 +5101,7 @@ class binance(Exchange, ImplicitAPI):
5095
5101
  @ignore
5096
5102
  edit a trade order
5097
5103
 
5098
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#cancel-an-existing-order-and-send-a-new-order-trade
5104
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
5099
5105
 
5100
5106
  :param str id: cancel order id
5101
5107
  :param str symbol: unified symbol of the market to create an order in
@@ -5267,10 +5273,10 @@ class binance(Exchange, ImplicitAPI):
5267
5273
  request: dict = {
5268
5274
  'symbol': market['id'],
5269
5275
  'side': side.upper(),
5270
- 'orderId': id,
5271
- 'quantity': self.amount_to_precision(symbol, amount),
5272
5276
  }
5273
5277
  clientOrderId = self.safe_string_n(params, ['newClientOrderId', 'clientOrderId', 'origClientOrderId'])
5278
+ request['orderId'] = id
5279
+ request['quantity'] = self.amount_to_precision(symbol, amount)
5274
5280
  if price is not None:
5275
5281
  request['price'] = self.price_to_precision(symbol, price)
5276
5282
  if clientOrderId is not None:
@@ -5284,8 +5290,6 @@ class binance(Exchange, ImplicitAPI):
5284
5290
 
5285
5291
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
5286
5292
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
5287
- https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Modify-UM-Order
5288
- https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Modify-CM-Order
5289
5293
 
5290
5294
  :param str id: cancel order id
5291
5295
  :param str symbol: unified symbol of the market to create an order in
@@ -5294,28 +5298,16 @@ class binance(Exchange, ImplicitAPI):
5294
5298
  :param float amount: how much of currency you want to trade in units of base currency
5295
5299
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
5296
5300
  :param dict [params]: extra parameters specific to the exchange API endpoint
5297
- :param boolean [params.portfolioMargin]: set to True if you would like to edit an order in a portfolio margin account
5298
5301
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
5299
5302
  """
5300
5303
  await self.load_markets()
5301
5304
  market = self.market(symbol)
5302
- isPortfolioMargin = None
5303
- isPortfolioMargin, params = self.handle_option_and_params_2(params, 'editContractOrder', 'papi', 'portfolioMargin', False)
5304
- if market['linear'] or isPortfolioMargin:
5305
- if price is None:
5306
- raise ArgumentsRequired(self.id + ' editOrder() requires a price argument for portfolio margin and linear orders')
5307
5305
  request = self.edit_contract_order_request(id, symbol, type, side, amount, price, params)
5308
5306
  response = None
5309
5307
  if market['linear']:
5310
- if isPortfolioMargin:
5311
- response = await self.papiPutUmOrder(self.extend(request, params))
5312
- else:
5313
- response = await self.fapiPrivatePutOrder(self.extend(request, params))
5308
+ response = await self.fapiPrivatePutOrder(self.extend(request, params))
5314
5309
  elif market['inverse']:
5315
- if isPortfolioMargin:
5316
- response = await self.papiPutCmOrder(self.extend(request, params))
5317
- else:
5318
- response = await self.dapiPrivatePutOrder(self.extend(request, params))
5310
+ response = await self.dapiPrivatePutOrder(self.extend(request, params))
5319
5311
  #
5320
5312
  # swap and future
5321
5313
  #
@@ -5349,7 +5341,7 @@ class binance(Exchange, ImplicitAPI):
5349
5341
  """
5350
5342
  edit a trade order
5351
5343
 
5352
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#cancel-an-existing-order-and-send-a-new-order-trade
5344
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
5353
5345
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
5354
5346
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
5355
5347
 
@@ -5360,7 +5352,6 @@ class binance(Exchange, ImplicitAPI):
5360
5352
  :param float amount: how much of currency you want to trade in units of base currency
5361
5353
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
5362
5354
  :param dict [params]: extra parameters specific to the exchange API endpoint
5363
- :param boolean [params.portfolioMargin]: set to True if you would like to edit an order in a portfolio margin account
5364
5355
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
5365
5356
  """
5366
5357
  await self.load_markets()
@@ -6030,8 +6021,8 @@ class binance(Exchange, ImplicitAPI):
6030
6021
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order
6031
6022
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/New-Order
6032
6023
  https://developers.binance.com/docs/derivatives/option/trade/New-Order
6033
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#sor
6034
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#test-new-order-using-sor-trade
6024
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#sor
6025
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-using-sor-trade
6035
6026
  https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Order
6036
6027
  https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Order
6037
6028
  https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-Margin-Order
@@ -6059,7 +6050,6 @@ class binance(Exchange, ImplicitAPI):
6059
6050
  :param str [params.stopLossOrTakeProfit]: 'stopLoss' or 'takeProfit', required for spot trailing orders
6060
6051
  :param str [params.positionSide]: *swap and portfolio margin only* "BOTH" for one-way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
6061
6052
  :param bool [params.hedged]: *swap and portfolio margin only* True for hedged mode, False for one way mode, default is False
6062
- :param float [params.cost]: *spot market buy only* the quote quantity that can be used alternative for the amount
6063
6053
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
6064
6054
  """
6065
6055
  await self.load_markets()
@@ -6378,7 +6368,7 @@ class binance(Exchange, ImplicitAPI):
6378
6368
  """
6379
6369
  create a market order by providing the symbol, side and cost
6380
6370
 
6381
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#new-order-trade
6371
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
6382
6372
 
6383
6373
  :param str symbol: unified symbol of the market to create an order in
6384
6374
  :param str side: 'buy' or 'sell'
@@ -6390,16 +6380,14 @@ class binance(Exchange, ImplicitAPI):
6390
6380
  market = self.market(symbol)
6391
6381
  if not market['spot']:
6392
6382
  raise NotSupported(self.id + ' createMarketOrderWithCost() supports spot orders only')
6393
- req = {
6394
- 'cost': cost,
6395
- }
6396
- return await self.create_order(symbol, 'market', side, 0, None, self.extend(req, params))
6383
+ params['cost'] = cost
6384
+ return await self.create_order(symbol, 'market', side, cost, None, params)
6397
6385
 
6398
6386
  async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
6399
6387
  """
6400
6388
  create a market buy order by providing the symbol and cost
6401
6389
 
6402
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#new-order-trade
6390
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
6403
6391
 
6404
6392
  :param str symbol: unified symbol of the market to create an order in
6405
6393
  :param float cost: how much you want to trade in units of the quote currency
@@ -6410,16 +6398,14 @@ class binance(Exchange, ImplicitAPI):
6410
6398
  market = self.market(symbol)
6411
6399
  if not market['spot']:
6412
6400
  raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot orders only')
6413
- req = {
6414
- 'cost': cost,
6415
- }
6416
- return await self.create_order(symbol, 'market', 'buy', 0, None, self.extend(req, params))
6401
+ params['cost'] = cost
6402
+ return await self.create_order(symbol, 'market', 'buy', cost, None, params)
6417
6403
 
6418
6404
  async def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
6419
6405
  """
6420
6406
  create a market sell order by providing the symbol and cost
6421
6407
 
6422
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#new-order-trade
6408
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
6423
6409
 
6424
6410
  :param str symbol: unified symbol of the market to create an order in
6425
6411
  :param float cost: how much you want to trade in units of the quote currency
@@ -6437,7 +6423,7 @@ class binance(Exchange, ImplicitAPI):
6437
6423
  """
6438
6424
  fetches information on an order made by the user
6439
6425
 
6440
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#query-order-user_data
6426
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-order-user_data
6441
6427
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Order
6442
6428
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Query-Order
6443
6429
  https://developers.binance.com/docs/derivatives/option/trade/Query-Single-Order
@@ -6502,7 +6488,7 @@ class binance(Exchange, ImplicitAPI):
6502
6488
  """
6503
6489
  fetches information on multiple orders made by the user
6504
6490
 
6505
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#all-orders-user_data
6491
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
6506
6492
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
6507
6493
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
6508
6494
  https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
@@ -6761,7 +6747,7 @@ class binance(Exchange, ImplicitAPI):
6761
6747
  """
6762
6748
  fetch all unfilled currently open orders
6763
6749
 
6764
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#current-open-orders-user_data
6750
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#current-open-orders-user_data
6765
6751
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders
6766
6752
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Current-All-Open-Orders
6767
6753
  https://developers.binance.com/docs/derivatives/option/trade/Query-Current-Open-Option-Orders
@@ -7048,7 +7034,7 @@ class binance(Exchange, ImplicitAPI):
7048
7034
  """
7049
7035
  fetches information on multiple closed orders made by the user
7050
7036
 
7051
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#all-orders-user_data
7037
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
7052
7038
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
7053
7039
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
7054
7040
  https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
@@ -7077,7 +7063,7 @@ class binance(Exchange, ImplicitAPI):
7077
7063
  """
7078
7064
  fetches information on multiple canceled orders made by the user
7079
7065
 
7080
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#all-orders-user_data
7066
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
7081
7067
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
7082
7068
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
7083
7069
  https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
@@ -7106,7 +7092,7 @@ class binance(Exchange, ImplicitAPI):
7106
7092
  """
7107
7093
  fetches information on multiple canceled orders made by the user
7108
7094
 
7109
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#all-orders-user_data
7095
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
7110
7096
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
7111
7097
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
7112
7098
  https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
@@ -7138,7 +7124,7 @@ class binance(Exchange, ImplicitAPI):
7138
7124
  """
7139
7125
  cancels an open order
7140
7126
 
7141
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#cancel-order-trade
7127
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-order-trade
7142
7128
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order
7143
7129
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Cancel-Order
7144
7130
  https://developers.binance.com/docs/derivatives/option/trade/Cancel-Option-Order
@@ -7219,7 +7205,7 @@ class binance(Exchange, ImplicitAPI):
7219
7205
  """
7220
7206
  cancel all open orders in a market
7221
7207
 
7222
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#cancel-all-open-orders-on-a-symbol-trade
7208
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-all-open-orders-on-a-symbol-trade
7223
7209
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders
7224
7210
  https://developers.binance.com/docs/derivatives/option/trade/Cancel-all-Option-orders-on-specific-symbol
7225
7211
  https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders
@@ -7444,7 +7430,7 @@ class binance(Exchange, ImplicitAPI):
7444
7430
  """
7445
7431
  fetch all the trades made from a single order
7446
7432
 
7447
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#account-trade-list-user_data
7433
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
7448
7434
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
7449
7435
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
7450
7436
  https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
@@ -7473,7 +7459,7 @@ class binance(Exchange, ImplicitAPI):
7473
7459
  """
7474
7460
  fetch all trades made by the user
7475
7461
 
7476
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#account-trade-list-user_data
7462
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
7477
7463
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
7478
7464
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
7479
7465
  https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
@@ -11213,7 +11199,7 @@ class binance(Exchange, ImplicitAPI):
11213
11199
  body = self.urlencode(params)
11214
11200
  else:
11215
11201
  raise AuthenticationError(self.id + ' userDataStream endpoint requires `apiKey` credential')
11216
- elif (api == 'private') or (api == 'eapiPrivate') or (api == 'sapi' and path != 'system/status') or (api == 'sapiV2') or (api == 'sapiV3') or (api == 'sapiV4') or (api == 'dapiPrivate') or (api == 'dapiPrivateV2') or (api == 'fapiPrivate') or (api == 'fapiPrivateV2') or (api == 'fapiPrivateV3') or (api == 'papi' and path != 'ping') or (api == 'papiV2'):
11202
+ elif (api == 'private') or (api == 'eapiPrivate') or (api == 'sapi' and path != 'system/status') or (api == 'sapiV2') or (api == 'sapiV3') or (api == 'sapiV4') or (api == 'dapiPrivate') or (api == 'dapiPrivateV2') or (api == 'fapiPrivate') or (api == 'fapiPrivateV2') or (api == 'fapiPrivateV3') or (api == 'papi' and path != 'ping'):
11217
11203
  self.check_required_credentials()
11218
11204
  if method == 'POST' and ((path == 'order') or (path == 'sor/order')):
11219
11205
  # inject in implicit API calls
@@ -12383,7 +12369,7 @@ class binance(Exchange, ImplicitAPI):
12383
12369
  # "price": "10871.09",
12384
12370
  # "avgPrice": "10913.21000",
12385
12371
  # "origQty": "0.001",
12386
- # "executedQty": "0.001",
12372
+ # "executedQty": "0.002",
12387
12373
  # "cumQuote": "10.91321",
12388
12374
  # "timeInForce": "IOC",
12389
12375
  # "type": "LIMIT",
@@ -519,6 +519,8 @@ class bingx(Exchange, ImplicitAPI):
519
519
  'SNOW': 'Snowman', # Snowman vs SnowSwap conflict
520
520
  'OMNI': 'OmniCat',
521
521
  'NAP': '$NAP', # NAP on SOL = SNAP
522
+ 'TRUMP': 'TRUMPMAGA',
523
+ 'TRUMPSOL': 'TRUMP',
522
524
  },
523
525
  'options': {
524
526
  'defaultType': 'spot',
@@ -590,17 +592,20 @@ class bingx(Exchange, ImplicitAPI):
590
592
  'limit': 512, # 512 days for 'allFillOrders', 1000 days for 'fillOrders'
591
593
  'daysBack': 30, # 30 for 'allFillOrders', 7 for 'fillHistory'
592
594
  'untilDays': 30, # 30 for 'allFillOrders', 7 for 'fillHistory'
595
+ 'symbolRequired': True,
593
596
  },
594
597
  'fetchOrder': {
595
598
  'marginMode': False,
596
599
  'trigger': False,
597
600
  'trailing': False,
601
+ 'symbolRequired': True,
598
602
  },
599
603
  'fetchOpenOrders': {
600
604
  'marginMode': False,
601
605
  'limit': None,
602
606
  'trigger': False,
603
607
  'trailing': False,
608
+ 'symbolRequired': False,
604
609
  },
605
610
  'fetchOrders': {
606
611
  'marginMode': False,
@@ -609,6 +614,7 @@ class bingx(Exchange, ImplicitAPI):
609
614
  'untilDays': 7,
610
615
  'trigger': False,
611
616
  'trailing': False,
617
+ 'symbolRequired': True,
612
618
  },
613
619
  'fetchClosedOrders': {
614
620
  'marginMode': False,
@@ -618,6 +624,7 @@ class bingx(Exchange, ImplicitAPI):
618
624
  'untilDays': 7,
619
625
  'trigger': False,
620
626
  'trailing': False,
627
+ 'symbolRequired': True,
621
628
  },
622
629
  'fetchOHLCV': {
623
630
  'limit': 1440,
@@ -630,19 +637,7 @@ class bingx(Exchange, ImplicitAPI):
630
637
  'daysBack': None,
631
638
  'untilDays': None,
632
639
  },
633
- 'fetchOHLCV': {
634
- 'limit': 1440,
635
- },
636
640
  'fetchOrders': None,
637
- 'fetchClosedOrders': {
638
- 'marginMode': False,
639
- 'limit': 1000,
640
- 'daysBack': None,
641
- 'daysBackCanceled': None,
642
- 'untilDays': 7,
643
- 'trigger': False,
644
- 'trailing': False,
645
- },
646
641
  },
647
642
  #
648
643
  'spot': {
@@ -671,12 +666,16 @@ class bingx(Exchange, ImplicitAPI):
671
666
  'extends': 'defaultForInverse',
672
667
  },
673
668
  },
669
+ 'defaultForFuture': {
670
+ 'extends': 'defaultForLinear',
671
+ 'fetchOrders': None,
672
+ },
674
673
  'future': {
675
674
  'linear': {
676
- 'extends': 'defaultForLinear',
675
+ 'extends': 'defaultForFuture',
677
676
  },
678
677
  'inverse': {
679
- 'extends': 'defaultForInverse',
678
+ 'extends': 'defaultForFuture',
680
679
  },
681
680
  },
682
681
  },
@@ -819,7 +818,7 @@ class bingx(Exchange, ImplicitAPI):
819
818
  }
820
819
  return result
821
820
 
822
- async def fetch_spot_markets(self, params):
821
+ async def fetch_spot_markets(self, params) -> List[Market]:
823
822
  response = await self.spotV1PublicGetCommonSymbols(params)
824
823
  #
825
824
  # {
@@ -2658,10 +2657,8 @@ class bingx(Exchange, ImplicitAPI):
2658
2657
  :param dict [params]: extra parameters specific to the exchange API endpoint
2659
2658
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2660
2659
  """
2661
- req = {
2662
- 'quoteOrderQty': cost,
2663
- }
2664
- return await self.create_order(symbol, 'market', side, cost, None, self.extend(req, params))
2660
+ params['quoteOrderQty'] = cost
2661
+ return await self.create_order(symbol, 'market', side, cost, None, params)
2665
2662
 
2666
2663
  async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
2667
2664
  """
@@ -2671,10 +2668,8 @@ class bingx(Exchange, ImplicitAPI):
2671
2668
  :param dict [params]: extra parameters specific to the exchange API endpoint
2672
2669
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2673
2670
  """
2674
- req = {
2675
- 'quoteOrderQty': cost,
2676
- }
2677
- return await self.create_order(symbol, 'market', 'buy', cost, None, self.extend(req, params))
2671
+ params['quoteOrderQty'] = cost
2672
+ return await self.create_order(symbol, 'market', 'buy', cost, None, params)
2678
2673
 
2679
2674
  async def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
2680
2675
  """
@@ -2684,10 +2679,8 @@ class bingx(Exchange, ImplicitAPI):
2684
2679
  :param dict [params]: extra parameters specific to the exchange API endpoint
2685
2680
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2686
2681
  """
2687
- req = {
2688
- 'quoteOrderQty': cost,
2689
- }
2690
- return await self.create_order(symbol, 'market', 'sell', cost, None, self.extend(req, params))
2682
+ params['quoteOrderQty'] = cost
2683
+ return await self.create_order(symbol, 'market', 'sell', cost, None, params)
2691
2684
 
2692
2685
  def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
2693
2686
  """
@@ -2870,7 +2863,10 @@ class bingx(Exchange, ImplicitAPI):
2870
2863
  else:
2871
2864
  positionSide = 'BOTH'
2872
2865
  request['positionSide'] = positionSide
2873
- request['quantity'] = amount if (market['inverse']) else self.parse_to_numeric(self.amount_to_precision(symbol, amount)) # precision not available for inverse contracts
2866
+ amountReq = amount
2867
+ if not market['inverse']:
2868
+ amountReq = self.parse_to_numeric(self.amount_to_precision(symbol, amount))
2869
+ request['quantity'] = amountReq # precision not available for inverse contracts
2874
2870
  params = self.omit(params, ['hedged', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId'])
2875
2871
  return self.extend(request, params)
2876
2872
 
@@ -5534,7 +5530,7 @@ class bingx(Exchange, ImplicitAPI):
5534
5530
  request: dict = {
5535
5531
  'coin': currency['id'],
5536
5532
  'address': address,
5537
- 'amount': self.number_to_string(amount),
5533
+ 'amount': self.currency_to_precision(code, amount),
5538
5534
  'walletType': walletType,
5539
5535
  }
5540
5536
  network = self.safe_string_upper(params, 'network')