V3 Technical Docs
  • Deployed Contracts
    • Notional V3
      • Ethereum Mainnet
      • Arbitrum
  • Security
    • Audits
    • Bug Bounty
  • Currency Ids & Precision
    • Currency Ids
    • Market Indexes
    • Notional Internal Precision
  • Contract interaction guides
    • Intro
    • Trading guide
      • Deposit (Prime Lend)
      • Trade fCash (Borrow & Lend Fixed)
      • Add liquidity (Mint nTokens)
      • Withdraw liquidity (Redeem nTokens)
      • Withdraw (Prime Cash)
      • Settle Account
      • Enter Leveraged Vaults
      • Exit Leveraged Vaults
    • Accounts
    • Prime Cash Markets
    • fCash Markets
    • nTokens
    • Leveraged Vaults
    • Oracles
    • Governance parameters
  • Subgraph guides
    • Notional V3 Subgraphs
      • Fetch Notional Accounts
      • Fetch Notional's reserves
      • Fetch Notional nToken accounts
      • Fetch Historical Trades
      • Fetch an Account's P&L
      • Fetch current fCash and Prime Cash Rates
      • Fetch Historical Prime Cash & Prime Debt Exchange Rates
      • Fetch Prime Cash Market Balances
      • Fetch fCash Market Balances
      • Fetch Outstanding Debt
      • Fetch Historical nToken Exchange Rates
      • Fetch ETH Oracle Exchange Rates
      • Fetch Annual Incentive Rates
      • Fetch Interest Rate Models
      • Fetch Governance Parameters
  • Dune Dashboard
  • Notional Risk Docs
  • Notional V3 Docs
  • Notional Blog
Powered by GitBook
On this page
  • Fetch the Price Oracle Address for a given currency
  • ETH Price Oracle Exchange Rates
  1. Contract interaction guides

Oracles

Fetch the Price Oracle Address for a given currency

The getRateStorage method can be used to fetch the addresses of price oracles used by the Notional protocol:

# Fetch the DAI/ETH price oracle address.
DaiEthOracleAddress = notional.getRateStorage(2)["ethRate"]["rateOracle"]

# Fetch the USDC/ETH price oracle address.
UsdcEthOracleAddress = notional.getRateStorage(3)["ethRate"]["rateOracle"]

ETH Price Oracle Exchange Rates

The getCurrencyAndRates method can be used to fetch the current ETH price oracles used to value accounts in the Notional system:

# Fetch the DAI/ETH price oracle exchange rate.
notional.getCurrencyAndRates(2)["ethRate"]["rate"]/notional.getCurrencyAndRates(2)["ethRate"]["rateDecimals"]

# Fetch the USDC/ETH price oracle exchange rate.
notional.getCurrencyAndRates(3)["ethRate"]["rate"]/notional.getCurrencyAndRates(3)["ethRate"]["rateDecimals"]
PreviousLeveraged VaultsNextGovernance parameters

Last updated 11 months ago