Flipside TeamDaily Ref Finance Revenue
    Updated 2024-11-13
    with tb1 as ( select trunc(hour,'day') as day,
    'aurora' as token_address,
    avg(price) as avg_price
    from near.price.ez_prices_hourly
    where symbol = 'ETH'
    group by 1,2
    UNION
    select trunc(hour,'day') as day,
    '3.contract.portalbridge.near' as token_address,
    1 as avg_price
    from near.price.ez_prices_hourly
    where symbol = 'ETH'
    UNION
    Select trunc(TO_TIMESTAMP(value[0]::string),'day') as day,
    'usmeme.tg' as token_address,
    avg(value[1]) as avg_price
    from (
    SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/usmeme/market_chart?vs_currency=usd') as resp
    )
    ,LATERAL FLATTEN (input => resp:data:prices)
    group by all
    UNION
    Select trunc(TO_TIMESTAMP(value[0]::string),'day') as day,
    'token.jumbo_exchange.near' as token_address,
    avg(value[1]) as avg_price
    from (
    SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/jumbo-exchange/market_chart?vs_currency=usd') as resp
    )
    ,LATERAL FLATTEN (input => resp:data:prices)
    group by all
    UNION
    Select trunc(TO_TIMESTAMP(value[0]::string),'day') as day,
    'celo.token.a11bd.near' as token_address,
    avg(value[1]) as avg_price
    Last run: 3 months ago
    DAILY
    Swappers
    Swaps
    Volume
    PROTOCOL_FEES
    PROTOCOL_REVENUE
    1
    2023-11-19 00:00:00.00034028485707772853.885570.777
    2
    2023-11-20 00:00:00.000406343612659286329.641265.928
    3
    2023-11-21 00:00:00.00035134307512513756.255751.251
    4
    2023-11-22 00:00:00.00028221447668943834.47766.894
    5
    2023-11-23 00:00:00.00030917504906622453.31490.662
    6
    2023-11-24 00:00:00.00031221125237922618.96523.792
    7
    2023-11-25 00:00:00.00029727053129811564.905312.981
    8
    2023-11-26 00:00:00.00029124753639121819.56363.912
    9
    2023-11-27 00:00:00.00030320217998853999.425799.885
    10
    2023-11-28 00:00:00.00028019253331351665.675333.135
    11
    2023-11-29 00:00:00.00039224007048333524.165704.833
    12
    2023-11-30 00:00:00.00027517952841531420.765284.153
    13
    2023-12-01 00:00:00.00030013264343772171.885434.377
    14
    2023-12-02 00:00:00.00031816204336302168.15433.63
    15
    2023-12-03 00:00:00.000329201211067965533.981106.796
    16
    2023-12-04 00:00:00.000545689815564797782.3951556.479
    17
    2023-12-05 00:00:00.00069810950288150514407.5252881.505
    18
    2023-12-06 00:00:00.0005427011268277113413.8552682.771
    19
    2023-12-07 00:00:00.000433380610121555060.7751012.155
    20
    2023-12-08 00:00:00.0007334609220671111033.5552206.711
    ...
    366
    23KB
    386s