ccxt 4.0.71__py2.py3-none-any.whl → 4.0.73__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.
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.0.71'
25
+ __version__ = '4.0.73'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/abstract/binance.py CHANGED
@@ -554,6 +554,21 @@ class ImplicitAPI:
554
554
  papi_get_cm_openorder = papiGetCmOpenOrder = Entry('cm/openOrder', 'papi', 'GET', {'cost': 1})
555
555
  papi_get_cm_openorders = papiGetCmOpenOrders = Entry('cm/openOrders', 'papi', 'GET', {'cost': 1})
556
556
  papi_get_cm_allorders = papiGetCmAllOrders = Entry('cm/allOrders', 'papi', 'GET', {'cost': 20})
557
+ papi_get_um_conditional_openorder = papiGetUmConditionalOpenOrder = Entry('um/conditional/openOrder', 'papi', 'GET', {'cost': 1})
558
+ papi_get_um_conditional_openorders = papiGetUmConditionalOpenOrders = Entry('um/conditional/openOrders', 'papi', 'GET', {'cost': 40})
559
+ papi_get_um_conditional_orderhistory = papiGetUmConditionalOrderHistory = Entry('um/conditional/orderHistory', 'papi', 'GET', {'cost': 1})
560
+ papi_get_um_conditional_allorders = papiGetUmConditionalAllOrders = Entry('um/conditional/allOrders', 'papi', 'GET', {'cost': 40})
561
+ papi_get_cm_conditional_openorder = papiGetCmConditionalOpenOrder = Entry('cm/conditional/openOrder', 'papi', 'GET', {'cost': 1})
562
+ papi_get_cm_conditional_openorders = papiGetCmConditionalOpenOrders = Entry('cm/conditional/openOrders', 'papi', 'GET', {'cost': 40})
563
+ papi_get_cm_conditional_orderhistory = papiGetCmConditionalOrderHistory = Entry('cm/conditional/orderHistory', 'papi', 'GET', {'cost': 1})
564
+ papi_get_cm_conditional_allorders = papiGetCmConditionalAllOrders = Entry('cm/conditional/allOrders', 'papi', 'GET', {'cost': 40})
565
+ papi_get_margin_order = papiGetMarginOrder = Entry('margin/order', 'papi', 'GET', {'cost': 5})
566
+ papi_get_margin_openorders = papiGetMarginOpenOrders = Entry('margin/openOrders', 'papi', 'GET', {'cost': 5})
567
+ papi_get_margin_allorders = papiGetMarginAllOrders = Entry('margin/allOrders', 'papi', 'GET', {'cost': 100})
568
+ papi_get_margin_orderlist = papiGetMarginOrderList = Entry('margin/orderList', 'papi', 'GET', {'cost': 5})
569
+ papi_get_margin_allorderlist = papiGetMarginAllOrderList = Entry('margin/allOrderList', 'papi', 'GET', {'cost': 100})
570
+ papi_get_margin_openorderlist = papiGetMarginOpenOrderList = Entry('margin/openOrderList', 'papi', 'GET', {'cost': 5})
571
+ papi_get_margin_mytrades = papiGetMarginMyTrades = Entry('margin/myTrades', 'papi', 'GET', {'cost': 5})
557
572
  papi_get_balance = papiGetBalance = Entry('balance', 'papi', 'GET', {'cost': 20})
558
573
  papi_get_account = papiGetAccount = Entry('account', 'papi', 'GET', {'cost': 20})
559
574
  papi_get_margin_maxborrowable = papiGetMarginMaxBorrowable = Entry('margin/maxBorrowable', 'papi', 'GET', {'cost': 5})
@@ -572,6 +587,10 @@ class ImplicitAPI:
572
587
  papi_get_um_apitradingstatus = papiGetUmApiTradingStatus = Entry('um/apiTradingStatus', 'papi', 'GET', {'cost': 1})
573
588
  papi_get_um_commissionrate = papiGetUmCommissionRate = Entry('um/commissionRate', 'papi', 'GET', {'cost': 20})
574
589
  papi_get_cm_commissionrate = papiGetCmCommissionRate = Entry('cm/commissionRate', 'papi', 'GET', {'cost': 20})
590
+ papi_get_margin_marginloan = papiGetMarginMarginLoan = Entry('margin/marginLoan', 'papi', 'GET', {'cost': 10})
591
+ papi_get_margin_repayloan = papiGetMarginRepayLoan = Entry('margin/repayLoan', 'papi', 'GET', {'cost': 10})
592
+ papi_get_margin_margininteresthistory = papiGetMarginMarginInterestHistory = Entry('margin/marginInterestHistory', 'papi', 'GET', {'cost': 1})
593
+ papi_get_portfolio_interest_history = papiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'papi', 'GET', {'cost': 50})
575
594
  papi_get_um_income = papiGetUmIncome = Entry('um/income', 'papi', 'GET', {'cost': 30})
576
595
  papi_get_cm_income = papiGetCmIncome = Entry('cm/income ', 'papi', 'GET', {'cost': 30})
577
596
  papi_get_um_account = papiGetUmAccount = Entry('um/account', 'papi', 'GET', {'cost': 5})
@@ -579,10 +598,6 @@ class ImplicitAPI:
579
598
  papi_get_portfolio_repay_futures_switch = papiGetPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'papi', 'GET', {'cost': 3})
580
599
  papi_get_um_adlquantile = papiGetUmAdlQuantile = Entry('um/adlQuantile', 'papi', 'GET', {'cost': 5})
581
600
  papi_get_cm_adlquantile = papiGetCmAdlQuantile = Entry('cm/adlQuantile', 'papi', 'GET', {'cost': 5})
582
- papi_get_margin_marginloan = papiGetMarginMarginLoan = Entry('margin/marginLoan', 'papi', 'GET', {'cost': 0.0667})
583
- papi_get_margin_repayloan = papiGetMarginRepayLoan = Entry('margin/repayLoan', 'papi', 'GET', {'cost': 0.0667})
584
- papi_get_margin_margininteresthistory = papiGetMarginMarginInterestHistory = Entry('margin/marginInterestHistory', 'papi', 'GET', {'cost': 0.1})
585
- papi_get_portfolio_interest_history = papiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'papi', 'GET', {'cost': 50})
586
601
  papi_post_um_order = papiPostUmOrder = Entry('um/order', 'papi', 'POST', {'cost': 1})
587
602
  papi_post_cm_order = papiPostCmOrder = Entry('cm/order', 'papi', 'POST', {'cost': 1})
588
603
  papi_post_margin_order = papiPostMarginOrder = Entry('margin/order', 'papi', 'POST', {'cost': 0.0133})
@@ -554,6 +554,21 @@ class ImplicitAPI:
554
554
  papi_get_cm_openorder = papiGetCmOpenOrder = Entry('cm/openOrder', 'papi', 'GET', {'cost': 1})
555
555
  papi_get_cm_openorders = papiGetCmOpenOrders = Entry('cm/openOrders', 'papi', 'GET', {'cost': 1})
556
556
  papi_get_cm_allorders = papiGetCmAllOrders = Entry('cm/allOrders', 'papi', 'GET', {'cost': 20})
557
+ papi_get_um_conditional_openorder = papiGetUmConditionalOpenOrder = Entry('um/conditional/openOrder', 'papi', 'GET', {'cost': 1})
558
+ papi_get_um_conditional_openorders = papiGetUmConditionalOpenOrders = Entry('um/conditional/openOrders', 'papi', 'GET', {'cost': 40})
559
+ papi_get_um_conditional_orderhistory = papiGetUmConditionalOrderHistory = Entry('um/conditional/orderHistory', 'papi', 'GET', {'cost': 1})
560
+ papi_get_um_conditional_allorders = papiGetUmConditionalAllOrders = Entry('um/conditional/allOrders', 'papi', 'GET', {'cost': 40})
561
+ papi_get_cm_conditional_openorder = papiGetCmConditionalOpenOrder = Entry('cm/conditional/openOrder', 'papi', 'GET', {'cost': 1})
562
+ papi_get_cm_conditional_openorders = papiGetCmConditionalOpenOrders = Entry('cm/conditional/openOrders', 'papi', 'GET', {'cost': 40})
563
+ papi_get_cm_conditional_orderhistory = papiGetCmConditionalOrderHistory = Entry('cm/conditional/orderHistory', 'papi', 'GET', {'cost': 1})
564
+ papi_get_cm_conditional_allorders = papiGetCmConditionalAllOrders = Entry('cm/conditional/allOrders', 'papi', 'GET', {'cost': 40})
565
+ papi_get_margin_order = papiGetMarginOrder = Entry('margin/order', 'papi', 'GET', {'cost': 5})
566
+ papi_get_margin_openorders = papiGetMarginOpenOrders = Entry('margin/openOrders', 'papi', 'GET', {'cost': 5})
567
+ papi_get_margin_allorders = papiGetMarginAllOrders = Entry('margin/allOrders', 'papi', 'GET', {'cost': 100})
568
+ papi_get_margin_orderlist = papiGetMarginOrderList = Entry('margin/orderList', 'papi', 'GET', {'cost': 5})
569
+ papi_get_margin_allorderlist = papiGetMarginAllOrderList = Entry('margin/allOrderList', 'papi', 'GET', {'cost': 100})
570
+ papi_get_margin_openorderlist = papiGetMarginOpenOrderList = Entry('margin/openOrderList', 'papi', 'GET', {'cost': 5})
571
+ papi_get_margin_mytrades = papiGetMarginMyTrades = Entry('margin/myTrades', 'papi', 'GET', {'cost': 5})
557
572
  papi_get_balance = papiGetBalance = Entry('balance', 'papi', 'GET', {'cost': 20})
558
573
  papi_get_account = papiGetAccount = Entry('account', 'papi', 'GET', {'cost': 20})
559
574
  papi_get_margin_maxborrowable = papiGetMarginMaxBorrowable = Entry('margin/maxBorrowable', 'papi', 'GET', {'cost': 5})
@@ -572,6 +587,10 @@ class ImplicitAPI:
572
587
  papi_get_um_apitradingstatus = papiGetUmApiTradingStatus = Entry('um/apiTradingStatus', 'papi', 'GET', {'cost': 1})
573
588
  papi_get_um_commissionrate = papiGetUmCommissionRate = Entry('um/commissionRate', 'papi', 'GET', {'cost': 20})
574
589
  papi_get_cm_commissionrate = papiGetCmCommissionRate = Entry('cm/commissionRate', 'papi', 'GET', {'cost': 20})
590
+ papi_get_margin_marginloan = papiGetMarginMarginLoan = Entry('margin/marginLoan', 'papi', 'GET', {'cost': 10})
591
+ papi_get_margin_repayloan = papiGetMarginRepayLoan = Entry('margin/repayLoan', 'papi', 'GET', {'cost': 10})
592
+ papi_get_margin_margininteresthistory = papiGetMarginMarginInterestHistory = Entry('margin/marginInterestHistory', 'papi', 'GET', {'cost': 1})
593
+ papi_get_portfolio_interest_history = papiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'papi', 'GET', {'cost': 50})
575
594
  papi_get_um_income = papiGetUmIncome = Entry('um/income', 'papi', 'GET', {'cost': 30})
576
595
  papi_get_cm_income = papiGetCmIncome = Entry('cm/income ', 'papi', 'GET', {'cost': 30})
577
596
  papi_get_um_account = papiGetUmAccount = Entry('um/account', 'papi', 'GET', {'cost': 5})
@@ -579,10 +598,6 @@ class ImplicitAPI:
579
598
  papi_get_portfolio_repay_futures_switch = papiGetPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'papi', 'GET', {'cost': 3})
580
599
  papi_get_um_adlquantile = papiGetUmAdlQuantile = Entry('um/adlQuantile', 'papi', 'GET', {'cost': 5})
581
600
  papi_get_cm_adlquantile = papiGetCmAdlQuantile = Entry('cm/adlQuantile', 'papi', 'GET', {'cost': 5})
582
- papi_get_margin_marginloan = papiGetMarginMarginLoan = Entry('margin/marginLoan', 'papi', 'GET', {'cost': 0.0667})
583
- papi_get_margin_repayloan = papiGetMarginRepayLoan = Entry('margin/repayLoan', 'papi', 'GET', {'cost': 0.0667})
584
- papi_get_margin_margininteresthistory = papiGetMarginMarginInterestHistory = Entry('margin/marginInterestHistory', 'papi', 'GET', {'cost': 0.1})
585
- papi_get_portfolio_interest_history = papiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'papi', 'GET', {'cost': 50})
586
601
  papi_post_um_order = papiPostUmOrder = Entry('um/order', 'papi', 'POST', {'cost': 1})
587
602
  papi_post_cm_order = papiPostCmOrder = Entry('cm/order', 'papi', 'POST', {'cost': 1})
588
603
  papi_post_margin_order = papiPostMarginOrder = Entry('margin/order', 'papi', 'POST', {'cost': 0.0133})
@@ -554,6 +554,21 @@ class ImplicitAPI:
554
554
  papi_get_cm_openorder = papiGetCmOpenOrder = Entry('cm/openOrder', 'papi', 'GET', {'cost': 1})
555
555
  papi_get_cm_openorders = papiGetCmOpenOrders = Entry('cm/openOrders', 'papi', 'GET', {'cost': 1})
556
556
  papi_get_cm_allorders = papiGetCmAllOrders = Entry('cm/allOrders', 'papi', 'GET', {'cost': 20})
