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/Stop Loss) orders by way of API, please pay attention to the following:
(1) When the Activation Worth for a Trailing Cease isn't working
You have to use the variable identify activatePrice (case-sensitive). Additionally, ensure the value is handed as a floating-point quantity (decimal) moderately than a string or integer.
(2) When remaining TP/SL orders are usually not being cancelled
That you must use the precise perform for algorithmic orders. Please seek advice from the Binance Algo Orders documentation. Orders placed by way of the API are categorized as "Conditional" orders; creating them as "Primary" orders isn't supported via 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 here hoping it stays on the internet to save some 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