I'm not knowledgeable developer, so it took me about three hours of troubleshooting to determine 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
You have to use the variable identify activatePrice (case-sensitive). Additionally, ensure the value is passed as a floating-point number (decimal) somewhat than a string or integer.
(2) When remaining TP/SL orders usually are not being cancelled
It's essential 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 shouldn't be supported by way of this technique.
Use the following perform: def cancel_all_algo_orders_direct():
This may appear to be a random tip, but Iβm posting it right here hoping it stays on the web to avoid wasting future consumer from the identical 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