557
+ papi_get_um_conditional_openorder = papiGetUmConditionalOpenOrder = Entry('um/conditional/openOrder', 'papi', 'GET', {'cost': 1})
558
+ papi_get_um_conditional_openorders = papiGetUmConditionalOpenOrders = Entry('um/conditional/openOrders', 'papi', 'GET', {'cost': 40})
559
+ papi_get_um_conditional_orderhistory = papiGetUmConditionalOrderHistory = Entry('um/conditional/orderHistory', 'papi', 'GET', {'cost': 1})
560
+ papi_get_um_conditional_allorders = papiGetUmConditionalAllOrders = Entry('um/conditional/allOrders', 'papi', 'GET', {'cost': 40})
561
+ papi_get_cm_conditional_openorder = papiGetCmConditionalOpenOrder = Entry('cm/conditional/openOrder', 'papi', 'GET', {'cost': 1})
562
+ papi_get_cm_conditional_openorders = papiGetCmConditionalOpenOrders = Entry('cm/conditional/openOrders', 'papi', 'GET', {'cost': 40})
563
+ papi_get_cm_conditional_orderhistory = papiGetCmConditionalOrderHistory = Entry('cm/conditional/orderHistory', 'papi', 'GET', {'cost': 1})
564
+ papi_get_cm_conditional_allorders = papiGetCmConditionalAllOrders = Entry('cm/conditional/allOrders', 'papi', 'GET', {'cost': 40})
565
+ papi_get_margin_order = papiGetMarginOrder = Entry('margin/order', 'papi', 'GET', {'cost': 5})
566
+ papi_get_margin_openorders = papiGetMarginOpenOrders = Entry('margin/openOrders', 'papi', 'GET', {'cost': 5})
567
+ papi_get_margin_allorders = papiGetMarginAllOrders = Entry('margin/allOrders', 'papi', 'GET', {'cost': 100})
568
+ papi_get_margin_orderlist = papiGetMarginOrderList = Entry('margin/orderList', 'papi', 'GET', {'cost': 5})
569
+ papi_get_margin_allorderlist = papiGetMarginAllOrderList = Entry('margin/allOrderList', 'papi', 'GET', {'cost': 100})
570
+ papi_get_margin_openorderlist = papiGetMarginOpenOrderList = Entry('margin/openOrderList', 'papi', 'GET', {'cost': 5})
571
+ papi_get_margin_mytrades = papiGetMarginMyTrades = Entry('margin/myTrades', 'papi', 'GET', {'cost': 5})
557
572
  papi_get_balance = papiGetBalance = Entry('balance', 'papi', 'GET', {'cost': 20})
558
573
  papi_get_account = papiGetAccount = Entry('account', 'papi', 'GET', {'cost': 20})
559
574
  papi_get_margin_maxborrowable = papiGetMarginMaxBorrowable = Entry('margin/maxBorrowable', 'papi', 'GET', {'cost': 5})
@@ -572,6 +587,10 @@ class ImplicitAPI:
572
587
  papi_get_um_apitradingstatus = papiGetUmApiTradingStatus = Entry('um/apiTradingStatus', 'papi', 'GET', {'cost': 1})
573
588
  papi_get_um_commissionrate = papiGetUmCommissionRate = Entry('um/commissionRate', 'papi', 'GET', {'cost': 20})
574
589
  papi_get_cm_commissionrate = papiGetCmCommissionRate = Entry('cm/commissionRate', 'papi', 'GET', {'cost': 20})
590
+ papi_get_margin_marginloan = papiGetMarginMarginLoan = Entry('margin/marginLoan', 'papi', 'GET', {'cost': 10})
591
+ papi_get_margin_repayloan = papiGetMarginRepayLoan = Entry('margin/repayLoan', 'papi', 'GET', {'cost': 10})
592
+ papi_get_margin_margininteresthistory = papiGetMarginMarginInterestHistory = Entry('margin/marginInterestHistory', 'papi', 'GET', {'cost': 1})
593
+ papi_get_portfolio_interest_history = papiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'papi', 'GET', {'cost': 50})
575
594
  papi_get_um_income = papiGetUmIncome = Entry('um/income', 'papi', 'GET', {'cost': 30})
576
595
  papi_get_cm_income = papiGetCmIncome = Entry('cm/income ', 'papi', 'GET', {'cost': 30})
577
596
  papi_get_um_account = papiGetUmAccount = Entry('um/account', 'papi', 'GET', {'cost': 5})
@@ -579,10 +598,6 @@ class ImplicitAPI:
579
598
  papi_get_portfolio_repay_futures_switch = papiGetPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'papi', 'GET', {'cost': 3})
580
599
  papi_get_um_adlquantile = papiGetUmAdlQuantile = Entry('um/adlQuantile', 'papi', 'GET', {'cost': 5})
581
600
  papi_get_cm_adlquantile = papiGetCmAdlQuantile = Entry('cm/adlQuantile', 'papi', 'GET', {'cost': 5})
582
- papi_get_margin_marginloan = papiGetMarginMarginLoan = Entry('margin/marginLoan', 'papi', 'GET', {'cost': 0.0667})
583
- papi_get_margin_repayloan = papiGetMarginRepayLoan = Entry('margin/repayLoan', 'papi', 'GET', {'cost': 0.0667})
584
- papi_get_margin_margininteresthistory = papiGetMarginMarginInterestHistory = Entry('margin/marginInterestHistory', 'papi', 'GET', {'cost': 0.1})
585
- papi_get_portfolio_interest_history = papiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'papi', 'GET', {'cost': 50})
586
601
  papi_post_um_order = papiPostUmOrder = Entry('um/order', 'papi', 'POST', {'cost': 1})
587
602
  papi_post_cm_order = papiPostCmOrder = Entry('cm/order', 'papi', 'POST', {'cost': 1})
588
603
  papi_post_margin_order = papiPostMarginOrder = Entry('margin/order', 'papi', 'POST', {'cost': 0.0133})
@@ -554,6 +554,21 @@ class ImplicitAPI:
554
554
  papi_get_cm_openorder = papiGetCmOpenOrder = Entry('cm/openOrder', 'papi', 'GET', {'cost': 1})
555
555
  papi_get_cm_openorders = papiGetCmOpenOrders = Entry('cm/openOrders', 'papi', 'GET', {'cost': 1})
556
556
  papi_get_cm_allorders = papiGetCmAllOrders = Entry('cm/allOrders', 'papi', 'GET', {'cost': 20})
