Analytics & GraphQL API
The Analytics Layer is designed for builders who want to go beyond static metrics — it’s the gateway for advanced vault intelligence, real-time dashboards, and custom bots.
PLX’s GraphQL endpoint (https://api.plx.fi/graphql) exposes the same indexer powering the official PLX Terminal, with direct read access to vaults, rebalances, fees, and reward emissions.
Architecture
Powered by PostGraphile and custom resolvers.
Every vault state syncs via the Indexer Stream in under 500ms.
Data stored in ClickHouse for ultra-fast time-series queries.
Supports both read and streamed subscriptions for live dashboards.
Example Queries
Get all active vaults
query {
vaults {
symbol
tvl
leverage
apy
lastRebalance
}
}Query specific vault performance
query GetVaultStats {
vaultMetrics(symbol: "SOL5X") {
tvl
apy
rebalances24h
drift
}
}Query leaderboard positions
query {
leaderboard(limit: 5) {
address
totalRewards
rank
}
}Example Response
{
"data": {
"vaultMetrics": {
"tvl": 1829301.92,
"apy": 35.2,
"rebalances24h": 12,
"drift": 0.021
}
}
}This API is ideal for analytics dashboards, terminal clones, or bot overlays that visualize live exposure or rebalance data. You can even subscribe to continuous updates:
subscription VaultUpdates {
vaultRebalances {
symbol
newRatio
timestamp
}
}Last updated
