The parent market for a given token ID, as returned by the CLOB API
GET /markets-by-token/:token_id.
Resolves a token ID to its market's condition_id and both the primary (Yes)
and secondary (No) token IDs. The CLOB API already delivers snake_case keys,
so from_attrs/1 normalisation is a no-op here but kept for consistency with
the other schemas.
Summary
Functions
Builds a MarketByToken from the raw (JSON-decoded) CLOB attributes. Keys may
be in camelCase (atom or string); they are normalised to the snake_case
fields. Returns {:error, {:missing_fields, fields}} when a required field is
absent.
Types
Functions
Builds a MarketByToken from the raw (JSON-decoded) CLOB attributes. Keys may
be in camelCase (atom or string); they are normalised to the snake_case
fields. Returns {:error, {:missing_fields, fields}} when a required field is
absent.