Skip to main content

Solidity API

IPriceAdapter

Interface for price adapters

getPriceData

function getPriceData(address asset) external view returns (uint256 price, uint8 decimals)

Get the price data for an asset

The asset shall be whitelisted in the OrionConfig contract. The registry will handle normalization to priceAdapterDecimals.

Parameters

NameTypeDescription
assetaddressThe address of the asset to get the price for

Return Values

NameTypeDescription
priceuint256The raw price of the asset
decimalsuint8The number of decimals for the returned price