ccxt 4.4.41__py2.py3-none-any.whl → 4.4.42__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 +1 -1
- ccxt/abstract/binance.py +3 -0
- ccxt/abstract/binancecoinm.py +3 -0
- ccxt/abstract/binanceus.py +3 -0
- ccxt/abstract/binanceusdm.py +3 -0
- ccxt/ace.py +1 -1
- ccxt/alpaca.py +0 -1
- ccxt/ascendex.py +0 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +1 -1
- ccxt/async_support/alpaca.py +0 -1
- ccxt/async_support/ascendex.py +0 -1
- ccxt/async_support/base/exchange.py +15 -15
- ccxt/async_support/bigone.py +0 -1
- ccxt/async_support/binance.py +3 -0
- ccxt/async_support/bingx.py +2 -0
- ccxt/async_support/bitfinex.py +122 -0
- ccxt/async_support/blofin.py +16 -7
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +8 -9
- ccxt/async_support/coinbaseexchange.py +5 -6
- ccxt/async_support/coinbaseinternational.py +7 -8
- ccxt/async_support/coincatch.py +0 -1
- ccxt/async_support/coincheck.py +0 -1
- ccxt/async_support/coinex.py +91 -6
- ccxt/async_support/coinlist.py +3 -4
- ccxt/async_support/coinmate.py +1 -3
- ccxt/async_support/coinmetro.py +4 -5
- ccxt/async_support/coinone.py +0 -1
- ccxt/async_support/coinsph.py +7 -8
- ccxt/async_support/cryptocom.py +3 -0
- ccxt/async_support/currencycom.py +3 -4
- ccxt/async_support/defx.py +6 -7
- ccxt/async_support/deribit.py +1 -3
- ccxt/async_support/digifinex.py +0 -1
- ccxt/async_support/ellipx.py +0 -2
- ccxt/async_support/exmo.py +1 -2
- ccxt/async_support/gate.py +1 -2
- ccxt/async_support/gemini.py +4 -5
- ccxt/async_support/hashkey.py +79 -67
- ccxt/async_support/hitbtc.py +47 -5
- ccxt/async_support/hollaex.py +4 -6
- ccxt/async_support/htx.py +1 -3
- ccxt/async_support/huobijp.py +0 -1
- ccxt/async_support/idex.py +8 -8
- ccxt/async_support/independentreserve.py +0 -1
- ccxt/async_support/indodax.py +0 -1
- ccxt/async_support/kraken.py +63 -3
- ccxt/async_support/krakenfutures.py +75 -3
- ccxt/async_support/kucoin.py +1 -3
- ccxt/async_support/kucoinfutures.py +10 -9
- ccxt/async_support/kuna.py +1 -3
- ccxt/async_support/latoken.py +1 -3
- ccxt/async_support/lbank.py +0 -1
- ccxt/async_support/luno.py +0 -1
- ccxt/async_support/lykke.py +0 -1
- ccxt/async_support/mercado.py +0 -1
- ccxt/async_support/mexc.py +3 -4
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +4 -6
- ccxt/async_support/oceanex.py +0 -1
- ccxt/async_support/okcoin.py +1 -3
- ccxt/async_support/okx.py +1 -3
- ccxt/async_support/onetrading.py +1 -3
- ccxt/async_support/p2b.py +1 -1
- ccxt/async_support/paradex.py +5 -7
- ccxt/async_support/phemex.py +8 -10
- ccxt/async_support/poloniex.py +1 -3
- ccxt/async_support/poloniexfutures.py +6 -6
- ccxt/async_support/probit.py +0 -1
- ccxt/async_support/timex.py +0 -1
- ccxt/async_support/tokocrypto.py +11 -14
- ccxt/async_support/tradeogre.py +1 -1
- ccxt/async_support/upbit.py +0 -1
- ccxt/async_support/wavesexchange.py +4 -5
- ccxt/async_support/whitebit.py +8 -9
- ccxt/async_support/woo.py +98 -12
- ccxt/async_support/woofipro.py +96 -15
- ccxt/async_support/xt.py +3 -2
- ccxt/async_support/yobit.py +0 -1
- ccxt/async_support/zaif.py +0 -1
- ccxt/async_support/zonda.py +1 -2
- ccxt/base/exchange.py +21 -17
- ccxt/bigone.py +0 -1
- ccxt/binance.py +3 -0
- ccxt/bingx.py +2 -0
- ccxt/bitfinex.py +122 -0
- ccxt/blofin.py +16 -7
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +8 -9
- ccxt/coinbaseexchange.py +5 -6
- ccxt/coinbaseinternational.py +7 -8
- ccxt/coincatch.py +0 -1
- ccxt/coincheck.py +0 -1
- ccxt/coinex.py +91 -6
- ccxt/coinlist.py +3 -4
- ccxt/coinmate.py +1 -3
- ccxt/coinmetro.py +4 -5
- ccxt/coinone.py +0 -1
- ccxt/coinsph.py +7 -8
- ccxt/cryptocom.py +3 -0
- ccxt/currencycom.py +3 -4
- ccxt/defx.py +6 -7
- ccxt/deribit.py +1 -3
- ccxt/digifinex.py +0 -1
- ccxt/ellipx.py +0 -2
- ccxt/exmo.py +1 -2
- ccxt/gate.py +1 -2
- ccxt/gemini.py +4 -5
- ccxt/hashkey.py +79 -67
- ccxt/hitbtc.py +47 -5
- ccxt/hollaex.py +4 -6
- ccxt/htx.py +1 -3
- ccxt/huobijp.py +0 -1
- ccxt/idex.py +8 -8
- ccxt/independentreserve.py +0 -1
- ccxt/indodax.py +0 -1
- ccxt/kraken.py +63 -3
- ccxt/krakenfutures.py +75 -3
- ccxt/kucoin.py +1 -3
- ccxt/kucoinfutures.py +10 -9
- ccxt/kuna.py +1 -3
- ccxt/latoken.py +1 -3
- ccxt/lbank.py +0 -1
- ccxt/luno.py +0 -1
- ccxt/lykke.py +0 -1
- ccxt/mercado.py +0 -1
- ccxt/mexc.py +3 -4
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +4 -6
- ccxt/oceanex.py +0 -1
- ccxt/okcoin.py +1 -3
- ccxt/okx.py +1 -3
- ccxt/onetrading.py +1 -3
- ccxt/p2b.py +1 -1
- ccxt/paradex.py +5 -7
- ccxt/phemex.py +8 -10
- ccxt/poloniex.py +1 -3
- ccxt/poloniexfutures.py +6 -6
- ccxt/pro/__init__.py +1 -1
- ccxt/probit.py +0 -1
- ccxt/timex.py +0 -1
- ccxt/tokocrypto.py +11 -14
- ccxt/tradeogre.py +1 -1
- ccxt/upbit.py +0 -1
- ccxt/wavesexchange.py +4 -5
- ccxt/whitebit.py +8 -9
- ccxt/woo.py +98 -12
- ccxt/woofipro.py +96 -15
- ccxt/xt.py +3 -2
- ccxt/yobit.py +0 -1
- ccxt/zaif.py +0 -1
- ccxt/zonda.py +1 -2
- {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/METADATA +5 -5
- {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/RECORD +158 -162
- ccxt/bitbay.py +0 -17
- ccxt/bitfinex2.py +0 -3624
- ccxt/hitbtc3.py +0 -16
- ccxt/pro/bitfinex2.py +0 -1086
- {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/WHEEL +0 -0
- {ccxt-4.4.41.dist-info → ccxt-4.4.42.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/abstract/binance.py
CHANGED
@@ -360,6 +360,8 @@ class ImplicitAPI:
|
|
360
360
|
sapi_post_portfolio_bnb_transfer = sapiPostPortfolioBnbTransfer = Entry('portfolio/bnb-transfer', 'sapi', 'POST', {'cost': 150})
|
361
361
|
sapi_post_portfolio_repay_futures_switch = sapiPostPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'sapi', 'POST', {'cost': 150})
|
362
362
|
sapi_post_portfolio_repay_futures_negative_balance = sapiPostPortfolioRepayFuturesNegativeBalance = Entry('portfolio/repay-futures-negative-balance', 'sapi', 'POST', {'cost': 150})
|
363
|
+
sapi_post_portfolio_mint = sapiPostPortfolioMint = Entry('portfolio/mint', 'sapi', 'POST', {'cost': 20})
|
364
|
+
sapi_post_portfolio_redeem = sapiPostPortfolioRedeem = Entry('portfolio/redeem', 'sapi', 'POST', {'cost': 20})
|
363
365
|
sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
|
364
366
|
sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
|
365
367
|
sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
|
@@ -599,6 +601,7 @@ class ImplicitAPI:
|
|
599
601
|
eapiprivate_get_block_order_orders = eapiPrivateGetBlockOrderOrders = Entry('block/order/orders', 'eapiPrivate', 'GET', {'cost': 5})
|
600
602
|
eapiprivate_get_block_order_execute = eapiPrivateGetBlockOrderExecute = Entry('block/order/execute', 'eapiPrivate', 'GET', {'cost': 5})
|
601
603
|
eapiprivate_get_block_user_trades = eapiPrivateGetBlockUserTrades = Entry('block/user-trades', 'eapiPrivate', 'GET', {'cost': 5})
|
604
|
+
eapiprivate_get_blocktrades = eapiPrivateGetBlockTrades = Entry('blockTrades', 'eapiPrivate', 'GET', {'cost': 5})
|
602
605
|
eapiprivate_post_order = eapiPrivatePostOrder = Entry('order', 'eapiPrivate', 'POST', {'cost': 1})
|
603
606
|
eapiprivate_post_batchorders = eapiPrivatePostBatchOrders = Entry('batchOrders', 'eapiPrivate', 'POST', {'cost': 5})
|
604
607
|
eapiprivate_post_listenkey = eapiPrivatePostListenKey = Entry('listenKey', 'eapiPrivate', 'POST', {'cost': 1})
|
ccxt/abstract/binancecoinm.py
CHANGED
@@ -360,6 +360,8 @@ class ImplicitAPI:
|
|
360
360
|
sapi_post_portfolio_bnb_transfer = sapiPostPortfolioBnbTransfer = Entry('portfolio/bnb-transfer', 'sapi', 'POST', {'cost': 150})
|
361
361
|
sapi_post_portfolio_repay_futures_switch = sapiPostPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'sapi', 'POST', {'cost': 150})
|
362
362
|
sapi_post_portfolio_repay_futures_negative_balance = sapiPostPortfolioRepayFuturesNegativeBalance = Entry('portfolio/repay-futures-negative-balance', 'sapi', 'POST', {'cost': 150})
|
363
|
+
sapi_post_portfolio_mint = sapiPostPortfolioMint = Entry('portfolio/mint', 'sapi', 'POST', {'cost': 20})
|
364
|
+
sapi_post_portfolio_redeem = sapiPostPortfolioRedeem = Entry('portfolio/redeem', 'sapi', 'POST', {'cost': 20})
|
363
365
|
sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
|
364
366
|
sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
|
365
367
|
sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
|
@@ -599,6 +601,7 @@ class ImplicitAPI:
|
|
599
601
|
eapiprivate_get_block_order_orders = eapiPrivateGetBlockOrderOrders = Entry('block/order/orders', 'eapiPrivate', 'GET', {'cost': 5})
|
600
602
|
eapiprivate_get_block_order_execute = eapiPrivateGetBlockOrderExecute = Entry('block/order/execute', 'eapiPrivate', 'GET', {'cost': 5})
|
601
603
|
eapiprivate_get_block_user_trades = eapiPrivateGetBlockUserTrades = Entry('block/user-trades', 'eapiPrivate', 'GET', {'cost': 5})
|
604
|
+
eapiprivate_get_blocktrades = eapiPrivateGetBlockTrades = Entry('blockTrades', 'eapiPrivate', 'GET', {'cost': 5})
|
602
605
|
eapiprivate_post_order = eapiPrivatePostOrder = Entry('order', 'eapiPrivate', 'POST', {'cost': 1})
|
603
606
|
eapiprivate_post_batchorders = eapiPrivatePostBatchOrders = Entry('batchOrders', 'eapiPrivate', 'POST', {'cost': 5})
|
604
607
|
eapiprivate_post_listenkey = eapiPrivatePostListenKey = Entry('listenKey', 'eapiPrivate', 'POST', {'cost': 1})
|
ccxt/abstract/binanceus.py
CHANGED
@@ -391,6 +391,8 @@ class ImplicitAPI:
|
|
391
391
|
sapi_post_portfolio_bnb_transfer = sapiPostPortfolioBnbTransfer = Entry('portfolio/bnb-transfer', 'sapi', 'POST', {'cost': 150})
|
392
392
|
sapi_post_portfolio_repay_futures_switch = sapiPostPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'sapi', 'POST', {'cost': 150})
|
393
393
|
sapi_post_portfolio_repay_futures_negative_balance = sapiPostPortfolioRepayFuturesNegativeBalance = Entry('portfolio/repay-futures-negative-balance', 'sapi', 'POST', {'cost': 150})
|
394
|
+
sapi_post_portfolio_mint = sapiPostPortfolioMint = Entry('portfolio/mint', 'sapi', 'POST', {'cost': 20})
|
395
|
+
sapi_post_portfolio_redeem = sapiPostPortfolioRedeem = Entry('portfolio/redeem', 'sapi', 'POST', {'cost': 20})
|
394
396
|
sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
|
395
397
|
sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
|
396
398
|
sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
|
@@ -651,6 +653,7 @@ class ImplicitAPI:
|
|
651
653
|
eapiprivate_get_block_order_orders = eapiPrivateGetBlockOrderOrders = Entry('block/order/orders', 'eapiPrivate', 'GET', {'cost': 5})
|
652
654
|
eapiprivate_get_block_order_execute = eapiPrivateGetBlockOrderExecute = Entry('block/order/execute', 'eapiPrivate', 'GET', {'cost': 5})
|
653
655
|
eapiprivate_get_block_user_trades = eapiPrivateGetBlockUserTrades = Entry('block/user-trades', 'eapiPrivate', 'GET', {'cost': 5})
|
656
|
+
eapiprivate_get_blocktrades = eapiPrivateGetBlockTrades = Entry('blockTrades', 'eapiPrivate', 'GET', {'cost': 5})
|
654
657
|
eapiprivate_post_order = eapiPrivatePostOrder = Entry('order', 'eapiPrivate', 'POST', {'cost': 1})
|
655
658
|
eapiprivate_post_batchorders = eapiPrivatePostBatchOrders = Entry('batchOrders', 'eapiPrivate', 'POST', {'cost': 5})
|
656
659
|
eapiprivate_post_listenkey = eapiPrivatePostListenKey = Entry('listenKey', 'eapiPrivate', 'POST', {'cost': 1})
|
ccxt/abstract/binanceusdm.py
CHANGED
@@ -360,6 +360,8 @@ class ImplicitAPI:
|
|
360
360
|
sapi_post_portfolio_bnb_transfer = sapiPostPortfolioBnbTransfer = Entry('portfolio/bnb-transfer', 'sapi', 'POST', {'cost': 150})
|
361
361
|
sapi_post_portfolio_repay_futures_switch = sapiPostPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'sapi', 'POST', {'cost': 150})
|
362
362
|
sapi_post_portfolio_repay_futures_negative_balance = sapiPostPortfolioRepayFuturesNegativeBalance = Entry('portfolio/repay-futures-negative-balance', 'sapi', 'POST', {'cost': 150})
|
363
|
+
sapi_post_portfolio_mint = sapiPostPortfolioMint = Entry('portfolio/mint', 'sapi', 'POST', {'cost': 20})
|
364
|
+
sapi_post_portfolio_redeem = sapiPostPortfolioRedeem = Entry('portfolio/redeem', 'sapi', 'POST', {'cost': 20})
|
363
365
|
sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
|
364
366
|
sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
|
365
367
|
sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
|
@@ -599,6 +601,7 @@ class ImplicitAPI:
|
|
599
601
|
eapiprivate_get_block_order_orders = eapiPrivateGetBlockOrderOrders = Entry('block/order/orders', 'eapiPrivate', 'GET', {'cost': 5})
|
600
602
|
eapiprivate_get_block_order_execute = eapiPrivateGetBlockOrderExecute = Entry('block/order/execute', 'eapiPrivate', 'GET', {'cost': 5})
|
601
603
|
eapiprivate_get_block_user_trades = eapiPrivateGetBlockUserTrades = Entry('block/user-trades', 'eapiPrivate', 'GET', {'cost': 5})
|
604
|
+
eapiprivate_get_blocktrades = eapiPrivateGetBlockTrades = Entry('blockTrades', 'eapiPrivate', 'GET', {'cost': 5})
|
602
605
|
eapiprivate_post_order = eapiPrivatePostOrder = Entry('order', 'eapiPrivate', 'POST', {'cost': 1})
|
603
606
|
eapiprivate_post_batchorders = eapiPrivatePostBatchOrders = Entry('batchOrders', 'eapiPrivate', 'POST', {'cost': 5})
|
604
607
|
eapiprivate_post_listenkey = eapiPrivatePostListenKey = Entry('listenKey', 'eapiPrivate', 'POST', {'cost': 1})
|
ccxt/ace.py
CHANGED
ccxt/alpaca.py
CHANGED
@@ -1189,7 +1189,6 @@ class alpaca(Exchange, ImplicitAPI):
|
|
1189
1189
|
'postOnly': None,
|
1190
1190
|
'side': self.safe_string(order, 'side'),
|
1191
1191
|
'price': self.safe_number(order, 'limit_price'),
|
1192
|
-
'stopPrice': self.safe_number(order, 'stop_price'),
|
1193
1192
|
'triggerPrice': self.safe_number(order, 'stop_price'),
|
1194
1193
|
'cost': None,
|
1195
1194
|
'average': self.safe_number(order, 'filled_avg_price'),
|
ccxt/ascendex.py
CHANGED
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/ace.py
CHANGED
ccxt/async_support/alpaca.py
CHANGED
@@ -1189,7 +1189,6 @@ class alpaca(Exchange, ImplicitAPI):
|
|
1189
1189
|
'postOnly': None,
|
1190
1190
|
'side': self.safe_string(order, 'side'),
|
1191
1191
|
'price': self.safe_number(order, 'limit_price'),
|
1192
|
-
'stopPrice': self.safe_number(order, 'stop_price'),
|
1193
1192
|
'triggerPrice': self.safe_number(order, 'stop_price'),
|
1194
1193
|
'cost': None,
|
1195
1194
|
'average': self.safe_number(order, 'filled_avg_price'),
|
ccxt/async_support/ascendex.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.4.
|
5
|
+
__version__ = '4.4.42'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -1653,44 +1653,44 @@ class Exchange(BaseExchange):
|
|
1653
1653
|
query = self.extend(params, {'reduceOnly': True})
|
1654
1654
|
return await self.create_order_ws(symbol, type, side, amount, price, query)
|
1655
1655
|
|
1656
|
-
async def create_stop_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None,
|
1656
|
+
async def create_stop_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, triggerPrice: Num = None, params={}):
|
1657
1657
|
if not self.has['createStopOrder']:
|
1658
1658
|
raise NotSupported(self.id + ' createStopOrder() is not supported yet')
|
1659
|
-
if
|
1659
|
+
if triggerPrice is None:
|
1660
1660
|
raise ArgumentsRequired(self.id + ' create_stop_order() requires a stopPrice argument')
|
1661
|
-
query = self.extend(params, {'stopPrice':
|
1661
|
+
query = self.extend(params, {'stopPrice': triggerPrice})
|
1662
1662
|
return await self.create_order(symbol, type, side, amount, price, query)
|
1663
1663
|
|
1664
|
-
async def create_stop_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None,
|
1664
|
+
async def create_stop_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, triggerPrice: Num = None, params={}):
|
1665
1665
|
if not self.has['createStopOrderWs']:
|
1666
1666
|
raise NotSupported(self.id + ' createStopOrderWs() is not supported yet')
|
1667
|
-
if
|
1667
|
+
if triggerPrice is None:
|
1668
1668
|
raise ArgumentsRequired(self.id + ' createStopOrderWs() requires a stopPrice argument')
|
1669
|
-
query = self.extend(params, {'stopPrice':
|
1669
|
+
query = self.extend(params, {'stopPrice': triggerPrice})
|
1670
1670
|
return await self.create_order_ws(symbol, type, side, amount, price, query)
|
1671
1671
|
|
1672
|
-
async def create_stop_limit_order(self, symbol: str, side: OrderSide, amount: float, price: float,
|
1672
|
+
async def create_stop_limit_order(self, symbol: str, side: OrderSide, amount: float, price: float, triggerPrice: float, params={}):
|
1673
1673
|
if not self.has['createStopLimitOrder']:
|
1674
1674
|
raise NotSupported(self.id + ' createStopLimitOrder() is not supported yet')
|
1675
|
-
query = self.extend(params, {'stopPrice':
|
1675
|
+
query = self.extend(params, {'stopPrice': triggerPrice})
|
1676
1676
|
return await self.create_order(symbol, 'limit', side, amount, price, query)
|
1677
1677
|
|
1678
|
-
async def create_stop_limit_order_ws(self, symbol: str, side: OrderSide, amount: float, price: float,
|
1678
|
+
async def create_stop_limit_order_ws(self, symbol: str, side: OrderSide, amount: float, price: float, triggerPrice: float, params={}):
|
1679
1679
|
if not self.has['createStopLimitOrderWs']:
|
1680
1680
|
raise NotSupported(self.id + ' createStopLimitOrderWs() is not supported yet')
|
1681
|
-
query = self.extend(params, {'stopPrice':
|
1681
|
+
query = self.extend(params, {'stopPrice': triggerPrice})
|
1682
1682
|
return await self.create_order_ws(symbol, 'limit', side, amount, price, query)
|
1683
1683
|
|
1684
|
-
async def create_stop_market_order(self, symbol: str, side: OrderSide, amount: float,
|
1684
|
+
async def create_stop_market_order(self, symbol: str, side: OrderSide, amount: float, triggerPrice: float, params={}):
|
1685
1685
|
if not self.has['createStopMarketOrder']:
|
1686
1686
|
raise NotSupported(self.id + ' createStopMarketOrder() is not supported yet')
|
1687
|
-
query = self.extend(params, {'stopPrice':
|
1687
|
+
query = self.extend(params, {'stopPrice': triggerPrice})
|
1688
1688
|
return await self.create_order(symbol, 'market', side, amount, None, query)
|
1689
1689
|
|
1690
|
-
async def create_stop_market_order_ws(self, symbol: str, side: OrderSide, amount: float,
|
1690
|
+
async def create_stop_market_order_ws(self, symbol: str, side: OrderSide, amount: float, triggerPrice: float, params={}):
|
1691
1691
|
if not self.has['createStopMarketOrderWs']:
|
1692
1692
|
raise NotSupported(self.id + ' createStopMarketOrderWs() is not supported yet')
|
1693
|
-
query = self.extend(params, {'stopPrice':
|
1693
|
+
query = self.extend(params, {'stopPrice': triggerPrice})
|
1694
1694
|
return await self.create_order_ws(symbol, 'market', side, amount, None, query)
|
1695
1695
|
|
1696
1696
|
async def fetch_last_prices(self, symbols: Strings = None, params={}):
|
ccxt/async_support/bigone.py
CHANGED
ccxt/async_support/binance.py
CHANGED
@@ -658,6 +658,8 @@ class binance(Exchange, ImplicitAPI):
|
|
658
658
|
'portfolio/bnb-transfer': 150, # Weight(IP): 1500 => cost = 0.1 * 1500 = 150
|
659
659
|
'portfolio/repay-futures-switch': 150, # Weight(IP): 1500 => cost = 0.1 * 1500 = 150
|
660
660
|
'portfolio/repay-futures-negative-balance': 150, # Weight(IP): 1500 => cost = 0.1 * 1500 = 150
|
661
|
+
'portfolio/mint': 20,
|
662
|
+
'portfolio/redeem': 20,
|
661
663
|
'lending/auto-invest/plan/add': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
662
664
|
'lending/auto-invest/plan/edit': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
663
665
|
'lending/auto-invest/plan/edit-status': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
@@ -986,6 +988,7 @@ class binance(Exchange, ImplicitAPI):
|
|
986
988
|
'block/order/orders': 5,
|
987
989
|
'block/order/execute': 5,
|
988
990
|
'block/user-trades': 5,
|
991
|
+
'blockTrades': 5,
|
989
992
|
},
|
990
993
|
'post': {
|
991
994
|
'order': 1,
|
ccxt/async_support/bingx.py
CHANGED
@@ -5345,6 +5345,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
5345
5345
|
elif market['swap']:
|
5346
5346
|
request['endTs'] = now
|
5347
5347
|
if market['spot']:
|
5348
|
+
if limit is not None:
|
5349
|
+
request['limit'] = limit # default 500, maximum 1000
|
5348
5350
|
response = await self.spotV1PrivateGetTradeMyTrades(self.extend(request, params))
|
5349
5351
|
data = self.safe_dict(response, 'data', {})
|
5350
5352
|
fills = self.safe_list(data, 'fills', [])
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -101,6 +101,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
101
101
|
'fetchOHLCV': True,
|
102
102
|
'fetchOpenInterest': True,
|
103
103
|
'fetchOpenInterestHistory': True,
|
104
|
+
'fetchOpenInterests': True,
|
104
105
|
'fetchOpenOrder': True,
|
105
106
|
'fetchOpenOrders': True,
|
106
107
|
'fetchOrder': True,
|
@@ -420,6 +421,75 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
420
421
|
'TETHERUSE': 'ERC20',
|
421
422
|
},
|
422
423
|
},
|
424
|
+
'features': {
|
425
|
+
'default': {
|
426
|
+
'sandbox': False,
|
427
|
+
'createOrder': {
|
428
|
+
'marginMode': True,
|
429
|
+
'triggerPrice': True,
|
430
|
+
'triggerPriceType': None,
|
431
|
+
'triggerDirection': False,
|
432
|
+
'stopLossPrice': True,
|
433
|
+
'takeProfitPrice': True,
|
434
|
+
'attachedStopLossTakeProfit': None,
|
435
|
+
'timeInForce': {
|
436
|
+
'IOC': True,
|
437
|
+
'FOK': True,
|
438
|
+
'PO': True,
|
439
|
+
'GTD': False,
|
440
|
+
},
|
441
|
+
'hedged': False,
|
442
|
+
'trailing': True, # todo: unify
|
443
|
+
# todo: leverage unify
|
444
|
+
},
|
445
|
+
'createOrders': {
|
446
|
+
'max': 75,
|
447
|
+
},
|
448
|
+
'fetchMyTrades': {
|
449
|
+
'marginMode': False,
|
450
|
+
'limit': 2500,
|
451
|
+
'daysBack': None,
|
452
|
+
'untilDays': 100000, # todo: implement
|
453
|
+
},
|
454
|
+
'fetchOrder': {
|
455
|
+
'marginMode': False,
|
456
|
+
'trigger': False,
|
457
|
+
'trailing': False,
|
458
|
+
},
|
459
|
+
'fetchOpenOrders': {
|
460
|
+
'marginMode': False,
|
461
|
+
'limit': None,
|
462
|
+
'trigger': False,
|
463
|
+
'trailing': False,
|
464
|
+
},
|
465
|
+
'fetchOrders': None,
|
466
|
+
'fetchClosedOrders': {
|
467
|
+
'marginMode': False,
|
468
|
+
'limit': None,
|
469
|
+
'daysBackClosed': None,
|
470
|
+
'daysBackCanceled': None,
|
471
|
+
'untilDays': 100000,
|
472
|
+
'trigger': False,
|
473
|
+
'trailing': False,
|
474
|
+
},
|
475
|
+
'fetchOHLCV': {
|
476
|
+
'limit': 10000,
|
477
|
+
},
|
478
|
+
},
|
479
|
+
'spot': {
|
480
|
+
'extends': 'default',
|
481
|
+
},
|
482
|
+
'swap': {
|
483
|
+
'linear': {
|
484
|
+
'extends': 'default',
|
485
|
+
},
|
486
|
+
'inverse': None,
|
487
|
+
},
|
488
|
+
'future': {
|
489
|
+
'linear': None,
|
490
|
+
'inverse': None,
|
491
|
+
},
|
492
|
+
},
|
423
493
|
'exceptions': {
|
424
494
|
'exact': {
|
425
495
|
'11010': RateLimitExceeded,
|
@@ -3117,6 +3187,58 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
3117
3187
|
'previousFundingDatetime': None,
|
3118
3188
|
}
|
3119
3189
|
|
3190
|
+
async def fetch_open_interests(self, symbols: Strings = None, params={}):
|
3191
|
+
"""
|
3192
|
+
Retrieves the open interest for a list of symbols
|
3193
|
+
|
3194
|
+
https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
3195
|
+
|
3196
|
+
:param str[] [symbols]: a list of unified CCXT market symbols
|
3197
|
+
:param dict [params]: exchange specific parameters
|
3198
|
+
:returns dict[]: a list of `open interest structures <https://docs.ccxt.com/#/?id=open-interest-structure>`
|
3199
|
+
"""
|
3200
|
+
await self.load_markets()
|
3201
|
+
symbols = self.market_symbols(symbols)
|
3202
|
+
marketIds = ['ALL']
|
3203
|
+
if symbols is not None:
|
3204
|
+
marketIds = self.market_ids(symbols)
|
3205
|
+
request: dict = {
|
3206
|
+
'keys': ','.join(marketIds),
|
3207
|
+
}
|
3208
|
+
response = await self.publicGetStatusDeriv(self.extend(request, params))
|
3209
|
+
#
|
3210
|
+
# [
|
3211
|
+
# [
|
3212
|
+
# "tXRPF0:USTF0", # market id
|
3213
|
+
# 1706256986000, # millisecond timestamp
|
3214
|
+
# null,
|
3215
|
+
# 0.512705, # derivative mid price
|
3216
|
+
# 0.512395, # underlying spot mid price
|
3217
|
+
# null,
|
3218
|
+
# 37671483.04, # insurance fund balance
|
3219
|
+
# null,
|
3220
|
+
# 1706284800000, # timestamp of next funding
|
3221
|
+
# 0.00002353, # accrued funding for next period
|
3222
|
+
# 317, # next funding step
|
3223
|
+
# null,
|
3224
|
+
# 0, # current funding
|
3225
|
+
# null,
|
3226
|
+
# null,
|
3227
|
+
# 0.5123016, # mark price
|
3228
|
+
# null,
|
3229
|
+
# null,
|
3230
|
+
# 2233562.03115, # open interest in contracts
|
3231
|
+
# null,
|
3232
|
+
# null,
|
3233
|
+
# null,
|
3234
|
+
# 0.0005, # average spread without funding payment
|
3235
|
+
# 0.0025 # funding payment cap
|
3236
|
+
# ]
|
3237
|
+
# ]
|
3238
|
+
#
|
3239
|
+
result = self.parse_open_interests(response)
|
3240
|
+
return self.filter_by_array(result, 'symbol', symbols)
|
3241
|
+
|
3120
3242
|
async def fetch_open_interest(self, symbol: str, params={}):
|
3121
3243
|
"""
|
3122
3244
|
retrieves the open interest of a contract trading pair
|
ccxt/async_support/blofin.py
CHANGED
@@ -167,7 +167,7 @@ class blofin(Exchange, ImplicitAPI):
|
|
167
167
|
'rest': 'https://openapi.blofin.com',
|
168
168
|
},
|
169
169
|
'referral': {
|
170
|
-
'url': 'https://blofin.com/register?referral_code=
|
170
|
+
'url': 'https://blofin.com/register?referral_code=f79EsS',
|
171
171
|
'discount': 0.05,
|
172
172
|
},
|
173
173
|
'www': 'https://www.blofin.com',
|
@@ -287,10 +287,18 @@ class blofin(Exchange, ImplicitAPI):
|
|
287
287
|
'brokerId': 'ec6dd3a7dd982d0b',
|
288
288
|
'accountsByType': {
|
289
289
|
'swap': 'futures',
|
290
|
+
'funding': 'funding',
|
290
291
|
'future': 'futures',
|
292
|
+
'copy_trading': 'copy_trading',
|
293
|
+
'earn': 'earn',
|
294
|
+
'spot': 'spot',
|
291
295
|
},
|
292
296
|
'accountsById': {
|
297
|
+
'funding': 'funding',
|
293
298
|
'futures': 'swap',
|
299
|
+
'copy_trading': 'copy_trading',
|
300
|
+
'earn': 'earn',
|
301
|
+
'spot': 'spot',
|
294
302
|
},
|
295
303
|
'sandboxMode': False,
|
296
304
|
'defaultNetwork': 'ERC20',
|
@@ -873,8 +881,9 @@ class blofin(Exchange, ImplicitAPI):
|
|
873
881
|
entry = self.safe_dict(data, 0, {})
|
874
882
|
return self.parse_funding_rate(entry, market)
|
875
883
|
|
876
|
-
def parse_balance_by_type(self,
|
877
|
-
|
884
|
+
def parse_balance_by_type(self, response):
|
885
|
+
data = self.safe_list(response, 'data')
|
886
|
+
if (data is not None) and isinstance(data, list):
|
878
887
|
return self.parse_funding_balance(response)
|
879
888
|
else:
|
880
889
|
return self.parse_balance(response)
|
@@ -986,19 +995,19 @@ class blofin(Exchange, ImplicitAPI):
|
|
986
995
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
987
996
|
"""
|
988
997
|
await self.load_markets()
|
989
|
-
accountType =
|
990
|
-
params = self.
|
998
|
+
accountType = None
|
999
|
+
accountType, params = self.handle_option_and_params_2(params, 'fetchBalance', 'accountType', 'type')
|
991
1000
|
request: dict = {
|
992
1001
|
}
|
993
1002
|
response = None
|
994
|
-
if accountType is not None:
|
1003
|
+
if accountType is not None and accountType != 'swap':
|
995
1004
|
options = self.safe_dict(self.options, 'accountsByType', {})
|
996
1005
|
parsedAccountType = self.safe_string(options, accountType, accountType)
|
997
1006
|
request['accountType'] = parsedAccountType
|
998
1007
|
response = await self.privateGetAssetBalances(self.extend(request, params))
|
999
1008
|
else:
|
1000
1009
|
response = await self.privateGetAccountBalance(self.extend(request, params))
|
1001
|
-
return self.parse_balance_by_type(
|
1010
|
+
return self.parse_balance_by_type(response)
|
1002
1011
|
|
1003
1012
|
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
1004
1013
|
market = self.market(symbol)
|
ccxt/async_support/cex.py
CHANGED
@@ -1067,7 +1067,7 @@ class cex(Exchange, ImplicitAPI):
|
|
1067
1067
|
'postOnly': None,
|
1068
1068
|
'side': self.safe_string_lower(order, 'side'),
|
1069
1069
|
'price': self.safe_number(order, 'price'),
|
1070
|
-
'
|
1070
|
+
'triggerPrice': self.safe_number(order, 'stopPrice'),
|
1071
1071
|
'amount': requestedBase,
|
1072
1072
|
'cost': executedQuote,
|
1073
1073
|
'average': self.safe_number(order, 'averagePrice'),
|
ccxt/async_support/coinbase.py
CHANGED
@@ -2810,10 +2810,10 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2810
2810
|
'product_id': market['id'],
|
2811
2811
|
'side': side.upper(),
|
2812
2812
|
}
|
2813
|
-
|
2813
|
+
triggerPrice = self.safe_number_n(params, ['stopPrice', 'stop_price', 'triggerPrice'])
|
2814
2814
|
stopLossPrice = self.safe_number(params, 'stopLossPrice')
|
2815
2815
|
takeProfitPrice = self.safe_number(params, 'takeProfitPrice')
|
2816
|
-
isStop =
|
2816
|
+
isStop = triggerPrice is not None
|
2817
2817
|
isStopLoss = stopLossPrice is not None
|
2818
2818
|
isTakeProfit = takeProfitPrice is not None
|
2819
2819
|
timeInForce = self.safe_string(params, 'timeInForce')
|
@@ -2831,7 +2831,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2831
2831
|
'stop_limit_stop_limit_gtd': {
|
2832
2832
|
'base_size': self.amount_to_precision(symbol, amount),
|
2833
2833
|
'limit_price': self.price_to_precision(symbol, price),
|
2834
|
-
'stop_price': self.price_to_precision(symbol,
|
2834
|
+
'stop_price': self.price_to_precision(symbol, triggerPrice),
|
2835
2835
|
'stop_direction': stopDirection,
|
2836
2836
|
'end_time': endTime,
|
2837
2837
|
},
|
@@ -2841,25 +2841,25 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2841
2841
|
'stop_limit_stop_limit_gtc': {
|
2842
2842
|
'base_size': self.amount_to_precision(symbol, amount),
|
2843
2843
|
'limit_price': self.price_to_precision(symbol, price),
|
2844
|
-
'stop_price': self.price_to_precision(symbol,
|
2844
|
+
'stop_price': self.price_to_precision(symbol, triggerPrice),
|
2845
2845
|
'stop_direction': stopDirection,
|
2846
2846
|
},
|
2847
2847
|
}
|
2848
2848
|
elif isStopLoss or isTakeProfit:
|
2849
|
-
|
2849
|
+
tpslPrice = None
|
2850
2850
|
if isStopLoss:
|
2851
2851
|
if stopDirection is None:
|
2852
2852
|
stopDirection = 'STOP_DIRECTION_STOP_UP' if (side == 'buy') else 'STOP_DIRECTION_STOP_DOWN'
|
2853
|
-
|
2853
|
+
tpslPrice = self.price_to_precision(symbol, stopLossPrice)
|
2854
2854
|
else:
|
2855
2855
|
if stopDirection is None:
|
2856
2856
|
stopDirection = 'STOP_DIRECTION_STOP_DOWN' if (side == 'buy') else 'STOP_DIRECTION_STOP_UP'
|
2857
|
-
|
2857
|
+
tpslPrice = self.price_to_precision(symbol, takeProfitPrice)
|
2858
2858
|
request['order_configuration'] = {
|
2859
2859
|
'stop_limit_stop_limit_gtc': {
|
2860
2860
|
'base_size': self.amount_to_precision(symbol, amount),
|
2861
2861
|
'limit_price': self.price_to_precision(symbol, price),
|
2862
|
-
'stop_price':
|
2862
|
+
'stop_price': tpslPrice,
|
2863
2863
|
'stop_direction': stopDirection,
|
2864
2864
|
},
|
2865
2865
|
}
|
@@ -3110,7 +3110,6 @@ class coinbase(Exchange, ImplicitAPI):
|
|
3110
3110
|
'postOnly': postOnly,
|
3111
3111
|
'side': self.safe_string_lower(order, 'side'),
|
3112
3112
|
'price': price,
|
3113
|
-
'stopPrice': triggerPrice,
|
3114
3113
|
'triggerPrice': triggerPrice,
|
3115
3114
|
'amount': amount,
|
3116
3115
|
'filled': self.safe_string(order, 'filled_size'),
|
@@ -1042,7 +1042,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1042
1042
|
side = self.safe_string(order, 'side')
|
1043
1043
|
timeInForce = self.safe_string(order, 'time_in_force')
|
1044
1044
|
postOnly = self.safe_value(order, 'post_only')
|
1045
|
-
|
1045
|
+
triggerPrice = self.safe_number(order, 'stop_price')
|
1046
1046
|
clientOrderId = self.safe_string(order, 'client_oid')
|
1047
1047
|
return self.safe_order({
|
1048
1048
|
'id': id,
|
@@ -1058,8 +1058,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1058
1058
|
'postOnly': postOnly,
|
1059
1059
|
'side': side,
|
1060
1060
|
'price': price,
|
1061
|
-
'
|
1062
|
-
'triggerPrice': stopPrice,
|
1061
|
+
'triggerPrice': triggerPrice,
|
1063
1062
|
'cost': cost,
|
1064
1063
|
'amount': amount,
|
1065
1064
|
'filled': filled,
|
@@ -1224,9 +1223,9 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1224
1223
|
clientOrderId = self.safe_string_2(params, 'clientOrderId', 'client_oid')
|
1225
1224
|
if clientOrderId is not None:
|
1226
1225
|
request['client_oid'] = clientOrderId
|
1227
|
-
|
1228
|
-
if
|
1229
|
-
request['stop_price'] = self.price_to_precision(symbol,
|
1226
|
+
triggerPrice = self.safe_number_n(params, ['stopPrice', 'stop_price', 'triggerPrice'])
|
1227
|
+
if triggerPrice is not None:
|
1228
|
+
request['stop_price'] = self.price_to_precision(symbol, triggerPrice)
|
1230
1229
|
timeInForce = self.safe_string_2(params, 'timeInForce', 'time_in_force')
|
1231
1230
|
if timeInForce is not None:
|
1232
1231
|
request['time_in_force'] = timeInForce
|
@@ -1630,7 +1630,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1630
1630
|
:param float amount: how much you want to trade in units of the base currency, quote currency for 'market' 'buy' orders
|
1631
1631
|
:param float [price]: the price to fulfill the order, in units of the quote currency, ignored in market orders
|
1632
1632
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1633
|
-
:param float [params.stopPrice]:
|
1633
|
+
:param float [params.stopPrice]: alias for triggerPrice
|
1634
1634
|
:param float [params.triggerPrice]: price to trigger stop orders
|
1635
1635
|
:param float [params.stopLossPrice]: price to trigger stop-loss orders
|
1636
1636
|
:param bool [params.postOnly]: True or False
|
@@ -1642,7 +1642,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1642
1642
|
await self.load_markets()
|
1643
1643
|
market = self.market(symbol)
|
1644
1644
|
typeId = type.upper()
|
1645
|
-
|
1645
|
+
triggerPrice = self.safe_number_n(params, ['triggerPrice', 'stopPrice', 'stop_price'])
|
1646
1646
|
clientOrderIdprefix = self.safe_string(self.options, 'brokerId', 'nfqkvdjp')
|
1647
1647
|
clientOrderId = clientOrderIdprefix + '-' + self.uuid()
|
1648
1648
|
clientOrderId = clientOrderId[0:17]
|
@@ -1652,12 +1652,12 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1652
1652
|
'instrument': market['id'],
|
1653
1653
|
'size': self.amount_to_precision(market['symbol'], amount),
|
1654
1654
|
}
|
1655
|
-
if
|
1655
|
+
if triggerPrice is not None:
|
1656
1656
|
if type == 'limit':
|
1657
1657
|
typeId = 'STOP_LIMIT'
|
1658
1658
|
else:
|
1659
1659
|
typeId = 'STOP'
|
1660
|
-
request['stop_price'] =
|
1660
|
+
request['stop_price'] = triggerPrice
|
1661
1661
|
request['type'] = typeId
|
1662
1662
|
if type == 'limit':
|
1663
1663
|
if price is None:
|
@@ -1751,7 +1751,6 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1751
1751
|
'postOnly': None,
|
1752
1752
|
'side': self.safe_string_lower(order, 'side'),
|
1753
1753
|
'price': self.safe_string(order, 'price'),
|
1754
|
-
'stopPrice': self.safe_string(order, 'stop_price'),
|
1755
1754
|
'triggerPrice': self.safe_string(order, 'stop_price'),
|
1756
1755
|
'amount': self.safe_string(order, 'size'),
|
1757
1756
|
'filled': self.safe_string(order, 'exec_qty'),
|
@@ -1885,9 +1884,9 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1885
1884
|
request['size'] = self.amount_to_precision(symbol, amount)
|
1886
1885
|
if price is not None:
|
1887
1886
|
request['price'] = self.price_to_precision(symbol, price)
|
1888
|
-
|
1889
|
-
if
|
1890
|
-
request['stop_price'] =
|
1887
|
+
triggerPrice = self.safe_number_n(params, ['stopPrice', 'stop_price', 'triggerPrice'])
|
1888
|
+
if triggerPrice is not None:
|
1889
|
+
request['stop_price'] = triggerPrice
|
1891
1890
|
clientOrderId = self.safe_string_2(params, 'client_order_id', 'clientOrderId')
|
1892
1891
|
if clientOrderId is None:
|
1893
1892
|
raise BadRequest(self.id + ' editOrder() requires a clientOrderId parameter')
|