Query editor
with tok as (select contract_address, max(symbol) as symbol, max(decimals) as decimalsfrom tokens.erc20 where blockchain='ethereum' group by 1)selects.call_block_time,coalesce(t0.symbol,'?')||' / '||coalesce(t1.symbol,'?') as pair,round(cast(s.amounts[1] as double)/power(10,coalesce(t0.decimals,18)),4) as amt_token0,round(cast(s.amounts[2] as double)/power(10,coalesce(t1.decimals,18)),4) as amt_token1,round(100.0*(power(cast(bytearray_to_uint256(bytearray_substring(s.strategy,243,32)) as double)/nullif(cast(bytearray_to_uint256(bytearray_substring(s.strategy,211,32)) as double),0),2)-1),4) as range_width_pct,power(cast(bytearray_to_uint256(bytearray_substring(s.strategy,211,32)) as double)/1e18,2)*power(10,coalesce(t0.decimals,18)-coalesce(t1.decimals,18)) as price_lo,power(cast(bytearray_to_uint256(bytearray_substring(s.strategy,243,32)) as double)/1e18,2)*power(10,coalesce(t0.decimals,18)-coalesce(t1.decimals,18)) as price_hi,cast(bytearray_to_uint256(bytearray_substring(s.strategy,277,4)) as double)/1e7 as fee_pctfrom oneinch_multichain.aquarouter_call_ship sleft join tok t0 on t0.contract_address=s.tokens[1]left join tok t1 on t1.contract_address=s.tokens[2]where s.chain='ethereum' and s.call_successand bytearray_substring(s.strategy,45,20) = 0x1893f0f96b35719d0412546e33510ef7c313c906order by s.call_block_time desc