557
+ papi_get_um_conditional_openorder = papiGetUmConditionalOpenOrder = Entry('um/conditional/openOrder', 'papi', 'GET', {'cost': 1})
558
+ papi_get_um_conditional_openorders = papiGetUmConditionalOpenOrders = Entry('um/conditional/openOrders', 'papi', 'GET', {'cost': 40})
559
+ papi_get_um_conditional_orderhistory = papiGetUmConditionalOrderHistory = Entry('um/conditional/orderHistory', 'papi', 'GET', {'cost': 1})
560
+ papi_get_um_conditional_allorders = papiGetUmConditionalAllOrders = Entry('um/conditional/allOrders', 'papi', 'GET', {'cost': 40})
561
+ papi_get_cm_conditional_openorder = papiGetCmConditionalOpenOrder = Entry('cm/conditional/openOrder', 'papi', 'GET', {'cost': 1})
562
+ papi_get_cm_conditional_openorders = papiGetCmConditionalOpenOrders = Entry('cm/conditional/openOrders', 'papi', 'GET', {'cost': 40})
563
+ papi_get_cm_conditional_orderhistory = papiGetCmConditionalOrderHistory = Entry('cm/conditional/orderHistory', 'papi', 'GET', {'cost': 1})
564
+ papi_get_cm_conditional_allorders = papiGetCmConditionalAllOrders = Entry('cm/conditional/allOrders', 'papi', 'GET', {'cost': 40})
565
+ papi_get_margin_order = papiGetMarginOrder = Entry('margin/order', 'papi', 'GET', {'cost': 5})
566
+ papi_get_margin_openorders = papiGetMarginOpenOrders = Entry('margin/openOrders', 'papi', 'GET', {'cost': 5})
567
+ papi_get_margin_allorders = papiGetMarginAllOrders = Entry('margin/allOrders', 'papi', 'GET', {'cost': 100})
568
+ papi_get_margin_orderlist = papiGetMarginOrderList = Entry('margin/orderList', 'papi', 'GET', {'cost': 5})
569
+ papi_get_margin_allorderlist = papiGetMarginAllOrderList = Entry('margin/allOrderList', 'papi', 'GET', {'cost': 100})
570
+ papi_get_margin_openorderlist = papiGetMarginOpenOrderList = Entry('margin/openOrderList', 'papi', 'GET', {'cost': 5})
571
+ papi_get_margin_mytrades = papiGetMarginMyTrades = Entry('margin/myTrades', 'papi', 'GET', {'cost': 5})
557
572
  papi_get_balance = papiGetBalance = Entry('balance', 'papi', 'GET', {'cost': 20})
558
573
  papi_get_account = papiGetAccount = Entry('account', 'papi', 'GET', {'cost': 20})
559
574
  papi_get_margin_maxborrowable = papiGetMarginMaxBorrowable = Entry('margin/maxBorrowable', 'papi', 'GET', {'cost': 5})
@@ -572,6 +587,10 @@ class ImplicitAPI:
572
587
  papi_get_um_apitradingstatus = papiGetUmApiTradingStatus = Entry('um/apiTradingStatus', 'papi', 'GET', {'cost': 1})
573
588
  papi_get_um_commissionrate = papiGetUmCommissionRate = Entry('um/commissionRate', 'papi', 'GET', {'cost': 20})
574
589
  papi_get_cm_commissionrate = papiGetCmCommissionRate = Entry('cm/commissionRate', 'papi', 'GET', {'cost': 20})
590
+ papi_get_margin_marginloan = papiGetMarginMarginLoan = Entry('margin/marginLoan', 'papi', 'GET', {'cost': 10})
591
+ papi_get_margin_repayloan = papiGetMarginRepayLoan = Entry('margin/repayLoan', 'papi', 'GET', {'cost': 10})
592
+ papi_get_margin_margininteresthistory = papiGetMarginMarginInterestHistory = Entry('margin/marginInterestHistory', 'papi', 'GET', {'cost': 1})
593
+ papi_get_portfolio_interest_history = papiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'papi', 'GET', {'cost': 50})
575
594
  papi_get_um_income = papiGetUmIncome = Entry('um/income', 'papi', 'GET', {'cost': 30})
576
595
  papi_get_cm_income = papiGetCmIncome = Entry('cm/income ', 'papi', 'GET', {'cost': 30})
577
596
  papi_get_um_account = papiGetUmAccount = Entry('um/account', 'papi', 'GET', {'cost': 5})
@@ -579,10 +598,6 @@ class ImplicitAPI:
579
598
  papi_get_portfolio_repay_futures_switch = papiGetPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'papi', 'GET', {'cost': 3})
580
599
  papi_get_um_adlquantile = papiGetUmAdlQuantile = Entry('um/adlQuantile', 'papi', 'GET', {'cost': 5})
581
600
  papi_get_cm_adlquantile = papiGetCmAdlQuantile = Entry('cm/adlQuantile', 'papi', 'GET', {'cost': 5})
582
- papi_get_margin_marginloan = papiGetMarginMarginLoan = Entry('margin/marginLoan', 'papi', 'GET', {'cost': 0.0667})
583
- papi_get_margin_repayloan = papiGetMarginRepayLoan = Entry('margin/repayLoan', 'papi', 'GET', {'cost': 0.0667})
584
- papi_get_margin_margininteresthistory = papiGetMarginMarginInterestHistory = Entry('margin/marginInterestHistory', 'papi', 'GET', {'cost': 0.1})
585
- papi_get_portfolio_interest_history = papiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'papi', 'GET', {'cost': 50})
586
601
  papi_post_um_order = papiPostUmOrder = Entry('um/order', 'papi', 'POST', {'cost': 1})
587
602
  papi_post_cm_order = papiPostCmOrder = Entry('cm/order', 'papi', 'POST', {'cost': 1})
588
603
  papi_post_margin_order = papiPostMarginOrder = Entry('margin/order', 'papi', 'POST', {'cost': 0.0133})
ccxt/abstract/lbank2.py CHANGED
@@ -2,56 +2,60 @@ from ccxt.base.types import Entry
2
2
 
3
3
 
4
4
  class ImplicitAPI:
