From c75fb64f699c37a06bdd55573e39a77ed9d895f8 Mon Sep 17 00:00:00 2001 From: Wildan Fathan Date: Sat, 7 Dec 2024 00:04:11 +0700 Subject: [PATCH] Handle nil case for min_notional in Binance products --- apps/tai/lib/tai/venue_adapters/binance/products.ex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/tai/lib/tai/venue_adapters/binance/products.ex b/apps/tai/lib/tai/venue_adapters/binance/products.ex index 63b456cf2..d73a5797d 100644 --- a/apps/tai/lib/tai/venue_adapters/binance/products.ex +++ b/apps/tai/lib/tai/venue_adapters/binance/products.ex @@ -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,