greyswancount margin liquidations
    Updated 2024-04-24
    select
    DECODED_ACCOUNTS [5] :pubkey
    from
    solana.core.ez_events_decoded a
    where
    a.PROGRAM_ID = 'MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA'
    and a.succeeded = 'true'
    and a.BLOCK_TIMESTAMP >= current_date - 1
    and a.event_type = 'lendingAccountWithdraw'


    select
    BLOCK_TIMESTAMP,
    liquidator1,
    liquidator2,
    amount,
    close as price,
    close * amount as USD_value,
    symbol,
    tx_id
    from
    transfers
    left join solana.price.ez_token_prices_hourly on date_trunc('hour', block_timestamp) = RECORDED_HOUR
    and mint = TOKEN_ADDRESS
    where
    RECORDED_HOUR >= current_date - 30
    order by
    block_timestamp desc



    QueryRunArchived: QueryRun has been archived