Skip to main content

Decentralized Oracles

Oracles are smart contracts that enable you to query the current price of an asset. Since smart contracts cannot connect to internet and pull information, Oracles rely on having someone constantly updating their prices. Because of that, be mindful when using an oracle that there might be a delay between the market's latest information and the Oracles data.

In contrast with FT and NFT, Oracle contract's are not standardized. We will here list different providers and how to use their Oracle as they are built.

Price Oracles

Native Oracle

Query Assets

NEAR_ENV=mainnet near view priceoracle.near get_assets

Get Assets Price

NEAR_ENV=mainnet near view priceoracle.near get_price_data

Divide the returned multiplier by 10000 to obtain the price in USD.