OracleAncillaryInterface

Financial contract facing Oracle interface.

Interface used by financial contracts to interact with the Oracle. Voters will use a different interface.

requestPrice(bytes32 identifier, uint256 time, bytes ancillaryData) public

Enqueues a request (if a request isn’t already present) for the given identifier, time pair.

Time must be in the past and the identifier must be supported.

Parameters:

  • identifier: uniquely identifies the price requested. eg BTC/USD (encoded as bytes32) could be requested.

  • ancillaryData: arbitrary data appended to a price request to give the voters more info from the caller.

  • time: unix timestamp for the price request.

hasPrice(bytes32 identifier, uint256 time, bytes ancillaryData) → bool public

Whether the price for identifier and time is available.

Time must be in the past and the identifier must be supported.

Parameters:

  • identifier: uniquely identifies the price requested. eg BTC/USD (encoded as bytes32) could be requested.

  • time: unix timestamp for the price request.

  • ancillaryData: arbitrary data appended to a price request to give the voters more info from the caller.

getPrice(bytes32 identifier, uint256 time, bytes ancillaryData) → int256 public

Gets the price for identifier and time if it has already been requested and resolved.

If the price is not available, the method reverts.

Parameters:

  • identifier: uniquely identifies the price requested. eg BTC/USD (encoded as bytes32) could be requested.

  • time: unix timestamp for the price request.

  • ancillaryData: arbitrary data appended to a price request to give the voters more info from the caller.

© UMA Project 2018-2019