Skip to content

Commit

Permalink
Patch fix place safe market order (#514)
Browse files Browse the repository at this point in the history
Fixes #512
  • Loading branch information
jjxtra authored and vslee committed Jan 23, 2020
1 parent 239be68 commit 04eef85
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ public static async Task<ExchangeOrderResult> PlaceSafeMarketOrderAsync(this Exc
ExchangeOrderRequest request = new ExchangeOrderRequest
{
Amount = amount,
IsBuy = isBuy,
OrderType = OrderType.Limit,
Price = CryptoUtility.RoundAmount((isBuy ? highPrice : lowPrice) * priceThreshold),
ShouldRoundAmount = true,
Expand All @@ -328,6 +329,7 @@ public static async Task<ExchangeOrderResult> PlaceSafeMarketOrderAsync(this Exc
case ExchangeAPIOrderResult.Filled:
case ExchangeAPIOrderResult.Canceled:
case ExchangeAPIOrderResult.Error:
i = maxTries + 1;
break;
}
}
Expand Down

0 comments on commit 04eef85

Please sign in to comment.