19 lines
824 B
Go
19 lines
824 B
Go
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"`
|
|
}
|