Documentation ¶
Index ¶
Constants ¶
View Source
const (
APIPathPrefix = "/api/v1"
)
View Source
const (
StatusAvailable = "available"
)
Response constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthZResponse ¶
type HealthZResponse struct { Status string `json:"status" yaml:"status"` Oracle struct { LastSync string `json:"last_sync"` } `json:"oracle"` }
HealthZResponse defines the response type for the healthy API handler.
type Oracle ¶
type Oracle interface { GetLastPriceSyncTimestamp() time.Time GetPrices() types.CurrencyPairDec GetTvwapPrices() types.CurrencyPairDecByProvider GetVwapPrices() types.CurrencyPairDecByProvider }
Oracle defines the Oracle interface contract that the v1 router depends on.
type PricesPerProviderResponse ¶
type PricesPerProviderResponse struct {
Prices types.CurrencyPairDecByProvider `json:"providers"`
}
type PricesResponse ¶
type PricesResponse struct {
Prices types.CurrencyPairDec `json:"prices"`
}
PricesResponse defines the response type for getting the latest exchange rates from the oracle.
Click to show internal directories.
Click to hide internal directories.