5
- public_get_currencypairs = publicGetCurrencyPairs = Entry('currencyPairs', 'public', 'GET', {'cost': 2.5})
6
- public_get_accuracy = publicGetAccuracy = Entry('accuracy', 'public', 'GET', {'cost': 2.5})
7
- public_get_usdtocny = publicGetUsdToCny = Entry('usdToCny', 'public', 'GET', {'cost': 2.5})
8
- public_get_withdrawconfigs = publicGetWithdrawConfigs = Entry('withdrawConfigs', 'public', 'GET', {'cost': 2.5})
9
- public_get_timestamp = publicGetTimestamp = Entry('timestamp', 'public', 'GET', {'cost': 2.5})
10
- public_get_ticker_24hr = publicGetTicker24hr = Entry('ticker/24hr', 'public', 'GET', {'cost': 2.5})
11
- public_get_ticker = publicGetTicker = Entry('ticker', 'public', 'GET', {'cost': 2.5})
12
- public_get_depth = publicGetDepth = Entry('depth', 'public', 'GET', {'cost': 2.5})
13
- public_get_incrdepth = publicGetIncrDepth = Entry('incrDepth', 'public', 'GET', {'cost': 2.5})
14
- public_get_trades = publicGetTrades = Entry('trades', 'public', 'GET', {'cost': 2.5})
15
- public_get_kline = publicGetKline = Entry('kline', 'public', 'GET', {'cost': 2.5})
16
- public_get_supplement_system_ping = publicGetSupplementSystemPing = Entry('supplement/system_ping', 'public', 'GET', {'cost': 2.5})
17
- public_get_supplement_incrdepth = publicGetSupplementIncrDepth = Entry('supplement/incrDepth', 'public', 'GET', {'cost': 2.5})
18
- public_get_supplement_trades = publicGetSupplementTrades = Entry('supplement/trades', 'public', 'GET', {'cost': 2.5})
19
- public_get_supplement_ticker_price = publicGetSupplementTickerPrice = Entry('supplement/ticker/price', 'public', 'GET', {'cost': 2.5})
20
- public_get_supplement_ticker_bookticker = publicGetSupplementTickerBookTicker = Entry('supplement/ticker/bookTicker', 'public', 'GET', {'cost': 2.5})
21
- public_post_supplement_system_status = publicPostSupplementSystemStatus = Entry('supplement/system_status', 'public', 'POST', {'cost': 2.5})
22
- private_post_user_info = privatePostUserInfo = Entry('user_info', 'private', 'POST', {'cost': 2.5})
23
- private_post_subscribe_get_key = privatePostSubscribeGetKey = Entry('subscribe/get_key', 'private', 'POST', {'cost': 2.5})
24
- private_post_subscribe_refresh_key = privatePostSubscribeRefreshKey = Entry('subscribe/refresh_key', 'private', 'POST', {'cost': 2.5})
25
- private_post_subscribe_destroy_key = privatePostSubscribeDestroyKey = Entry('subscribe/destroy_key', 'private', 'POST', {'cost': 2.5})
26
- private_post_get_deposit_address = privatePostGetDepositAddress = Entry('get_deposit_address', 'private', 'POST', {'cost': 2.5})
27
- private_post_deposit_history = privatePostDepositHistory = Entry('deposit_history', 'private', 'POST', {'cost': 2.5})
28
- private_post_create_order = privatePostCreateOrder = Entry('create_order', 'private', 'POST', {'cost': 1})
29
- private_post_batch_create_order = privatePostBatchCreateOrder = Entry('batch_create_order', 'private', 'POST', {'cost': 1})
30
- private_post_cancel_order = privatePostCancelOrder = Entry('cancel_order', 'private', 'POST', {'cost': 1})
31
- private_post_cancel_clientorders = privatePostCancelClientOrders = Entry('cancel_clientOrders', 'private', 'POST', {'cost': 1})
32
- private_post_orders_info = privatePostOrdersInfo = Entry('orders_info', 'private', 'POST', {'cost': 2.5})
33
- private_post_orders_info_history = privatePostOrdersInfoHistory = Entry('orders_info_history', 'private', 'POST', {'cost': 2.5})
34
- private_post_order_transaction_detail = privatePostOrderTransactionDetail = Entry('order_transaction_detail', 'private', 'POST', {'cost': 2.5})
35
- private_post_transaction_history = privatePostTransactionHistory = Entry('transaction_history', 'private', 'POST', {'cost': 2.5})
36
- private_post_orders_info_no_deal = privatePostOrdersInfoNoDeal = Entry('orders_info_no_deal', 'private', 'POST', {'cost': 2.5})
37
- private_post_withdraw = privatePostWithdraw = Entry('withdraw', 'private', 'POST', {'cost': 2.5})
38
- private_post_withdrawcancel = privatePostWithdrawCancel = Entry('withdrawCancel', 'private', 'POST', {'cost': 2.5})
39
- private_post_withdraws = privatePostWithdraws = Entry('withdraws', 'private', 'POST', {'cost': 2.5})
40
- private_post_supplement_user_info = privatePostSupplementUserInfo = Entry('supplement/user_info', 'private', 'POST', {'cost': 2.5})
41
- private_post_supplement_withdraw = privatePostSupplementWithdraw = Entry('supplement/withdraw', 'private', 'POST', {'cost': 2.5})
42
- private_post_supplement_deposit_history = privatePostSupplementDepositHistory = Entry('supplement/deposit_history', 'private', 'POST', {'cost': 2.5})
43
- private_post_supplement_withdraws = privatePostSupplementWithdraws = Entry('supplement/withdraws', 'private', 'POST', {'cost': 2.5})
44
- private_post_supplement_get_deposit_address = privatePostSupplementGetDepositAddress = Entry('supplement/get_deposit_address', 'private', 'POST', {'cost': 2.5})
45
- private_post_supplement_asset_detail = privatePostSupplementAssetDetail = Entry('supplement/asset_detail', 'private', 'POST', {'cost': 2.5})
46
- private_post_supplement_customer_trade_fee = privatePostSupplementCustomerTradeFee = Entry('supplement/customer_trade_fee', 'private', 'POST', {'cost': 2.5})
47
- private_post_supplement_api_restrictions = privatePostSupplementApiRestrictions = Entry('supplement/api_Restrictions', 'private', 'POST', {'cost': 2.5})
48
- private_post_supplement_system_ping = privatePostSupplementSystemPing = Entry('supplement/system_ping', 'private', 'POST', {'cost': 2.5})
49
- private_post_supplement_create_order_test = privatePostSupplementCreateOrderTest = Entry('supplement/create_order_test', 'private', 'POST', {'cost': 1})
50
- private_post_supplement_create_order = privatePostSupplementCreateOrder = Entry('supplement/create_order', 'private', 'POST', {'cost': 1})
51
- private_post_supplement_cancel_order = privatePostSupplementCancelOrder = Entry('supplement/cancel_order', 'private', 'POST', {'cost': 1})
52
- private_post_supplement_cancel_order_by_symbol = privatePostSupplementCancelOrderBySymbol = Entry('supplement/cancel_order_by_symbol', 'private', 'POST', {'cost': 1})
53
- private_post_supplement_orders_info = privatePostSupplementOrdersInfo = Entry('supplement/orders_info', 'private', 'POST', {'cost': 2.5})
54
- private_post_supplement_orders_info_no_deal = privatePostSupplementOrdersInfoNoDeal = Entry('supplement/orders_info_no_deal', 'private', 'POST', {'cost': 2.5})
55
- private_post_supplement_orders_info_history = privatePostSupplementOrdersInfoHistory = Entry('supplement/orders_info_history', 'private', 'POST', {'cost': 2.5})
56
- private_post_supplement_user_info_account = privatePostSupplementUserInfoAccount = Entry('supplement/user_info_account', 'private', 'POST', {'cost': 2.5})
57
- private_post_supplement_transaction_history = privatePostSupplementTransactionHistory = Entry('supplement/transaction_history', 'private', 'POST', {'cost': 2.5})
5
+ spot_public_get_currencypairs = spotPublicGetCurrencyPairs = Entry('currencyPairs', ['spot', 'public'], 'GET', {'cost': 2.5})
6
+ spot_public_get_accuracy = spotPublicGetAccuracy = Entry('accuracy', ['spot', 'public'], 'GET', {'cost': 2.5})
7
+ spot_public_get_usdtocny = spotPublicGetUsdToCny = Entry('usdToCny', ['spot', 'public'], 'GET', {'cost': 2.5})
8
+ spot_public_get_withdrawconfigs = spotPublicGetWithdrawConfigs = Entry('withdrawConfigs', ['spot', 'public'], 'GET', {'cost': 2.5})
9
+ spot_public_get_timestamp = spotPublicGetTimestamp = Entry('timestamp', ['spot', 'public'], 'GET', {'cost': 2.5})
10
+ spot_public_get_ticker_24hr = spotPublicGetTicker24hr = Entry('ticker/24hr', ['spot', 'public'], 'GET', {'cost': 2.5})
11
+ spot_public_get_ticker = spotPublicGetTicker = Entry('ticker', ['spot', 'public'], 'GET', {'cost': 2.5})
12
+ spot_public_get_depth = spotPublicGetDepth = Entry('depth', ['spot', 'public'], 'GET', {'cost': 2.5})
13
+ spot_public_get_incrdepth = spotPublicGetIncrDepth = Entry('incrDepth', ['spot', 'public'], 'GET', {'cost': 2.5})
14
+ spot_public_get_trades = spotPublicGetTrades = Entry('trades', ['spot', 'public'], 'GET', {'cost': 2.5})
15
+ spot_public_get_kline = spotPublicGetKline = Entry('kline', ['spot', 'public'], 'GET', {'cost': 2.5})
16
+ spot_public_get_supplement_system_ping = spotPublicGetSupplementSystemPing = Entry('supplement/system_ping', ['spot', 'public'], 'GET', {'cost': 2.5})
17
+ spot_public_get_supplement_incrdepth = spotPublicGetSupplementIncrDepth = Entry('supplement/incrDepth', ['spot', 'public'], 'GET', {'cost': 2.5})
18
+ spot_public_get_supplement_trades = spotPublicGetSupplementTrades = Entry('supplement/trades', ['spot', 'public'], 'GET', {'cost': 2.5})
19
+ spot_public_get_supplement_ticker_price = spotPublicGetSupplementTickerPrice = Entry('supplement/ticker/price', ['spot', 'public'], 'GET', {'cost': 2.5})
20
+ spot_public_get_supplement_ticker_bookticker = spotPublicGetSupplementTickerBookTicker = Entry('supplement/ticker/bookTicker', ['spot', 'public'], 'GET', {'cost': 2.5})
21
+ spot_public_post_supplement_system_status = spotPublicPostSupplementSystemStatus = Entry('supplement/system_status', ['spot', 'public'], 'POST', {'cost': 2.5})
22
+ spot_private_post_user_info = spotPrivatePostUserInfo = Entry('user_info', ['spot', 'private'], 'POST', {'cost': 2.5})
23
+ spot_private_post_subscribe_get_key = spotPrivatePostSubscribeGetKey = Entry('subscribe/get_key', ['spot', 'private'], 'POST', {'cost': 2.5})
24
+ spot_private_post_subscribe_refresh_key = spotPrivatePostSubscribeRefreshKey = Entry('subscribe/refresh_key', ['spot', 'private'], 'POST', {'cost': 2.5})
25
+ spot_private_post_subscribe_destroy_key = spotPrivatePostSubscribeDestroyKey = Entry('subscribe/destroy_key', ['spot', 'private'], 'POST', {'cost': 2.5})
26
+ spot_private_post_get_deposit_address = spotPrivatePostGetDepositAddress = Entry('get_deposit_address', ['spot', 'private'], 'POST', {'cost': 2.5})
27
+ spot_private_post_deposit_history = spotPrivatePostDepositHistory = Entry('deposit_history', ['spot', 'private'], 'POST', {'cost': 2.5})
28
+ spot_private_post_create_order = spotPrivatePostCreateOrder = Entry('create_order', ['spot', 'private'], 'POST', {'cost': 1})
29
+ spot_private_post_batch_create_order = spotPrivatePostBatchCreateOrder = Entry('batch_create_order', ['spot', 'private'], 'POST', {'cost': 1})
30
+ spot_private_post_cancel_order = spotPrivatePostCancelOrder = Entry('cancel_order', ['spot', 'private'], 'POST', {'cost': 1})
31
+ spot_private_post_cancel_clientorders = spotPrivatePostCancelClientOrders = Entry('cancel_clientOrders', ['spot', 'private'], 'POST', {'cost': 1})
32
+ spot_private_post_orders_info = spotPrivatePostOrdersInfo = Entry('orders_info', ['spot', 'private'], 'POST', {'cost': 2.5})
33
+ spot_private_post_orders_info_history = spotPrivatePostOrdersInfoHistory = Entry('orders_info_history', ['spot', 'private'], 'POST', {'cost': 2.5})
34
+ spot_private_post_order_transaction_detail = spotPrivatePostOrderTransactionDetail = Entry('order_transaction_detail', ['spot', 'private'], 'POST', {'cost': 2.5})
35
+ spot_private_post_transaction_history = spotPrivatePostTransactionHistory = Entry('transaction_history', ['spot', 'private'], 'POST', {'cost': 2.5})
36
+ spot_private_post_orders_info_no_deal = spotPrivatePostOrdersInfoNoDeal = Entry('orders_info_no_deal', ['spot', 'private'], 'POST', {'cost': 2.5})
37
+ spot_private_post_withdraw = spotPrivatePostWithdraw = Entry('withdraw', ['spot', 'private'], 'POST', {'cost': 2.5})
38
+ spot_private_post_withdrawcancel = spotPrivatePostWithdrawCancel = Entry('withdrawCancel', ['spot', 'private'], 'POST', {'cost': 2.5})
39
+ spot_private_post_withdraws = spotPrivatePostWithdraws = Entry('withdraws', ['spot', 'private'], 'POST', {'cost': 2.5})
40
+ spot_private_post_supplement_user_info = spotPrivatePostSupplementUserInfo = Entry('supplement/user_info', ['spot', 'private'], 'POST', {'cost': 2.5})
41
+ spot_private_post_supplement_withdraw = spotPrivatePostSupplementWithdraw = Entry('supplement/withdraw', ['spot', 'private'], 'POST', {'cost': 2.5})
42
+ spot_private_post_supplement_deposit_history = spotPrivatePostSupplementDepositHistory = Entry('supplement/deposit_history', ['spot', 'private'], 'POST', {'cost': 2.5})
43
+ spot_private_post_supplement_withdraws = spotPrivatePostSupplementWithdraws = Entry('supplement/withdraws', ['spot', 'private'], 'POST', {'cost': 2.5})
44
+ spot_private_post_supplement_get_deposit_address = spotPrivatePostSupplementGetDepositAddress = Entry('supplement/get_deposit_address', ['spot', 'private'], 'POST', {'cost': 2.5})
45
+ spot_private_post_supplement_asset_detail = spotPrivatePostSupplementAssetDetail = Entry('supplement/asset_detail', ['spot', 'private'], 'POST', {'cost': 2.5})
46
+ spot_private_post_supplement_customer_trade_fee = spotPrivatePostSupplementCustomerTradeFee = Entry('supplement/customer_trade_fee', ['spot', 'private'], 'POST', {'cost': 2.5})
47
+ spot_private_post_supplement_api_restrictions = spotPrivatePostSupplementApiRestrictions = Entry('supplement/api_Restrictions', ['spot', 'private'], 'POST', {'cost': 2.5})
48
+ spot_private_post_supplement_system_ping = spotPrivatePostSupplementSystemPing = Entry('supplement/system_ping', ['spot', 'private'], 'POST', {'cost': 2.5})
49
+ spot_private_post_supplement_create_order_test = spotPrivatePostSupplementCreateOrderTest = Entry('supplement/create_order_test', ['spot', 'private'], 'POST', {'cost': 1})
50
+ spot_private_post_supplement_create_order = spotPrivatePostSupplementCreateOrder = Entry('supplement/create_order', ['spot', 'private'], 'POST', {'cost': 1})
51
+ spot_private_post_supplement_cancel_order = spotPrivatePostSupplementCancelOrder = Entry('supplement/cancel_order', ['spot', 'private'], 'POST', {'cost': 1})
52
+ spot_private_post_supplement_cancel_order_by_symbol = spotPrivatePostSupplementCancelOrderBySymbol = Entry('supplement/cancel_order_by_symbol', ['spot', 'private'], 'POST', {'cost': 1})
53
+ spot_private_post_supplement_orders_info = spotPrivatePostSupplementOrdersInfo = Entry('supplement/orders_info', ['spot', 'private'], 'POST', {'cost': 2.5})
54
+ spot_private_post_supplement_orders_info_no_deal = spotPrivatePostSupplementOrdersInfoNoDeal = Entry('supplement/orders_info_no_deal', ['spot', 'private'], 'POST', {'cost': 2.5})
55
+ spot_private_post_supplement_orders_info_history = spotPrivatePostSupplementOrdersInfoHistory = Entry('supplement/orders_info_history', ['spot', 'private'], 'POST', {'cost': 2.5})
56
+ spot_private_post_supplement_user_info_account = spotPrivatePostSupplementUserInfoAccount = Entry('supplement/user_info_account', ['spot', 'private'], 'POST', {'cost': 2.5})
57
+ spot_private_post_supplement_transaction_history = spotPrivatePostSupplementTransactionHistory = Entry('supplement/transaction_history', ['spot', 'private'], 'POST', {'cost': 2.5})
58
+ contract_public_get_cfd_openapi_v1_pub_gettime = contractPublicGetCfdOpenApiV1PubGetTime = Entry('cfd/openApi/v1/pub/getTime', ['contract', 'public'], 'GET', {'cost': 2.5})
59
+ contract_public_get_cfd_openapi_v1_pub_instrument = contractPublicGetCfdOpenApiV1PubInstrument = Entry('cfd/openApi/v1/pub/instrument', ['contract', 'public'], 'GET', {'cost': 2.5})
60
+ contract_public_get_cfd_openapi_v1_pub_marketdata = contractPublicGetCfdOpenApiV1PubMarketData = Entry('cfd/openApi/v1/pub/marketData', ['contract', 'public'], 'GET', {'cost': 2.5})
61
+ contract_public_get_cfd_openapi_v1_pub_marketorder = contractPublicGetCfdOpenApiV1PubMarketOrder = Entry('cfd/openApi/v1/pub/marketOrder', ['contract', 'public'], 'GET', {'cost': 2.5})
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.0.71'
7
+ __version__ = '4.0.73'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.0.71'
5
+ __version__ = '4.0.73'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -743,7 +743,7 @@ class Exchange(BaseExchange):
743
743
  raise NotSupported(self.id + ' parseWsOrderTrade() is not supported yet')
