Fetch Oracle
  • Welcome to Fetch
  • THE BASICS
    • What Problem Does Fetch Solve?
    • What Can You Do With Fetch?
    • The FETCH Token
    • Staking
    • Contracts Overview
    • Contract Addresses
    • Contributing
    • Audits
  • REPORTING DATA
    • How to Report Data
    • Requirements
      • (Optional) Using Cloud Hosting
    • Installing Telliot
      • Adding Accounts
      • MAC Virtual Machine with UTM
    • Reporting With Telliot
      • Reporting Options
      • Discord Notifications
    • Gas Fees
    • Add support for a new spot price
  • GETTING DATA
    • Tipping
    • Receiving Data From Fetch
    • Solidity
    • User Checklists
    • Testnet
    • Creating a Query
  • VOTES & DISPUTES
    • Voting
    • Disputing
    • Introduction to DVM
      • Installing DVM
      • Monitoring
  • OPTIONAL CONFIGS
    • Claim Tip Script ENV Config
  • Connect
    • Whitepaper
    • Telegram
    • Twitter/X
    • YouTube
Powered by GitBook
On this page
  1. GETTING DATA

Receiving Data From Fetch

This page is about consuming data from Fetch Oracle in your own smart contract.

PreviousTippingNextSolidity

Last updated 8 months ago

Querying Information

The Fetch Oracle system allows users to request specific pieces of data. Meanwhile, reporters can then submit those values.

Every piece of data that is requested, reported, and retrieved within the Fetch system is associated with a Query Type, Query Data, and a specific identifier known as the Query ID.

A Query Type is a specification for custom data you want to receive from the oracle. It defines the parameters of a Query that users can input for their specific requests. For example:

Query Type - SpotPrice

  1. asset

    • description: Asset ID (e.g. PLS)

    • value type: string

  2. currency

    • description: Selected currency (e.g. USD)

    • value type: string

To generate a new SpotPrice Query ID, use the .

Query Data is used to form your new Query's unique identifier, or Query ID.

It's also emitted in data submission and payment contract events, allowing Fetch users and reporters can programmatically construct query objects.

The Query ID is your Query's unique identifier and the hash of the Query Data. It's required for submitting, retrieving, and paying for all data in the ecosystem.

To generate a query ID, use this simple tool:

Query ID Builder
Get A Query ID
Query ID Builder
Logo
Example QueryData and QueryID