ccxt 4.4.42__py2.py3-none-any.whl → 4.4.44__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 (91) hide show
  1. ccxt/__init__.py +3 -1
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/abstract/bingx.py +4 -0
  7. ccxt/abstract/bitstamp.py +1 -0
  8. ccxt/abstract/myokx.py +340 -0
  9. ccxt/async_support/__init__.py +3 -1
  10. ccxt/async_support/base/exchange.py +1 -1
  11. ccxt/async_support/binance.py +57 -45
  12. ccxt/async_support/bingx.py +30 -7
  13. ccxt/async_support/bitfinex.py +6 -2
  14. ccxt/async_support/bitget.py +3 -1
  15. ccxt/async_support/bitmart.py +4 -7
  16. ccxt/async_support/bitmex.py +3 -5
  17. ccxt/async_support/bitstamp.py +59 -0
  18. ccxt/async_support/bybit.py +8 -23
  19. ccxt/async_support/coinbase.py +13 -9
  20. ccxt/async_support/coinbaseinternational.py +13 -9
  21. ccxt/async_support/coincatch.py +2 -2
  22. ccxt/async_support/coinex.py +5 -5
  23. ccxt/async_support/cryptocom.py +4 -2
  24. ccxt/async_support/defx.py +2 -2
  25. ccxt/async_support/delta.py +1 -1
  26. ccxt/async_support/gate.py +9 -4
  27. ccxt/async_support/gemini.py +65 -2
  28. ccxt/async_support/hashkey.py +9 -9
  29. ccxt/async_support/htx.py +101 -3
  30. ccxt/async_support/hyperliquid.py +6 -1
  31. ccxt/async_support/kraken.py +9 -2
  32. ccxt/async_support/krakenfutures.py +5 -0
  33. ccxt/async_support/kucoin.py +9 -7
  34. ccxt/async_support/kucoinfutures.py +5 -5
  35. ccxt/async_support/mexc.py +18 -12
  36. ccxt/async_support/myokx.py +35 -0
  37. ccxt/async_support/ndax.py +1 -1
  38. ccxt/async_support/oceanex.py +1 -1
  39. ccxt/async_support/okx.py +5 -6
  40. ccxt/async_support/phemex.py +6 -4
  41. ccxt/async_support/vertex.py +63 -4
  42. ccxt/async_support/whitebit.py +4 -2
  43. ccxt/async_support/woo.py +8 -6
  44. ccxt/async_support/woofipro.py +5 -2
  45. ccxt/base/exchange.py +1 -1
  46. ccxt/binance.py +57 -45
  47. ccxt/bingx.py +30 -7
  48. ccxt/bitfinex.py +6 -2
  49. ccxt/bitget.py +3 -1
  50. ccxt/bitmart.py +4 -7
  51. ccxt/bitmex.py +3 -5
  52. ccxt/bitstamp.py +59 -0
  53. ccxt/bybit.py +8 -23
  54. ccxt/coinbase.py +13 -9
  55. ccxt/coinbaseinternational.py +13 -9
  56. ccxt/coincatch.py +2 -2
  57. ccxt/coinex.py +5 -5
  58. ccxt/cryptocom.py +4 -2
  59. ccxt/defx.py +2 -2
  60. ccxt/delta.py +1 -1
  61. ccxt/gate.py +9 -4
  62. ccxt/gemini.py +65 -2
  63. ccxt/hashkey.py +9 -9
  64. ccxt/htx.py +101 -3
  65. ccxt/hyperliquid.py +6 -1
  66. ccxt/kraken.py +9 -2
  67. ccxt/krakenfutures.py +5 -0
  68. ccxt/kucoin.py +9 -7
  69. ccxt/kucoinfutures.py +5 -5
  70. ccxt/mexc.py +18 -12
  71. ccxt/myokx.py +35 -0
  72. ccxt/ndax.py +1 -1
  73. ccxt/oceanex.py +1 -1
  74. ccxt/okx.py +5 -6
  75. ccxt/phemex.py +6 -4
  76. ccxt/pro/__init__.py +3 -1
  77. ccxt/pro/bitcoincom.py +4 -1
  78. ccxt/pro/bitopro.py +1 -1
  79. ccxt/pro/myokx.py +23 -0
  80. ccxt/vertex.py +63 -4
  81. ccxt/whitebit.py +4 -2
  82. ccxt/woo.py +8 -6
  83. ccxt/woofipro.py +5 -2
  84. {ccxt-4.4.42.dist-info → ccxt-4.4.44.dist-info}/METADATA +36 -34
  85. {ccxt-4.4.42.dist-info → ccxt-4.4.44.dist-info}/RECORD +88 -87
  86. ccxt/async_support/bitbay.py +0 -17
  87. ccxt/async_support/bitfinex2.py +0 -3625
  88. ccxt/async_support/hitbtc3.py +0 -16
  89. {ccxt-4.4.42.dist-info → ccxt-4.4.44.dist-info}/LICENSE.txt +0 -0
  90. {ccxt-4.4.42.dist-info → ccxt-4.4.44.dist-info}/WHEEL +0 -0
  91. {ccxt-4.4.42.dist-info → ccxt-4.4.44.dist-info}/top_level.txt +0 -0
