BaseTOSHI Parameters
    Updated 2024-09-13




    with flow as (
    WITH json as (
    SELECT
    livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=toshi&order=market_cap_desc&per_page=100&page=1&sparkline=false&locale=en'
    ) as resp
    )

    SELECT
    value:market_cap as market_cap,
    value:total_supply as total_supply,
    value:high_24h as high_24h,
    value:low_24h as low_24h,
    value:price_change_percentage_24h as price_change_percentage_24h,
    value:market_cap_change_percentage_24h as market_cap_change_percentage_24h,
    value:ath as ath,
    value:ath_change_percentage as ath_change_percentage,
    value:atl as atl,
    value:atl_change_percentage as atl_change_percentage,
    value:circulating_supply as circulating_supply,
    value:market_cap_rank as market_cap_rank,
    value:total_volume as trading_volume,
    value:current_price as current_price,
    FROM json,
    LATERAL FLATTEN(input => json.resp:data) as value
    )


    SELECT
    current_price,
    round(price_change_percentage_24h,2) as price_change_percentage_24h,
    round(market_cap,2) as "Marketcap",
    QueryRunArchived: QueryRun has been archived