33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
package model
|
|
|
|
// QuoteState captures v2 quote state metadata for persistence.
|
|
type QuoteState string
|
|
|
|
const (
|
|
QuoteStateUnspecified QuoteState = "unspecified"
|
|
QuoteStateIndicative QuoteState = "indicative"
|
|
QuoteStateExecutable QuoteState = "executable"
|
|
QuoteStateBlocked QuoteState = "blocked"
|
|
QuoteStateExpired QuoteState = "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 {
|
|
State QuoteState `bson:"state,omitempty" json:"state,omitempty"`
|
|
BlockReason QuoteBlockReason `bson:"blockReason,omitempty" json:"blockReason,omitempty"`
|
|
}
|