Price Oracle

MatchingEngine contract manages API for price oracles on orderbook exchange. To get price data on Standard, Solidity developers use IMatchingEngine interface to call its functions.

pragma solidity ^0.8.24;
import {IMatchingEngine} from "standard3.0-contracts/src/exchange/interfaces/IMatchingEngine.sol";

contract CLOBOracle {
    IMatchingEngine public matchingEngine;
 
    constructor(address _engine) {
        matchingEngine = IMatchingEngine(_engine);
    }

    function mktPrice(address base, address quote) public view returns (uint256 price) {
        return matchingEngine.mktPrice(
            base,
            quote,
        );
    }
}

Price Oracle

Bid/Ask Heads

Market Suspensions

  • GetSpreads()

Last updated