From b3cc6abaea5bc5b670037a5538305239fe75dd7d Mon Sep 17 00:00:00 2001 From: Nick Bair Date: Mon, 4 Nov 2024 19:11:32 -0700 Subject: [PATCH] Schema fixes for create order and close position (#38) --- lib/models/definitions/pricing/client_price.ex | 2 +- .../definitions/transaction/market_order_position_closeout.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/models/definitions/pricing/client_price.ex b/lib/models/definitions/pricing/client_price.ex index 88c772f..d0703cd 100644 --- a/lib/models/definitions/pricing/client_price.ex +++ b/lib/models/definitions/pricing/client_price.ex @@ -30,6 +30,6 @@ defmodule ExOanda.ClientPrice do |> cast(params, [:type, :instrument, :time, :tradeable, :closeout_bid, :closeout_ask]) |> cast_embed(:bids) |> cast_embed(:asks) - |> validate_required([:type, :instrument, :time, :tradeable, :closeout_bid, :closeout_ask]) + |> validate_required([:type, :closeout_bid, :closeout_ask]) end end diff --git a/lib/models/definitions/transaction/market_order_position_closeout.ex b/lib/models/definitions/transaction/market_order_position_closeout.ex index 98a8cd6..9ba9d45 100644 --- a/lib/models/definitions/transaction/market_order_position_closeout.ex +++ b/lib/models/definitions/transaction/market_order_position_closeout.ex @@ -10,7 +10,7 @@ defmodule ExOanda.MarketOrderPositionCloseout do typed_embedded_schema do field(:instrument, :string) - field(:units, :integer) + field(:units, :string) end @doc false