April 2017
Intermediate to advanced
266 pages
7h 4m
English
To send a query to Oraclize, you will need to call the oraclize_query function. This function expects at least two arguments, that is, the data source and the input for the given data source. The data source argument is not case-sensitive.
Here are some basic examples of the oraclize_query function:
oraclize_query("WolframAlpha", "random number between 0 and 100"); oraclize_query("URL", "https://api.kraken.com/0/public/Ticker?pair=ETHXBT"); oraclize_query("IPFS", "QmdEJwJG1T9rzHvBD8i69HHuJaRgXRKEQCP7Bh1BVttZbU"); oraclize_query("URL", "https://xyz.io/makePayment", '{"currency": "USD", "amount": "1"}');
Here is how the preceding code works: