πSample Dashboard
This page will help you understand and create a dashboard using the Top Ledger platform.
Introduction
Sample SQL Query
with cte_markets as (
select
pd.input_accounts.market,
pd.input_accounts.baseMint,
pd.input_accounts.quoteMint,
ts_base.symbol as baseMintName,
ts_quote.symbol as quoteMintName,
ts_quote.decimals
from phoenix.parsed pd
join token.solana_token ts_base on ts_base.address = pd.input_accounts.baseMint
join token.solana_token ts_quote on ts_quote.address = pd.input_accounts.quoteMint
where 1=1
and pd.instruction_type = 'InitializeMarket'
)
,
market_names as (
select
market,
baseMint,
quoteMint,
baseMintName || ' - ' || quoteMintName as marketName,
decimals
from cte_markets
)
select block_date,market, marketName, trades, sum(trades) over(order by block_date) as cum_trades
from
(
select block_date,market, marketName, count(distinct tx_id) as trades
from phoenix.parsed as p
cross join unnest(args.market_events) as market_event
join market_names as m on p.args.header_fields.header.market = m.market
where 1=1
and instruction_type = 'Log'
and market_event = 'FillSummary'
and p.args.header_fields.header.market = '{{market}}'
and market_event.fields.total_quote_lots_filled > 0
group by 1,2,3
) as a
order by 1 desc
Trades


Trade Volume and Fees

Market Analysis

Last updated