0xcypherDaily Stats copy
    Updated 2025-01-22
    -- forked from flyingfish / Daily Stats @ https://flipsidecrypto.xyz/flyingfish/q/kJk63ieEYvrC/daily-stats
    /* with cte1 AS (
    SELECT live.udf_api(
    'https://ipfs.io/ipfs/QmTnw8jdV9epXTYGWtP9nFCH1BtuXYRQp6FECcVNi3kuuE'
    ) AS response
    ) */
    with cte1 AS (
    SELECT
    livequery.live.udf_api(
    'GET',
    'https://science.flipsidecrypto.xyz/googlesheets/readsheet',
    { 'Content-Type': 'application/json' },
    { 'sheets_id': '1QMy-OCO8NFtb7chUXcAvWARPkgpvmK9Y5K0tXpMEGUI',
    'tab_name': 'base' }
    ) as response
    ),
    my_data AS (
    SELECT
    value:date_str :: date AS date,
    value:increase_calls :: integer AS increase_calls,
    value:inc_users :: integer AS inc_users,
    value:opens :: integer AS opens,
    value:add_collateral_actions :: integer AS add_collateral_actions,
    value:added_collateral :: float AS added_collateral,
    value:long_collateral :: float AS long_collateral,
    value:short_collateral :: float AS short_collateral,
    value:increase_fees_usd :: float AS increase_fees_usd,
    value:positions :: integer AS positions,
    value:longs :: integer AS longs,
    value:shorts :: integer AS shorts,
    value:inc_position_size_usd :: float AS inc_position_size_usd,
    value:inc_long_position_size_usd :: float AS inc_long_position_size_usd,
    value:inc_short_position_size_usd :: float AS inc_short_position_size_usd,
    value:decrease_calls :: integer AS decrease_calls,
    value:reduce_collateral_actions :: integer AS reduce_collateral_actions,
    value:full_close_actions :: integer AS full_close_actions,
    Last run: 3 months ago
    DATE
    TOTAL_FEES
    POOL_USD_AMOUNT
    PERCENT_PROFIT
    APR
    APY
    APR_7_DAY_AVG
    APY_7_DAY_AVG
    APR_30_DAY_AVG
    APY_30_DAY_AVG
    1
    2025-01-20 00:00:00.0002872983.1411723351519.110940.12545.62557.812636.28621428647.47698571421.69803333326.720573333
    2
    2025-01-19 00:00:00.0003582519.0111744601776.303050.15456.2175.432141.05207142956.403920.84758333325.53603
    3
    2025-01-18 00:00:00.0005039478.1041805549178.39280.209376.3945114.665733.82507142946.45388571421.70776666727.25751
    4
    2025-01-17 00:00:00.0001804318.7381710659147.912150.079128.871533.470523.80321428630.99312857125.0718539.73011
    5
    2025-01-16 00:00:00.0001200220.5631661589627.358550.054219.78321.875221.31627.94641428625.86998333340.933673333
    6
    2025-01-15 00:00:00.000942776.25141673946355.475620.042215.40316.652423.23485714330.44928571426.38706666741.615356667
    7
    2025-01-14 00:00:00.000689454.0551610105958.079270.032111.716512.430424.99728571432.63734285727.440743.06083
    8
    2025-01-13 00:00:00.0004581410.9431588189273.88080.216478.986120.30126.72842857134.70647142927.70958333343.375656667
    9
    2025-01-12 00:00:00.000330661.38541605657716.371270.01545.6215.78217.86414285720.15697142925.69640.04616
    10
    2025-01-11 00:00:00.000366170.40751608583536.125530.01716.24156.440418.38035714320.71301428626.199740.621336667
    11
    2025-01-10 00:00:00.000674324.97111611597598.705720.031411.46112.143518.505520.846826.83601666741.367583333
    12
    2025-01-09 00:00:00.0001935857.3771594690952.275380.09133.21539.395319.14164285721.576327.37743333342.026823333
    13
    2025-01-08 00:00:00.0001645671.8521623009777.204890.07627.7431.968817.45221428619.355329.41656666745.946406667
    14
    2025-01-07 00:00:00.0001420211.9991630937522.374940.065323.834526.914314.52715.86458571433.455956.324066667
    15
    2025-01-06 00:00:00.0001048721.6211694563143.455460.046416.93618.454513.29121428614.36214285733.2405556.059403333
    16
    2025-01-05 00:00:00.000571417.15631692247611.621440.02539.23459.674313.86478571415.05537142933.31233333356.145353333
    17
    2025-01-04 00:00:00.000444542.96361711110553.233010.01957.11757.376914.02121428615.22787142934.28201666757.37965
    18
    2025-01-03 00:00:00.000992047.06351705597678.733320.043615.91417.2513.96907142915.17198571436.251860.26319
    19
    2025-01-02 00:00:00.0001308223.9041673991039.224570.058621.38923.848313.67185714314.82711428637.0000561.24675
    20
    2025-01-01 00:00:00.000435107.00651641092939.746580.01997.26357.533812.50385714313.43815714338.215563.063046667
    ...
    331
    41KB
    1051s