cybergenlabHistorical Token Prices
    Updated 2025-02-11
    with token_meta as (
    select
    value:PLATFORM::string as platform,
    value:POOL_ADDRESS::string as pool_address,
    value:TOKEN_NAME::string as name,
    value:TICKER::string as ticker,
    value:TOKEN_ADDRESS::string as token_address,
    value:DECIMALS::numeric as decimals,
    value:SUPPLY::numeric as supply
    from (
    select
    livequery.live.udf_api('https://flipsidecrypto.xyz/api/v1/queries/7aa557ad-d182-4403-b9ca-8a4b774530a3/data/latest') as response
    ), lateral FLATTEN (input => response:data)
    order by 1 desc
    )

    , weth_price as (
    select
    date_trunc('day', hour) as date,
    avg(price) as price
    from base.price.ez_prices_hourly
    where symbol = 'WETH'
    and date_trunc('day', hour) = current_date()
    group by 1
    )

    , token_price_usdc as (
    select
    date_trunc('day', block_timestamp) as date,
    symbol_out,
    price as eth_price,
    avg((amount_out_usd/amount_out)) as price
    from base.defi.ez_dex_swaps, weth_price
    where contract_address in (select pool_address from token_meta)
    and symbol_out in ('CONVO','LUNA', 'AIXBT')
    and symbol_in= 'USDC'
    Last run: 2 months ago
    DATE
    SYMBOL_OUT
    PRICE
    1
    2025-01-08 00:00:00.000CONVO0.04203053511
    2
    2024-12-17 00:00:00.000AIXBT0.2318223726
    3
    2025-02-02 00:00:00.000CONVO0.01069378422
    4
    2024-11-22 00:00:00.000LUNA0.0371204395
    5
    2024-12-16 00:00:00.000AIXBT0.2751548183
    6
    2024-12-17 00:00:00.000LUNA0.09921662927
    7
    2024-10-30 00:00:00.000SEKOIA0.001347402508
    8
    2025-01-18 00:00:00.000GAME0.1319447948
    9
    2024-12-23 00:00:00.000SEKOIA0.02438432236
    10
    2024-12-18 00:00:00.000SEKOIA0.01297457222
    11
    2025-02-05 00:00:00.000GAME0.04726750801
    12
    2025-02-07 00:00:00.000SEKOIA0.01091300379
    13
    2025-02-04 00:00:00.000GAME0.05306985021
    14
    2024-12-16 00:00:00.000GAME0.07520301719
    15
    2024-11-01 00:00:00.000SEKOIA0.001139672591
    16
    2024-10-30 00:00:00.000LUNA0.1143779357
    17
    2024-12-20 00:00:00.000AIXBT0.2649221615
    18
    2024-10-28 00:00:00.000LUNA0.1690334412
    19
    2024-12-30 00:00:00.000CONVO0.06049446886
    20
    2024-11-02 00:00:00.000GAME0.01005405974
    ...
    640
    31KB
    22s