LogoLogo
Cryptum.ioGitHub
  • 🌐Cryptum
    • What is Cryptum
    • DeFi Market
    • Ecosystem
      • Bitcoin
      • Ethereum
      • Polygon
      • Avalanche C-Chain
      • BNB Chain
      • Cardano
      • Celo
      • Hathor
      • Solana
      • Stellar
      • XRP Ledger
      • Stratus
      • Hyperledger Besu
  • 👝Products
    • Dashboard Analytics
    • Tokenization
    • Crypto Checkout
      • Overview
      • Getting started
      • Checkout Dashboard
        • Creating your Store
        • Customer Checkout screens
        • Analytics
        • Managing Wallets
        • Creating Collections and NFTs
        • Linking Products to NFTs
        • Monitoring Orders
      • Checkout API
        • Authentication
        • Store
        • Orders
          • Handling Orders
    • Wallets
    • DeFi-as-a-Service
    • On & Off Ramp (soon)
    • E-commerce Plugins
      • Wordpress NFT Plugin
        • How to install NFT Plugin
        • Connect your Credentials to NFT Plugin
      • Wordpress Checkout Plugin
        • How to install Checkout Plugin
        • Connect your Credentials to Checkout Plugin
      • Plugins Guides
        • Creating your Store
        • Manage your Wallets
        • Creating Collections and NFTs
        • Linking Products to NFTs
        • Monitoring Orders
        • Monitoring Store (Analytics)
  • 💻Community Edition
    • Overview
    • Architecture
    • Start for free
    • Getting started
    • Dashboard guide
      • 🔑Creating a Project (API Key)
      • 🛠️Start building!
      • 📊Monitoring your Project
      • 📈Monitoring Requests
    • SDK guides
      • Get test currencies
      • Chainlink
        • 📈Price Feeds
        • ⚙️Automation
        • 🎲VRF
        • 🛤️CCIP
        • 🛤️CCIP
        • Project Examples
          • Lottery
          • Send Message CCIP
      • Wallets
      • Balances
      • Prices
      • Tokens
        • EVM Tokens (ERC-20)
        • Solana Tokens (SPL)
        • Cardano Tokens
        • Stellar Tokens
        • XRP Tokens
        • Hathor Tokens
      • NFTs
        • EVM NFTs (Ethereum, Polygon and others)
        • NFTs on Solana
        • NFTs on Hathor Network
      • Queries
        • Wallet information
        • Get transaction by hash
        • Get block information
        • Get transaction receipt by hash
        • Get fees information
        • Get NFT data
        • Get NFT balance
        • Get UTXOs (Unspent transaction outputs)
      • Uniswap
      • Staking
      • Smart Contracts
        • Deploy custom Smart Contracts
        • Loot Box
    • Features and credits
      • Avalanche C Chain
      • Bitcoin
      • BNB Chain
      • Cardano
      • Celo
      • Ethereum
      • Hathor
      • Polygon
      • Solana
      • Stellar
      • XRP Ledger
      • Stratus
    • API guides
      • API Cryptum
      • API Connector
  • 📃GLOSSARY
    • Blockchain terms
    • Cryptum terms
Powered by GitBook
On this page
  1. Community Edition
  2. SDK guides
  3. Chainlink

Price Feeds

PreviousChainlinkNextAutomation

Last updated 1 year ago

Smart contracts often act in real-time on data such as prices of assets. This is especially true in DeFi. For example, Synthetix uses Data Feeds to determine prices on their derivatives platform. Lending and borrowing platforms like AAVE use Data Feeds to ensure the total value of the collateral. Data Feeds aggregate many data sources and publish them on-chain using a combination of the Decentralized Data Model and Off-Chain Reporting.

Step 1

The first prerequisite you will need is the creation of an account and a Project (API Key) on Cryptum Dashboard.

PS: Our dashboard is almost ready! To generate an API Key, contact

Step 2

With a valid Cryptum API Key, you can then instantiate the SDK as follows:

const CryptumSdk = require('cryptum-sdk')

const sdk = new CryptumSdk({
  environment: 'testnet',  // 'testnet', 'mainnet'
  apiKey: "YOUR-API-KEY-HERE",
})

Step 3

Now we must select the function in our SDK:

Get Price By Address

In our SDK, there are enums of contracts for token pairs on Ethereum mainnet and testnet. If you cannot find the pair you desire, check the available .

const address = sdk.chainlink.feeds.MAINNET.ETHEREUM.ADA_USD

const price = await sdk.chainlink.getPricesByAddress({
    protocol: "ETHEREUM",
    address: address
})

Get Price By Asset

List currency price quotations

const price = await sdk.chainlink.getPrices({
    protocol: "ETHEREUM",
    asset: 'ETH'
})
// Prices {
//   "USD": 0.3495,
//   "BTC": 7.35687406736623e-06,
// }

💻
📈
Read more about Chainlink Data Feeds
hello@blockforce.in
Price Feeds Addresses