744
744
 
745
745
  def parse_ws_ohlcv(self, ohlcv, market=None):
746
- raise NotSupported(self.id + ' parseWsOHLCV() is not supported yet')
746
+ return self.parse_ohlcv(ohlcv, market)
747
747
 
748
748
  async def fetch_funding_rates(self, symbols: Optional[List[str]] = None, params={}):
749
749
  raise NotSupported(self.id + ' fetchFundingRates() is not supported yet')
@@ -2967,6 +2967,12 @@ class Exchange(BaseExchange):
2967
2967
  market = self.market(firstMarket)
2968
2968
  return market
2969
2969
 
2970
+ def parse_ws_ohlcvs(self, ohlcvs: List[object], market: Optional[Any] = None, timeframe: str = '1m', since: Optional[int] = None, limit: Optional[int] = None):
2971
+ results = []
2972
+ for i in range(0, len(ohlcvs)):
2973
+ results.append(self.parse_ws_ohlcv(ohlcvs[i], market))
2974
+ return results
2975
+
2970
2976
  async def fetch_transactions(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
2971
2977
  """
2972
2978
  * @deprecated
@@ -103,6 +103,7 @@ class binance(Exchange, ImplicitAPI):
103
103
  'fetchMarketLeverageTiers': 'emulated',
104
104
  'fetchMarkets': True,
105
105
  'fetchMarkOHLCV': True,
106
+ 'fetchMySettlementHistory': True,
106
107
  'fetchMyTrades': True,
107
108
  'fetchOHLCV': True,
108
109
  'fetchOpenInterest': True,
@@ -909,6 +910,21 @@ class binance(Exchange, ImplicitAPI):
909
910
  'cm/openOrder': 1, # 1
910
911
  'cm/openOrders': 1, # 1
911
912
  'cm/allOrders': 20, # 20
913
+ 'um/conditional/openOrder': 1,
914
+ 'um/conditional/openOrders': 40,
915
+ 'um/conditional/orderHistory': 1,
916
+ 'um/conditional/allOrders': 40,
917
+ 'cm/conditional/openOrder': 1,
918
+ 'cm/conditional/openOrders': 40,
919
+ 'cm/conditional/orderHistory': 1,
920
+ 'cm/conditional/allOrders': 40,
921
+ 'margin/order': 5,
922
+ 'margin/openOrders': 5,
923
+ 'margin/allOrders': 100,
924
+ 'margin/orderList': 5,
925
+ 'margin/allOrderList': 100,
926
+ 'margin/openOrderList': 5,
927
+ 'margin/myTrades': 5,
912
928
  'balance': 20, # 20
913
929
  'account': 20, # 20
914
930
  'margin/maxBorrowable': 5, # 5
@@ -927,6 +943,10 @@ class binance(Exchange, ImplicitAPI):
927
943
  'um/apiTradingStatus': 1, # 1
928
944
  'um/commissionRate': 20, # 20
929
945
  'cm/commissionRate': 20, # 20
946
+ 'margin/marginLoan': 10,
947
+ 'margin/repayLoan': 10,
948
+ 'margin/marginInterestHistory': 1,
949
+ 'portfolio/interest-history': 50, # 50
930
950
  'um/income': 30,
931
951
  'cm/income ': 30,
932
952
  'um/account': 5,
@@ -934,10 +954,6 @@ class binance(Exchange, ImplicitAPI):
934
954
  'portfolio/repay-futures-switch': 3, # Weight(IP): 30 => cost = 0.1 * 30 = 3
935
955
  'um/adlQuantile': 5,
936
956
  'cm/adlQuantile': 5,
937
- 'margin/marginLoan': 0.0667, # Weight(UID): 10 => cost = 0.006667 * 10 = 0.06667
938
- 'margin/repayLoan': 0.0667, # Weight(UID): 10 => cost = 0.006667 * 10 = 0.06667
939
- 'margin/marginInterestHistory': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
940
- 'portfolio/interest-history': 50, # 50
941
957
  },
942
958
  'post': {
943
959
  'um/order': 1, # 0
@@ -7161,7 +7177,57 @@ class binance(Exchange, ImplicitAPI):
7161
7177
  sorted = self.sort_by(settlements, 'timestamp')
7162
7178
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
7163
7179
 
7180
+ async def fetch_my_settlement_history(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
7181
+ """
7182
+ fetches historical settlement records of the user
7183
+ see https://binance-docs.github.io/apidocs/voptions/en/#user-exercise-record-user_data
7184
+ :param str symbol: unified market symbol of the settlement history
7185
+ :param int [since]: timestamp in ms
7186
+ :param int [limit]: number of records
7187
+ :param dict [params]: exchange specific params
7188
+ :returns dict[]: a list of [settlement history objects]
7189
+ """
7190
+ await self.load_markets()
7191
+ market = None if (symbol is None) else self.market(symbol)
7192
+ type = None
7193
+ type, params = self.handle_market_type_and_params('fetchMySettlementHistory', market, params)
7194
+ if type != 'option':
7195
+ raise NotSupported(self.id + ' fetchMySettlementHistory() supports option markets only')
7196
+ request = {}
7197
+ if symbol is not None:
7198
+ request['symbol'] = market['id']
7199
+ if since is not None:
7200
+ request['startTime'] = since
7201
+ if limit is not None:
7202
+ request['limit'] = limit
7203
+ response = await self.eapiPrivateGetExerciseRecord(self.extend(request, params))
7204
+ #
7205
+ # [
7206
+ # {
7207
+ # "id": "1125899906842897036",
7208
+ # "currency": "USDT",
7209
+ # "symbol": "BTC-230728-30000-C",
7210
+ # "exercisePrice": "30000.00000000",
7211
+ # "markPrice": "29160.71284993",
7212
+ # "quantity": "1.00000000",
7213
+ # "amount": "0.00000000",
7214
+ # "fee": "0.00000000",
7215
+ # "createDate": 1690531200000,
7216
+ # "priceScale": 0,
7217
+ # "quantityScale": 2,
7218
+ # "optionSide": "CALL",
7219
+ # "positionSide": "LONG",
7220
+ # "quoteAsset": "USDT"
7221
+ # }
7222
+ # ]
7223
+ #
7224
+ settlements = self.parse_settlements(response, market)
7225
+ sorted = self.sort_by(settlements, 'timestamp')
7226
+ return self.filter_by_symbol_since_limit(sorted, market['symbol'], since, limit)
7227
+
7164
7228
  def parse_settlement(self, settlement, market):
7229
+ #
7230
+ # fetchSettlementHistory
7165
7231
  #
7166
7232
  # {
7167
7233
  # "symbol": "ETH-230223-1900-P",
@@ -7171,17 +7237,38 @@ class binance(Exchange, ImplicitAPI):
7171
7237
  # "strikeResult": "REALISTIC_VALUE_STRICKEN"
7172
7238
  # }
7173
7239
  #
7174
- timestamp = self.safe_integer(settlement, 'expiryDate')
7240
+ # fetchMySettlementHistory
7241
+ #
7242
+ # {
7243
+ # "id": "1125899906842897036",
7244
+ # "currency": "USDT",
7245
+ # "symbol": "BTC-230728-30000-C",
7246
+ # "exercisePrice": "30000.00000000",
7247
+ # "markPrice": "29160.71284993",
7248
+ # "quantity": "1.00000000",
7249
+ # "amount": "0.00000000",
7250
+ # "fee": "0.00000000",
7251
+ # "createDate": 1690531200000,
7252
+ # "priceScale": 0,
7253
+ # "quantityScale": 2,
7254
+ # "optionSide": "CALL",
7255
+ # "positionSide": "LONG",
7256
+ # "quoteAsset": "USDT"
7257
+ # }
7258
+ #
7259
+ timestamp = self.safe_integer_2(settlement, 'expiryDate', 'createDate')
7175
7260
  marketId = self.safe_string(settlement, 'symbol')
7176
7261
  return {
7177
7262
  'info': settlement,
7178
7263
  'symbol': self.safe_symbol(marketId, market),
7179
- 'price': self.safe_number(settlement, 'realStrikePrice'),
7264
+ 'price': self.safe_number_2(settlement, 'realStrikePrice', 'exercisePrice'),
7180
7265
  'timestamp': timestamp,
7181
7266
  'datetime': self.iso8601(timestamp),
7182
7267
  }
7183
7268
 
7184
7269
  def parse_settlements(self, settlements, market):
7270
+ #
7271
+ # fetchSettlementHistory
7185
7272
  #
7186
7273
  # [
7187
7274
  # {
@@ -7193,6 +7280,27 @@ class binance(Exchange, ImplicitAPI):
7193
7280
  # }
7194
7281
  # ]
7195
7282
  #
7283
+ # fetchMySettlementHistory
7284
+ #
7285
+ # [
7286
+ # {
7287
+ # "id": "1125899906842897036",
7288
+ # "currency": "USDT",
7289
+ # "symbol": "BTC-230728-30000-C",
7290
+ # "exercisePrice": "30000.00000000",
7291
+ # "markPrice": "29160.71284993",
7292
+ # "quantity": "1.00000000",
7293
+ # "amount": "0.00000000",
7294
+ # "fee": "0.00000000",
7295
+ # "createDate": 1690531200000,
7296
+ # "priceScale": 0,
7297
+ # "quantityScale": 2,
7298
+ # "optionSide": "CALL",
7299
+ # "positionSide": "LONG",
7300
+ # "quoteAsset": "USDT"
7301
+ # }
7302
+ # ]
7303
+ #
7196
7304
  result = []
7197
7305
  for i in range(0, len(settlements)):
7198
7306
  result.append(self.parse_settlement(settlements[i], market))