Open dungtrandk opened 11 months ago
Jeff Please help :-)
I Want to place a SOLUSDT futures market order and I am using Binance.Net.Interfaces.Clients.UsdFuturesApi.IBinanceRestClientUsdFuturesApiTrading to place the order async: The code:
var response = await BinanceClient.UsdFuturesApi.Trading.PlaceOrderAsync( "SOLUSDT", Binance.Net.Enums.OrderSide.Buy, Binance.Net.Enums.FuturesOrderType.Market, 10, null, Binance.Net.Enums.PositionSide.Both);
In my Binance account i have set the positionside to both and i have set the SOLUSDT pair to CROSS and leverage is set to 1 (also tried different other leverages). I have more than 1000 USDT on the Futures Account but still, the response is error with the the error message: "Insufficient Margin".
You buy 10 SOL, change your quantity of your order to 1 and try again
Hi XHighIntell
I can try this no problem. But when I do it using the Binance website, I dont need to buy/SELL 10 SOL before.
I just select the leverage, amount i want to buy/sell for and then click buy/sell.
Cant this be achieved using this Library?
For spot api you can do that by set 'quoteQuantity',
FuturesApi have only 'quantity' param because thats a Futures thing, even in Binance UI you have same. Its very simple to calculate the size of position based on your desire USD value like that:
decimal quantity = USDValue / BestAskPrice;
JUST EDITED TO REFERENCE THE CORRECT CLASS
I am using the Binance.net lib to place futures orders and here is my problem:
When I use the Binance.Net.Interfaces.Clients.UsdFuturesApi.IBinanceRestClientUsdFuturesApiTrading I expected it to place a usdt futures order with the selected leverage on that symbol. But instead it seems to wanting to place a Margin trade on that symbol, but since I dont have any funds in the symbol on my Margin account it says something like "Insufficient margin on account".
I do not want to place margin orders but leverage on USDT-M futures.
ALSO: I HAVE MY MARGIN MODE SET TO "CROSS" AND LEVERAGE SET TO "1" TO TEST.
How do i do that?