# Oracle Proxy

Oracle is the primary endpoint for reading and writing asset information. As a user, you can use the various read endpoints.

Returns a single PriceTick object with a median price. The

`type`

field in the response object will indicate the median. The median is returned either as an on-chain (on L2) computed median, or during testing, may be a median calculation done off-chain.get

OracleProxy

/get_value

Retrieve a single value for an asset

Returns a PriceAggregate object containing more advanced price calculation. For example, the median price calculation is a liquidity weighted price, computed as follows:

$\sum_1^n\frac{midprice_i*liquidity_i}{liquidity_i}$

where liquidity is defined as

$\frac{\sum_{midprice-1\%}^{midprice}bidPrice_i*bidVolume_i+\sum_{midprice}^{midprice+1\%}askPrice_i*askVolume_i}{2}$

Why use

**instead of**`get_value`

**, which contains more data about an asset? Consider the bundle to be reflective of the more detailed financial data, such as liquidity, used by more complex DeFi applications. At present, both endpoints can be used interchangeably, but expect the methods to differentiate in the future.**`get_bundle`

get

OracleProxy

/get_price_bundle

Retrieves a bundle of statistics about the asset

This method is not yet implemented; coming Sep 2022.

get

OracleProxy

/get_values

Retrieves all applicable prices

Last modified 1yr ago