price_oracle.oracle
Documentation for eth_defi.price_oracle.oracle Python module.
Price oracle core functionality.
This core mechanism is used by outside event feeders,
like eth_defi.uniswap_v2.oracle
.
Functions
|
Calculate TWAP price over all entries in the buffer. |
Classes
Base class for price oracles. |
|
Always use the same hardcoded exchange rate. |
|
A single source entry for price calculations. |
|
A callable for calcualte |
|
Price oracle core. |
|
Different price entry sources. |
|
Return a price for a token we trust we can always redeem for 1 USD. |
Exceptions
We do not have enough events for a longer period of time. |
|
The price buffer data does not have recent enough entries.. |
|
The price buffer does not have enough data. |
|
Something wrong with price calculation. |