0

I wonder if it's possible to call oraclize JUST ONCE, and get results from different APIs.

oraclize_query("URL" , "['json1' , 'json2']");

The problem that I have is that the API that I'm using does not allow to get two values from one call. Therefore I need to call it twice. So I wonder if I can call oraclize one time and get those two values.

Thanks

1

So I wonder if can can call oraclize one time and get those two values.

You can call oraclize query once and send two inputs, but unfortunatelly you can call only one API.

I will list below all the queries available in Oraclize API at the moment.


pragma solidity ^0.4.18;

contract OraclizeI {
    function query(uint _timestamp, string _datasource, string _arg) external payable returns (bytes32 _id);
    function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) external payable returns (bytes32 _id);
    function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) public payable returns (bytes32 _id);
    function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) external payable returns (bytes32 _id);
    function queryN(uint _timestamp, string _datasource, bytes _argN) public payable returns (bytes32 _id);
    function queryN_withGasLimit(uint _timestamp, string _datasource, bytes _argN, uint _gaslimit) external payable returns (bytes32 _id);
}

Source

1
  • It's too bad this isn't in the official docs right now
    – AlexG
    Mar 9 '18 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.