Module models

Source
Expand description

Core domain models for the flow trading system.

This module contains the fundamental data structures that represent the domain entities.

The models in this module are primarily data structures with minimal business logic, following the principles of the hexagonal architecture to separate domain entities from their persistence and processing implementations.

Structs§

AuctionMetaData
A simple struct for the external identification of an auction.
AuctionOutcome
Provides temporal context for an outcome by associating it with a specific auction time interval.
AuctionSolveRequest
Configuration for scheduling and running a batch auction.
AuthData
An authorization defines a portfolio and associates some data. This data describes any trading constraints, as well as a default demand curve to associate to the portfolio.
AuthHistoryRecord
A record of the authorization’s data at the time it was updated or defined
AuthId
A UUID newtype
AuthRecord
A full description of an authorization
BidderId
A UUID newtype
Bound
A newtype wrapper around an optional float, with convenience methods to specify an infinite-fallback.
Config
Flow trading takes place within a context. This config describes this context.
Constant
A representation of a flat demand curve supporting interval, half-line, and full-line trading domains
CostData
A cost defines a group and associates some data to it. This data describes the utility implied by trades in the form of a demand curve.
CostHistoryRecord
A record of the cost’s data at the time it was updated or defined
CostId
A UUID newtype
CostRecord
A full description of a cost
Curve
A representation of a piecewise-linear, weakly monotone decreasing demand curve
DateTimeRangeQuery
A query type for dealing with datetime ranges
DateTimeRangeResponse
The paginated response to a datetime query
Group
A hashmap with deterministic ordering
Outcome
An outcome represents the result of an auction for a particular auth or product.
Point
A representation of a point for use in defining piecewise-linear curves
Portfolio
A hashmap with deterministic ordering
ProductData
A description of a product in a forward market
ProductId
A UUID newtype
ProductQuery
A query for searching for known products
ProductQueryResponse
Standard response format for product queries.
ProductRecord
A product record combines a standard product ID with implementation-specific data.
RawAuctionInput
A struct containing the raw auth and cost records for the stated auction interval.
SubmissionRecord
A submission represents a bidder’s complete set of active authorizations and costs that are considered for auction processing.

Enums§

DemandCurve
A demand curve over (rate, price).
GroupDisplay
Controls whether cost group details should be included in API responses