service backend
All checks were successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful

This commit is contained in:
Stephan D
2025-11-07 18:35:26 +01:00
parent 20e8f9acc4
commit 62a6631b9a
537 changed files with 48453 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package model
// CrossRateConfig describes how to synthetically derive a currency pair using
// two other pairs connected by a pivot currency.
type CrossRateConfig struct {
Enabled bool `bson:"enabled" json:"enabled"`
PivotCurrency string `bson:"pivotCurrency,omitempty" json:"pivotCurrency,omitempty"`
BaseLeg CrossRateLeg `bson:"baseLeg" json:"baseLeg"`
QuoteLeg CrossRateLeg `bson:"quoteLeg" json:"quoteLeg"`
}
// CrossRateLeg identifies a supporting currency pair and optional overrides to
// fetch or orient its pricing data for cross-rate calculations.
type CrossRateLeg struct {
Pair CurrencyPair `bson:"pair" json:"pair"`
Invert bool `bson:"invert,omitempty" json:"invert,omitempty"`
Provider string `bson:"provider,omitempty" json:"provider,omitempty"`
}