rezarwzDaily bets and volume base on markets
    Updated 2025-02-26
    with markets_data as (
    WITH api_data AS (
    SELECT
    PARSE_JSON(
    livequery.live.udf_api(
    'https://api.dune.com/api/v1/query/4114067/results/?api_key=lJ1CV9LcjSB6qiqiOZOjZEVLFzwHNfmM'
    )
    ) AS resp
    )
    SELECT
    VALUE:Title as Market_Title,
    value:q_Title as Question_Title,
    value:token0 as token0,
    value:token1 as token1
    FROM
    api_data,
    LATERAL FLATTEN(input => resp:data:result:rows)
    ),
    all_bets as (
    SELECT
    ev.tx_hash as tx_hash,
    ev.block_Timestamp as block_Timestamp,
    DECODED_LOG:fee,
    DECODED_LOG:maker,
    DECODED_LOG:makerAmountFilled / pow(10, 18) as maker_amount,
    DECODED_LOG:makerAssetId,
    DECODED_LOG:taker,
    DECODED_LOG:takerAmountFilled / pow(10, 18) as taker_amount,
    DECODED_LOG:takerAssetId,
    CASE
    WHEN decoded_log:takerAssetId = 0 then decoded_log:takerAmountFilled
    when decoded_log:makerAssetId = 0 then decoded_log:makerAmountFilled
    end / 1e18 as Amount_USD,
    CASE
    WHEN decoded_log:takerAssetId = 0 then decoded_log:makerAssetId
    when decoded_log:makerAssetId = 0 then decoded_log:takerAssetId
    Last run: about 2 months ago
    DATE
    Market Title
    AMOUNT_USD
    # of Bets
    1
    2024-10-12 00:00:00.000
    Pennsylvania Presidential Election Winner
    7270.52774161346
    2
    2024-10-30 00:00:00.000
    Which party wins Presidency + Popular Vote?
    5008.81714285758
    3
    2024-11-09 00:00:00.000
    Solana ETF approved in 2024?
    5808.856738
    4
    2024-11-11 00:00:00.000
    Champions League Winner
    28049.726244184
    5
    2024-11-16 00:00:00.000
    Will Elon Musk be a member of the Trump administration?
    13710.05658
    6
    2024-11-27 00:00:00.000
    What game will win the Game Of the Year Award in 2024?
    10940.400012122
    7
    2024-12-01 00:00:00.000
    Will Binance list Blast before the Blast Season 2 airdrop happens?
    660.63283664
    8
    2024-12-13 00:00:00.000
    Champions League Winner
    36309.68
    9
    2025-01-15 00:00:00.000
    Will BTC be above $100,000 on January 15th?
    1402.54596270
    10
    2024-10-08 00:00:00.000
    Will Polymarket launch a token in 2024?
    19065.63956116394
    11
    2024-10-25 00:00:00.000
    Will Trump say "NAFTA" during Michigan rally on October 25?
    7.9386
    12
    2024-11-07 00:00:00.000
    Will SOL hit $150 or $230 first?
    572.1196420
    13
    2024-11-07 00:00:00.000
    When will Polymarket's "Presidential Election Winner 2024" market resolve?
    1557.4156
    14
    2024-11-17 00:00:00.000
    Will SOL hit $150 or $230 first?
    34188.788158108
    15
    2024-12-11 00:00:00.000
    Ethereum all time high in 2024?
    18918.627858168
    16
    2024-12-16 00:00:00.000
    Fed Interest Rates: December 2024
    99377.4224158
    17
    2025-02-10 00:00:00.000
    Will Trump create a national Bitcoin reserve?
    346.755610
    18
    2024-12-11 00:00:00.000
    Will pump.fun be banned in the US in 2024?
    11859.0538
    19
    2024-11-12 00:00:00.000
    Who will be inaugurated as President?
    13859.6915118
    20
    2024-11-30 00:00:00.000
    Solana ETF approved in 2024?
    1059.590412
    ...
    4207
    355KB
    10s