diff --git a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs index e8f1762c..90612190 100644 --- a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs +++ b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs @@ -547,7 +547,7 @@ protected override async Task> OnGetAmountsAvailable return balances; } - protected override async Task OnPlaceOrderAsync(ExchangeOrderRequest order) + protected override async Task OnPlaceOrderAsync(ExchangeOrderRequest order) { if (order.Price == null && order.OrderType != OrderType.Market) throw new ArgumentNullException(nameof(order.Price)); @@ -575,8 +575,9 @@ protected override async Task OnPlaceOrderAsync(ExchangeOrd if (order.OrderType != OrderType.Market) { decimal outputPrice = await ClampOrderPrice(order.MarketSymbol, order.Price.Value); - payload["timeInForce"] = "GTC"; payload["price"] = outputPrice; + if (order.IsPostOnly != true) + payload["timeInForce"] = "GTC"; } order.ExtraParameters.CopyTo(payload); diff --git a/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPI.cs b/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPI.cs index b01a70cf..55473c4b 100644 --- a/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPI.cs +++ b/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPI.cs @@ -192,7 +192,7 @@ protected virtual Task> OnGetFeesAsync() => throw new NotImplementedException(); protected virtual Task> OnGetAmountsAvailableToTradeAsync() => throw new NotImplementedException(); - protected virtual Task OnPlaceOrderAsync(ExchangeOrderRequest order) => + protected virtual Task OnPlaceOrderAsync(ExchangeOrderRequest order) => throw new NotImplementedException(); protected virtual Task OnPlaceOrdersAsync(params ExchangeOrderRequest[] order) => throw new NotImplementedException();