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 Oracle - Promixityfi
- Account: price-oracle.near | price-oracle.testnet
- Creator: Proximity
- Smart contract: https://github.com/NearDeFi/price-oracle
- Bot to fill contract: https://github.com/NearDeFi/near-price-oracle-bot
Query Assets
- CLI
NEAR_ENV=mainnet near view priceoracle.near get_assets
Get Assets Price
- CLI
NEAR_ENV=mainnet near view priceoracle.near get_price_data
tip
Divide the returned multiplier
by 10000
to obtain the price in USD.