service backend
This commit is contained in:
18
api/fx/storage/model/cross.go
Normal file
18
api/fx/storage/model/cross.go
Normal 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user