ccxt/binance.py CHANGED
@@ -248,6 +248,7 @@ class binance(Exchange, ImplicitAPI):
248
248
  'private': 'https://api.binance.com/api/v3',
249
249
  'v1': 'https://api.binance.com/api/v1',
250
250
  'papi': 'https://papi.binance.com/papi/v1',
251
+ 'papiV2': 'https://papi.binance.com/papi/v2',
251
252
  },
252
253
  'www': 'https://www.binance.com',
253
254
  'referral': {
@@ -1190,6 +1191,11 @@ class binance(Exchange, ImplicitAPI):
1190
1191
  'listenKey': 0.2,
1191
1192
  },
1192
1193
  },
1194
+ 'papiV2': {
1195
+ 'get': {
1196
+ 'um/account': 1,
1197
+ },
1198
+ },
1193
1199
  },
1194
1200
  'fees': {
1195
1201
  'trading': {
@@ -1582,7 +1588,6 @@ class binance(Exchange, ImplicitAPI):
1582
1588
  },
1583
1589
  },
1584
1590
  'features': {
1585
- # https://developers.binance.com/docs/binance-spot-api-docs/rest-api#:~:text=quoteOrderQty
1586
1591
  'spot': {
1587
1592
  'sandbox': True,
1588
1593
  'createOrder': {
@@ -1600,12 +1605,13 @@ class binance(Exchange, ImplicitAPI):
1600
1605
  'GTD': False,
1601
1606
  },
1602
1607
  'hedged': True,
1608
+ 'leverage': False,
1609
+ 'marketBuyRequiresPrice': False,
1610
+ 'marketBuyByCost': True,
1603
1611
  # exchange-supported features
1604
- 'selfTradePrevention': True,
1612
+ 'selfTradePrevention': True, # todo
1605
1613
  'trailing': True,
1606
- 'twap': False,
1607
- 'iceberg': True,
1608
- 'oco': False,
1614
+ 'iceberg': True, # todo implementation
1609
1615
  },
1610
1616
  'createOrders': None,
1611
1617
  'fetchMyTrades': {
@@ -1668,11 +1674,12 @@ class binance(Exchange, ImplicitAPI):
1668
1674
  },
1669
1675
  'hedged': True,
1670
1676
  # exchange-supported features
1671
- 'selfTradePrevention': True,
1677
+ 'selfTradePrevention': True, # todo
1672
1678
  'trailing': True,
1673
- 'twap': False,
1674
1679
  'iceberg': False,
1675
- 'oco': False,
1680
+ 'leverage': False,
1681
+ 'marketBuyRequiresPrice': False,
1682
+ 'marketBuyByCost': True,
1676
1683
  },
