ccxt 4.4.95__py2.py3-none-any.whl → 4.4.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.
Files changed (110) hide show
  1. ccxt/__init__.py +3 -1
  2. ccxt/abstract/binance.py +3 -0
  3. ccxt/abstract/binancecoinm.py +3 -0
  4. ccxt/abstract/binanceus.py +3 -0
  5. ccxt/abstract/binanceusdm.py +3 -0
  6. ccxt/abstract/foxbit.py +26 -0
  7. ccxt/abstract/hyperliquid.py +1 -1
  8. ccxt/abstract/phemex.py +1 -0
  9. ccxt/apex.py +3 -3
  10. ccxt/ascendex.py +2 -2
  11. ccxt/async_support/__init__.py +3 -1
  12. ccxt/async_support/apex.py +3 -3
  13. ccxt/async_support/ascendex.py +2 -2
  14. ccxt/async_support/base/exchange.py +10 -5
  15. ccxt/async_support/base/ws/future.py +5 -3
  16. ccxt/async_support/binance.py +90 -34
  17. ccxt/async_support/binancecoinm.py +5 -1
  18. ccxt/async_support/binanceus.py +3 -1
  19. ccxt/async_support/binanceusdm.py +3 -1
  20. ccxt/async_support/bingx.py +1 -1
  21. ccxt/async_support/bitget.py +30 -143
  22. ccxt/async_support/bitmart.py +2 -2
  23. ccxt/async_support/bitrue.py +13 -8
  24. ccxt/async_support/bybit.py +14 -5
  25. ccxt/async_support/coinbaseexchange.py +4 -2
  26. ccxt/async_support/coinbaseinternational.py +2 -2
  27. ccxt/async_support/coinspot.py +36 -1
  28. ccxt/async_support/cryptocom.py +78 -3
  29. ccxt/async_support/cryptomus.py +41 -1
  30. ccxt/async_support/defx.py +1 -1
  31. ccxt/async_support/derive.py +1 -1
  32. ccxt/async_support/ellipx.py +40 -0
  33. ccxt/async_support/exmo.py +1 -1
  34. ccxt/async_support/foxbit.py +1935 -0
  35. ccxt/async_support/gate.py +1 -2
  36. ccxt/async_support/hashkey.py +39 -0
  37. ccxt/async_support/hyperliquid.py +42 -27
  38. ccxt/async_support/independentreserve.py +35 -0
  39. ccxt/async_support/indodax.py +34 -0
  40. ccxt/async_support/kucoin.py +3 -2
  41. ccxt/async_support/kucoinfutures.py +3 -2
  42. ccxt/async_support/latoken.py +42 -0
  43. ccxt/async_support/luno.py +36 -0
  44. ccxt/async_support/mercado.py +34 -0
  45. ccxt/async_support/mexc.py +31 -32
  46. ccxt/async_support/modetrade.py +3 -3
  47. ccxt/async_support/okcoin.py +1 -1
  48. ccxt/async_support/okx.py +10 -3
  49. ccxt/async_support/onetrading.py +1 -1
  50. ccxt/async_support/oxfun.py +2 -1
  51. ccxt/async_support/paradex.py +2 -2
  52. ccxt/async_support/phemex.py +36 -31
  53. ccxt/async_support/vertex.py +3 -2
  54. ccxt/async_support/woo.py +6 -2
  55. ccxt/async_support/woofipro.py +2 -2
  56. ccxt/base/decimal_to_precision.py +16 -10
  57. ccxt/base/errors.py +6 -0
  58. ccxt/base/exchange.py +60 -17
  59. ccxt/binance.py +90 -34
  60. ccxt/binancecoinm.py +5 -1
  61. ccxt/binanceus.py +3 -1
  62. ccxt/binanceusdm.py +3 -1
  63. ccxt/bingx.py +1 -1
  64. ccxt/bitget.py +30 -143
  65. ccxt/bitmart.py +2 -2
  66. ccxt/bitrue.py +13 -8
  67. ccxt/bybit.py +14 -5
  68. ccxt/coinbaseexchange.py +4 -2
  69. ccxt/coinbaseinternational.py +2 -2
  70. ccxt/coinspot.py +36 -1
  71. ccxt/cryptocom.py +78 -3
  72. ccxt/cryptomus.py +41 -1
  73. ccxt/defx.py +1 -1
  74. ccxt/derive.py +1 -1
  75. ccxt/ellipx.py +40 -0
  76. ccxt/exmo.py +1 -1
  77. ccxt/foxbit.py +1935 -0
  78. ccxt/gate.py +1 -2
  79. ccxt/hashkey.py +39 -0
  80. ccxt/hyperliquid.py +42 -27
  81. ccxt/independentreserve.py +35 -0
  82. ccxt/indodax.py +34 -0
  83. ccxt/kucoin.py +3 -2
  84. ccxt/kucoinfutures.py +3 -2
  85. ccxt/latoken.py +42 -0
  86. ccxt/luno.py +36 -0
  87. ccxt/mercado.py +34 -0
  88. ccxt/mexc.py +31 -32
  89. ccxt/modetrade.py +3 -3
  90. ccxt/okcoin.py +1 -1
  91. ccxt/okx.py +10 -3
  92. ccxt/onetrading.py +1 -1
  93. ccxt/oxfun.py +2 -1
  94. ccxt/paradex.py +2 -2
  95. ccxt/phemex.py +36 -31
  96. ccxt/pro/__init__.py +1 -1
  97. ccxt/pro/binancecoinm.py +3 -1
  98. ccxt/pro/binanceus.py +3 -1
  99. ccxt/pro/binanceusdm.py +3 -1
  100. ccxt/pro/bybit.py +33 -1
  101. ccxt/test/tests_async.py +15 -0
  102. ccxt/test/tests_sync.py +15 -0
  103. ccxt/vertex.py +3 -2
  104. ccxt/woo.py +6 -2
  105. ccxt/woofipro.py +2 -2
  106. {ccxt-4.4.95.dist-info → ccxt-4.4.97.dist-info}/METADATA +19 -19
  107. {ccxt-4.4.95.dist-info → ccxt-4.4.97.dist-info}/RECORD +110 -107
  108. {ccxt-4.4.95.dist-info → ccxt-4.4.97.dist-info}/LICENSE.txt +0 -0
  109. {ccxt-4.4.95.dist-info → ccxt-4.4.97.dist-info}/WHEEL +0 -0
  110. {ccxt-4.4.95.dist-info → ccxt-4.4.97.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.4.95'
25
+ __version__ = '4.4.97'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
@@ -139,6 +139,7 @@ from ccxt.digifinex import digifinex # noqa: F4
139
139
  from ccxt.ellipx import ellipx # noqa: F401
140
140
  from ccxt.exmo import exmo # noqa: F401
141
141
  from ccxt.fmfwio import fmfwio # noqa: F401
142
+ from ccxt.foxbit import foxbit # noqa: F401
142
143
  from ccxt.gate import gate # noqa: F401
143
144
  from ccxt.gateio import gateio # noqa: F401
144
145
  from ccxt.gemini import gemini # noqa: F401
@@ -246,6 +247,7 @@ exchanges = [
246
247
  'ellipx',
247
248
  'exmo',
248
249
  'fmfwio',
250
+ 'foxbit',
249
251
  'gate',
250
252
  'gateio',
251
253
  'gemini',
ccxt/abstract/binance.py CHANGED
@@ -222,6 +222,7 @@ class ImplicitAPI:
222
222
  sapi_get_portfolio_balance = sapiGetPortfolioBalance = Entry('portfolio/balance', 'sapi', 'GET', {'cost': 2})
223
223
  sapi_get_portfolio_negative_balance_exchange_record = sapiGetPortfolioNegativeBalanceExchangeRecord = Entry('portfolio/negative-balance-exchange-record', 'sapi', 'GET', {'cost': 2})
224
224
  sapi_get_portfolio_pmloan_history = sapiGetPortfolioPmloanHistory = Entry('portfolio/pmloan-history', 'sapi', 'GET', {'cost': 5})
225
+ sapi_get_portfolio_earn_asset_balance = sapiGetPortfolioEarnAssetBalance = Entry('portfolio/earn-asset-balance', 'sapi', 'GET', {'cost': 150})
225
226
  sapi_get_staking_productlist = sapiGetStakingProductList = Entry('staking/productList', 'sapi', 'GET', {'cost': 0.1})
226
227
  sapi_get_staking_position = sapiGetStakingPosition = Entry('staking/position', 'sapi', 'GET', {'cost': 0.1})
227
228
  sapi_get_staking_stakingrecord = sapiGetStakingStakingRecord = Entry('staking/stakingRecord', 'sapi', 'GET', {'cost': 0.1})
@@ -364,6 +365,7 @@ class ImplicitAPI:
364
365
  sapi_post_portfolio_repay_futures_negative_balance = sapiPostPortfolioRepayFuturesNegativeBalance = Entry('portfolio/repay-futures-negative-balance', 'sapi', 'POST', {'cost': 150})
365
366
  sapi_post_portfolio_mint = sapiPostPortfolioMint = Entry('portfolio/mint', 'sapi', 'POST', {'cost': 20})
366
367
  sapi_post_portfolio_redeem = sapiPostPortfolioRedeem = Entry('portfolio/redeem', 'sapi', 'POST', {'cost': 20})
368
+ sapi_post_portfolio_earn_asset_transfer = sapiPostPortfolioEarnAssetTransfer = Entry('portfolio/earn-asset-transfer', 'sapi', 'POST', {'cost': 150})
367
369
  sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
368
370
  sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
369
371
  sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
@@ -502,6 +504,7 @@ class ImplicitAPI:
502
504
  fapipublic_get_apitradingstatus = fapiPublicGetApiTradingStatus = Entry('apiTradingStatus', 'fapiPublic', 'GET', {'cost': 1, 'noSymbol': 10})
503
505
  fapipublic_get_lvtklines = fapiPublicGetLvtKlines = Entry('lvtKlines', 'fapiPublic', 'GET', {'cost': 1})
504
506
  fapipublic_get_convert_exchangeinfo = fapiPublicGetConvertExchangeInfo = Entry('convert/exchangeInfo', 'fapiPublic', 'GET', {'cost': 4})
507
+ fapipublic_get_insurancebalance = fapiPublicGetInsuranceBalance = Entry('insuranceBalance', 'fapiPublic', 'GET', {'cost': 1})
505
508
  fapidata_get_delivery_price = fapiDataGetDeliveryPrice = Entry('delivery-price', 'fapiData', 'GET', {'cost': 1})
506
509
  fapidata_get_openinteresthist = fapiDataGetOpenInterestHist = Entry('openInterestHist', 'fapiData', 'GET', {'cost': 1})
507
510
  fapidata_get_toplongshortaccountratio = fapiDataGetTopLongShortAccountRatio = Entry('topLongShortAccountRatio', 'fapiData', 'GET', {'cost': 1})
@@ -222,6 +222,7 @@ class ImplicitAPI:
222
222
  sapi_get_portfolio_balance = sapiGetPortfolioBalance = Entry('portfolio/balance', 'sapi', 'GET', {'cost': 2})
223
223
  sapi_get_portfolio_negative_balance_exchange_record = sapiGetPortfolioNegativeBalanceExchangeRecord = Entry('portfolio/negative-balance-exchange-record', 'sapi', 'GET', {'cost': 2})
224
224
  sapi_get_portfolio_pmloan_history = sapiGetPortfolioPmloanHistory = Entry('portfolio/pmloan-history', 'sapi', 'GET', {'cost': 5})
225
+ sapi_get_portfolio_earn_asset_balance = sapiGetPortfolioEarnAssetBalance = Entry('portfolio/earn-asset-balance', 'sapi', 'GET', {'cost': 150})
225
226
  sapi_get_staking_productlist = sapiGetStakingProductList = Entry('staking/productList', 'sapi', 'GET', {'cost': 0.1})
226
227
  sapi_get_staking_position = sapiGetStakingPosition = Entry('staking/position', 'sapi', 'GET', {'cost': 0.1})
227
228
  sapi_get_staking_stakingrecord = sapiGetStakingStakingRecord = Entry('staking/stakingRecord', 'sapi', 'GET', {'cost': 0.1})
@@ -364,6 +365,7 @@ class ImplicitAPI:
364
365
  sapi_post_portfolio_repay_futures_negative_balance = sapiPostPortfolioRepayFuturesNegativeBalance = Entry('portfolio/repay-futures-negative-balance', 'sapi', 'POST', {'cost': 150})
365
366
  sapi_post_portfolio_mint = sapiPostPortfolioMint = Entry('portfolio/mint', 'sapi', 'POST', {'cost': 20})
366
367
  sapi_post_portfolio_redeem = sapiPostPortfolioRedeem = Entry('portfolio/redeem', 'sapi', 'POST', {'cost': 20})
368
+ sapi_post_portfolio_earn_asset_transfer = sapiPostPortfolioEarnAssetTransfer = Entry('portfolio/earn-asset-transfer', 'sapi', 'POST', {'cost': 150})
367
369
  sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
368
370
  sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
369
371
  sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
@@ -502,6 +504,7 @@ class ImplicitAPI:
502
504
  fapipublic_get_apitradingstatus = fapiPublicGetApiTradingStatus = Entry('apiTradingStatus', 'fapiPublic', 'GET', {'cost': 1, 'noSymbol': 10})
503
505
  fapipublic_get_lvtklines = fapiPublicGetLvtKlines = Entry('lvtKlines', 'fapiPublic', 'GET', {'cost': 1})
504
506
  fapipublic_get_convert_exchangeinfo = fapiPublicGetConvertExchangeInfo = Entry('convert/exchangeInfo', 'fapiPublic', 'GET', {'cost': 4})
507
+ fapipublic_get_insurancebalance = fapiPublicGetInsuranceBalance = Entry('insuranceBalance', 'fapiPublic', 'GET', {'cost': 1})
505
508
  fapidata_get_delivery_price = fapiDataGetDeliveryPrice = Entry('delivery-price', 'fapiData', 'GET', {'cost': 1})
506
509
  fapidata_get_openinteresthist = fapiDataGetOpenInterestHist = Entry('openInterestHist', 'fapiData', 'GET', {'cost': 1})
507
510
  fapidata_get_toplongshortaccountratio = fapiDataGetTopLongShortAccountRatio = Entry('topLongShortAccountRatio', 'fapiData', 'GET', {'cost': 1})
@@ -222,6 +222,7 @@ class ImplicitAPI:
222
222
  sapi_get_portfolio_balance = sapiGetPortfolioBalance = Entry('portfolio/balance', 'sapi', 'GET', {'cost': 2})
223
223
  sapi_get_portfolio_negative_balance_exchange_record = sapiGetPortfolioNegativeBalanceExchangeRecord = Entry('portfolio/negative-balance-exchange-record', 'sapi', 'GET', {'cost': 2})
224
224
  sapi_get_portfolio_pmloan_history = sapiGetPortfolioPmloanHistory = Entry('portfolio/pmloan-history', 'sapi', 'GET', {'cost': 5})
225
+ sapi_get_portfolio_earn_asset_balance = sapiGetPortfolioEarnAssetBalance = Entry('portfolio/earn-asset-balance', 'sapi', 'GET', {'cost': 150})
225
226
  sapi_get_staking_productlist = sapiGetStakingProductList = Entry('staking/productList', 'sapi', 'GET', {'cost': 0.1})
226
227
  sapi_get_staking_position = sapiGetStakingPosition = Entry('staking/position', 'sapi', 'GET', {'cost': 0.1})
227
228
  sapi_get_staking_stakingrecord = sapiGetStakingStakingRecord = Entry('staking/stakingRecord', 'sapi', 'GET', {'cost': 0.1})
@@ -395,6 +396,7 @@ class ImplicitAPI:
395
396
  sapi_post_portfolio_repay_futures_negative_balance = sapiPostPortfolioRepayFuturesNegativeBalance = Entry('portfolio/repay-futures-negative-balance', 'sapi', 'POST', {'cost': 150})
396
397
  sapi_post_portfolio_mint = sapiPostPortfolioMint = Entry('portfolio/mint', 'sapi', 'POST', {'cost': 20})
397
398
  sapi_post_portfolio_redeem = sapiPostPortfolioRedeem = Entry('portfolio/redeem', 'sapi', 'POST', {'cost': 20})
399
+ sapi_post_portfolio_earn_asset_transfer = sapiPostPortfolioEarnAssetTransfer = Entry('portfolio/earn-asset-transfer', 'sapi', 'POST', {'cost': 150})
398
400
  sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
399
401
  sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
400
402
  sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
@@ -554,6 +556,7 @@ class ImplicitAPI:
554
556
  fapipublic_get_apitradingstatus = fapiPublicGetApiTradingStatus = Entry('apiTradingStatus', 'fapiPublic', 'GET', {'cost': 1, 'noSymbol': 10})
555
557
  fapipublic_get_lvtklines = fapiPublicGetLvtKlines = Entry('lvtKlines', 'fapiPublic', 'GET', {'cost': 1})
556
558
  fapipublic_get_convert_exchangeinfo = fapiPublicGetConvertExchangeInfo = Entry('convert/exchangeInfo', 'fapiPublic', 'GET', {'cost': 4})
559
+ fapipublic_get_insurancebalance = fapiPublicGetInsuranceBalance = Entry('insuranceBalance', 'fapiPublic', 'GET', {'cost': 1})
557
560
  fapidata_get_delivery_price = fapiDataGetDeliveryPrice = Entry('delivery-price', 'fapiData', 'GET', {'cost': 1})
558
561
  fapidata_get_openinteresthist = fapiDataGetOpenInterestHist = Entry('openInterestHist', 'fapiData', 'GET', {'cost': 1})
559
562
  fapidata_get_toplongshortaccountratio = fapiDataGetTopLongShortAccountRatio = Entry('topLongShortAccountRatio', 'fapiData', 'GET', {'cost': 1})
@@ -222,6 +222,7 @@ class ImplicitAPI:
222
222
  sapi_get_portfolio_balance = sapiGetPortfolioBalance = Entry('portfolio/balance', 'sapi', 'GET', {'cost': 2})
223
223
  sapi_get_portfolio_negative_balance_exchange_record = sapiGetPortfolioNegativeBalanceExchangeRecord = Entry('portfolio/negative-balance-exchange-record', 'sapi', 'GET', {'cost': 2})
224
224
  sapi_get_portfolio_pmloan_history = sapiGetPortfolioPmloanHistory = Entry('portfolio/pmloan-history', 'sapi', 'GET', {'cost': 5})
225
+ sapi_get_portfolio_earn_asset_balance = sapiGetPortfolioEarnAssetBalance = Entry('portfolio/earn-asset-balance', 'sapi', 'GET', {'cost': 150})
225
226
  sapi_get_staking_productlist = sapiGetStakingProductList = Entry('staking/productList', 'sapi', 'GET', {'cost': 0.1})
226
227
  sapi_get_staking_position = sapiGetStakingPosition = Entry('staking/position', 'sapi', 'GET', {'cost': 0.1})
227
228
  sapi_get_staking_stakingrecord = sapiGetStakingStakingRecord = Entry('staking/stakingRecord', 'sapi', 'GET', {'cost': 0.1})
@@ -364,6 +365,7 @@ class ImplicitAPI:
364
365
  sapi_post_portfolio_repay_futures_negative_balance = sapiPostPortfolioRepayFuturesNegativeBalance = Entry('portfolio/repay-futures-negative-balance', 'sapi', 'POST', {'cost': 150})
365
366
  sapi_post_portfolio_mint = sapiPostPortfolioMint = Entry('portfolio/mint', 'sapi', 'POST', {'cost': 20})
366
367
  sapi_post_portfolio_redeem = sapiPostPortfolioRedeem = Entry('portfolio/redeem', 'sapi', 'POST', {'cost': 20})
368
+ sapi_post_portfolio_earn_asset_transfer = sapiPostPortfolioEarnAssetTransfer = Entry('portfolio/earn-asset-transfer', 'sapi', 'POST', {'cost': 150})
367
369
  sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
368
370
  sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
369
371
  sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
@@ -502,6 +504,7 @@ class ImplicitAPI:
502
504
  fapipublic_get_apitradingstatus = fapiPublicGetApiTradingStatus = Entry('apiTradingStatus', 'fapiPublic', 'GET', {'cost': 1, 'noSymbol': 10})
503
505
  fapipublic_get_lvtklines = fapiPublicGetLvtKlines = Entry('lvtKlines', 'fapiPublic', 'GET', {'cost': 1})
504
506
  fapipublic_get_convert_exchangeinfo = fapiPublicGetConvertExchangeInfo = Entry('convert/exchangeInfo', 'fapiPublic', 'GET', {'cost': 4})
507
+ fapipublic_get_insurancebalance = fapiPublicGetInsuranceBalance = Entry('insuranceBalance', 'fapiPublic', 'GET', {'cost': 1})
505
508
  fapidata_get_delivery_price = fapiDataGetDeliveryPrice = Entry('delivery-price', 'fapiData', 'GET', {'cost': 1})
506
509
  fapidata_get_openinteresthist = fapiDataGetOpenInterestHist = Entry('openInterestHist', 'fapiData', 'GET', {'cost': 1})
507
510
  fapidata_get_toplongshortaccountratio = fapiDataGetTopLongShortAccountRatio = Entry('topLongShortAccountRatio', 'fapiData', 'GET', {'cost': 1})
@@ -0,0 +1,26 @@
1
+ from ccxt.base.types import Entry
2
+
3
+
4
+ class ImplicitAPI:
5
+ v3_public_get_currencies = v3PublicGetCurrencies = Entry('currencies', ['v3', 'public'], 'GET', {'cost': 5})
6
+ v3_public_get_markets = v3PublicGetMarkets = Entry('markets', ['v3', 'public'], 'GET', {'cost': 5})
7
+ v3_public_get_markets_ticker_24hr = v3PublicGetMarketsTicker24hr = Entry('markets/ticker/24hr', ['v3', 'public'], 'GET', {'cost': 60})
8
+ v3_public_get_markets_market_orderbook = v3PublicGetMarketsMarketOrderbook = Entry('markets/{market}/orderbook', ['v3', 'public'], 'GET', {'cost': 6})
9
+ v3_public_get_markets_market_candlesticks = v3PublicGetMarketsMarketCandlesticks = Entry('markets/{market}/candlesticks', ['v3', 'public'], 'GET', {'cost': 12})
10
+ v3_public_get_markets_market_trades_history = v3PublicGetMarketsMarketTradesHistory = Entry('markets/{market}/trades/history', ['v3', 'public'], 'GET', {'cost': 12})
11
+ v3_public_get_markets_market_ticker_24hr = v3PublicGetMarketsMarketTicker24hr = Entry('markets/{market}/ticker/24hr', ['v3', 'public'], 'GET', {'cost': 15})
12
+ v3_private_get_accounts = v3PrivateGetAccounts = Entry('accounts', ['v3', 'private'], 'GET', {'cost': 2})
13
+ v3_private_get_accounts_symbol_transactions = v3PrivateGetAccountsSymbolTransactions = Entry('accounts/{symbol}/transactions', ['v3', 'private'], 'GET', {'cost': 60})
14
+ v3_private_get_orders = v3PrivateGetOrders = Entry('orders', ['v3', 'private'], 'GET', {'cost': 2})
15
+ v3_private_get_orders_by_order_id_id = v3PrivateGetOrdersByOrderIdId = Entry('orders/by-order-id/{id}', ['v3', 'private'], 'GET', {'cost': 2})
16
+ v3_private_get_trades = v3PrivateGetTrades = Entry('trades', ['v3', 'private'], 'GET', {'cost': 6})
17
+ v3_private_get_deposits_address = v3PrivateGetDepositsAddress = Entry('deposits/address', ['v3', 'private'], 'GET', {'cost': 10})
18
+ v3_private_get_deposits = v3PrivateGetDeposits = Entry('deposits', ['v3', 'private'], 'GET', {'cost': 10})
19
+ v3_private_get_withdrawals = v3PrivateGetWithdrawals = Entry('withdrawals', ['v3', 'private'], 'GET', {'cost': 10})
20
+ v3_private_get_me_fees_trading = v3PrivateGetMeFeesTrading = Entry('me/fees/trading', ['v3', 'private'], 'GET', {'cost': 60})
21
+ v3_private_post_orders = v3PrivatePostOrders = Entry('orders', ['v3', 'private'], 'POST', {'cost': 2})
22
+ v3_private_post_orders_batch = v3PrivatePostOrdersBatch = Entry('orders/batch', ['v3', 'private'], 'POST', {'cost': 7.5})
23
+ v3_private_post_orders_cancel_replace = v3PrivatePostOrdersCancelReplace = Entry('orders/cancel-replace', ['v3', 'private'], 'POST', {'cost': 3})
24
+ v3_private_post_withdrawals = v3PrivatePostWithdrawals = Entry('withdrawals', ['v3', 'private'], 'POST', {'cost': 10})
25
+ v3_private_put_orders_cancel = v3PrivatePutOrdersCancel = Entry('orders/cancel', ['v3', 'private'], 'PUT', {'cost': 2})
26
+ status_public_get_status = statusPublicGetStatus = Entry('status', ['status', 'public'], 'GET', {'cost': 30})
@@ -2,5 +2,5 @@ from ccxt.base.types import Entry
2
2
 
3
3
 
4
4
  class ImplicitAPI:
5
- public_post_info = publicPostInfo = Entry('info', 'public', 'POST', {'cost': 20, 'byType': {'l2Book': 2, 'allMids': 2, 'clearinghouseState': 2, 'orderStatus': 2, 'spotClearinghouseState': 2, 'exchangeStatus': 2, 'candleSnapshot': 3}})
5
+ public_post_info = publicPostInfo = Entry('info', 'public', 'POST', {'cost': 20, 'byType': {'l2Book': 2, 'allMids': 2, 'clearinghouseState': 2, 'orderStatus': 2, 'spotClearinghouseState': 2, 'exchangeStatus': 2, 'candleSnapshot': 4}})
6
6
  private_post_exchange = privatePostExchange = Entry('exchange', 'private', 'POST', {'cost': 1})
ccxt/abstract/phemex.py CHANGED
@@ -102,6 +102,7 @@ class ImplicitAPI:
102
102
  private_put_spot_orders = privatePutSpotOrders = Entry('spot/orders', 'private', 'PUT', {'cost': 1})
103
103
  private_put_orders_replace = privatePutOrdersReplace = Entry('orders/replace', 'private', 'PUT', {'cost': 1})
104
104
  private_put_g_orders_replace = privatePutGOrdersReplace = Entry('g-orders/replace', 'private', 'PUT', {'cost': 1})
105
+ private_put_g_orders_create = privatePutGOrdersCreate = Entry('g-orders/create', 'private', 'PUT', {'cost': 1})
105
106
  private_put_positions_leverage = privatePutPositionsLeverage = Entry('positions/leverage', 'private', 'PUT', {'cost': 5})
106
107
  private_put_g_positions_leverage = privatePutGPositionsLeverage = Entry('g-positions/leverage', 'private', 'PUT', {'cost': 5})
107
108
  private_put_g_positions_switch_pos_mode_sync = privatePutGPositionsSwitchPosModeSync = Entry('g-positions/switch-pos-mode-sync', 'private', 'PUT', {'cost': 5})
ccxt/apex.py CHANGED
@@ -1485,7 +1485,7 @@ class apex(Exchange, ImplicitAPI):
1485
1485
  'status': self.safe_string(transfer, 'status'),
1486
1486
  }
1487
1487
 
1488
- def cancel_all_orders(self, symbol: Str = None, params={}):
1488
+ def cancel_all_orders(self, symbol: Str = None, params={}) -> List[Order]:
1489
1489
  """
1490
1490
  cancel all open orders in a market
1491
1491
 
@@ -1503,7 +1503,7 @@ class apex(Exchange, ImplicitAPI):
1503
1503
  request['symbol'] = market['id']
1504
1504
  response = self.privatePostV3DeleteOpenOrders(self.extend(request, params))
1505
1505
  data = self.safe_dict(response, 'data', {})
1506
- return data
1506
+ return [self.parse_order(data, market)]
1507
1507
 
1508
1508
  def cancel_order(self, id: str, symbol: Str = None, params={}):
1509
1509
  """
@@ -1527,7 +1527,7 @@ class apex(Exchange, ImplicitAPI):
1527
1527
  request['id'] = id
1528
1528
  response = self.privatePostV3DeleteOrder(self.extend(request, params))
1529
1529
  data = self.safe_dict(response, 'data', {})
1530
- return data
1530
+ return self.safe_order(data)
1531
1531
 
1532
1532
  def fetch_order(self, id: str, symbol: Str = None, params={}):
1533
1533
  """
ccxt/ascendex.py CHANGED
@@ -2432,9 +2432,9 @@ class ascendex(Exchange, ImplicitAPI):
2432
2432
  # }
2433
2433
  # }
2434
2434
  #
2435
- return self.safe_order({
2435
+ return [self.safe_order({
2436
2436
  'info': response,
2437
- })
2437
+ })]
2438
2438
 
2439
2439
  def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
2440
2440
  #
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.95'
7
+ __version__ = '4.4.97'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -119,6 +119,7 @@ from ccxt.async_support.digifinex import digifinex
119
119
  from ccxt.async_support.ellipx import ellipx # noqa: F401
120
120
  from ccxt.async_support.exmo import exmo # noqa: F401
121
121
  from ccxt.async_support.fmfwio import fmfwio # noqa: F401
122
+ from ccxt.async_support.foxbit import foxbit # noqa: F401
122
123
  from ccxt.async_support.gate import gate # noqa: F401
123
124
  from ccxt.async_support.gateio import gateio # noqa: F401
124
125
  from ccxt.async_support.gemini import gemini # noqa: F401
@@ -226,6 +227,7 @@ exchanges = [
226
227
  'ellipx',
227
228
  'exmo',
228
229
  'fmfwio',
230
+ 'foxbit',
229
231
  'gate',
230
232
  'gateio',
231
233
  'gemini',
@@ -1485,7 +1485,7 @@ class apex(Exchange, ImplicitAPI):
1485
1485
  'status': self.safe_string(transfer, 'status'),
1486
1486
  }
1487
1487
 
1488
- async def cancel_all_orders(self, symbol: Str = None, params={}):
1488
+ async def cancel_all_orders(self, symbol: Str = None, params={}) -> List[Order]:
1489
1489
  """
1490
1490
  cancel all open orders in a market
1491
1491
 
@@ -1503,7 +1503,7 @@ class apex(Exchange, ImplicitAPI):
1503
1503
  request['symbol'] = market['id']
1504
1504
  response = await self.privatePostV3DeleteOpenOrders(self.extend(request, params))
1505
1505
  data = self.safe_dict(response, 'data', {})
1506
- return data
1506
+ return [self.parse_order(data, market)]
1507
1507
 
1508
1508
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
1509
1509
  """
@@ -1527,7 +1527,7 @@ class apex(Exchange, ImplicitAPI):
1527
1527
  request['id'] = id
1528
1528
  response = await self.privatePostV3DeleteOrder(self.extend(request, params))
1529
1529
  data = self.safe_dict(response, 'data', {})
1530
- return data
1530
+ return self.safe_order(data)
1531
1531
 
1532
1532
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
1533
1533
  """
@@ -2433,9 +2433,9 @@ class ascendex(Exchange, ImplicitAPI):
2433
2433
  # }
2434
2434
  # }
2435
2435
  #
2436
- return self.safe_order({
2436
+ return [self.safe_order({
2437
2437
  'info': response,
2438
- })
2438
+ })]
2439
2439
 
2440
2440
  def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
2441
2441
  #
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.95'
5
+ __version__ = '4.4.97'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -176,7 +176,7 @@ class Exchange(BaseExchange):
176
176
  if (socksProxy not in self.socks_proxy_sessions):
177
177
  # Create our SSL context object with our CA cert file
178
178
  self.open() # ensure `asyncio_loop` is set
179
- proxy_session = self.get_socks_proxy_session(socksProxy)
179
+ proxy_session = self.get_socks_proxy_session(socksProxy)
180
180
  # add aiohttp_proxy for python as exclusion
181
181
  elif self.aiohttp_proxy:
182
182
  final_proxy = self.aiohttp_proxy
@@ -231,6 +231,8 @@ class Exchange(BaseExchange):
231
231
  self.last_json_response = json_response
232
232
  if self.verbose:
233
233
  self.log("\nfetch Response:", self.id, method, url, http_status_code, "ResponseHeaders:", headers, "ResponseBody:", http_response)
234
+ if json_response and not isinstance(json_response, list) and self.returnResponseHeaders:
235
+ json_response['responseHeaders'] = headers
234
236
  self.logger.debug("%s %s, Response: %s %s %s", method, url, http_status_code, headers, http_response)
235
237
 
236
238
  except socket.gaierror as e:
@@ -668,6 +670,9 @@ class Exchange(BaseExchange):
668
670
  async def un_watch_order_book_for_symbols(self, symbols: List[str], params={}):
669
671
  raise NotSupported(self.id + ' unWatchOrderBookForSymbols() is not supported yet')
670
672
 
673
+ async def un_watch_positions(self, symbols: Strings = None, params={}):
674
+ raise NotSupported(self.id + ' unWatchPositions() is not supported yet')
675
+
671
676
  async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
672
677
  raise NotSupported(self.id + ' fetchDepositAddresses() is not supported yet')
673
678
 
@@ -1596,10 +1601,10 @@ class Exchange(BaseExchange):
1596
1601
  """
1597
1602
  raise NotSupported(self.id + ' fetchDepositsWithdrawals() is not supported yet')
1598
1603
 
1599
- async def fetch_deposits(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1604
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1600
1605
  raise NotSupported(self.id + ' fetchDeposits() is not supported yet')
1601
1606
 
1602
- async def fetch_withdrawals(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1607
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1603
1608
  raise NotSupported(self.id + ' fetchWithdrawals() is not supported yet')
1604
1609
 
1605
1610
  async def fetch_deposits_ws(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
@@ -1892,7 +1897,7 @@ class Exchange(BaseExchange):
1892
1897
  calls = 0
1893
1898
  result = []
1894
1899
  errors = 0
1895
- until = self.safe_integer_2(params, 'untill', 'till') # do not omit it from params here
1900
+ until = self.safe_integer_n(params, ['until', 'untill', 'till']) # do not omit it from params here
1896
1901
  maxEntriesPerRequest, params = self.handle_max_entries_per_request_and_params(method, maxEntriesPerRequest, params)
1897
1902
  if (paginationDirection == 'forward'):
1898
1903
  if since is None:
@@ -1,6 +1,8 @@
1
1
  import asyncio
2
2
 
3
-
3
+ # Test by running:
4
+ # - python python/ccxt/pro/test/base/test_close.py
5
+ # - python python/ccxt/pro/test/base/test_future.py
4
6
  class Future(asyncio.Future):
5
7
 
6
8
  def resolve(self, result=None):
@@ -30,14 +32,14 @@ class Future(asyncio.Future):
30
32
  if err:
31
33
  exceptions.append(err)
32
34
  # if any exceptions return with first exception
35
+ if future.cancelled():
36
+ return
33
37
  if len(exceptions) > 0:
34
38
  future.set_exception(exceptions[0])
35
39
  # else return first result
36
40
  elif cancelled:
37
41
  future.cancel()
38
42
  else:
39
- if future.cancelled():
40
- return
41
43
  first_result = list(complete)[0].result()
42
44
  future.set_result(first_result)
43
45
  task.add_done_callback(callback)
@@ -506,6 +506,7 @@ class binance(Exchange, ImplicitAPI):
506
506
  'portfolio/balance': 2,
507
507
  'portfolio/negative-balance-exchange-record': 2,
508
508
  'portfolio/pmloan-history': 5,
509
+ 'portfolio/earn-asset-balance': 150, # Weight(IP): 1500 => cost = 0.1 * 1500 = 150
509
510
  # staking
510
511
  'staking/productList': 0.1,
511
512
  'staking/position': 0.1,
@@ -664,6 +665,7 @@ class binance(Exchange, ImplicitAPI):
664
665
  'portfolio/repay-futures-negative-balance': 150, # Weight(IP): 1500 => cost = 0.1 * 1500 = 150
665
666
  'portfolio/mint': 20,
666
667
  'portfolio/redeem': 20,
668
+ 'portfolio/earn-asset-transfer': 150, # Weight(IP): 1500 => cost = 0.1 * 1500 = 150
667
669
  'lending/auto-invest/plan/add': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
668
670
  'lending/auto-invest/plan/edit': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
669
671
  'lending/auto-invest/plan/edit-status': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
@@ -852,6 +854,7 @@ class binance(Exchange, ImplicitAPI):
852
854
  'apiTradingStatus': {'cost': 1, 'noSymbol': 10},
853
855
  'lvtKlines': 1,
854
856
  'convert/exchangeInfo': 4,
857
+ 'insuranceBalance': 1,
855
858
  },
856
859
  },
857
860
  'fapiData': {
@@ -1289,12 +1292,14 @@ class binance(Exchange, ImplicitAPI):
1289
1292
  'options': {
1290
1293
  'sandboxMode': False,
1291
1294
  'fetchMargins': True,
1292
- 'fetchMarkets': [
1293
- 'spot', # allows CORS in browsers
1294
- 'linear', # allows CORS in browsers
1295
- 'inverse', # allows CORS in browsers
1296
- # 'option', # does not allow CORS, enable outside of the browser only
1297
- ],
1295
+ 'fetchMarkets': {
1296
+ 'types': [
1297
+ 'spot', # allows CORS in browsers
1298
+ 'linear', # allows CORS in browsers
1299
+ 'inverse', # allows CORS in browsers
1300
+ # 'option', # does not allow CORS, enable outside of the browser only
1301
+ ],
1302
+ },
1298
1303
  'loadAllOptions': False,
1299
1304
  'fetchCurrencies': True, # self is a private call and it requires API keys
1300
1305
  # 'fetchTradesMethod': 'publicGetAggTrades', # publicGetTrades, publicGetHistoricalTrades, eapiPublicGetTrades
@@ -3022,7 +3027,14 @@ class binance(Exchange, ImplicitAPI):
3022
3027
  :returns dict[]: an array of objects representing market data
3023
3028
  """
3024
3029
  promisesRaw = []
3025
- rawFetchMarkets = self.safe_list(self.options, 'fetchMarkets', ['spot', 'linear', 'inverse'])
3030
+ rawFetchMarkets = None
3031
+ defaultTypes = ['spot', 'linear', 'inverse']
3032
+ fetchMarketsOptions = self.safe_dict(self.options, 'fetchMarkets')
3033
+ if fetchMarketsOptions is not None:
3034
+ rawFetchMarkets = self.safe_list(fetchMarketsOptions, 'types', defaultTypes)
3035
+ else:
3036
+ # for backward-compatibility
3037
+ rawFetchMarkets = self.safe_list(self.options, 'fetchMarkets', defaultTypes)
3026
3038
  # handle loadAllOptions option
3027
3039
  loadAllOptions = self.safe_bool(self.options, 'loadAllOptions', False)
3028
3040
  if loadAllOptions:
@@ -3914,29 +3926,52 @@ class binance(Exchange, ImplicitAPI):
3914
3926
  # "time": 1597370495002
3915
3927
  # }
3916
3928
  #
3917
- # {
3918
- # "symbol": "ETHBTC",
3919
- # "priceChange": "0.00068700",
3920
- # "priceChangePercent": "2.075",
3921
- # "weightedAvgPrice": "0.03342681",
3922
- # "prevClosePrice": "0.03310300",
3923
- # "lastPrice": "0.03378900",
3924
- # "lastQty": "0.07700000",
3925
- # "bidPrice": "0.03378900",
3926
- # "bidQty": "7.16800000",
3927
- # "askPrice": "0.03379000",
3928
- # "askQty": "24.00000000",
3929
- # "openPrice": "0.03310200",
3930
- # "highPrice": "0.03388900",
3931
- # "lowPrice": "0.03306900",
3932
- # "volume": "205478.41000000",
3933
- # "quoteVolume": "6868.48826294",
3934
- # "openTime": 1601469986932,
3935
- # "closeTime": 1601556386932,
3936
- # "firstId": 196098772,
3937
- # "lastId": 196186315,
3938
- # "count": 87544
3939
- # }
3929
+ # spot - ticker
3930
+ #
3931
+ # {
3932
+ # "symbol": "BTCUSDT",
3933
+ # "priceChange": "-188.18000000",
3934
+ # "priceChangePercent": "-0.159",
3935
+ # "weightedAvgPrice": "118356.64734074",
3936
+ # "lastPrice": "118449.03000000",
3937
+ # "prevClosePrice": "118637.22000000", # field absent in rolling ticker
3938
+ # "lastQty": "0.00731000", # field absent in rolling ticker
3939
+ # "bidPrice": "118449.02000000", # field absent in rolling ticker
3940
+ # "bidQty": "7.15931000", # field absent in rolling ticker
3941
+ # "askPrice": "118449.03000000", # field absent in rolling ticker
3942
+ # "askQty": "0.09592000", # field absent in rolling ticker
3943
+ # "openPrice": "118637.21000000",
3944
+ # "highPrice": "119273.36000000",
3945
+ # "lowPrice": "117427.50000000",
3946
+ # "volume": "14741.41491000",
3947
+ # "quoteVolume": "1744744445.80640740",
3948
+ # "openTime": "1753701474013",
3949
+ # "closeTime": "1753787874013",
3950
+ # "firstId": "5116031635",
3951
+ # "lastId": "5117964946",
3952
+ # "count": "1933312"
3953
+ # }
3954
+ #
3955
+ # usdm tickers
3956
+ #
3957
+ # {
3958
+ # "symbol": "SUSDT",
3959
+ # "priceChange": "-0.0229000",
3960
+ # "priceChangePercent": "-6.777",
3961
+ # "weightedAvgPrice": "0.3210035",
3962
+ # "lastPrice": "0.3150000",
3963
+ # "lastQty": "16",
3964
+ # "openPrice": "0.3379000",
3965
+ # "highPrice": "0.3411000",
3966
+ # "lowPrice": "0.3071000",
3967
+ # "volume": "120588225",
3968
+ # "quoteVolume": "38709237.2289000",
3969
+ # "openTime": "1753701720000",
3970
+ # "closeTime": "1753788172414",
3971
+ # "firstId": "72234973",
3972
+ # "lastId": "72423677",
3973
+ # "count": "188700"
3974
+ # }
3940
3975
  #
3941
3976
  # coinm
3942
3977
  #
@@ -4287,16 +4322,37 @@ class binance(Exchange, ImplicitAPI):
4287
4322
  elif self.is_inverse(type, subType):
4288
4323
  response = await self.dapiPublicGetTicker24hr(params)
4289
4324
  elif type == 'spot':
4290
- request: dict = {}
4291
- if symbols is not None:
4292
- request['symbols'] = self.json(self.market_ids(symbols))
4293
- response = await self.publicGetTicker24hr(self.extend(request, params))
4325
+ rolling = self.safe_bool(params, 'rolling', False)
4326
+ params = self.omit(params, 'rolling')
4327
+ if rolling:
4328
+ symbols = self.market_symbols(symbols)
4329
+ request: dict = {
4330
+ 'symbols': self.json(self.market_ids(symbols)),
4331
+ }
4332
+ response = await self.publicGetTicker(self.extend(request, params))
4333
+ # parseTicker is not able to handle marketType for spot-rolling ticker fields, so we need custom parsing
4334
+ return self.parse_tickers_for_rolling(response, symbols)
4335
+ else:
4336
+ request: dict = {}
4337
+ if symbols is not None:
4338
+ request['symbols'] = self.json(self.market_ids(symbols))
4339
+ response = await self.publicGetTicker24hr(self.extend(request, params))
4294
4340
  elif type == 'option':
4295
4341
  response = await self.eapiPublicGetTicker(params)
4296
4342
  else:
4297
4343
  raise NotSupported(self.id + ' fetchTickers() does not support ' + type + ' markets yet')
4298
4344
  return self.parse_tickers(response, symbols)
4299
4345
 
4346
+ def parse_tickers_for_rolling(self, response, symbols):
4347
+ results = []
4348
+ for i in range(0, len(response)):
4349
+ marketId = self.safe_string(response[i], 'symbol')
4350
+ tickerMarket = self.safe_market(marketId, None, None, 'spot')
4351
+ parsedTicker = self.parse_ticker(response[i])
4352
+ parsedTicker['symbol'] = tickerMarket['symbol']
4353
+ results.append(parsedTicker)
4354
+ return self.filter_by_array(results, 'symbol', symbols)
4355
+
4300
4356
  async def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
4301
4357
  """
4302
4358
  fetches mark price for the market
@@ -32,7 +32,11 @@ class binancecoinm(binance, ImplicitAPI):
32
32
  'createStopMarketOrder': True,
33
33
  },
34
34
  'options': {
35
- 'fetchMarkets': ['inverse'],
35
+ 'fetchMarkets': {
36
+ 'types': [
37
+ 'inverse',
38
+ ],
39
+ },
36
40
  'defaultSubType': 'inverse',
37
41
  'leverageBrackets': None,
38
42
  },
@@ -43,7 +43,9 @@ class binanceus(binance, ImplicitAPI):
43
43
  },
44
44
  },
45
45
  'options': {
46
- 'fetchMarkets': ['spot'],
46
+ 'fetchMarkets': {
47
+ 'types': ['spot'],
48
+ },
47
49
  'defaultType': 'spot',
48
50
  'fetchMargins': False,
49
51
  'quoteOrderQty': False,
@@ -33,7 +33,9 @@ class binanceusdm(binance, ImplicitAPI):
33
33
  'createStopMarketOrder': True,
34
34
  },
35
35
  'options': {
36
- 'fetchMarkets': ['linear'],
36
+ 'fetchMarkets': {
37
+ 'types': ['linear'],
38
+ },
37
39
  'defaultSubType': 'linear',
38
40
  # https://www.binance.com/en/support/faq/360033162192
39
41
  # tier amount, maintenance margin, initial margin,
@@ -5058,7 +5058,7 @@ class bingx(Exchange, ImplicitAPI):
5058
5058
  id = self.safe_string(transaction, 'id', dataId)
5059
5059
  address = self.safe_string(transaction, 'address')
5060
5060
  tag = self.safe_string(transaction, 'addressTag')
5061
- timestamp = self.safe_integer(transaction, 'insertTime')
5061
+ timestamp = self.safe_integer_2(transaction, 'insertTime', 'timestamp')
5062
5062
  datetime = self.iso8601(timestamp)
5063
5063
  if timestamp is None:
5064
5064
  datetime = self.safe_string(transaction, 'applyTime')