Receiving Data From Fetch

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

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 ID Builder.

Last updated