Skip to content

Commit

Permalink
Keep order removals in Gemini order book deltas. (#629)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsalexkwok authored Aug 17, 2021
1 parent 9bb12d3 commit ed59719
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ExchangeSharp/API/Exchanges/Gemini/ExchangeGeminiAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,8 @@ params string[] marketSymbols
decimal amount = change[2].ConvertInvariant<decimal>();

SortedDictionary<decimal, ExchangeOrderPrice> dict = (sell ? book.Asks : book.Bids);
if (amount == 0m)
dict.Remove(price);
else
dict[price] = new ExchangeOrderPrice { Amount = amount, Price = price };

dict[price] = new ExchangeOrderPrice { Amount = amount, Price = price };
}
}

Expand Down

0 comments on commit ed59719

Please sign in to comment.