HereĀ is a list of sources from which Oraclize lets smart contracts fetch data:
- URL: The URL data source provides you with the ability to make an HTTP GET or POST request, that is, fetch data from the WWW.
- WolframAlpha: The WolframAlpha data source provides you with the ability to submit a query to the WolframAlpha knowledge engine and get the answer.
- Blockchain: The blockchain data source provides you with ability to access data from other blockchains. Possible queries that can be submitted to the blockchain data source are bitcoin blockchain height, litecoin hashrate, bitcoin difficulty, 1NPFRDJuEdyqEn2nmLNaWMfojNksFjbL4S balance, and so on.
- IPFS: The IPFS data source provides you with the ability to fetch the content of a file stored in IPFS.
- Nested: The nested data source is a metadata source; it does not provide access to additional services. It was designed to provide a simple aggregation logic, enabling a single query to leverage sub-queries based on any available data source and producing a single string as a result; for example:
[WolframAlpha] temperature in ${[IPFS] QmP2ZkdsJG7LTw7jBbizTTgY1ZBeen64PqMgCAWz2koJBL}.
- Computation: The computation data source enables the auditable execution of a given application into a secure off-chain context; that is, it lets us fetch the result of an off-chain execution of an application. This application has to print the query result on the last line (on the standard output) before its quits. The execution context has to be described by a Dockerfile, where building and running it should start your main application straight away. The Dockerfile initialization plus your application execution should terminate as soon as possible: the maximum execution timeout is 5 minutes on an AWS t2.micro instance. Here, we are considering an AWS t2.micro instance because that's what Oraclize will use to execute the application. As the input for the data source is the IPFS multihash of a ZIP archive containing such files (Dockerfile plus any external file dependencies, and the Dockerfile has to be placed in the archive root), you should take care of preparing this archive and pushing it to IPFS beforehand.
These data sources are available at the time of writing this book. But many more data sources are likely to be available in the future.