Skip to content

Commit

Permalink
Handle nil case for min_notional in Binance products
Browse files Browse the repository at this point in the history
  • Loading branch information
f4th4n authored and rupurt committed Dec 7, 2024
1 parent 2342753 commit c75fb64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/tai/lib/tai/venue_adapters/binance/products.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ defmodule Tai.VenueAdapters.Binance.Products do
{:ok, status} = Tai.VenueAdapters.Binance.ProductStatus.normalize(exchange_status)
{min_price, max_price, tick_size} = filters |> price_filter
{min_size, max_size, step_size} = filters |> size_filter
%Decimal{} = min_notional = filters |> notional_filter

min_notional =
case filters |> notional_filter do
nil -> %Decimal{}
%Decimal{} = res -> res
end

%Tai.Venues.Product{
venue_id: venue_id,
Expand Down

0 comments on commit c75fb64

Please sign in to comment.