Skip to main content

For AI agents: the complete documentation index is at llms.txt. Markdown versions of pages are available by appending .md to the URL or sending Accept: text/markdown.

IPriceAdapterRegistry

IPriceAdapterRegistry​

Interface for the price adapter registry

setPriceAdapter​

function setPriceAdapter(address asset, contract IPriceAdapter adapter) external

Register or replace the price adapter for an asset.

Parameters​

NameTypeDescription
assetaddressThe address of the asset.
adaptercontract IPriceAdapterThe price adapter for the asset.

getPrice​

function getPrice(address asset) external view returns (uint256)

Returns the price of the given asset via its assigned price adapter.

The asset shall be whitelisted in the OrionConfig contract, therefore assigned an adapter in adapterOf. Returned value is always expected to have priceAdapterDecimals decimals.

Parameters​

NameTypeDescription
assetaddressThe address of the asset.

Return Values​

NameTypeDescription
[0]uint256The price of the asset, normalized to priceAdapterDecimals decimals.