I'm not knowledgeable developer, so it took me about three hours of troubleshooting to figure this out. In case you are working with USD-M Futures and making an attempt to set or cancel TP/SL (Take Profit/Cease Loss) orders by way of API, please pay attention to the next:
(1) When the Activation Worth for a Trailing Stop isn't working
It's essential to use the variable identify activatePrice (case-sensitive). Additionally, ensure the value is handed as a floating-point number (decimal) slightly than a string or integer.
(2) When remaining TP/SL orders aren't being cancelled
You want to use the precise perform for algorithmic orders. Please seek advice from the Binance Algo Orders documentation. Orders positioned by way of the API are categorized as "Conditional" orders; creating them as "Primary" orders isn't supported by way of this technique.
Use the next perform: def cancel_all_algo_orders_direct():
This may look like a random tip, but Iβm posting it here hoping it stays on the web to avoid wasting future consumer from the same wrestle I had.
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments