csp88gForge PnL
    Updated 2025-04-30
    WITH relics AS
    (select BLOCK_ID, BLOCK_TIMESTAMP, TX_HASH, SIGNER_ID, LOGS
    from near.core.fact_actions_events_function_call
    where RECEIVER_ID = 'aa-harvest-moon-relics.near'
    AND block_timestamp::date >= '2024-06-06'
    AND signer_id = '{{Your_wallet_address}}'
    AND method_name = 'ft_on_transfer'
    AND RECEIPT_SUCCEEDED = 'true')
    ,

    last_sale_prices AS (
    SELECT
    value[0] as "Relic Type",
    value[1]::date as date,
    value[2] as "Sold Price"
    FROM (
    SELECT
    livequery.live.udf_api(
    'https://flipsidecrypto.xyz/api/queries/60153da9-252d-4bb7-b64a-ed0de56e4b58/latest-run'
    ) as response
    ), lateral FLATTEN (input => response:data:result:rows)
    ),

    near_to_usd AS (
    SELECT
    value[0] as "NEAR in USD",
    FROM (
    SELECT
    livequery.live.udf_api(
    'https://flipsidecrypto.xyz/api/queries/19059b7b-5a0e-4428-b051-848deb8d7f81/latest-run'
    ) as response
    ), lateral FLATTEN (input => response:data:result:rows)
    ),

    gear_to_usd AS (
    SELECT
    Last run: about 1 month agoAuto-refreshes every 24 hours
    Spent $GEAR
    GEAR to USD
    Unrealized P/L $NEAR
    NEAR to USD
    Unrealized P/L (USD)
    Unrealized P/L (USD) including relic sale fees
    1
    2800394.39249.35638.36243.97176.94
    1
    43B
    102s