Oracle

The Oracle Contract returns the price data for the entire Money Market and the Perps Platform. It utilizes multiple price sources, ranging from external oracles like Pyth or Slinky, to TWAP and Spot.

Deployments

Neutron: neutron1dwp6m7pdrz6rnhdyrx5ha0acsduydqcpzkylvfgspsz60pj2agxqaqrr7g

Osmosis: osmo1mhznfr60vjdp2gejhyv2gax9nvyyzhd3z0qcwseyetkfustjauzqycsy2g


Types

The types of the Oracle Contract can be found here.

For reference on the Queries and Methods:

Base Types
type Decimal = string

Queries

config

Returns the Contracts configuration.

Query message
{
    config: {}    
}
Return output
{
    data: {
        base_denom: string
        owner: string | null
        proposed_new_owner: string | null
    }
}

price

Query message
{
    price: {
        denom: string
        kind?: 'default' | 'liquidation' | null
    }  
}
Return output
{
    data: {
        denom: string
        price: Decimal
    }
}

price_source

Query message
{
    price_source: {
        denom: string
    }
}
Return output
{
    data: {
        denom: string
        price_source: string
    }
}

price_sources

Query message
{
    price_sources: {
        limit?: number | null
        start_after?: string | null
    }
}
Return output
{
    data: [
        {
            denom: string
            price_source: string
        },
        ...
    ]   
}

prices

Query message
{
    prices: {
        kind?: 'default' | 'liquidation' | null
        limit?: number | null
        start_after?: string | null
    } 
}
Return output
{
    data: {
        
    }
}

prices_by_denoms

Query message
{
    prices_by_denoms: {
        denoms: string[]
        kind?: 'default' | 'liquidation' | null
    }
}
Return output
{
    data: [
        {
            denom: string
            price: Decimal    
        },
        ...
    ]
}

Methods

Only the owner of the contract can call its methods. That's why they are not part of the documentation.

Last updated