Skip to content

Commit 679b7dd

Browse files
jjxtra麦树然
authored andcommitted
Patch fix place safe market order (DigitalRuby#514)
Fixes DigitalRuby#512
1 parent 2741fbc commit 679b7dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPIExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ public static async Task<ExchangeOrderResult> PlaceSafeMarketOrderAsync(this Exc
309309
ExchangeOrderRequest request = new ExchangeOrderRequest
310310
{
311311
Amount = amount,
312+
IsBuy = isBuy,
312313
OrderType = OrderType.Limit,
313314
Price = CryptoUtility.RoundAmount((isBuy ? highPrice : lowPrice) * priceThreshold),
314315
ShouldRoundAmount = true,
@@ -328,6 +329,7 @@ public static async Task<ExchangeOrderResult> PlaceSafeMarketOrderAsync(this Exc
328329
case ExchangeAPIOrderResult.Filled:
329330
case ExchangeAPIOrderResult.Canceled:
330331
case ExchangeAPIOrderResult.Error:
332+
i = maxTries + 1;
331333
break;
332334
}
333335
}

0 commit comments

Comments
 (0)