1677
1684
  'createOrders': {
1678
1685
  'max': 5,
@@ -2825,7 +2832,7 @@ class binance(Exchange, ImplicitAPI):
2825
2832
  """
2826
2833
  fetches the current integer timestamp in milliseconds from the exchange server
2827
2834
 
2828
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#check-server-time # spot
2835
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#check-server-time # spot
2829
2836
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time # swap
2830
2837
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Check-Server-time # future
2831
2838
 
@@ -3061,7 +3068,7 @@ class binance(Exchange, ImplicitAPI):
3061
3068
  """
3062
3069
  retrieves data on all markets for binance
3063
3070
 
3064
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#exchange-information # spot
3071
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#exchange-information # spot
3065
3072
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information # swap
3066
3073
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Exchange-Information # future
3067
3074
  https://developers.binance.com/docs/derivatives/option/market-data/Exchange-Information # option
@@ -3616,7 +3623,7 @@ class binance(Exchange, ImplicitAPI):
3616
3623
  """
3617
3624
  query for balance and get the amount of funds available for trading or funds locked in orders
3618
3625
 
3619
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-information-user_data # spot
3626
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#account-information-user_data # spot
3620
3627
  https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details # cross margin
3621
3628
  https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info # isolated margin
3622
3629
  https://developers.binance.com/docs/wallet/asset/funding-wallet # funding
@@ -3874,7 +3881,7 @@ class binance(Exchange, ImplicitAPI):
3874
3881
  """
3875
3882
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
3876
3883
 
3877
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#order-book # spot
3884
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#order-book # spot
3878
3885
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Order-Book # swap
3879
3886
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Order-Book # future
3880
3887
  https://developers.binance.com/docs/derivatives/option/market-data/Order-Book # option
@@ -4131,8 +4138,8 @@ class binance(Exchange, ImplicitAPI):
4131
4138
  """
4132
4139
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
4133
4140
 
4134
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics # spot
4135
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#rolling-window-price-change-statistics # spot
4141
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#24hr-ticker-price-change-statistics # spot
4142
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#rolling-window-price-change-statistics # spot
4136
4143
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics # swap
4137
4144
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics # future
4138
4145
  https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics # option
@@ -4170,7 +4177,7 @@ class binance(Exchange, ImplicitAPI):
4170
4177
  """
4171
4178
  fetches the bid and ask price and volume for multiple markets
4172
4179
 
4173
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-order-book-ticker # spot
4180
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#symbol-order-book-ticker # spot
4174
4181
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker # swap
4175
4182
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Order-Book-Ticker # future
4176
4183
 
@@ -4204,7 +4211,7 @@ class binance(Exchange, ImplicitAPI):
4204
4211
  """
4205
4212
  fetches the last price for multiple markets
4206
4213
 
4207
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-price-ticker # spot
4214
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#symbol-price-ticker # spot
4208
4215
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker # swap
4209
4216
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Price-Ticker # future
4210
4217
 
@@ -4305,7 +4312,7 @@ class binance(Exchange, ImplicitAPI):
4305
4312
  """
4306
4313
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
4307
4314
 
4308
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics # spot
4315
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#24hr-ticker-price-change-statistics # spot
4309
4316
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics # swap
4310
4317
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics # future
4311
4318
  https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics # option
@@ -4466,7 +4473,7 @@ class binance(Exchange, ImplicitAPI):
4466
4473
  """
4467
4474
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
4468
4475
 
4469
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#klinecandlestick-data
4476
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#klinecandlestick-data
4470
4477
  https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
4471
4478
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
4472
4479
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
@@ -4842,17 +4849,17 @@ class binance(Exchange, ImplicitAPI):
4842
4849
  get the list of most recent trades for a particular symbol
4843
4850
  Default fetchTradesMethod
4844
4851
 
4845
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#compressedaggregate-trades-list # publicGetAggTrades(spot)
4852
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#compressedaggregate-trades-list # publicGetAggTrades(spot)
4846
4853
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List # fapiPublicGetAggTrades(swap)
4847
4854
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Compressed-Aggregate-Trades-List # dapiPublicGetAggTrades(future)
4848
4855
  https://developers.binance.com/docs/derivatives/option/market-data/Recent-Trades-List # eapiPublicGetTrades(option)
4849
4856
 
4850
4857
  Other fetchTradesMethod
4851
4858
 
4852
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#recent-trades-list # publicGetTrades(spot)
4859
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#recent-trades-list # publicGetTrades(spot)
4853
4860
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List # fapiPublicGetTrades(swap)
4854
4861
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Recent-Trades-List # dapiPublicGetTrades(future)
4855
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#old-trade-lookup # publicGetHistoricalTrades(spot)
4862
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#old-trade-lookup # publicGetHistoricalTrades(spot)
4856
4863
  https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup # fapiPublicGetHistoricalTrades(swap)
4857
4864
  https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Old-Trades-Lookup # dapiPublicGetHistoricalTrades(future)
4858
4865
  https://developers.binance.com/docs/derivatives/option/market-data/Old-Trades-Lookup # eapiPublicGetHistoricalTrades(option)
@@ -4979,7 +4986,7 @@ class binance(Exchange, ImplicitAPI):
4979
4986
  @ignore
4980
4987
  edit a trade order
4981
4988
 
4982
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
4989
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#cancel-an-existing-order-and-send-a-new-order-trade
4983
4990
 
4984
4991
  :param str id: cancel order id
4985
4992
  :param str symbol: unified symbol of the market to create an order in
@@ -5219,7 +5226,7 @@ class binance(Exchange, ImplicitAPI):
5219
5226
  """
5220
5227
  edit a trade order
5221
5228
 
5222
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
5229
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#cancel-an-existing-order-and-send-a-new-order-trade
5223
5230
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
5224
5231
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
5225
5232
 
@@ -5894,13 +5901,13 @@ class binance(Exchange, ImplicitAPI):
5894
5901
  """
5895
5902
  create a trade order
5896
5903
 
5897
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
5898
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-trade
5904
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#new-order-trade
5905
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#test-new-order-trade
5899
5906
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order
5900
5907
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/New-Order
5901
5908
  https://developers.binance.com/docs/derivatives/option/trade/New-Order
5902
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#sor
5903
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-using-sor-trade
5909
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#sor
5910
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#test-new-order-using-sor-trade
5904
5911
  https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Order
5905
5912
  https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Order
5906
5913
  https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-Margin-Order
@@ -5926,6 +5933,7 @@ class binance(Exchange, ImplicitAPI):
5926
5933
  :param str [params.stopLossOrTakeProfit]: 'stopLoss' or 'takeProfit', required for spot trailing orders
5927
5934
  :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
5928
5935
  :param bool [params.hedged]: *swap and portfolio margin only* True for hedged mode, False for one way mode, default is False
5936
+ :param float [params.cost]: *spot market buy only* the quote quantity that can be used alternative for the amount
5929
5937
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
5930
5938
  """
5931
5939
  self.load_markets()
@@ -6234,7 +6242,7 @@ class binance(Exchange, ImplicitAPI):
6234
6242
  """
6235
6243
  create a market order by providing the symbol, side and cost
6236
6244
 
6237
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
6245
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#new-order-trade
6238
6246
 
6239
6247
  :param str symbol: unified symbol of the market to create an order in
6240
6248
  :param str side: 'buy' or 'sell'
@@ -6246,14 +6254,16 @@ class binance(Exchange, ImplicitAPI):
6246
6254
  market = self.market(symbol)
6247
6255
  if not market['spot']:
6248
6256
  raise NotSupported(self.id + ' createMarketOrderWithCost() supports spot orders only')
6249
- params['cost'] = cost
6250
- return self.create_order(symbol, 'market', side, cost, None, params)
6257
+ req = {
6258
+ 'cost': cost,
6259
+ }
6260
+ return self.create_order(symbol, 'market', side, 0, None, self.extend(req, params))
6251
6261
 
6252
6262
  def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
6253
6263
  """
6254
6264
  create a market buy order by providing the symbol and cost
6255
6265
 
6256
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
6266
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#new-order-trade
6257
6267
 
6258
6268
  :param str symbol: unified symbol of the market to create an order in
6259
6269
  :param float cost: how much you want to trade in units of the quote currency
@@ -6264,14 +6274,16 @@ class binance(Exchange, ImplicitAPI):
6264
6274
  market = self.market(symbol)
6265
6275
  if not market['spot']:
6266
6276
  raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot orders only')
6267
- params['cost'] = cost
6268
- return self.create_order(symbol, 'market', 'buy', cost, None, params)
6277
+ req = {
6278
+ 'cost': cost,
6279
+ }
6280
+ return self.create_order(symbol, 'market', 'buy', 0, None, self.extend(req, params))
6269
6281
 
6270
6282
  def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
6271
6283
  """
6272
6284
  create a market sell order by providing the symbol and cost
6273
6285
 
6274
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
6286
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#new-order-trade
6275
6287
 
6276
6288
  :param str symbol: unified symbol of the market to create an order in
6277
6289
  :param float cost: how much you want to trade in units of the quote currency
@@ -6289,7 +6301,7 @@ class binance(Exchange, ImplicitAPI):
6289
6301
  """
6290
6302
  fetches information on an order made by the user
6291
6303
 
6292
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-order-user_data
6304
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#query-order-user_data
6293
6305
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Order
6294
6306
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Query-Order
6295
6307
  https://developers.binance.com/docs/derivatives/option/trade/Query-Single-Order
@@ -6354,7 +6366,7 @@ class binance(Exchange, ImplicitAPI):
6354
6366
  """
6355
6367
  fetches information on multiple orders made by the user
6356
6368
 
6357
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
6369
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#all-orders-user_data
6358
6370
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
6359
6371
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
6360
6372
  https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
@@ -6613,7 +6625,7 @@ class binance(Exchange, ImplicitAPI):
6613
6625
  """
6614
6626
  fetch all unfilled currently open orders
6615
6627
 
6616
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#current-open-orders-user_data
6628
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#current-open-orders-user_data
6617
6629
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders
6618
6630
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Current-All-Open-Orders
6619
6631
  https://developers.binance.com/docs/derivatives/option/trade/Query-Current-Open-Option-Orders
@@ -6899,7 +6911,7 @@ class binance(Exchange, ImplicitAPI):
6899
6911
  """
6900
6912
  fetches information on multiple closed orders made by the user
6901
6913
 
6902
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
6914
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#all-orders-user_data
6903
6915
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
6904
6916
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
6905
6917
  https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
@@ -6928,7 +6940,7 @@ class binance(Exchange, ImplicitAPI):
6928
6940
  """
6929
6941
  fetches information on multiple canceled orders made by the user
6930
6942
 
6931
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
6943
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#all-orders-user_data
6932
6944
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
6933
6945
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
6934
6946
  https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
@@ -6957,7 +6969,7 @@ class binance(Exchange, ImplicitAPI):
6957
6969
  """
6958
6970
  fetches information on multiple canceled orders made by the user
6959
6971
 
6960
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
6972
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#all-orders-user_data
6961
6973
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
6962
6974
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
6963
6975
  https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
@@ -6989,7 +7001,7 @@ class binance(Exchange, ImplicitAPI):
6989
7001
  """
6990
7002
  cancels an open order
6991
7003
 
6992
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-order-trade
7004
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#cancel-order-trade
6993
7005
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order
6994
7006
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Cancel-Order
6995
7007
  https://developers.binance.com/docs/derivatives/option/trade/Cancel-Option-Order
@@ -7070,7 +7082,7 @@ class binance(Exchange, ImplicitAPI):
7070
7082
  """
7071
7083
  cancel all open orders in a market
7072
7084
 
7073
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-all-open-orders-on-a-symbol-trade
7085
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#cancel-all-open-orders-on-a-symbol-trade
7074
7086
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders
7075
7087
  https://developers.binance.com/docs/derivatives/option/trade/Cancel-all-Option-orders-on-specific-symbol
7076
7088
  https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders
@@ -7295,7 +7307,7 @@ class binance(Exchange, ImplicitAPI):
7295
7307
  """
7296
7308
  fetch all the trades made from a single order
7297
7309
 
7298
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
7310
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#account-trade-list-user_data
7299
7311
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
7300
7312
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
7301
7313
  https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
@@ -7324,7 +7336,7 @@ class binance(Exchange, ImplicitAPI):
7324
7336
  """
7325
7337
  fetch all trades made by the user
7326
7338
 
7327
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
7339
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#account-trade-list-user_data
7328
7340
  https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
7329
7341
  https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
7330
7342
  https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
@@ -11060,7 +11072,7 @@ class binance(Exchange, ImplicitAPI):
11060
11072
  body = self.urlencode(params)
11061
11073
  else:
11062
11074
  raise AuthenticationError(self.id + ' userDataStream endpoint requires `apiKey` credential')
11063
- 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'):
11075
+ 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'):
11064
11076
  self.check_required_credentials()
11065
11077
  if method == 'POST' and ((path == 'order') or (path == 'sor/order')):
11066
11078
  # inject in implicit API calls
ccxt/bingx.py CHANGED
@@ -399,12 +399,26 @@ class bingx(Exchange, ImplicitAPI):
399
399
  'get': {
400
400
  'uid': 1,
401
401
  'apiKey/query': 2,
402
+ 'account/apiPermissions': 5,
402
403
  },
403
404
  'post': {
404
405
  'innerTransfer/authorizeSubAccount': 1,
405
406
  },
406
407
  },
407
408
  },
409
+ 'transfer': {
410
+ 'v1': {
411
+ 'private': {
412
+ 'get': {
413
+ 'subAccount/asset/transferHistory': 1,
414
+ },
415
+ 'post': {
416
+ 'subAccount/transferAsset/supportCoins': 1,
417
+ 'subAccount/transferAsset': 1,
418
+ },
419
+ },
420
+ },
421
+ },
408
422
  },
409
423
  'user': {
410
424
  'auth': {
@@ -561,6 +575,11 @@ class bingx(Exchange, ImplicitAPI):
561
575
  },
562
576
  'hedged': True,
563
577
  'trailing': True,
578
+ 'leverage': False,
579
+ 'marketBuyRequiresPrice': False,
580
+ 'marketBuyByCost': True,
581
+ 'selfTradePrevention': False,
582
+ 'iceberg': False,
564
583
  },
565
584
  'createOrders': {
566
585
  'max': 5,
@@ -6144,13 +6163,17 @@ class bingx(Exchange, ImplicitAPI):
6144
6163
  if isSandbox and (type != 'swap'):
6145
6164
  raise NotSupported(self.id + ' does not have a testnet/sandbox URL for ' + type + ' endpoints')
6146
6165
  url = self.implode_hostname(self.urls['api'][type])
6147
- if type == 'spot' and version == 'v3':
6148
- url += '/api'
6149
- else:
6150
- url += '/' + type
6151
- url += '/' + version + '/'
6152
6166
  path = self.implode_params(path, params)
6153
- url += path
6167
+ if version == 'transfer':
6168
+ type = 'account/transfer'
6169
+ version = section[2]
6170
+ access = section[3]
6171
+ if path != 'account/apiPermissions':
6172
+ if type == 'spot' and version == 'v3':
6173
+ url += '/api'
6174
+ else:
6175
+ url += '/' + type
6176
+ url += '/' + version + '/' + path
6154
6177
  params = self.omit(params, self.extract_params(path))
6155
6178
  params['timestamp'] = self.nonce()
6156
6179
  params = self.keysort(params)
@@ -6159,7 +6182,7 @@ class bingx(Exchange, ImplicitAPI):
6159
6182
  url += '?' + self.urlencode(params)
6160
6183
  elif access == 'private':
6161
6184
  self.check_required_credentials()
6162
- isJsonContentType = ((type == 'subAccount') and (method == 'POST'))
6185
+ isJsonContentType = (((type == 'subAccount') or (type == 'account/transfer')) and (method == 'POST'))
6163
6186
  parsedParams = self.parse_params(params)
6164
6187
  signature = self.hmac(self.encode(self.rawencode(parsedParams)), self.encode(self.secret), hashlib.sha256)
6165
6188
  headers = {
ccxt/bitfinex.py CHANGED
@@ -438,8 +438,12 @@ class bitfinex(Exchange, ImplicitAPI):
438
438
  'GTD': False,
439
439
  },
440
440
  'hedged': False,
441
- 'trailing': True, # todo: unify
442
- # todo: leverage unify
441
+ 'trailing': True, # todo: implement
442
+ 'leverage': True, # todo: implement
443
+ 'marketBuyRequiresPrice': False,
444
+ 'marketBuyByCost': True,
445
+ 'selfTradePrevention': False,
446
+ 'iceberg': False,
443
447
  },
444
448
  'createOrders': {
445
449
  'max': 75,
ccxt/bitget.py CHANGED
@@ -6613,8 +6613,10 @@ class bitget(Exchange, ImplicitAPI):
6613
6613
  # },
6614
6614
  # ]
6615
6615
  # }
6616
+ symbols = self.market_symbols(symbols)
6616
6617
  data = self.safe_list(response, 'data', [])
6617
- return self.parse_funding_rates(data, market)
6618
+ result = self.parse_funding_rates(data, market)
6619
+ return self.filter_by_array(result, 'symbol', symbols)
6618
6620
 
6619
6621
  def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
6620
6622
  #
ccxt/bitmart.py CHANGED
@@ -726,14 +726,11 @@ class bitmart(Exchange, ImplicitAPI):
726
726
  },
727
727
  'hedged': False,
728
728
  'trailing': False,
729
- 'marketBuyRequiresPrice': True,
729
+ 'marketBuyRequiresPrice': False, # todo: https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
730
730
  'marketBuyByCost': True,
731
- # exchange-supported features
732
- # 'leverage': True,
733
- # 'selfTradePrevention': False,
734
- # 'twap': False,
735
- # 'iceberg': False,
736
- # 'oco': False,
731
+ 'leverage': True, # todo: implement
732
+ 'selfTradePrevention': False,
733
+ 'iceberg': False,
737
734
  },
738
735
  'createOrders': {
739
736
  'max': 10,
ccxt/bitmex.py CHANGED
@@ -310,11 +310,9 @@ class bitmex(Exchange, ImplicitAPI):
310
310
  'trailing': True,
311
311
  'marketBuyRequiresPrice': False,
312
312
  'marketBuyByCost': False,
313
- # exchange-supported features
314
- # 'selfTradePrevention': True,
315
- # 'twap': False,
316
- # 'iceberg': False,
317
- # 'oco': False,
313
+ 'leverage': False,
314
+ 'selfTradePrevention': False,
315
+ 'iceberg': True, # todo
318
316
  },
319
317
  'createOrders': None,
320
318
  'fetchMyTrades': {
ccxt/bitstamp.py CHANGED
@@ -165,6 +165,7 @@ class bitstamp(Exchange, ImplicitAPI):
165
165
  'user_transactions/': 1,
166
166
  'user_transactions/{pair}/': 1,
167
167
  'crypto-transactions/': 1,
168
+ 'open_order': 1,
168
169
  'open_orders/all/': 1,
169
170
  'open_orders/{pair}/': 1,
170
171
  'order_status/': 1,
@@ -505,6 +506,64 @@ class bitstamp(Exchange, ImplicitAPI):
505
506
  'Ensure that there are no more than': InvalidOrder, # {"status": "error", "reason": {"amount": ["Ensure that there are no more than 0 decimal places."], "__all__": [""]}}
506
507
  },
507
508
  },
509
+ 'features': {
510
+ 'spot': {
511
+ 'sandbox': False,
512
+ 'createOrder': {
513
+ 'marginMode': False,
514
+ 'triggerPrice': False,
515
+ 'triggerPriceType': None,
516
+ 'triggerDirection': False,
517
+ 'stopLossPrice': False,
518
+ 'takeProfitPrice': False,
519
+ 'attachedStopLossTakeProfit': None,
520
+ 'timeInForce': {
521
+ 'IOC': True,
522
+ 'FOK': True,
523
+ 'PO': True,
524
+ 'GTD': True,
525
+ },
526
+ 'hedged': False,
527
+ 'trailing': False,
528
+ 'leverage': False,
529
+ 'marketBuyByCost': False,
530
+ 'marketBuyRequiresPrice': False,
531
+ 'selfTradePrevention': False,
532
+ 'iceberg': False,
533
+ },
534
+ 'createOrders': None,
535
+ 'fetchMyTrades': {
536
+ 'marginMode': False,
537
+ 'limit': 1000,
538
+ 'daysBack': None,
539
+ 'untilDays': 30,
540
+ },
541
+ 'fetchOrder': {
542
+ 'marginMode': False,
543
+ 'trigger': False,
544
+ 'trailing': False,
545
+ },
546
+ 'fetchOpenOrders': {
547
+ 'marginMode': False,
548
+ 'limit': None,
549
+ 'trigger': False,
550
+ 'trailing': False,
551
+ },
552
+ 'fetchOrders': None,
553
+ 'fetchClosedOrders': None,
554
+ 'fetchOHLCV': {
555
+ 'limit': 1000,
556
+ },
557
+ },
558
+ 'swap': {
559
+ 'linear': None,
560
+ 'inverse': None,
561
+ },
562
+ 'future': {
563
+ 'linear': None,
564
+ 'inverse': None,
565
+ },
566
+ },
508
567
  })
509
568
 
510
569
  def fetch_markets(self, params={}) -> List[Market]:
ccxt/bybit.py CHANGED
@@ -1124,12 +1124,12 @@ class bybit(Exchange, ImplicitAPI):
1124
1124
  'GTD': False,
1125
1125
  },
1126
1126
  'hedged': True,
1127
- # exchange-supported features
1128
- 'selfTradePrevention': True,
1127
+ 'selfTradePrevention': True, # todo: implement
1129
1128
  'trailing': True,
1130
- 'twap': False,
1131
1129
  'iceberg': False,
1132
- 'oco': False,
1130
+ 'leverage': False,
1131
+ 'marketBuyRequiresPrice': False,
1132
+ 'marketBuyByCost': True,
1133
1133
  },
1134
1134
  'createOrders': {
1135
1135
  'max': 10,
@@ -1168,29 +1168,13 @@ class bybit(Exchange, ImplicitAPI):
1168
1168
  'spot': {
1169
1169
  'extends': 'default',
1170
1170
  'createOrder': {
1171
- 'marginMode': False,
1172
- 'triggerPrice': True,
1173
1171
  'triggerPriceType': None,
1174
1172
  'triggerDirection': False,
1175
- 'stopLossPrice': True,
1176
- 'takeProfitPrice': True,
1177
1173
  'attachedStopLossTakeProfit': {
1178
1174
  'triggerPriceType': None,
1179
1175
  'limitPrice': True,
1180
1176
  },
1181
- 'timeInForce': {
1182
- 'IOC': True,
1183
- 'FOK': True,
1184
- 'PO': True,
1185
- 'GTD': False,
1186
- },
1187
- 'hedged': True,
1188
- # exchange-supported features
1189
- 'selfTradePrevention': True,
1190
- 'trailing': True,
1191
- 'twap': False,
1192
- 'iceberg': False,
1193
- 'oco': False,
1177
+ 'marketBuyRequiresPrice': True,
1194
1178
  },
1195
1179
  },
1196
1180
  'swap': {
@@ -2056,6 +2040,7 @@ class bybit(Exchange, ImplicitAPI):
2056
2040
  'quoteId': quoteId,
2057
2041
  'settleId': settleId,
2058
2042
  'type': 'option',
2043
+ 'subType': 'linear',
2059
2044
  'spot': False,
2060
2045
  'margin': False,
2061
2046
  'swap': False,
@@ -2063,8 +2048,8 @@ class bybit(Exchange, ImplicitAPI):
2063
2048
  'option': True,
2064
2049
  'active': isActive,
2065
2050
  'contract': True,
2066
- 'linear': None,
2067
- 'inverse': None,
2051
+ 'linear': True,
2052
+ 'inverse': False,
2068
2053
  'taker': self.safe_number(market, 'takerFee', self.parse_number('0.0006')),
2069
2054
  'maker': self.safe_number(market, 'makerFee', self.parse_number('0.0001')),
2070
2055
  'contractSize': self.parse_number('1'),