You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. Thanks a lot for this super api. While hedge mode is active, I cannot send orders with the link request below. Can you share an example code that will allow me to send orders while hedge mode is active?
`var services = new ServiceCollection();
services.AddBinance((restClientOptions, socketClientOptions) =>
{
restClientOptions.ApiCredentials = new BinanceApiCredentials(textapi.Text, textsecret.Text);
restClientOptions.SpotApiOptions = new BinanceApiClientOptions
{
AutoTimestamp = true,
TimestampRecalculationInterval = TimeSpan.FromMinutes(30),
RateLimitingBehaviour = RateLimitingBehaviour.Wait
};
restClientOptions.LogLevel = LogLevel.Trace;
restClientOptions.LogWriters = new List { new ConsoleLogger() };
socketClientOptions.ApiCredentials = new BinanceApiCredentials(textapi.Text, textsecret.Text);
socketClientOptions.UsdFuturesStreamsOptions = new BinanceSocketApiClientOptions
{
AutoReconnect = true,
ReconnectInterval = TimeSpan.FromSeconds(15)
};
}, ServiceLifetime.Transient);
var serviceProvider = services.BuildServiceProvider();
var restClient = serviceProvider.GetRequiredService();`
Hello. Thanks a lot for this super api. While hedge mode is active, I cannot send orders with the link request below. Can you share an example code that will allow me to send orders while hedge mode is active?
`var services = new ServiceCollection();
services.AddBinance((restClientOptions, socketClientOptions) =>
{
restClientOptions.ApiCredentials = new BinanceApiCredentials(textapi.Text, textsecret.Text);
restClientOptions.SpotApiOptions = new BinanceApiClientOptions
{
AutoTimestamp = true,
TimestampRecalculationInterval = TimeSpan.FromMinutes(30),
RateLimitingBehaviour = RateLimitingBehaviour.Wait
};
restClientOptions.LogLevel = LogLevel.Trace;
restClientOptions.LogWriters = new List { new ConsoleLogger() };
}, ServiceLifetime.Transient);
var serviceProvider = services.BuildServiceProvider();
var restClient = serviceProvider.GetRequiredService();`
This is the structure I send orders to.
var longemir = await restClient.UsdFuturesApi.Trading.PlaceOrderAsync(listBox1.SelectedItem.ToString() + "USDT", OrderSide.Buy, FuturesOrderType.Market, quantity: Convert.ToDecimal(textBox1.Text));
The text was updated successfully, but these errors were encountered: