prices.usd
, since it covers all assets that are traded on any of the decentralized exchanges that are indexed in dex.trades
.prices.usd
.dex.trades
. It will assign asset prices based on a trading pair which has a pricefeed in prices.usd
.prices.usd
prices.usd
usd_amount
to this trade based on the $ETH price data in prices.usd
.usd_amount
is $23,498.5 * price of ETH (4.699,6) = $23,498
usd_amount
recorded in dex.trades
.$23,498/1,086,083 ≈ $0,02163
median_price
per hour.prices.usd
.dex.trades
and prices.prices_from_dex_data
are not able to pick up this price.dex.trades
will only have a usd_amount
for illiquid pairs of this asset. In this case, the $PLAY/$ETH pool has trades once in a while and these will have a usd_amount
in dex.trades
. The liquidity of the $PLAY/$ETH pool is very low and it pretty much only consists of arbitrage trades. Therefore, the resulting pricefeed in prices.prices_from_dex_data
is faulty since it depends on the usd_amount
in dex.trades
.prices.prices_from_dex_data
in order to make sure arbitrage trades do not disturb the price feed constructed. A simple way of validating that the script is working with the right pools is checking the sample_size
column. If the number seems suspiciously low, the script probably doesn't pick up the right price.