42 lines
1.6 KiB
Go
42 lines
1.6 KiB
Go
package model
|
|
|
|
// QuoteKind captures v2 quote kind metadata for persistence.
|
|
type QuoteKind string
|
|
|
|
const (
|
|
QuoteKindUnspecified QuoteKind = "unspecified"
|
|
QuoteKindExecutable QuoteKind = "executable"
|
|
QuoteKindIndicative QuoteKind = "indicative"
|
|
)
|
|
|
|
// QuoteLifecycle captures v2 quote lifecycle metadata for persistence.
|
|
type QuoteLifecycle string
|
|
|
|
const (
|
|
QuoteLifecycleUnspecified QuoteLifecycle = "unspecified"
|
|
QuoteLifecycleActive QuoteLifecycle = "active"
|
|
QuoteLifecycleExpired QuoteLifecycle = "expired"
|
|
)
|
|
|
|
// QuoteBlockReason captures v2 non-executability reason for persistence.
|
|
type QuoteBlockReason string
|
|
|
|
const (
|
|
QuoteBlockReasonUnspecified QuoteBlockReason = "unspecified"
|
|
QuoteBlockReasonRouteUnavailable QuoteBlockReason = "route_unavailable"
|
|
QuoteBlockReasonLimitBlocked QuoteBlockReason = "limit_blocked"
|
|
QuoteBlockReasonRiskBlocked QuoteBlockReason = "risk_blocked"
|
|
QuoteBlockReasonInsufficientLiquidity QuoteBlockReason = "insufficient_liquidity"
|
|
QuoteBlockReasonPriceStale QuoteBlockReason = "price_stale"
|
|
QuoteBlockReasonAmountTooSmall QuoteBlockReason = "amount_too_small"
|
|
QuoteBlockReasonAmountTooLarge QuoteBlockReason = "amount_too_large"
|
|
)
|
|
|
|
// QuoteStatusV2 stores execution status metadata from quotation v2.
|
|
type QuoteStatusV2 struct {
|
|
Kind QuoteKind `bson:"kind,omitempty" json:"kind,omitempty"`
|
|
Lifecycle QuoteLifecycle `bson:"lifecycle,omitempty" json:"lifecycle,omitempty"`
|
|
Executable *bool `bson:"executable,omitempty" json:"executable,omitempty"`
|
|
BlockReason QuoteBlockReason `bson:"blockReason,omitempty" json:"blockReason,omitempty"`
|
|
}
|