Open sinaptech opened 2 years ago
@HypsyNZ You do not have to worry about the rest. If you know this, help me, if not, you do not need to answer
This is for TP :
var startTP = await bfc.UsdFuturesApi.Trading.PlaceOrderAsync(ASSET, side: OrderSide.Sell, positionSide: PositionSide.Long, type: FuturesOrderType.TakeProfit, quantity: long_quantity, price: long_price, stopPrice: actpr, timeInForce: TimeInForce.GoodTillCanceled);
You can make await order than => if(PositionLongOpenOrder.Success)
{
....
}
For TP/SL you have to use
STOP/TAKE_PROFIT | quantity, price, stopPrice
@eros1453 Thank you. Is it works on Both Cross and Isolated?
yes for me But try it on both way, sometimes when you miss the order on one side it will close the other side positionb on 'Hedge mode`
@eros1453 Hi. I place an order with the following parameter values first for the limit order: Order Side: Sell, Order Type: Limit, Quantity: 5 ADA, PositionSide: Short, TimeInForce: TimeInForce.GoodTillCancel, Price: 1.25
after success result I place another order for SL Limit as follows: Order Side: Buy, Order Type: Stop, Quantity: 5 ADA, PositionSide: Short, TimeInForce: TimeInForce.GoodTillCancel, Price: 1.25, StopPrice: 1.45
But at binance the result is not as expected. see screen shot please
@HypsyNZ I have set order type to stoplosslimit. binance futures api return error Invalid orderType. Shouldn't I set closeposition=true??
@JKorf @HypsyNZ I want to place a limit order with limit stoploss order too like the attached files in binance. I could not add stoploss order limit by this package.
@eros1453 Hi. I place an order with the following parameter values first for the limit order: Order Side: Sell, Order Type: Limit, Quantity: 5 ADA, PositionSide: Short, TimeInForce: TimeInForce.GoodTillCancel, Price: 1.25
after success result I place another order for SL Limit as follows: Order Side: Buy, Order Type: Stop, Quantity: 5 ADA, PositionSide: Short, TimeInForce: TimeInForce.GoodTillCancel, Price: 1.25, StopPrice: 1.45
But at binance the result is not as expected. see screen shot please
Its cause from limit price. the order is not executed immediately. I use orderbook and use the bestAsk or bestBuy price. On fast moving market it gets stuck sometimes. It
s better to use market order for position opening for fast trades
@eros1453 @JKorf I have still confused in creating limit order with SL and TP limit order like https://github.com/JKorf/Binance.Net/issues/1005#issuecomment-1061823508 I want to know If I can place order with this package like the above screenshots.
Best way is to send Limit order with custom Order ID and when you receive the result trough userdatastream Event: Order Update execute the SL/TP orders. That must be the logic
Best way is to send Limit order with custom Order ID and when you receive the result trough userdatastream Event: Order Update execute the SL/TP orders. That must be the logic
thank you my lord of humanity. you just cured my depression.
Hi. for futures api USDT please help me how to get SL and TP limit order when the main order is limit too?