Hello,
I am trying to use dazl to query the ledger for Order contracts. If no filters are applied, I can retrieve all the contracts using the find_active function from the AIOPartyClient.
I have tried to look for examples of filters but didn’t encounter any that filtered using data types, only primitive fields.
How can I use find_active to filter using a field from a data type inside the template?
For example, for the Order template in Daml MiB:
template Order
with
operator : Party
provider : Party
customer : Party
status : Status
details : Details
providerOrderId : Optional Text
executions : [Execution]
remainingQuantity : Decimal
createdAt : Time
Which has the Details data type:
data Details = Details with
id : Text
listingId : Text
asset : Asset
side : Side
orderType : OrderType
timeInForce : TimeInForce
marketType : MarketType
optExchangeFee : Optional (ContractId AssetDeposit)
deriving (Eq, Show)
How can I use find_active to get all orders by their details.id?
Thank you in advance.