How can I fetch the current dollar price of BNB in a Solidity smart contract? Are there any recommended APIs or secure, decentralized methodologies for this?Is there a way to fetch the dollar price within the contract on the Binance Smart Chain mainnet without incurring gas fees?
1 Answer
Chainlink Data Feeds provide a secure, reliable, and decentralized source of off-chain data to power unique smart contract use cases for DeFi and beyond.
Use Chainlink: https://data.chain.link/bsc/mainnet/crypto-usd/bnb-usd
https://bscscan.com/address/0x0567f2323251f0aab15c8dfb1967e4e8a7d42aee#readContract#F10