Pangolin Analytics Page and Graphql
Firstly all queries are in the following page
https://github.com/pangolindex/analytics/blob/master/src/apollo/queries.js
Global Charts
{
pangolinDayDatas(first: 1000, orderBy: date, orderDirection: asc) {
id
date
dailyVolumeUSD
dailyVolumeETH
totalLiquidityUSD
totalLiquidityETH
}
}
Transactions
{
transactions(first: 100, orderBy: timestamp, orderDirection: desc) {
mints(orderBy: timestamp, orderDirection: desc) {
transaction {
id
timestamp
}
pair {
token0 {
id
symbol
}
token1 {
id
symbol
}
}
to
liquidity
amount0
amount1
amountUSD
}
burns(orderBy: timestamp, orderDirection: desc) {
transaction {
id
timestamp
}
pair {
token0 {
id
symbol
}
token1 {
id
symbol
}
}
sender
liquidity
amount0
amount1
amountUSD
}
swaps(orderBy: timestamp, orderDirection: desc) {
transaction {
id
timestamp
}
pair {
token0 {
id
symbol
}
token1 {
id
symbol
}
}
amount0In
amount0Out
amount1In
amount1Out
amountUSD
to
}
}
}
Top Tokens (Volume)
{
tokens(first: 6 orderBy:tradeVolumeUSD, orderDirection:desc) {
name
tradeVolumeUSD
}
}
Note: We show these tokens in volume. There is no possibility to show in liquidity because liquidity is calculated in codes after the graphql process.
// `data` is the result from that subgraph query
const currentLiquidityUSD = data?.totalLiquidity * ethPrice * data?.derivedETH
Top Pairs
{
pairs(first: 5, orderBy: trackedReserveETH, orderDirection: desc) {
id
token0 {
id
symbol
name
}
token1 {
id
symbol
name
}
}
}
Transactions
{
mints(first: 20, orderBy: timestamp, orderDirection: desc) {
transaction {
id
timestamp
}
pair {
token0 {
id
symbol
}
token1 {
id
symbol
}
}
to
liquidity
amount0
amount1
amountUSD
}
burns(first: 20, orderBy: timestamp, orderDirection: desc) {
transaction {
id
timestamp
}
pair {
token0 {
id
symbol
}
token1 {
id
symbol
}
}
sender
liquidity
amount0
amount1
amountUSD
}
swaps(first: 30, orderBy: timestamp, orderDirection: desc) {
transaction {
id
timestamp
}
id
pair {
token0 {
id
symbol
}
token1 {
id
symbol
}
}
amount0In
amount0Out
amount1In
amount1Out
amountUSD
to
}
}
Transactions(24h)
{
pangolinDayDatas(orderBy:date,orderDirection:desc) {
date
txCount
}
}